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
Recover the total number of viruses by name
public function getCountVirus() { return $this->getCount('VIRUSES', 'name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountVirusBy() {\n\t\treturn $this->getCountBy('VIRUSES', 'name');\n\t}", "public function getCountVirusId() {\n\t\treturn $this->getCount('VIRUSES', 'id');\n\t}", "public static function countOccurences($name)\n {\n $session = self::getSession();\n\n if (! isset($session->counts, $session->counts[$name])) {\n $session->counts[$name] = 1;\n } else {\n $session->counts[$name]++;\n }\n }", "public function countUsed()\n {\n }", "public function getReservedNameCount()\n {\n return $this->count(self::RESERVED_NAME);\n }", "function getNumberOfSpecies();", "function virustotalscan_info()\r\n{\r\n return array(\r\n\t\t\"name\"\t\t\t=> \"Virus Total Scanner\",\r\n\t\t\"description\"\t=> \"Scans new attachments and links by using VirusTotal.com's API.\",\r\n\t\t\"website\"\t\t=> \"http://mybb.ro\",\r\n\t\t\"author\"\t\t=> \"Surdeanu Mihai\",\r\n\t\t\"authorsite\"\t=> \"http://mybb.ro\",\r\n\t\t\"version\"\t\t=> \"1.1\",\r\n \"guid\" => \"1572096dc083bc7f00f2b4f5ae3837f7\",\r\n\t\t\"compatibility\"\t=> \"16*\"\r\n\t);\r\n}", "public function getAllViruses() {\n\t\treturn $this->selectAll('VIRUSES');\n\t}", "function spectra_address_count ()\n\t{\n\t\t$response = $GLOBALS[\"db\"][\"obj\"]->query (\"SELECT COUNT(*) AS `found` FROM `\".$GLOBALS[\"tables\"][\"ledger\"].\"` WHERE 1\");\n\t\t$result = $response->fetch_assoc ();\n\t\t\n\t\tif (!isset ($result[\"found\"]) || $result[\"found\"] == 0)\n\t\t{\n\t\t\treturn \"Unknown\";\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\treturn $result[\"found\"];\n\t\t}\n\t}", "public function findByNameCount(string $name): int\n {\n $exists = Kalyannaya::select('id')\n ->where('name', '=', $name)\n ->get()\n ->count();\n\n return $exists;\n }", "private function count()\n\t\t{\n\t\t\t$query = \"\tSELECT count(1) AS 'total'\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t`\".$this->tree_node.\"` `MTN`\n\t\t\t\t\t\tWHERE 1 = 1\n\t\t\t\t\t\t\tAND `MTN`.`application_release`\t= '\".$this->application_release.\"'\n\t\t\t\t\t\";\n\t\t\t$result = $this->link_mt->query($query);\n\n\t\t\t$row = $result->fetch_array(MYSQLI_ASSOC);\t\n\t\t\treturn $row['total'];\t\t\n\t\t}", "function count() ;", "public static function count();", "public function count() {\n $this->next();\n\n $names = [];\n while ($this->valid()) {\n $row_data = $this->current();\n $this->next();\n\n $names[] = $row_data['Name'];\n }\n $items = array_unique($names);\n $items = array_filter($items);\n\n return count($items);\n }", "public function countStored(): int;", "public function countNameservers(): int {}", "public function silverTrophyCount(): int\n {\n return $this->pluck('definedTrophies.silver');\n }", "function get_array_count( $name ){\n $settings = $this->get_settings();\n $name_len = mb_strlen($name);\n $cnt = 0;\n\n reset($settings);\n foreach( $settings as $key => $val ){\n if( substr($key, 0, $name_len) === $name ){\n ++$cnt;\n }\n }\n return $cnt;\n }", "public function count_inventory( $pBuffer = FALSE )\n\t{\n\t\ttry {\n\t\t\t$invsize = $this->steam_command(\n\t\t\t$this,\n\t\t\t\t\t\"get_size\",\n\t\t\tarray(),\n\t\t\t$pBuffer\n\t\t\t);\n\t\t} catch (steam_exception $e) { //this will happen on e.g. /home; function not allowed for this folder\n\t\t\t$invsize = sizeof($this->get_inventory());\n\t\t}\n\t\treturn $invsize;\n\t}", "function count(){}", "public function totalBuysQuantity(string $instrumentName): int\n {\n return 0;\n }", "public function holdingTankCount(){ return $this->APICall( 'holdingTankCount', \"Could not lookup web holding tank count\" ); }", "public function _count();", "function count_access($base_path, $name) {\r\n $filename = $base_path . DIRECTORY_SEPARATOR . \"stats.json\";\r\n $stats = json_decode(file_get_contents($filename), true);\r\n $stats[$name][mktime(0, 0, 0)] += 1;\r\n file_put_contents($filename, json_encode($stats, JSON_PRETTY_PRINT));\r\n}", "function countHit() {\n\n $this->saveField('hits', $this->data['Ringsite']['hits']+1, false);\n }", "public function goldTrophyCount(): int\n {\n return $this->pluck('definedTrophies.gold');\n }", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function getNumberGuests(): int {\n return count($this->getGuests());\n }", "function virustotalscan_scan(&$attacharray)\r\n{\r\n\tglobal $mybb, $db, $lang;\t\r\n // daca cheia nu este definita sau daca atasamentele nu sunt verificate atunci nu se intampla nimic\r\n if ($mybb->settings['virustotalscan_setting_attach_enable'] && !empty($mybb->settings['virustotalscan_setting_key']))\r\n {\r\n // in acest moment fisierul a fost deja incarcat pe server\r\n // se construieste URL-ul catre atasamentul incarcat pe server\r\n $file = \".\".substr($mybb->settings['uploadspath'], 1).\"/\".$attacharray['attachname'];\r\n $key = $mybb->settings['virustotalscan_setting_key'];\r\n $scan = virustotalscan_scan_file($file, $key);\r\n // se intoarce ID scanarii din string-ul primit ca rezultat\r\n $scan_id = explode('-', $scan['scan_id']);\r\n $scan_id = $scan_id[0];\r\n $retrieve = virustotalscan_get_report($scan_id, $key);\r\n if ($retrieve && $retrieve['result'] == 1) \r\n {\r\n \t\t$lang->load('virustotalscan');\r\n $total = count($retrieve['report'][1]);\r\n $count_array = array_count_values($retrieve['report'][1]);\r\n // se sorteaza vectorul dupa valori in ordine descrescatoare\r\n arsort($count_array);\r\n // acum se alege prima valoare nenula a cheii din vector\r\n $virus = \"-\";\r\n foreach ($count_array as $key => $val) {\r\n if ($key != \"\") {\r\n // prima valoare gasita e numele virusului ce va fi afisat pe forum\r\n $virus = $key;\r\n // dupa ce se gaseste se iese din structura repetitiva\r\n break;\r\n }\r\n // daca nu se cauta mai departe\r\n }\r\n $percent = \"<font color=\\\"#D71A1A\\\">\".intval($total - $count_array['']).\"</font>/\".$total.\" (\".number_format(floatval(floatval($total - $count_array[''])/floatval($total))*100, 2).\"%)\";\r\n // informatie folosita pentru log-uri\r\n $data = $lang->sprintf($lang->virustotalscan_data, $attacharray['attachname'], $virus, $percent);\r\n // ce se va afisa pe ecranul userului\r\n $size = virustotalscan_get_size($attacharray['filesize']);\r\n\t\t\t$error_data = $lang->sprintf($lang->virustotalscan_error_data, $attacharray['attachname'], $size, $retrieve['report'][0], $virus, $percent, addslashes($retrieve['permalink']));\r\n\t\t\t// se sterge fisierul de pe disc! Astfel el nu va putea ajunge in baza de date!\r\n\t\t\t@unlink($mybb->settings['uploadspath'].\"/\".$attacharray['attachname']);\r\n // se insereaza un log in sistem\r\n $insert_array = array(\r\n 'uid' => intval($mybb->user['uid']),\r\n 'username' => $db->escape_string($mybb->user['username']),\r\n 'date' => TIME_NOW,\r\n 'data' => $db->escape_string($data)\r\n );\r\n // se insereaza in baza de date\r\n $db->insert_query('virustotalscan_log', $insert_array);\r\n // se trimite email ?\r\n\t\t\tif (!empty($mybb->settings['virustotalscan_setting_email']) && virustotalscan_valid_email($mybb->settings['virustotalscan_setting_email'])) {\r\n my_mail($mybb->settings['virustotalscan_setting_email'], $lang->virustotalscan_email_subject, $lang->sprintf($lang->virustotalscan_email_message, htmlspecialchars_uni($mybb->user['username']), my_date($mybb->settings['timeformat'], TIME_NOW), $data), $mybb->settings['bbname'], '', '', false, 'html');\r\n\t\t\t}\t\r\n\t\t\t// in fine se afiseaza eroare si pe ecranul utilizatorului\r\n\t\t\terror($lang->sprintf($lang->virustotalscan_error_infected, nl2br($error_data)));\r\n }\r\n else {\r\n // nu s-a depistat niciun virus\r\n }\r\n } else {\r\n // daca nu e definita o cheie publica atunci nu se intampla nimic\r\n // daca pluginul nu e activ nu se intampla iar nimic\r\n }\r\n}", "public abstract function get_counts();", "public function totalCount();", "public function totalCount();", "function get_counts() {\n\t$artists = @file(\"/var/lib/musica/artists.count\");\n\t$albums = @file(\"/var/lib/musica/albums.count\");\n\t$songs = @file(\"/var/lib/musica/songs.count\");\n\t$counts = array(rtrim($artists[0]), rtrim($albums[0]), rtrim($songs[0]));\n\treturn $counts;\n}", "public function GetPatientsCount();", "function count_the_lines($name) {\n $file_name = $name;\n $number_of_lines = count(file($file_name));\n return $number_of_lines;\n}", "public function numberOfEquipmentFound()\n {\n return count($this->getLoanedEquipment());\n\n }", "public function getReleaseHeroesCount()\n {\n return $this->count(self::_RELEASE_HEROES);\n }", "abstract public function getHitCount() : string;", "public static function getStatCount($name, $formatted=false)\n\t{\n\t\tif (isset(MHTTPD::$stats[$name])) {\n\t\t\treturn $formatted ? MHTTPD::formatSize(MHTTPD::$stats[$name]) : MHTTPD::$stats[$name];\n\t\t}\n\t\treturn 0;\n\t}", "function count()\n {\n }", "function CountDevicesInRack($site) {\tglobal $devices, $racks;\n\n\t$rack = array();\n\t$max = 0;\n\t\n\tforeach($devices as $device_name => $installed_rack) {\n\t\tif ($racks[$installed_rack] == $site) {\n\t\t\tif (isset($rack[$installed_rack])) {\n\t\t\t\t$rack[$installed_rack]++;\n\t\t\t} \n\t\t\telse {\n\t\t\t\t$rack[$installed_rack]=1;\n\t\t\t}\n\t\t\tif ($rack[$installed_rack] > $max) {\n\t\t\t\t$max = $rack[$installed_rack];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $max;\n}", "abstract public function count();", "abstract public function count();", "abstract public function count();", "abstract public function count();", "public function getFileData( $name ) {\n\t\t$expire\t\t= $this->config->get( $name . '_expire' );\n\t\t$filename\t= DIR_LOGS . 'counter.txt';\n\t\t$ret\t\t= array();\n\n\t\t// do some checks\n\t\tif( !$expire ) {\n\t\t\t$expire = '600';\n\t\t}\n\n\t\tif( !file_exists( $filename ) ) {\n\t\t\tfopen( $filename, 'wb' );\n\t\t\tchmod( $filename, 0644 );\n\t\t}\n\n\t\t$ignore\t\t\t= false;\n\t\t$current_agent\t= ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? addslashes( trim( $_SERVER['HTTP_USER_AGENT'] ) ) : 'no agent';\n\t\t$current_time\t= time();\n\t\t$current_ip\t\t= $_SERVER['REMOTE_ADDR'];\n\n\t\t// read file\n\t\t$fileData\t\t= array();\n\t\t$handle\t\t\t= fopen( $filename, 'rb' );\n\n\t\tif( $handle ) {\n\t\t\twhile( !feof( $handle ) ) {\n\t\t\t\t$line = trim( fgets( $handle, 4096 ) );\n\t\t\t\tif( $line != '' ) {\n\t\t\t\t\t$fileData[] = $line;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfclose( $handle );\n\t\t}else{\n\t\t\t$ignore = true;\n\t\t}\n\n\t\t// get amount of entries\n\t\t$count = count( $fileData );\n\n\t\t// ignore bots\n\t\tif( substr_count( $current_agent, 'bot' ) > 0 ) {\n\t\t\t$ignore = true;\n\t\t}\n\n\t\t// if this ip is already recorded during the last session (see $expire) ignore\n\t\tfor( $i = 1; $i < $count; ++$i ) {\n\t\t\tlist( $counter_ip, $counter_time ) = explode( '#', $fileData[$i] );\n\t\t\t$counter_time = trim( $counter_time );\n\n\t\t\tif( $counter_ip == $current_ip && $current_time - $expire < $counter_time ) {\n\t\t\t\t// visitor already counted, break\n\t\t\t\t$ignore = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// increase counter\n\t\tif( $ignore == false ) {\n\t\t\tif( $count == 0 ) {\n\t\t\t\t// counter is empty, fill with data\n\t\t\t\t$data = date( 'z' ) . ':1#' . date( 'W') . ':1#' . date( 'n') . ':1#' . date( 'Y') . ':1#1#1#' . $current_time . \"\\n\"\n\t\t\t\t. $current_ip . '#' . $current_time . \"\\n\"\n\t\t\t\t;\n\n\t\t\t\t// write data\n\t\t\t\t$fp = fopen( $filename, 'wb+' );\n\t\t\t\tif( $fp ) {\n\t\t\t\t\tflock( $fp, LOCK_EX );\n\t\t\t\t\tfwrite( $fp, $data );\n\t\t\t\t\tflock( $fp, LOCK_UN );\n\t\t\t\t\tfclose( $fp );\n\t\t\t\t}\n\n\t\t\t\t// contruct data\n\t\t\t\t$day\t\t\t= $week = $month = $year = $all = $record = 1;\n\t\t\t\t$record_time\t= $current_time;\n\t\t\t\t$online\t\t= 1;\n\t\t\t}else{\n\t\t\t\t// increase counter\n\t\t\t\tlist( $day_arr, $week_arr, $month_arr, $year_arr, $all, $record, $record_time ) = explode( '#', $fileData[0] );\n\n\t\t\t\t// day\n\t\t\t\t$day = $this->_getValue( $day_arr, 1 );\n\t\t\t\tif( $this->_getValue( $day_arr, 0 ) == date( 'z' ) ) {\n\t\t\t\t\t++$day;\n\t\t\t\t}else{\n\t\t\t\t\t$day = 1;\n\t\t\t\t}\n\n\t\t\t\t// week\n\t\t\t\t$week = $this->_getValue( $week_arr, 1 );\n\t\t\t\tif( $this->_getValue( $week_arr, 0 ) == date( 'W' ) ) {\n\t\t\t\t\t++$week;\n\t\t\t\t}else{\n\t\t\t\t\t$week = 1;\n\t\t\t\t}\n\n\t\t\t\t// month\n\t\t\t\t$month = $this->_getValue( $month_arr,1 );\n\t\t\t\tif( $this->_getValue( $month_arr, 0 ) == date( 'n') ) {\n\t\t\t\t\t++$month;\n\t\t\t\t}else{\n\t\t\t\t\t$month = 1;\n\t\t\t\t}\n\n\t\t\t\t// year\n\t\t\t\t$year = $this->_getValue( $year_arr, 1 );\n\t\t\t\tif( $this->_getValue( $year_arr, 0 ) == date( 'Y' ) ) {\n\t\t\t\t\t++$year;\n\t\t\t\t}else{\n\t\t\t\t\t$year = 1;\n\t\t\t\t}\n\n\t\t\t\t// all\n\t\t\t\t++$all;\n\n\t\t\t\t// new record\n\t\t\t\t$record_time = trim( $record_time );\n\t\t\t\tif( $day > $record ) {\n\t\t\t\t\t$record\t\t\t= $day;\n\t\t\t\t\t$record_time\t= $current_time;\n\t\t\t\t}\n\n\t\t\t\t// write data and check how many online\n\t\t\t\t$online = 1;\n\t\t\t\tchmod( $filename, 0755 );\n\t\t\t\t$fp = fopen( $filename, 'wb+' );\n\n\t\t\t\tif( $fp ) {\n\t\t\t\t\tflock( $fp, LOCK_EX );\n\t\t\t\t\t$data = date( 'z' ) .':'\n\t\t\t\t\t. $day .'#'. date( 'W' ) .':'\n\t\t\t\t\t. $week .'#' . date( 'n' ) .':'\n\t\t\t\t\t. $month .'#' . date( 'Y' ) .':'\n\t\t\t\t\t. $year .'#'. $all . '#'\n\t\t\t\t\t. $record . '#'\n\t\t\t\t\t. $record_time . \"\\n\"\n\t\t\t\t\t;\n\t\t\t\t\tfwrite( $fp, $data );\n\n\t\t\t\t\tfor( $i = 1; $i < $count; ++$i ) {\n\t\t\t\t\t\tlist( $counter_ip, $counter_time ) = explode( '#', $fileData[$i] );\n\n\t\t\t\t\t\t// save if time is newer\n\t\t\t\t\t\tif( $current_time - $expire < $counter_time ) {\n\t\t\t\t\t\t\t$counter_time\t= trim( $counter_time );\n\t\t\t\t\t\t\t$data\t\t\t= $counter_ip . '#' . $counter_time . \"\\n\";\n\t\t\t\t\t\t\tfwrite( $fp, $data );\n\t\t\t\t\t\t\t++$online;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$data = $current_ip . '#' . $current_time . \"\\n\";\n\t\t\t\t\tfwrite( $fp, $data );\n\t\t\t\t\tflock( $fp, LOCK_UN );\n\t\t\t\t\tfclose( $fp );\n\t\t\t\t\tchmod( $filename, 0644 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$ret['day']\t\t= $day;\n\t\t\t$ret['week']\t= number_format( $week, 0, '.', '.' );\n\t\t\t$ret['month']\t= number_format( $month, 0, '.', '.' );\n\t\t\t$ret['year']\t= number_format( $year, 0, '.', '.' );\n\t\t\t$ret['online']\t= $online;\n\t\t\t$ret['all']\t\t= number_format( $all, 0, '.', '.' );\n\t\t}else{\n\t\t\t// read data for output\n\t\t\tif( $count > 0 ) {\n\t\t\t \tlist( $day_arr, $week_arr, $month_arr, $year_arr, $all, $record, $record_time) = explode( '#', $fileData[0] );\n\t\t\t}else{\n\t\t\t\tlist( $day_arr, $week_arr, $month_arr, $year_arr, $all, $record, $record_time ) = explode( '#', date( 'z') .':1#'. date( 'W' ) .':1#'. date( 'n') .':1#' . date( 'Y' ) .':1#1#1#'. $current_time );\n\t\t\t}\n\n\t\t\t$ret['day']\t\t= $this->_getValue( $day_arr );\n\t\t\t$ret['week']\t= number_format( $this->_getValue( $week_arr ), 0, '.', '.' );\n\t\t\t$ret['month']\t= number_format( $this->_getValue( $month_arr ), 0, '.', '.' );\n\t\t\t$ret['year']\t= number_format( $this->_getValue( $year_arr ), 0, '.', '.' );\n\t\t\t$ret['online']\t= $count - 1;\n\t\t\t$ret['all']\t\t= number_format( $all, 0, '.', '.' );\n\t\t}\n\n\t\treturn $ret;\n\t}", "function counterHits(){\n\tglobal $pth; include($pth['app']['globals']);\n\t$count \t\t= '';\n\t$counterHits= $pth['site']['counterHits'];\n\tclearstatcache();\n\tif(!is_file($counterHits)){ $handle\t= fopen($counterHits,'w'); fwrite($handle,'0'); fclose($handle); }\n\t// get current Hits + count\n\t$count\t= file_get_contents($counterHits);\n\tif(!$adm){\n\t\t$count = $count+1;\n\t\t// save Hits\n\t\t$files = fopen($counterHits,'w'); \n\t\tfwrite($files,$count);\n\t\tfclose($files);\n\t}\n\t\n\treturn '<p><strong>'.$count.'</strong> '.$txt['counterHits']['views'].'.</p>';\n}", "public function countGame() {\r\n\t\t$sql = new Sql();\r\n\t\t$result = $sql->Select(\"SELECT COUNT(*) as count FROM jogo\");\r\n\t\tif(count($result) > 0) {\r\n\t\t\t\r\n\t\t\t$count = ($result[0]['count']) / 16;\r\n\t\t\treturn ceil($count);\r\n\t\t}\r\n\t}", "function count();", "function getUserCount(){\n try{\n $api = $this->routerosapi;\n $user = $this->devices->getUserRouter(array('id' => '1111'));\n $api->port = $user['port'];\n if($api->connect(\"10.10.10.1\",$user['username'],$user['password'])){\n $api->write('/ip/hotspot/host/print');\n $read = $api->read();\n $api->disconnect(); \n return count($read); \n }\n }catch(Exeption $error){\n return $error;\n }\n }", "public function searchCount(string $searchText): int;", "public function getLootCount()\n {\n return $this->count(self::_LOOT);\n }", "public function getNewHeroesCount()\n {\n return $this->count(self::_NEW_HEROES);\n }", "public function getTotalNumberOfResults();", "function panier_get_count() {\n global $panier;\n $resultat = 0;\n foreach ($panier as $item) {\n $resultat+= $item[PS_PANIER_ITEM_QTY];\n }\n return $resultat;\n}", "public function ultralinkCount(){ return $this->APICall( 'ultralinkCount', \"Could not retrieve the Ultralink count\" ); }", "public function getTotalVoterCount(): int\n {\n return $this->totalVoterCount;\n }", "function getTotalnventory($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud -> sql(\"select *, COUNT(mortality_status) from pigs_tbl where mortality_status='alive' \");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['COUNT(mortality_status)'];\n\t}\n\n\t$crud->disconnect();\n}", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public abstract function count();", "public abstract function count();", "public function getHashCount() {}", "public function getHashCount() {}", "public function totalTrophyCount(): int\n {\n $count = $this->bronze() + $this->silver() + $this->gold();\n\n return $this->hasPlatinum() ? ++$count : $count;\n }" ]
[ "0.77930135", "0.6778709", "0.5804429", "0.5520062", "0.5477595", "0.5468212", "0.54637015", "0.54510194", "0.5384852", "0.5327596", "0.532125", "0.5303181", "0.52912396", "0.52766085", "0.52672887", "0.52452993", "0.52140504", "0.5207936", "0.52041584", "0.5203091", "0.5187349", "0.5150446", "0.5134661", "0.51337165", "0.5114645", "0.5100475", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.5099292", "0.50944376", "0.50944376", "0.50942737", "0.50942737", "0.50942737", "0.50942737", "0.50942737", "0.50942737", "0.50942737", "0.50942737", "0.50942737", "0.50942737", "0.50942737", "0.5084739", "0.50678134", "0.5064753", "0.5025383", "0.5025383", "0.5014683", "0.50142384", "0.5006356", "0.49955288", "0.49950653", "0.49892125", "0.49798858", "0.49590272", "0.49575248", "0.49552435", "0.49552435", "0.49552435", "0.49552435", "0.4954584", "0.49441", "0.49421418", "0.49415863", "0.49410158", "0.49291536", "0.49174348", "0.49138457", "0.49133405", "0.4912161", "0.49112767", "0.4910968", "0.49066794", "0.48971242", "0.48971242", "0.48971242", "0.48807314", "0.48807314", "0.48741654", "0.48741654", "0.48724118" ]
0.7909123
0
Retrieve the number of times each virus was detected
public function getCountVirusBy() { return $this->getCountBy('VIRUSES', 'name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountVirus() {\n\t\treturn $this->getCount('VIRUSES', 'name');\n\t}", "public function getCountVirusId() {\n\t\treturn $this->getCount('VIRUSES', 'id');\n\t}", "function getCount() {\n $this->putCount();\n //opens countlog.data to read the number of hits\n $datei = fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR .\"countlog.data\", \"r\");\n $count = fgets($datei, 1000);\n fclose($datei);\n return $count;\n }", "public function countGame() {\r\n\t\t$sql = new Sql();\r\n\t\t$result = $sql->Select(\"SELECT COUNT(*) as count FROM jogo\");\r\n\t\tif(count($result) > 0) {\r\n\t\t\t\r\n\t\t\t$count = ($result[0]['count']) / 16;\r\n\t\t\treturn ceil($count);\r\n\t\t}\r\n\t}", "function count() ;", "public static function count();", "function get_counts() {\n\t$artists = @file(\"/var/lib/musica/artists.count\");\n\t$albums = @file(\"/var/lib/musica/albums.count\");\n\t$songs = @file(\"/var/lib/musica/songs.count\");\n\t$counts = array(rtrim($artists[0]), rtrim($albums[0]), rtrim($songs[0]));\n\treturn $counts;\n}", "function virustotalscan_info()\r\n{\r\n return array(\r\n\t\t\"name\"\t\t\t=> \"Virus Total Scanner\",\r\n\t\t\"description\"\t=> \"Scans new attachments and links by using VirusTotal.com's API.\",\r\n\t\t\"website\"\t\t=> \"http://mybb.ro\",\r\n\t\t\"author\"\t\t=> \"Surdeanu Mihai\",\r\n\t\t\"authorsite\"\t=> \"http://mybb.ro\",\r\n\t\t\"version\"\t\t=> \"1.1\",\r\n \"guid\" => \"1572096dc083bc7f00f2b4f5ae3837f7\",\r\n\t\t\"compatibility\"\t=> \"16*\"\r\n\t);\r\n}", "function getUserCount(){\n try{\n $api = $this->routerosapi;\n $user = $this->devices->getUserRouter(array('id' => '1111'));\n $api->port = $user['port'];\n if($api->connect(\"10.10.10.1\",$user['username'],$user['password'])){\n $api->write('/ip/hotspot/host/print');\n $read = $api->read();\n $api->disconnect(); \n return count($read); \n }\n }catch(Exeption $error){\n return $error;\n }\n }", "public function iN_TotalVerificationRequests() {\n\t\t$q = mysqli_query($this->db, \"SELECT COUNT(*) AS verificationCount FROM i_verification_requests WHERE request_status = '0'\") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($q, MYSQLI_ASSOC);\n\t\tif ($row) {\n\t\t\treturn isset($row['verificationCount']) ? $row['verificationCount'] : '0';\n\t\t} else {return 0;}\n\t}", "public function count()\n {\n return $this->backgroundCheck\n ->count();\n }", "public function ultralinkCount(){ return $this->APICall( 'ultralinkCount', \"Could not retrieve the Ultralink count\" ); }", "function counterHits(){\n\tglobal $pth; include($pth['app']['globals']);\n\t$count \t\t= '';\n\t$counterHits= $pth['site']['counterHits'];\n\tclearstatcache();\n\tif(!is_file($counterHits)){ $handle\t= fopen($counterHits,'w'); fwrite($handle,'0'); fclose($handle); }\n\t// get current Hits + count\n\t$count\t= file_get_contents($counterHits);\n\tif(!$adm){\n\t\t$count = $count+1;\n\t\t// save Hits\n\t\t$files = fopen($counterHits,'w'); \n\t\tfwrite($files,$count);\n\t\tfclose($files);\n\t}\n\t\n\treturn '<p><strong>'.$count.'</strong> '.$txt['counterHits']['views'].'.</p>';\n}", "function count(){}", "public function countMatches() : int\n {\n return sizeof($this->getMatches());\n }", "private function count()\n\t\t{\n\t\t\t$query = \"\tSELECT count(1) AS 'total'\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t`\".$this->tree_node.\"` `MTN`\n\t\t\t\t\t\tWHERE 1 = 1\n\t\t\t\t\t\t\tAND `MTN`.`application_release`\t= '\".$this->application_release.\"'\n\t\t\t\t\t\";\n\t\t\t$result = $this->link_mt->query($query);\n\n\t\t\t$row = $result->fetch_array(MYSQLI_ASSOC);\t\n\t\t\treturn $row['total'];\t\t\n\t\t}", "function count();", "public static function getMonitorCount() : int {}", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "function count_site_visit($from_admin_overview=false) {\r\n\tif (file_exists(COUNTER_FILE)) {\r\n\t\t$ignore = false;\r\n\t\t$current_agent = (isset($_SERVER['HTTP_USER_AGENT'])) ? addslashes(trim($_SERVER['HTTP_USER_AGENT'])) : \"no agent\";\r\n\t\t$current_time = time();\r\n\t\t$current_ip = $_SERVER['REMOTE_ADDR']; \r\n\t \r\n\t\t// daten einlesen\r\n\t\t$c_file = array();\r\n\t\t$handle = fopen(COUNTER_FILE, \"r\");\r\n\t \r\n\t \tif ($handle) {\r\n\t\t\twhile (!feof($handle)) {\r\n\t\t\t\t$line = trim(fgets($handle, 4096)); \r\n\t\t\t\tif ($line != \"\") {\r\n\t\t\t\t\t$c_file[] = $line;\r\n\t\t\t\t}\t\t \r\n\t\t\t}\r\n\t\t\tfclose ($handle);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$ignore = true;\r\n\t\t}\r\n\t \r\n\t\t// bots ignorieren \r\n\t\tif (substr_count($current_agent, \"bot\") > 0) {\r\n\t\t\t$ignore = true;\r\n\t\t}\r\n\t\t \r\n\t \r\n\t\t// hat diese ip einen eintrag in den letzten expire sec gehabt, dann igornieren?\r\n\t\tfor ($i = 1; $i < sizeof($c_file); $i++) {\r\n\t\t\tlist($counter_ip, $counter_time) = explode(\"||\", $c_file[$i]);\r\n\t\t\t$counter_time = trim($counter_time);\r\n\t\t \r\n\t\t\tif ($counter_ip == $current_ip && $current_time-COUNTER_IP_EXPIRE < $counter_time) {\r\n\t\t\t\t// besucher wurde bereits gezählt, daher hier abbruch\r\n\t\t\t\t$ignore = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n\t\t// counter hochzählen\r\n\t\tif (!$ignore) {\r\n\t\t\tif (sizeof($c_file) == 0) {\r\n\t\t\t\t// wenn counter leer, dann füllen \r\n\t\t\t\t$add_line1 = date(\"z\") . \":1||\" . date(\"W\") . \":1||\" . date(\"n\") . \":1||\" . date(\"Y\") . \":1||1||1||\" . $current_time . \"\\n\";\r\n\t\t\t\t$add_line2 = $current_ip . \"||\" . $current_time . \"\\n\";\r\n\t\t\t \r\n\t\t\t\t// daten schreiben\r\n\t\t\t\t$fp = fopen(COUNTER_FILE,\"w+\");\r\n\t\t\t\tif ($fp) {\r\n\t\t\t\t\tflock($fp, LOCK_EX);\r\n\t\t\t\t\tfwrite($fp, $add_line1);\r\n\t\t\t\t\tfwrite($fp, $add_line2);\r\n\t\t\t\t\tflock($fp, LOCK_UN);\r\n\t\t\t\t\tfclose($fp);\r\n\t\t\t\t}\r\n\t\t\t \r\n\t\t\t\t// werte zur verfügung stellen\r\n\t\t\t\t$day = $week = $month = $year = $all = $record = 1;\r\n\t\t\t\t$record_time = $current_time;\r\n\t\t\t\t$online = 1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// counter hochzählen\r\n\t\t\t\tlist($day_arr, $week_arr, $month_arr, $year_arr, $all, $record, $record_time) = explode(\"||\", $c_file[0]);\r\n\t\t\t \r\n\t\t\t\t// day\r\n\t\t\t\t$day_data = explode(\":\", $day_arr);\r\n\t\t\t\t$day = $day_data[1];\r\n\t\t\t\tif ($day_data[0] == date(\"z\")) $day++; else $day = 1;\r\n\t\t\t \r\n\t\t\t\t// week\r\n\t\t\t\t$week_data = explode(\":\", $week_arr);\r\n\t\t\t\t$week = $week_data[1];\r\n\t\t\t\tif ($week_data[0] == date(\"W\")) $week++; else $week = 1;\r\n\t\t\t \r\n\t\t\t\t// month\r\n\t\t\t\t$month_data = explode(\":\", $month_arr);\r\n\t\t\t\t$month = $month_data[1];\r\n\t\t\t\tif ($month_data[0] == date(\"n\")) $month++; else $month = 1;\r\n\t\t\t \r\n\t\t\t\t// year\r\n\t\t\t\t$year_data = explode(\":\", $year_arr);\r\n\t\t\t\t$year = $year_data[1];\r\n\t\t\t\tif ($year_data[0] == date(\"Y\")) $year++; else $year = 1;\r\n\t\t\t \r\n\t\t\t\t// all\r\n\t\t\t\t$all++;\r\n\t\t\t \r\n\t\t\t\t// neuer record?\r\n\t\t\t\t$record_time = trim($record_time);\r\n\t\t\t\tif ($day > $record) {\r\n\t\t\t\t\t$record = $day;\r\n\t\t\t\t\t$record_time = $current_time;\r\n\t\t\t\t}\r\n\t\t\t \r\n\t\t\t\t// speichern und aufräumen und anzahl der online leute bestimmten\r\n\t\t\t \r\n\t\t\t\t$online = 1;\r\n\t\t\t \t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// daten schreiben\r\n\t\t\t\t$fp = fopen(COUNTER_FILE,\"w+\");\r\n\t\t\t\tif ($fp) {\r\n\t\t\t\t\tflock($fp, LOCK_EX);\r\n\t\t\t\t\t$add_line1 = date(\"z\") . \":\" . $day . \"||\" . date(\"W\") . \":\" . $week . \"||\" . date(\"n\") . \":\" . $month . \"||\" . date(\"Y\") . \":\" . $year . \"||\" . $all . \"||\" . $record . \"||\" . $record_time . \"\\n\";\t\t \r\n\t\t\t\t\tfwrite($fp, $add_line1);\r\n\r\n\t\t\t\t\tfor ($i = 1; $i < sizeof($c_file); $i++) {\r\n\t\t\t\t\t\tlist($counter_ip, $counter_time) = explode(\"||\", $c_file[$i]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// übernehmen\r\n\t\t\t\t\t\tif ($current_time-COUNTER_IP_EXPIRE < $counter_time) {\r\n\t\t\t\t\t\t\t$counter_time = trim($counter_time);\r\n\t\t\t\t\t\t\t$add_line = $counter_ip . \"||\" . $counter_time . \"\\n\";\r\n\t\t\t\t\t\t\tfwrite($fp, $add_line);\r\n\t\t\t\t\t\t\t$online++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$add_line = $current_ip . \"||\" . $current_time . \"\\n\";\r\n\t\t\t\t\tfwrite($fp, $add_line);\r\n\t\t\t\t\tflock($fp, LOCK_UN);\r\n\t\t\t\t\tfclose($fp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "public function getAttackCount()\n {\n return $this->count(self::ATTACK);\n }", "public function count()\n {\n return $this->timesRepeat * count($this->test);\n }", "public function _count();", "public function count()\n {\n return $this->client->count($this->compile())['count'];\n }", "public abstract function get_counts();", "public function getAllViruses() {\n\t\treturn $this->selectAll('VIRUSES');\n\t}", "public function GetPatientsCount();", "public function get_scan_steps() {\r\n\t\treturn count( $this->get_scan_urls() );\r\n\t}", "public function getCounter();", "public function receivedCount();", "public function getNumber_hits()\n {\n return $this->number_hits;\n }", "public function getScenarioStatCounts();", "public function getResCount()\n {\n return $this->count(self::RES);\n }", "public function getCount() {\n $result = array();\n\n $result['normal'] = (int)$this->db->count('SELECT COUNT(DISTINCT mapname) FROM playertimes WHERE mapname NOT IN ('.$this->ignored.') AND mapname NOT LIKE \"prokz%\" AND mapname NOT LIKE \"kzpro%\"');\n $result['prokz'] = (int)$this->db->count('SELECT COUNT(DISTINCT mapname) FROM playertimes WHERE mapname NOT IN ('.$this->ignored.') AND (mapname LIKE \"prokz%\" OR mapname LIKE \"kzpro%\")');\n\n return $result;\n }", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function signCount(): int\n {\n return $this->signCount;\n }", "function count()\n {\n return $this->_matchesNum;\n }", "abstract public function getHitCount() : string;", "function spectra_address_count ()\n\t{\n\t\t$response = $GLOBALS[\"db\"][\"obj\"]->query (\"SELECT COUNT(*) AS `found` FROM `\".$GLOBALS[\"tables\"][\"ledger\"].\"` WHERE 1\");\n\t\t$result = $response->fetch_assoc ();\n\t\t\n\t\tif (!isset ($result[\"found\"]) || $result[\"found\"] == 0)\n\t\t{\n\t\t\treturn \"Unknown\";\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\treturn $result[\"found\"];\n\t\t}\n\t}", "public function countStored(): int;", "function countHit() {\n\n $this->saveField('hits', $this->data['Ringsite']['hits']+1, false);\n }", "function GetNumberOfMatchesMS()\n {\n return sizeof($this->more_skin_matches);\n }", "public function count() {\n\t\treturn $this->length();\n\t}", "function get_count() {\n\t\t$count=0;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"select count(pr_id) as num from \".$this->_db_table);\n\t\tif (!$rs) {\n\t\t\tprint $db->ErrorMsg();\n\t\t} else {\n\t\t\t$count = $rs->fields[\"num\"];\n\t\t}\n\t\treturn $count;\n\t}", "function virustotalscan_scan(&$attacharray)\r\n{\r\n\tglobal $mybb, $db, $lang;\t\r\n // daca cheia nu este definita sau daca atasamentele nu sunt verificate atunci nu se intampla nimic\r\n if ($mybb->settings['virustotalscan_setting_attach_enable'] && !empty($mybb->settings['virustotalscan_setting_key']))\r\n {\r\n // in acest moment fisierul a fost deja incarcat pe server\r\n // se construieste URL-ul catre atasamentul incarcat pe server\r\n $file = \".\".substr($mybb->settings['uploadspath'], 1).\"/\".$attacharray['attachname'];\r\n $key = $mybb->settings['virustotalscan_setting_key'];\r\n $scan = virustotalscan_scan_file($file, $key);\r\n // se intoarce ID scanarii din string-ul primit ca rezultat\r\n $scan_id = explode('-', $scan['scan_id']);\r\n $scan_id = $scan_id[0];\r\n $retrieve = virustotalscan_get_report($scan_id, $key);\r\n if ($retrieve && $retrieve['result'] == 1) \r\n {\r\n \t\t$lang->load('virustotalscan');\r\n $total = count($retrieve['report'][1]);\r\n $count_array = array_count_values($retrieve['report'][1]);\r\n // se sorteaza vectorul dupa valori in ordine descrescatoare\r\n arsort($count_array);\r\n // acum se alege prima valoare nenula a cheii din vector\r\n $virus = \"-\";\r\n foreach ($count_array as $key => $val) {\r\n if ($key != \"\") {\r\n // prima valoare gasita e numele virusului ce va fi afisat pe forum\r\n $virus = $key;\r\n // dupa ce se gaseste se iese din structura repetitiva\r\n break;\r\n }\r\n // daca nu se cauta mai departe\r\n }\r\n $percent = \"<font color=\\\"#D71A1A\\\">\".intval($total - $count_array['']).\"</font>/\".$total.\" (\".number_format(floatval(floatval($total - $count_array[''])/floatval($total))*100, 2).\"%)\";\r\n // informatie folosita pentru log-uri\r\n $data = $lang->sprintf($lang->virustotalscan_data, $attacharray['attachname'], $virus, $percent);\r\n // ce se va afisa pe ecranul userului\r\n $size = virustotalscan_get_size($attacharray['filesize']);\r\n\t\t\t$error_data = $lang->sprintf($lang->virustotalscan_error_data, $attacharray['attachname'], $size, $retrieve['report'][0], $virus, $percent, addslashes($retrieve['permalink']));\r\n\t\t\t// se sterge fisierul de pe disc! Astfel el nu va putea ajunge in baza de date!\r\n\t\t\t@unlink($mybb->settings['uploadspath'].\"/\".$attacharray['attachname']);\r\n // se insereaza un log in sistem\r\n $insert_array = array(\r\n 'uid' => intval($mybb->user['uid']),\r\n 'username' => $db->escape_string($mybb->user['username']),\r\n 'date' => TIME_NOW,\r\n 'data' => $db->escape_string($data)\r\n );\r\n // se insereaza in baza de date\r\n $db->insert_query('virustotalscan_log', $insert_array);\r\n // se trimite email ?\r\n\t\t\tif (!empty($mybb->settings['virustotalscan_setting_email']) && virustotalscan_valid_email($mybb->settings['virustotalscan_setting_email'])) {\r\n my_mail($mybb->settings['virustotalscan_setting_email'], $lang->virustotalscan_email_subject, $lang->sprintf($lang->virustotalscan_email_message, htmlspecialchars_uni($mybb->user['username']), my_date($mybb->settings['timeformat'], TIME_NOW), $data), $mybb->settings['bbname'], '', '', false, 'html');\r\n\t\t\t}\t\r\n\t\t\t// in fine se afiseaza eroare si pe ecranul utilizatorului\r\n\t\t\terror($lang->sprintf($lang->virustotalscan_error_infected, nl2br($error_data)));\r\n }\r\n else {\r\n // nu s-a depistat niciun virus\r\n }\r\n } else {\r\n // daca nu e definita o cheie publica atunci nu se intampla nimic\r\n // daca pluginul nu e activ nu se intampla iar nimic\r\n }\r\n}", "public function count()\n {\n return count($this->tokens);\n }", "private function checkForNumberOfHits()\n {\n // Get number of hits per page\n $hits = $this->app->request->getGet(\"hits\", 4);\n\n if (!(is_numeric($hits) && $hits > 0 && $hits <= 8)) {\n $hits = 4;\n }\n return $hits;\n }", "public static function counter() {}", "public function count() {\n\t\t\treturn (int)$this->count;\n\t\t}", "function GetPhotoUploadCount(){\r\n\t$directory = \"./images/\";\r\n\t$filecount = 0;\r\n\t$files = glob($directory . \"4mw*.jpg\");\r\n\tif ($files){\r\n \t\t$filecount = count($files);\r\n\t}\r\n\techo $filecount;\r\n}", "public function getFrameCount() {}", "public function getFrameCount() {}", "public function getReleaseHeroesCount()\n {\n return $this->count(self::_RELEASE_HEROES);\n }", "public function countUsed()\n {\n }", "function count()\n {\n }", "public function count()\n {\n return $this->length();\n }", "function CountDevicesInRack($site) {\tglobal $devices, $racks;\n\n\t$rack = array();\n\t$max = 0;\n\t\n\tforeach($devices as $device_name => $installed_rack) {\n\t\tif ($racks[$installed_rack] == $site) {\n\t\t\tif (isset($rack[$installed_rack])) {\n\t\t\t\t$rack[$installed_rack]++;\n\t\t\t} \n\t\t\telse {\n\t\t\t\t$rack[$installed_rack]=1;\n\t\t\t}\n\t\t\tif ($rack[$installed_rack] > $max) {\n\t\t\t\t$max = $rack[$installed_rack];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $max;\n}", "public function countTemporyImages(){\n $count = $this->_tableGw->select()->count();\n return $count;\n }", "public function getTotalVoterCount(): int\n {\n return $this->totalVoterCount;\n }", "public function silverTrophyCount(): int\n {\n return $this->pluck('definedTrophies.silver');\n }", "public function getUnprocSpecNoImage(){\n\t\t$cnt = 0;\n\t\tif($this->collid){\n\t\t\t$sql = 'SELECT count(o.occid) AS cnt '.\n\t\t\t\t'FROM omoccurrences o LEFT JOIN images i ON o.occid = i.occid '.\n\t\t\t\t'WHERE (o.collid = '.$this->collid.') AND (i.imgid IS NULL) AND (o.processingstatus = \"unprocessed\") ';\n\t\t\t$rs = $this->conn->query($sql);\n\t\t\twhile($r = $rs->fetch_object()){\n\t\t\t\t$cnt = $r->cnt;\n\t\t\t}\n\t\t\t$rs->free();\n\t\t}\n\t\treturn $cnt;\n\t}", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;", "public function count(): int;" ]
[ "0.78493", "0.73544276", "0.6004679", "0.5939721", "0.59321404", "0.5896587", "0.58024746", "0.5744334", "0.57226354", "0.5705141", "0.56638485", "0.5610544", "0.56093466", "0.55940825", "0.55922985", "0.55792344", "0.5572401", "0.5563391", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55546135", "0.55498236", "0.5547113", "0.5543776", "0.55436695", "0.5533008", "0.5529448", "0.55107", "0.54885554", "0.54884696", "0.5477152", "0.54732424", "0.5473239", "0.54723716", "0.54671896", "0.5460861", "0.54603493", "0.54603493", "0.5459642", "0.5459642", "0.5459642", "0.5459642", "0.5459642", "0.5459642", "0.5459642", "0.5459642", "0.5459642", "0.5459642", "0.5459642", "0.54510707", "0.544163", "0.54382634", "0.54265237", "0.5419882", "0.5416", "0.54095197", "0.53987855", "0.5397085", "0.5393734", "0.5387505", "0.5379676", "0.53785115", "0.536655", "0.53622514", "0.5360981", "0.5360981", "0.5359752", "0.5355011", "0.53496516", "0.5349228", "0.5347825", "0.5347005", "0.5340436", "0.5337374", "0.53274995", "0.5324767", "0.5324767", "0.5324767", "0.5324767", "0.5324767", "0.5324767" ]
0.75359917
1
Recover the total number of viruses by id
public function getCountVirusId() { return $this->getCount('VIRUSES', 'id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTotalnventory($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud -> sql(\"select *, COUNT(mortality_status) from pigs_tbl where mortality_status='alive' \");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['COUNT(mortality_status)'];\n\t}\n\n\t$crud->disconnect();\n}", "public function getCountVirusBy() {\n\t\treturn $this->getCountBy('VIRUSES', 'name');\n\t}", "function getTotalVoucher($id){\n\t\t$t=0;\n\t\t$a = Voucher::all();\n\t\tforeach($a as $n){\n\t\t$dur= $a->amount;\n\t\t\n\t\t$r=$dur;\n\t\t$t = $t + $r;\n\t\t}\n\t\treturn $t;\n\t\t}", "function getCountOfTransferedNativePig($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud -> sql(\"SELECT *, COUNT(farmer_id_fk) FROM pigs_tbl WHERE farmer_id_fk='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['COUNT(farmer_id_fk)'];\n\t}\n\t$crud->disconnect();\n}", "public function dohvBrojSmestajaOglasavaca($id){\n return count($this->where('idVlasnik',$id)->findAll());\n }", "public function getCountVirus() {\n\t\treturn $this->getCount('VIRUSES', 'name');\n\t}", "public function countHoldings($icid) {\n $result = $this->connector->run(\"MATCH (c:Identity {id: '{$icid}'}) RETURN size((c)<-[:HIRELATION]-(:Resource)) as count\");\n $count = $result->getRecord()->get(\"count\");\n return $count;\n }", "function getSamplesCount($id){\n\t\n\t\t$query = 'SELECT count(*) AS SampleCount FROM samples As Sample \n\t\t\t\t LEFT JOIN minerals AS Mineral ON Sample.mineral_id=Mineral.id\n\t\t\t\t LEFT JOIN crystal_systems as CrystalSystem ON Mineral.crystal_system_id=CrystalSystem.id\n\t\t\t\t WHERE CrystalSystem.id = '.$id;\n\t\t\n\t\treturn $this->query($query);\n\t\n\t}", "static function adminGetVisitsCount($id)\r\n {\r\n if ($id)\r\n {\r\n $sql = \"SELECT COUNT(id) FROM metric_visits WHERE metric_id={$id} LIMIT 1\";\r\n $res = Yii::app()->db->createCommand($sql)->queryScalar();\r\n }\r\n return $res;\r\n }", "function consec_productobyID($id) {\n $sql = \"\n SELECT\n COUNT(idusuario)\n FROM vendedor\n WHERE idusuario=?;\";\n //$sql = $this->db->query($sql, array($id));\n \n //return $sql->simple_query(); //->total_cortes;\n }", "public function countVotes($id, $type)\n {\n \t$totalVotes = 0;\n\n $currentVotes = Vote::where('votable_id', '=', $id)->where('votable_type', $type)->get();\n \tforeach($currentVotes as $v)\n \t{\n \t\t$totalVotes += $v->vote;\n \t}\n\n \treturn $totalVotes;\n }", "function cognitivefactory_count_subs($id) {\n global $CFG, $DB;\n \n // counting direct subs\n $sql = \"\n SELECT \n COUNT(id)\n FROM \n {cognitivefactory_opdata}\n WHERE \n itemdest = {$id} AND\n operatorid = 'hierarchize'\n \";\n $res = $DB->count_records_sql($sql);\n return $res;\n}", "private function num_imagenes_anuncio($id){\n\t\t$anuncio_md5 = md5($id);\n\t\t$this->where('id_e',$anuncio_md5);\n\t\tif($salida_imagenes = $this->get('anuncios_img')){\n\t\t\t$count = count($salida_imagenes);\n\t\t\treturn $count;\n\t\t}else{\n\t\t\t\n\t\t\t$campos = array('apto' => '0');\n\t\t\t$this->where('id',$id);\n\t\t\t$this->update('anuncios',$campos);\n\t\t\treturn '0';\n\t\t}\n\t}", "public function findCountProd($id){\n return Product::where('id',$id)->first()->count;\n }", "public function countlineafactura($id)\n {\n $sql = \"SELECT COUNT(*) as totallinea FROM ventas_detalles VD\n INNER JOIN productos P \n ON VD.IDPROD = P.REFERENCIA\n WHERE VD.IDVENTA ='$id'\";\n return ejecutarConsulta($sql);\n }", "public function countAll($id) {\n $this->db->from($this->table);\n $this->db->where(\"merchId\", $id);\n return $this->db->count_all_results();\n }", "public function countForCode($id) {\n\t\treturn $this->queryCode($id)->count();\n\t}", "function tailoredtemp9($id) {\n return mysqli_query($this->conn, \"SELECT Count(*) as c FROM `ticket` JOIN `flight_instance` ON `ticket`.`id_fight`=`flight_instance`.`iid` WHERE `flight_instance`.`iid` = \".$id.\" GROUP BY (`ticket`.`id_fight`)\");\n }", "public function getCount($id) {\n\n $query = \"select * from scope where id=\" . $id;\n $result = mysqli_query($this->plink, $query);\n return mysqli_num_rows($result);\n }", "public function getTotalSubeixoRodovias(){\n\t\t$total = 0;\n\t\t$i=0;\n\t\twhile($i<count($this->result)){\n\t\t\tif($this->result[$i]->idn_digs == 1000)\n\t\t\t\t$total++;\n\t\t\t$i++;\n\t\t}\n\t\treturn $total;\n\t}", "public function modelTotalRecord(){\n $conn = Connection::getInstance();\n // thuc hien truy van\n $query = $conn->query(\"select id from inventory\");\n // tra ve so ban ghi\n return $query->rowCount();\n }", "function countChilds($id);", "public function totalCount();", "public function totalCount();", "public function countlend($id){\n\t\t\t$query=$this->db->where(['idlibro'=>$id])->from(\"prestamo\")->count_all_results();\n\t\t\treturn $query;\t\n\t\t}", "public function countStored(): int;", "function get_count_per_user($cu_id) {\n\t\t$count=0;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"select count(pr_id) as num from \".$this->_db_table.\" where pr_cu_id=$cu_id\");\n\t\tif (!$rs) {\n\t\t\tprint $db->ErrorMsg();\n\t\t} else {\n\t\t\t$count = $rs->fields[\"num\"];\n\t\t}\n\t\treturn $count;\n\t}", "public function count_used($var_value_id)\n {\n $query=$this->db->select('*')->from('nvar_value')->where(array('var_value_id'=>$var_value_id));\n $res=$query->get();\n $result=$res->result_array();\n\n return count($result);\n }", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function get_count_invoice() {\n $id = $this->input->post('pay_id');\n $result = $this->classtraineemodel->get_count_invoice($id);\n \n echo count($result);\n }", "public function _count();", "function huifucount($id){\n return Db::name('zixun_huifu')->where(['pid'=>$id,'is_show'=>'y','is_del'=>'n','types'=>'huifu'])->count();\n}", "public function getTotalVoterCount(): int\n {\n return $this->totalVoterCount;\n }", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public static function getTotalProductCount() {\n Db_Actions::DbSelect(\"SELECT COUNT(id) FROM cscart_products\");\n }", "function ipts_recount_turnaj($turnaj_id) {\n\tcpdb_fetch_all(\"select debata_ID from debata where turnaj_ID = :turnaj_id\",\n\t\tarray(\":turnaj_id\"=>$turnaj_id), $debaty);\n\t\n\tforeach ($debaty as $debata) {\n\t\tiptsr_internal_deb($debata[\"debata_ID\"]);\n\t}\n}", "public function getModelCount($class, $id)\n {\n return $this->createQuery()\n ->where('imaged_model = ? AND sf_image_id = ?', array($class, $id))\n ->count();\n }", "function count_by_id($table){\n global $db;\n if(tableExists($table))\n {\n $sql = \"SELECT COUNT(id) AS total FROM \".$db->escape($table);\n $result = $db->query($sql);\n return($db->fetch_assoc($result));\n }\n}", "function getHead_length($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from pigs_tbl where pig_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['head_length'];\n\n\t}\n\t$crud->disconnect();\n}", "public function countDrink($usuario_id){\n $sql = \"SELECT count(id) as drink_counter FROM drink WHERE user_id = $usuario_id\";\n\n $stmt = $this->cnx->prepare($sql);\n $result = $stmt->execute();\n \n $resultados = array();\n\n while($rs = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $resultados[] = $rs;\n }\n \n if(empty($resultados)){\n return 0;\n }\n \n return $resultados[0]['drink_counter'];\n }", "public function getTotalVote($idea_id,$version = 0)\r\n {\r\n $model = new Ynidea_Model_DbTable_Ideavotes; \r\n $select = $model->select()\r\n ->from('engine4_ynidea_ideavotes',array('count(*) AS total_vote'))\r\n ->where('idea_id = ?',$idea_id)->where('version_id=?',$version); \r\n $row = $model->fetchRow($select);\r\n return $row->total_vote ; \r\n }", "public function count()\n {\n return ++$this->id;\n }", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function goldTrophyCount(): int\n {\n return $this->pluck('definedTrophies.gold');\n }", "function getRoundsCount($project_id)\n\t{\n\t $option = JRequest::getCmd('option');\n\t\t$app = JFactory::getApplication();\n $db = sportsmanagementHelper::getDBConnection(TRUE, $app->getUserState( \"com_sportsmanagement.cfg_which_database\", FALSE ) );\n $query = $db->getQuery(true);\n\t // Select some fields\n $query->select('count(*) AS count');\n // From the table\n\t\t$query->from('#__sportsmanagement_round');\n $query->where('project_id = '.$project_id); \n\n\t\t$db->setQuery($query);\n\t\treturn $db->loadResult();\n\t}", "public static function count();", "public function getResult($id){\n\n $vote_pour= DB::table('survey_vouter')->where('survey_id', $id )->where('vote','Pour')->count();\n $vote_contre= DB::table('survey_vouter')->where('survey_id', $id )->where('vote','Contre')->count();\n $result = $vote_pour * 100/($vote_pour + $vote_contre);\n //var_dump($result);\n Survey::where('id',$id)->update(['resultat'=>$result]);\n return $result;\n }", "private function profundidad($id=0){\n\n $deep = 0;\n\n while($id > 0){\n $sql = \"SELECT IDPADRE FROM CARGO WHERE ESTADO=1 AND IDCARGO=$id\";\n $newId = $this->ado->query($sql);\n\n $id = $newId[0]['IDPADRE'];\n $deep++;\n }\n\n return $deep;\n }", "function countCvsent($pid)\n\t\t {\n\t\t $sql = \"SELECT COUNT(DISTINCT cand_id) As cnt FROM pof_candidates WHERE pofid =\".$pid.\" AND stage IN (SELECT id FROM segment_name WHERE segment_type_id='5' ) \";\n\t $q = $this->db->query($sql);\n\t $row = $q->row();\n\t return $row->cnt;\n\t\t }", "protected function ask_get_nb_views($id)\n\t{\n\t\t$sql = \"SELECT COUNT(*) AS nb_views\n\t\t\t\tFROM \".$this->table_views.\"\n\t\t\t\tWHERE id_quest = ?\";\n\t\t$data = array($id);\n\t\t$query = $this->db->query($sql, $data);\n\t\tif( $query->row() != NULL )\n\t\t\treturn $query->row()->nb_views;\n\t\telse\n\t\t\treturn 0;\n\t}", "public static function reset_counts($id)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$success = DB::table('devices')\n\t\t\t\t->where('id', '=', $id)\n\t\t\t\t->update(array(\n\t\t\t\t\t'c_n_c_count' => 0,\n\t\t\t\t\t'warning_count' => 0,\n\t\t\t\t\t'alert_count' => 0,\n\t\t\t\t\t'critical_count' => 0,\n\t\t\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")\n\t\t\t\t\t));\n\n\t\t\treturn $success;\n\t\t}\n\n\t\tcatch( Exception $e)\n\t\t{\n\t\t\tLog::write('error', $e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function getCountaTividadeVia($id){\n \n $stm = $this->db->query(\n \"SELECT MAX(AQAT_CD_ATIVIDADE) + 1\n FROM SAD_TB_ATIVIDADE WHERE AQCL_ID_AQAS = $id\"\n );\n return $stm->fetchAll(); \n \n }", "function getNbNouvelles($idRSS) {\n $sql = \"SELECT COUNT(*) AS count FROM Nouvelle WHERE idRSS = ?\";\n $req = $this->db->prepare($sql);\n $params = array($idRSS);\n $res = $req->execute($params);\n debug($this->db,$sql,$params);\n if ($res === FALSE) {\n die(\"getNbNouvelles error: Requête impossible !\\n\");\n }\n $res = $req->fetchAll();\n if (isset($res[0]))\n return $res[0]['count'];\n else\n return 0;\n }", "function count(){}", "abstract public function countTotal();", "function getvotes($id)\r\n\t{\r\n\t\t$query = 'SELECT rating_sum, rating_count FROM #__content_rating WHERE content_id = '.(int)$id;\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$votes = $this->_db->loadObjectlist();\r\n\r\n\t\treturn $votes;\r\n\t}", "public static function totalNumber()\n {\n return (int)self::find()->count();\n }", "function get_count() {\n\t\t$count=0;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"select count(pr_id) as num from \".$this->_db_table);\n\t\tif (!$rs) {\n\t\t\tprint $db->ErrorMsg();\n\t\t} else {\n\t\t\t$count = $rs->fields[\"num\"];\n\t\t}\n\t\treturn $count;\n\t}", "public function verifyIncidence ($id) {\n return DB::table('incidence')->where([['type', '=', '1'],['status','=', null],['contract', '=', $id]])->count();\n }", "public function count_number_register($id)\n {\n $this->db->where('socialEmpresaUsuarioId', $id);\n $datos = $this->db->count_all_results('social_media_empresa');\n return $datos;\n }", "function countApp($id)\n {\n global $pdo;\n\n\n $query = 'SELECT COUNT(*) AS num\n FROM (SELECT * FROM g1116887.Job_posting WHERE user_id = :id) J, g1116887.Applied A\n WHERE A.job_id = J.job_id ';\n\n $values = array(':id'=>$id);\n\n try\n {\n $res = $pdo->prepare($query);\n $res->execute($values);\n }\n catch (PDOException $e)\n {\n throw(\"Database query error\");\n echo $e->getMessage();\n }\n\n $row = $res->fetch(PDO::FETCH_ASSOC);\n\n $tot = $row['num'];\n\n echo $tot;\n }", "public function getVirusesOnComputer($computerid)\n\t\t{\n\n\t\t\treturn self::$database->getTypeOnComputer(Settings::setting('software_virus_type'), $computerid);\n\t\t}", "public function getTotalInvoiced();", "public function count(): int;", "public function count(): int;" ]
[ "0.685187", "0.67090595", "0.6562469", "0.64864653", "0.6359972", "0.62702894", "0.62613034", "0.6137624", "0.6110519", "0.604311", "0.6001232", "0.5933323", "0.59167963", "0.59153324", "0.5888431", "0.5870624", "0.5854248", "0.58107436", "0.579014", "0.5769571", "0.57181203", "0.5698624", "0.5659599", "0.5659599", "0.5643815", "0.56013155", "0.5593529", "0.55927116", "0.55609804", "0.55609804", "0.55609804", "0.55232817", "0.5521627", "0.55039245", "0.5502563", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.54775316", "0.5474454", "0.54730874", "0.5469982", "0.54669887", "0.5464912", "0.545719", "0.5450913", "0.5446749", "0.54388756", "0.54388756", "0.54387397", "0.54387397", "0.54387397", "0.54387397", "0.54387397", "0.54387397", "0.54387397", "0.54387397", "0.54387397", "0.54387397", "0.54387397", "0.54363304", "0.5429407", "0.54269546", "0.54245293", "0.5422161", "0.5417682", "0.54159075", "0.5414398", "0.54076326", "0.5394966", "0.5387516", "0.5386043", "0.5385393", "0.5383442", "0.53829855", "0.53807586", "0.5379702", "0.53736794", "0.53729004", "0.5366538", "0.5363315", "0.5363315" ]
0.7643925
0
Recover the average number of viruses detected per month
public function getVirusPerMonth() { return parent::getVirusPerMonth(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function getAverageMonthPace() {\r\n\t\tif (self::$AverageMonthPace === false) {\r\n\t\t\t$AverageMonthPace = DB::getInstance()->query('SELECT AVG(`s`/60/`distance`) AS `avg` FROM `'.PREFIX.'training` WHERE `time` > '.(time()-30*DAY_IN_S).' AND `sportid`='.CONF_RUNNINGSPORT.' LIMIT 1')->fetch();\r\n\t\t\tself::$AverageMonthPace = $AverageMonthPace['avg'];\r\n\t\t}\r\n\r\n\t\treturn self::$AverageMonthPace;\r\n\t}", "public function totalAverageVisitors()\n {\n $query1 = \"SELECT COUNT(recordID) AS totalVisitors FROM ad_stats WHERE (MONTH(date) = MONTH(CURRENT_DATE()) AND YEAR(date) = YEAR(CURRENT_DATE()));\"; \n $result = mysqli_query($GLOBALS['db'], $query1);\n $tempData1 = mysqli_fetch_assoc($result);\n $data['totalVisitors'] = $tempData1['totalVisitors'];\n \n\n //to get the final output\n $query2=\"SELECT AVG(visitors) AS avgVisitors FROM (SELECT date, COUNT(recordID)AS visitors FROM ad_stats GROUP BY date) AS T1;\";\n $result = mysqli_query($GLOBALS['db'], $query2);\n $tempData2 = mysqli_fetch_assoc($result);\n $data['avgVisitors'] = $tempData2['avgVisitors'];\n\n return $data;\n }", "function monthlyStats($month, $conn){\n $query = $conn->query(\"SELECT * FROM viewer_tbl\");\n $counter = 0;\n while ($data = $query->fetch_array()) {\n $dbMonth = $data['visited_date'];\n if($month == date('F' , strtotime($dbMonth))){\n ++$counter;\n }\n }\n return $counter;\n }", "public function calculateAverage()\n {\n return 0.0;\n }", "public function averageWatchedPerWeek()\n {\n// $totals = array_pluck(\\DB::table('films')\n// ->where('watched', true)\n// ->select(\\DB::raw('count(title) AS count, WEEK(watched_on, 2) AS `week`'))\n// ->groupBy('week')\n// ->get(), 'count');\n\n $total = $this->model->watched()->count();\n\n return number_format($total / floor(\\Carbon\\Carbon::now()->dayOfYear / 7 + 1), 1);\n }", "function get_avg_days_to_mitigation($conn, $dept = NULL, $date_start = NULL, $date_end = NULL, $type_restriction = NULL) {\n $filter = get_sql_hazard_filter($dept, $date_start, $date_end, $type_restriction);\n\t$query_days = \"SELECT AVG(t.days) \" .\n\t\t \"FROM (SELECT DATEDIFF(date_mitigated, date) as days \" .\n\t\t \"FROM hazard \" .\n\t\t $filter . \" AND date_mitigated IS NOT NULL AND date IS NOT NULL \" .\n\t\t \"LIMIT 100) as t\";\n\treturn exec_query($conn, $query_days)[0][0];\n}", "public function calcSnowAvg() {\n\t\t$min = $this->snow['base'];\n\t\t$max = $this->snow['upperbase'];\n\t\treturn ($min + $max)/2;\n\t}", "public function average(){\n $i = 0;\n $total = 0;\n for($i = 0; $i < count($this->collection); $i++){\n $total += $this->collection[$i]->amount;\n }\n if($i == 0)\n return 3;\n return (int)round($total/$i);\n }", "public function testCalculatesAverageVisitorsNumber()\n {\n $source = new StubDataSource(array(40000, 50000, 100000, 20000, 40000));\n $statistics = new Statistics($source);\n $this->assertEquals(50000, $statistics->getAverage());\n }", "public function average()\n {\n return $this->getSum() / count($this->values);\n }", "public function gettotalStoriesPerMonth() {\n $googleVis = new Googlevis();\n $columns = $googleVis->createColumns(\n array('Year/Month' => 'string', 'No. of Stories' => 'number')\n );\n\n $estimate_data = $this->getEstimateDataByMonth(\n $this->easybacklogClient->getStoriesFromTheme()\n );\n\n $row = $rows = $row_data = $row_label = array();\n\n foreach($estimate_data AS $year => $month) {\n foreach($month AS $month_no => $stories) {\n foreach($stories AS $story) {\n $counter = (!isset($counter) ? 0 : $counter);\n $counter += $story;\n }\n $rows[] = $googleVis->createDataRow(\n $year .\"/\". $month_no,\n $counter\n );\n $counter = 0;\n }\n }\n return array('cols' => $columns, 'rows' => $rows);\n }", "function nameAverages($names,&$averages){\r\n\t$average = 0;\r\n\t$totalnames = 0;\r\n\tforeach($names as $name=>$counts){\r\n\t\tforeach($counts as $month=>$value){\r\n\t\t\t$totalnames = $totalnames + $value;\r\n\t\t}\r\n\t\t$average = $totalnames/count($counts);\r\n\t\t$averages[$name] = $average;\r\n\t\t$totalnames = 0;\r\n\t}\r\n}", "function ros_get_grades_average($grads)\n{\n $povprecje = array();\n $cnt = count($grads);\n $povprecje['mistakes'] = 0;\n $povprecje['timeinseconds'] = 0;\n $povprecje['hitsperminute'] = 0;\n $povprecje['precision'] = 0;\n foreach($grads as $grade)\n {\n $povprecje['mistakes'] = $povprecje['mistakes'] + $grade->mistakes; \n $povprecje['timeinseconds'] = $povprecje['timeinseconds'] + $grade->timeinseconds;\n }\n if($cnt != 0){\n $povprecje['mistakes'] = $povprecje['mistakes'] / $cnt;\n $povprecje['timeinseconds'] = $povprecje['timeinseconds'] / $cnt;\n }\n return $povprecje;\n}", "function getMeanHours($start_year, $end_year, $start_month, $end_month, $start_day, $end_day, $start_hour, $end_hour){\n\t\t//Declaring arrays\t\n\t\t$HOURS_IN_DAY = 24;\n\t\t$hourly_array = accessData($start_year, $end_year, $start_month, $end_month, $start_day, $end_day, $start_hour, $end_hour);\n\t\t$sum_array = array();\n\t\t$divideBy_array = array();\n\t\t$mean_array = array();\n\t\t\n\t\t//Initializing the arrays.\n\t\t//$sum_array will hold the number of people that have crossed in that specific hour, for the entire timeframe specified.\n\t\t//$dividBy_array will holder the number of unique hours that were pulled from for each hour (unique regarding year, month, day) \n\t\tfor($i = 0; $i < $HOURS_IN_DAY; $i++){\n\t\t\t$sum_array[$i] = 0;\n\t\t\t$divideBy_array[$i] = 0;\n\t\t}\n\t\t\n\t\t//This fills the previously described associative arrays, $sum_array and $divideBy_array.\n\t\tforeach($hourly_array as $year => $temp1){\n\t\t\tforeach($hourly_array[$year] as $month => $temp2){\n\t\t\t\tforeach($hourly_array[$year][$month] as $day => $temp3){\n\t\t\t\t\tforeach($hourly_array[$year][$month][$day] as $hour => $value){\n\t\t\t\t\t\t$sum_array[$hour] += $value;\n\t\t\t\t\t\t$divideBy_array[$hour] += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//This creates the associative array $mean_array dividing the $sum_array by the $divideBy_array, with the index\n\t\t//decided by the specific hour that has its mean being caluclated. \n\t\tfor($i = 0; $i < $HOURS_IN_DAY; $i++){\n\t\t\t$mean_array[$i] = (int)($sum_array[$i]/$divideBy_array[$i]);\n\t\t}\n\t\t\n\t\t//Any values that are still null will be set to 0.\n\t\tfor($i = 0; $i < $HOURS_IN_DAY; $i++){\n\t\t\tif($mean_array[$i] == NULL)\n\t\t\t\t$mean_array[$i] = 0;\n\t\t}\n\t\t\t\n \t\treturn $mean_array;\n\t}", "public function getMonthlyHits() {\n\t\t$sql = 'SELECT *, ROUND((counter / (SELECT sum(counter) FROM analytics WHERE insertdate BETWEEN DATE_SUB(NOW(),INTERVAL 1 MONTH) AND NOW() ORDER BY counter DESC LIMIT 10)*100),2) as hits FROM analytics WHERE insertdate BETWEEN DATE_SUB(NOW(),INTERVAL 1 MONTH) AND NOW() GROUP BY pagename ORDER BY counter DESC LIMIT 10';\n\t\n\t\t//execute the query\n\t\t$rows = $this->db->clean($sql);\n\t\t\n\t\t$maxwidth = 173;\n\t\t$max = $rows[0]['hits'];\n\t\t\n\t\tforeach($rows as $key => $row) {\n\t\t\n\t\t\t$rows[$key]['maxwidth'] = round($maxwidth * ($row['hits']/$max));\n\t\t}\n\t\t\n\t\t//return the results\n\t\treturn array('month' => $rows);\n\t}", "function mean_bpm($con) {\n\t$bpm = array();\n\n\tfor ($i = 0; $i < 6; $i++) {\n\n\t\t$mood_cluster = $i + 1;\n\n\t\t$qry = \"SELECT AVG(BPM) AS MEAN_BPM\n\t\t\t\tFROM SONGS\n\t\t\t\tWHERE MOOD = '$mood_cluster'\";\n\n\t\t$results = mysqli_query($con, $qry);\n\n\t\tif (mysqli_num_rows($results) > 0) {\n\n\t\t\twhile($row = mysqli_fetch_assoc($results)) {\n\n\t\t\t\t$bpm[$i] = round( $row['MEAN_BPM'] );\n\t\t\t\t// echo 'mood: '.$mood_cluster.' - bpm: '.$bpm[$i].\"</br>\";\n\n\t\t\t} // End While.\n\n\t\t\tmysqli_free_result($results);\n\t\t} // End if.\n\n\t// End for.\n\t}\n\t\n\treturn $bpm;\n}", "function average() {\n $total = 0;\n foreach ($this->grades as $value) // goes through grades using foreach\n $total += $value;\n return $total / count($this->grades);\n }", "public function retrieveRevenueAverage()\n {\n $query = \"SELECT AVG(revenue) AS avgRevenue FROM (SELECT CONCAT(YEAR(date), '/', MONTH(date)) AS theMonth, SUM(exlAmount) AS revenue FROM payment GROUP BY theMonth ORDER BY YEAR(DATE) ASC, MONTH(date) ASC) AS T1;\";\n $result = mysqli_query($GLOBALS['db'], $query);\n $row = mysqli_fetch_assoc($result);\n return $row;\n }", "public function FireStatisticalinYear($date){\n $month_array = array();\n $month = date('Y/m', strtotime($date));\n $month_array[0]['month'] = $month;\n $month_array[0]['count'] = $this->FireStatistical($month);\n for($i = 1; $i < 6; $i++){\n $month = date('Y/m', strtotime($date.' -'.$i.' month'));\n $month_array[$i]['month'] = $month;\n $month_array[$i]['count'] = $this->FireStatistical($month);\n }\n return $month_array;\n }", "private function grab_data(){\n\t\t$y=0;\n\t\tfor($i=$this->startingmonth;$i>=0;$i--){\n\t\t\t$this->searchmonth = date(\"n\")-$i;\n\t\t\t$this->searchyear = date(\"Y\");\n\t\t\tif(0 >= $this->searchmonth){\n\t\t\t\twhile(0 >= $this->searchmonth){\n\t\t\t\t\t$this->searchmonth += 12;\n\t\t\t\t\t$this->searchyear--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->count_chrono_records();\n\t\t\t$this->monthlyrecordvolume[$i] = intval($this->volume_of_records_in_timerange);\n\t\t\tif(0==$this->max_month_value or $this->monthlyrecordvolume[$i] > $this->max_month_value){\n\t\t\t\t$this->max_month_value = $this->monthlyrecordvolume[$i];\n\t\t\t}\n\t\t\t$this->monthaggregator += $this->monthlyrecordvolume[$i];\n\t\t\t\n\t\t\t$this->count_months_recorded_this_year++;\n\t\t\tif(12 == $this->searchmonth or 0 == $i ){\n\t\t\t\t$this->ave_this_year[$y]['volume'] = intval($this->monthaggregator / $this->count_months_recorded_this_year);\n\t\t\t\t$this->ave_this_year[$y]['month'] = $i;\n\t\t\t\t$this->ave_this_year[$y]['year'] = $this->searchyear;\n\t\t\t\t$this->monthaggregator = 0;\n\t\t\t\t$this->count_months_recorded_this_year = 0;\n\t\t\t\t$y++;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "function get_ave($array) {\n\t\t\t// echo $ave;\n\t\t\treturn \"average of is \" . array_sum($array) / count($array);\n\t\t}", "function _averages() {\n if (!$this->staff) $this->_error('Access Denied', 403);\n\n // The only case switch in the entire migration :(\n $median = $this->db->type() == 'mysql' ?\n // \"SUBSTRING_INDEX( SUBSTRING_INDEX( GROUP_CONCAT(TIMESTAMPDIFF('SECOND', CAST(r.starttimestamp AS DATE), CAST(r.endtimestamp AS DATE)) ORDER BY TIMESTAMPDIFF('SECOND', CAST(r.starttimestamp AS DATE), CAST(r.endtimestamp AS DATE))), ',', COUNT(*)/2 ), ',', -1) as avgt\"\n \"AVG(TIMESTAMPDIFF('SECOND', CAST(r.starttimestamp AS DATE), CAST(r.endtimestamp AS DATE))) as avgt\"\n : \"MEDIAN(TIMESTAMPDIFF('SECOND', CAST(r.starttimestamp AS DATE), CAST(r.endtimestamp AS DATE))) as avgt\";\n\n\n $rows = $this->db->pq(\"SELECT CONCAT(CONCAT(vr.run, '-'), s.beamlinename) as rbl, min(vr.run) as run, min(vr.runid) as runid, min(s.beamlinename) as bl, count(r.robotactionid) as num, \n $median\n FROM v_run vr \n INNER JOIN blsession s ON (s.startdate BETWEEN vr.startdate AND vr.enddate) \n INNER JOIN proposal p ON (p.proposalid = s.proposalid) \n INNER JOIN robotaction r ON (r.blsessionid = s.sessionid) \n WHERE /*r.robotactionid > 1 AND*/ p.proposalcode <> 'cm' AND r.status='SUCCESS' AND (r.actiontype = 'LOAD') \n GROUP BY CONCAT(CONCAT(vr.run, '-'), s.beamlinename)\n ORDER BY min(s.beamlinename), min(vr.runid)\");\n \n $tvs = $this->db->pq(\"SELECT distinct vr.run,vr.runid \n FROM v_run vr \n INNER JOIN blsession bl ON (bl.startdate BETWEEN vr.startdate AND vr.enddate) \n INNER JOIN robotaction r ON (r.blsessionid = bl.sessionid) \n /*WHERE robotactionid != 1*/ ORDER BY vr.runid\");\n \n $rids = array();$rvl = array();\n $ticks = array();\n foreach ($tvs as $i => $t) {\n array_push($ticks, array($i, $t['RUN']));\n $rids[$t['RUN']] = $t['RUNID'];\n $rvl[$t['RUN']] = $i;\n }\n \n $bls = array();\n foreach ($rows as $r) {\n if (!array_key_exists($r['BL'], $bls)) $bls[$r['BL']] = array();\n \n array_push($bls[$r['BL']], $r);\n }\n \n $bld = array();\n foreach ($bls as $bl => $d) {\n $rd = array();\n foreach ($d as $i => $dat) {\n array_push($rd, array($rvl[$dat['RUN']], floatval($dat['AVGT'])));\n }\n \n $bld[$bl] = $rd;\n }\n\n $this->has_arg('download') ? $this->_write_csv($bld, $ticks, 'robot_load') : $this->_output(array('details' => $bls, 'data' => $bld, 'ticks' => $ticks, 'rids' => $rids));\n }", "function month_number_vue(int $year, int $month): int{\r\n $total = 0;\r\n $month = str_pad($month, 2, '0', STR_PAD_LEFT);\r\n $file = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'counter-' . $year . '-' . $month . '-' . '*';\r\n $files = glob($file);\r\n foreach($files as $file){\r\n $total += (int)file_get_contents($file);\r\n }\r\n return $total;\r\n}", "public function avgViews()\n {\n $query = \"SELECT AVG(views) FROM blog_post \n WHERE deleted = 0\";\n\n $stmt = static::$dbh->query($query);\n\n $views = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\n return $views;\n }", "public function getAverageReviews()\n {\n /* code goes here */\n }", "public function getAverage()\n {\n $total = 0;\n $nb = 0;\n foreach ($this->evaluationSessions as $evaluationSession) {\n if ($evaluationSession->getStatus() === Status::CLOSED) {\n $total += $evaluationSession->getGlobalScore();\n $nb++;\n }\n }\n if ($nb > 0) {\n return floatval($total / $nb);\n }\n return -1;\n }", "public function realisasi_program_jalan($user,$month) {\n\t\t$hasil = $this->db->query(\"SELECT AVG(input_realisasi_) AS Total FROM cc_program_eval where input_user_c='$user'\");\n\t\tif($hasil->num_rows() > 0){\n\t\t\treturn $hasil->result();\n\t\t}\n\t\telse {\n\t\t\treturn array();\n\t\t}\n\t}", "public function average(): float\n {\n return $this->sum() / $this->count();\n }", "function _getAverageByMonth($year, $sql, $format=0)\r\n\t{\r\n\t\tglobal $langs;\r\n\r\n\t\t$result=array();\r\n\t\t$res=array();\r\n\r\n\t\tdol_syslog(get_class($this).'::'.__FUNCTION__.\"\", LOG_DEBUG);\r\n\t\t$resql=$this->db->query($sql);\r\n\t\tif ($resql)\r\n\t\t{\r\n\t\t\t$num = $this->db->num_rows($resql);\r\n\t\t\t$i = 0; $j = 0;\r\n\t\t\twhile ($i < $num)\r\n\t\t\t{\r\n\t\t \t\t$row = $this->db->fetch_row($resql);\r\n\t\t \t\t$j = $row[0] * 1;\r\n\t\t \t\t$result[$j] = $row[1];\r\n\t\t \t\t$i++;\r\n\t\t \t}\r\n\t\t \t$this->db->free($resql);\r\n\t\t}\r\n else dol_print_error($this->db);\r\n\r\n\t\tfor ($i = 1 ; $i < 13 ; $i++)\r\n\t\t{\r\n\t\t\t$res[$i] = (isset($result[$i])?$result[$i]:0);\r\n\t\t}\r\n\r\n\t\t$data = array();\r\n\r\n\t\tfor ($i = 1 ; $i < 13 ; $i++)\r\n\t\t{\r\n\t\t\t$month='unknown';\r\n\t\t\tif ($format == 0) $month=$langs->transnoentitiesnoconv('MonthShort'.sprintf(\"%02d\", $i));\r\n\t\t\telseif ($format == 1) $month=$i;\r\n\t\t\telseif ($format == 2) $month=$langs->transnoentitiesnoconv('MonthVeryShort'.sprintf(\"%02d\", $i));\r\n\t\t\t//$month=dol_print_date(dol_mktime(12,0,0,$i,1,$year),($format?\"%m\":\"%b\"));\r\n\t\t\t//$month=dol_substr($month,0,3);\r\n\t\t\t$data[$i-1] = array($month, $res[$i]);\r\n\t\t}\r\n\r\n\t\treturn $data;\r\n\t}", "function getAverageAge($input) {\n global $sum; //'sum' was global gedeclareerd\n for($i=0; $i<count($input); $i++) { //$i moest '0' inhouden\n $sum += $input[$i];\n }\n\n return $sum / $i; //moest nog delen door aantal values van het array\n }", "public function averageRate()\n {\n $movie = $this->getKey();\n return DB::table('movies_reviews')\n ->where('movies_id', '=', $movie)\n ->average('rate');\n }", "public function getAverageLosses()\n {\n return round($this->getLossesAttribute() / $this->teams->count());\n }", "function getAverageStats() {\n return $this->averageNpsStats;\n }", "public function evalAvg()\n {\n $users = User::students()->get();\n $marks = [];\n foreach ( $users as $user )\n {\n if ($this->evalGradeExists($user))\n {\n array_push($marks,$this->userPercentage($user));\n }\n }\n $count = count($marks); //total numbers in array\n $total = 0;\n foreach ($marks as $mark) {\n $total += $mark; // total value of array numbers\n }\n $average = ($total/$count); // get average value\n return round($average,2);\n\n }", "public function getAveragePageLoadTime(Period $period);", "function avgT($a){\n\t\t\treturn array_sum($a) / count($a);\t\n\t\t}", "public function calcAverageMileage()\n {\n $battles = $this->battles - $this->battles_old;\n \n return $battles > 0 \n ? (float)$this->mileage / $battles \n : null;\n }", "function agregate_sales() {\n global $conn, $scrape_options;\n\n $dir = scandir(BASE_META_DIR);\n if (!$dir)\n return error(\"No apss were found.\\n\");\n\n $cnt = 0;\n $weekbeg = mktime(0, 0, 0, date('m'), date('d'), date('Y')) - ((date('N')-1)*24*60*60);\n// echo(\"agregating apps \".implode(\",\",$app_ids).\"\\n\");\n foreach($dir as $f) {\n if (substr($f,0,4) != \"app_\") continue;\n// if (!$apple_id) continue;\n $app = file_get_contents(BASE_META_DIR.\"$f/appmeta.dat\");\n if (!$app) continue;\n $app = unserialize($app);\n if (!$app) continue;\n $apple_id = $app[\"apple_id\"];\n\n if ($scrape_options[\"debug\"])\n echo(\"agregating stats for apple_id=$apple_id\\n\");\n\n $res = execSQL($conn, \"\nselect\n(select max(BeginDate) from itc_sales where AppleIdentifier=:apple_id) as stat_max_report_date,\n(select min(BeginDate) from itc_sales where AppleIdentifier=:apple_id) as stat_min_report_date,\n(select sum(units) from itc_sales where AppleIdentifier=:apple_id and BeginDate= EndDate and BeginDate = ifnull((select max(BeginDate) from itc_sales where AppleIdentifier=:apple_id), 0) group by AppleIdentifier) stat_last_day,\n(select sum(units) from itc_sales where AppleIdentifier=:apple_id and BeginDate<>EndDate and BeginDate > $weekbeg - 30 * 24 * 60 * 60 and EndDate<$weekbeg group by AppleIdentifier) stat_last_month,\n(select sum(units) from itc_sales where AppleIdentifier=:apple_id and (BeginDate<>EndDate or (BeginDate=EndDate and BeginDate>=$weekbeg)) group by AppleIdentifier) stat_whole_period\nfrom\ndual \n \", array(\":apple_id\"=>$apple_id));\n if (!$res) {\n echo(\"some problems with performing sql request. skipping\\n\");\n continue;\n }\n $row=$res->fetch(PDO::FETCH_ASSOC);\n if (!$row) {\n echo(\"no data has been returned\\n\");\n continue;\n }\n $app[\"stat_max_report_date\"] = $row[\"stat_max_report_date\"];\n $app[\"stat_min_report_date\"] = $row[\"stat_min_report_date\"];\n $app[\"stat_last_day\"] = $row[\"stat_last_day\"];\n $app[\"stat_last_month\"] = $row[\"stat_last_month\"];\n $app[\"stat_whole_period\"] = $row[\"stat_whole_period\"];\n $cont = serialize($app);\n if (!$cont) {\n echo(\"some problems with serializing app data: \". json_encode($app).\"\\n skipping\");\n continue;\n }\n if (!file_put_contents(BASE_META_DIR.\"$f/appmeta.dat\", $cont))\n echo(\"some problems with writing serialized data\\n\");\n }\n}", "public function getCurrentMonthTotalRevenue() : float;", "public function AverageDailySteps() {\n\t\t\n\t\tif (!empty($this->profil)) {\n\t\t\n\t\t\treturn $this->profil['user']['averageDailySteps'];\n\t\t}\n\t}", "public function averageByMonths($request, $model, $column, $dateColumn = null)\n {\n return $this->aggregate($request, $model, Trend::BY_MONTHS, 'avg', $column, $dateColumn);\n }", "function bbconnect_kpi_calculate_average($count, $amount) {\n return $count > 0 ? $amount/$count : 0;\n}", "public function getMomentsByMonth() {\n\t\ttry {\n\t\t\t$timezone = \\Auth::User()->station->getStationTimezone();\n\n\t\t\t$station_time = new \\DateTime('now', new \\DateTimeZone($timezone));\n\t\t\t$offset = $station_time->getOffset();\n\n\t\t\t$date = Carbon::now($timezone);\n\n\t\t\t$year_start = $date->copy()->startOfMonth()->subMonths(12);\n\n\t\t\t//If station is Nova we want to start at March 11 since this is when we launched with them\n\t\t\tif(\\Auth::User()->station->id == 8 && $year_start->lt(Carbon::parse('2016-03-11'))) {\n\t\t\t\t$year_start = Carbon::parse('2016-03-11');\n\t\t\t}\n\t\t\t$year_end = $date;\n\n\t\t\t$moments = \\DB::table('airshr_events')\n\t\t\t\t->select(\\DB::raw('MONTH(FROM_UNIXTIME(record_timestamp)) AS month, \n\t\t\t\tYEAR(FROM_UNIXTIME(record_timestamp)) AS year,\n\t\t\t\tWEEK(FROM_UNIXTIME(record_timestamp)) as week, \n\t\t\t\tCOUNT(*) as count'))\n\t\t\t\t->where('station_id', '=', \\Auth::User()->station->id)\n//\t\t\t\t->where('event_data_status', '=', 1)\n\t\t\t\t->where('record_timestamp', '>=', $year_start->timestamp)\n\t\t\t\t->where('record_timestamp', '<=', $year_end->timestamp)\n//\t\t\t\t->whereRaw('HOUR(CONVERT_TZ(FROM_UNIXTIME(record_timestamp), @@session.time_zone, \\''.$timezone.'\\')) >= 6')\n//\t\t\t\t->whereRaw('HOUR(CONVERT_TZ(FROM_UNIXTIME(record_timestamp), @@session.time_zone, \\''.$timezone.'\\')) < 22')\n\t\t\t\t->whereRaw(\"MOD(record_timestamp + {$offset}, 86400) >= 6*60*60\") //\"MOD(record_timestamp + {$offset}, 86400)\" gets seconds since midnight\n\t\t\t\t->whereRaw(\"MOD(record_timestamp + {$offset}, 86400) < 22*60*60\") // We then compare the hours from midnight to check if it is between the hours we want\n\t\t\t\t->groupBy('week')\n\t\t\t\t->orderBy('year')\n\t\t\t\t->orderBy('month')\n\t\t\t\t->orderBy('week')\n\t\t\t\t->get();\n\n\t\t\t$total_moments = 0;\n\t\t\t$moments_this_month = 0;\n\n\t\t\tforeach($moments as $moment) {\n\t\t\t\t$total_moments += $moment->count;\n\t\t\t\tif($moment->month == $date->month && $moment->year == $date->year) {\n\t\t\t\t\t$moments_this_month += $moment->count;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn response()->json(array('code' => 0,\n\t\t\t\t'moments' => $moments,\n\t\t\t\t'moments_this_month' => $moments_this_month,\n\t\t\t\t'total_moments' => $total_moments\n\t\t\t\t));\n\t\t\t\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\t}", "public function average() {\n $avgEmployees = Employee::avg(\"age\");\n\n return response()->json([\"age\"=>round($avgEmployees, 0)]);\n }", "function analysis($mthArray,$date){\r\n\t// the array is indexed from 1 to 12\r\n\t$d = date_parse_from_format(\"Y-m-d\", $date);\r\n\t\r\n\tif($d[\"month\"]==1){\r\n\t\t// compare january vs. december\r\n\t\t// the greater months in the array must be from the previous year\r\n\t\t$prevMonth=11;\r\n\t}\r\n\telse{\r\n\t\t$prevMonth=$d[\"month\"]-1;\r\n\t}\r\n\t\r\n\tif($mthArray[$d[\"month\"]]>$mthArray[$prevMonth]){\r\n\t\t$msg='We ate MORE meals together this month than last month';\r\n\t}\r\n\telse if($mthArray[$d[\"month\"]]<$mthArray[$prevMonth]){\r\n\t\t$msg='We ate LESS meals together this month than last month';\r\n\t}\r\n\telse{\r\n\t\t$msg='We ate THE SAME NUMBER OF meals together this month than last month';\r\n\t}\t\r\n\t\r\n\treturn $msg;\r\n}", "function average($array)\n{\n $avg = array_sum($array) / (count($array));\n return $avg;\n}", "public function getTotalAverageRevenueConversion()\n {\n $resource = Mage::getModel('abandonment/orderflag')->getResource();\n $average = 0;\n\n $nbConvertedCarts= $resource->getSumNbConvertedCarts();\n if ($nbConvertedCarts) {\n $average = $resource->getSumAmountConvertedCarts() / $nbConvertedCarts;\n }\n\n return $average;\n }", "public function getEstimateSpreadPerMonth() {\n\n // Do the columns\n $googleVis = new Googlevis();\n $columns = $googleVis->createColumns(\n array(\n 'Month' => 'string', \n 'Size: 1' => 'number', \n 'Size: 2' => 'number', \n 'Size: 3' => 'number', \n 'Size: 5' => 'number', \n 'Size: 8' => 'number', \n 'Size: 13' => 'number', \n 'Size: 20' => 'number'\n )\n );\n \n $estimate_data = $this->getEstimateDataByMonth(\n $this->easybacklogClient->getStoriesFromTheme()\n );\n\n\n $rows = array();\n foreach($estimate_data AS $year => $month) {\n foreach($month AS $month_no => $estimates) {\n foreach (array(1, 2, 3, 5, 8, 13, 20) AS $est) {\n $row_data[] = (isset($estimates[$est]) ? $estimates[$est] : 0);\n }\n\n $rows[] = $googleVis->createDataRow(\n $year .\"/\". $month_no,\n $row_data\n );\n $row = $row_label = $row_data = array();\n }\n \n }\n\n return array('cols' => $columns, 'rows' => $rows);\n }", "public function total()\r\n {\r\n $db = $this->app->make('database')->connection();\r\n\r\n return (int) $db->fetchColumn('\r\n SELECT COUNT(1) FROM ImageOptimizerProcessedFiles \r\n WHERE UNIX_TIMESTAMP(processedAt) >= UNIX_TIMESTAMP(LAST_DAY(CURDATE()) + INTERVAL 1 DAY - INTERVAL 1 MONTH)\r\n AND UNIX_TIMESTAMP(processedAt) < UNIX_TIMESTAMP(LAST_DAY(CURDATE()) + INTERVAL 1 DAY)\r\n ');\r\n }", "function totalHari($month,$year){\n $jumlah = cal_days_in_month(CAL_GREGORIAN,$month,$year);\n return $jumlah;\n}", "public static function getRAPHPFrameworkAverageLoading ();", "function get_month_media($date, $labels) {\n global $DB;\n\n $fechainicio = new DateTime(\"1-\".$date->month.\"-\".$date->year);\n $maxday = cal_days_in_month(CAL_GREGORIAN, $date->month, $date->year);\n $fechafin = new DateTime($maxday.\"-\".$date->month.\"-\".$date->year);\n $fechafin->setTime(23, 59, 59);\n $result = array();\n foreach ($labels as $label) {\n $result[] = 0;\n }\n\n $sql = \"SELECT id, connectedusers, date FROM {report_user_statistics} WHERE date >= ? AND date <= ? ORDER BY date;\";\n $todaslasconexiones = $DB->get_records_sql($sql, [$fechainicio->getTimestamp(), $fechafin->getTimestamp()]);\n $day = 0;\n $temp = array();\n $i = 1;\n foreach ($todaslasconexiones as $conexiones) {\n $fecha = new DateTime(\"@$conexiones->date\");\n if (($fecha->format('m') == $date->month) && ($fecha->format('Y') == $date->year)) {\n if ($day == 0) {\n $day = $fecha->format('d');\n $temp[] = $conexiones->connectedusers;\n } else if ($day == $fecha->format('d')) {\n $temp[] = $conexiones->connectedusers;\n } else if ($day < $fecha->format('d')) {\n $key = array_search($day, $labels);\n $result[$key] = array_sum($temp) / count($temp);\n $temp = array();\n $day = $fecha->format('d');\n $temp[] = $conexiones->connectedusers;\n }\n if (count($todaslasconexiones) == $i) {\n $key = array_search($day, $labels);\n $result[$key] = array_sum($temp) / count($temp);\n } else if (count($temp) > 1) {\n $key = array_search($day, $labels);\n $result[$key] = array_sum($temp) / count($temp);\n }\n $i++;\n }\n }\n return $result;\n}", "function averageAge ( array $students) : float {\n\n\t$totalAge = 0;\n\n\tforeach ($students as $student) {\n\n\t\techo $student[\"name\"] . \" is \" . $student[\"age\"];\n\t\techo \"<br>\";\n\t\t$totalAge += $student[\"age\"];\n\n\t}\n\t//make sure $totalAge is the correct number\n\techo \"Total age is \" . $totalAge;\n\techo \"<br>\";\n\treturn ($totalAge/count($students));\n\n}", "public function testGetMarkAverage()\n {\n $affectedProgram = $this->em->getRepository('AppBundle:AffectedProgram')->findOneBy(array('name' => 'Francais'));\n $sequence1 = $this->em->getRepository('AppBundle:Sequence')->findOneBy(array('name' => '1er Trimestre'));\n //Get marks of a student_1 6em from fixture and calculate their average\n $student_1_6em1 = $this->em->getRepository('AppBundle:Student')->findOneBy(array('name' => 'Eleve 6em 1'));\n $marks = $student_1_6em1->getMarksByAffectedProgramAndSequence($affectedProgram, $sequence1, 'Devoir');\n $average = $this->utils->getMarksAverage($marks);\n $this->assertEquals($average, 10.00);\n }", "public function getAvgVals($curr_date)\n {\n $date = new \\DateTime($curr_date);\n $date->sub(new \\DateInterval('P14D'));\n $last_14_days = $date->format('Y-m-d');\n // echo '<br> Curr date: '. $curr_date . ', 14 days later: ' . $last_14_days;\n \n $sql = 'SELECT AVG(temp_curr) AS temp, '\n . 'AVG(humidity) AS humdt, '\n . 'AVG(wind_spid) AS winds '\n . 'FROM data '\n . 'WHERE date >= :start AND date <= :end;';\n $stmt = $this->pdo->prepare($sql);\n try {\n $stmt->execute([\n ':start' => $last_14_days,\n ':end' => $curr_date,\n ]);\n } catch (\\PDOException $e) {\n $err_text = 'Error Select AVG Data!' . $e->getMessage();\n $this->errLoger($err_text, 'error');\n return null;\n }\n return $stmt->fetch(\\PDO::FETCH_ASSOC);\n }", "public function getAverage(): float\n {\n return $this->average;\n }", "public function getAvg(): float\n {\n return $this->avg;\n }", "public function getMeanRuntime()\n {\n return $this->mean_runtime; \n }", "public function getAveragePointsAgainst()\n {\n return number_format((float) $this->getPointsAgainst() / $this->teams->count(), 2, '.', '');\n }", "public function getAverageConfidence(): float\n {\n return RoadDamageReport::where('roaddamage_id', $this->id)\n ->avg('confidence');\n }", "function getMonthPixels( &$data ) {\n\t\t$month_total_edits = array();\n\t\tforeach( $data as $year => $tmp ) {\n\t\t\tforeach( $tmp['months'] as $month => $newdata ) {\n\t\t\t\t$month_total_edits[ $month.'/'.$year ] = $newdata['all'];\n\t\t\t}\n\t\t}\n\t\n\t\t$max_width = max( $month_total_edits );\n\t\t\n\t\t$pixels = array();\n\t\tforeach( $data as $year => $tmp ) {\n\t\t\tforeach( $tmp['months'] as $month => $newdata ) {\n\t\t\t\tif( $tmp['all'] == 0 ) $pixels[$year][$month] = array();\n\t\t\t\t\n\t\t\t\t$processarray = array( 'all' => $newdata['all'], 'anon' => $newdata['anon'], 'minor' => $newdata['minor'] );\n\t\t\t\t\n\t\t\t\tasort( $processarray );\n\t\t\t\t\n\t\t\t\tforeach( $processarray as $type => $count ) {\n\t\t\t\t\t$newtmp = ceil( ( 500 * ( $count ) / $max_width ) );\n\t\t\t\t\t$pixels[$year][$month][$type] = $newtmp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $pixels;\n\t}", "function getCharacterScore($character_id) {\n $activities = $this->getActivityCharacterList($character_id);\n $score['total'] = 0;\n $score['month'] = 0;\n $now = new Datetime();\n $now = $now->format('m');\n foreach ($activities as $item) {\n $date = new DateTime($item['dateTime']);\n $date = $date->format('m');\n if ($now == $date) {\n $score['month'] += $item['dkpEarn'];\n }\n $score['total'] += $item['dkpEarn'];\n }\n return $score;\n }", "public function getTotalMonth()\n {\n $today = Carbon::now()->toDateString();\n $timezone = new Carbon();\n $last_thirty_days = $timezone->subDays(30);\n\n return $this->appUser->whereBetween('date_created', array($last_thirty_days, $today))->count();\n }", "public function getAverageFinish()\n {\n $total = $this->teams->reduce(function ($position, $team) {\n return $position + $team->position;\n });\n\n return round($total / $this->teams->count());\n }", "function average($arr){\n return ($arr) ? array_sum($arr)/count($arr) : 0;\n }", "function getMonthTotal(){\n\t\t$total = $this->hhRentAmount;\n\t\tforeach ($this->members as $member){\n\t\t\tforeach ($member->getBills() as $bill){\n\t\t\t\t$total += $bill->getBillAmount();\n\t\t\t}\n\t\t}\n\t\treturn $total;\n\t}", "public function getVisitorAvgTransValue()\r\n\t{\r\n\t\t$value = 0;\r\n\t\t$count = 0;\r\n\t\r\n\t\tforeach ($this->getOrders() as $order)\r\n\t\t{\r\n\t\t\t$value += $order->getGrandTotal();\r\n\t\t\t\t\r\n\t\t\t$count++;\r\n\t\t}\r\n\t\t\r\n\t\tif ($value && $count)\r\n\t\t{\r\n\t\t\treturn round($value/$count,2);\r\n\t\t}\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "public static function getAverage()\n {\n \t$tempAveWaitTimeContainer = 0;\n $curlURL = \"http://149.202.73.207/contactRate.php\";\n $curlres = curl_init($curlURL);\n curl_setopt($curlres, CURLOPT_RETURNTRANSFER, true);\n $curlResRaw = curl_exec($curlres);\n $tempArr = json_decode($curlResRaw, true);\n $tempAveWaitTimeContainer = $tempArr[\"avgWaitTime\"];\n if ($tempArr[\"avgWaitTime\"] != 'null') {\n \t$tempAveWaitTimeContainer = $tempArr[\"avgWaitTime\"];\n }\n return $tempAveWaitTimeContainer;\n }", "public function getAvgLoad()\n {\n $loadArray = array();\n $this->refresher->Refresh();\n // ProcessorQueueLength\n foreach ($this->cpuValue->ObjectSet as $key => $set) {\n $loadArray = $set->PercentProcessorTime;\n }\n\n return $loadArray[0];\n }", "public function getAveragePointsFor()\n {\n return number_format((float) $this->getPointsFor() / $this->teams->count(), 2, '.', '');\n }", "public function avg_time($avg_count = 1)\n\t{\n\t\treturn ($this->endTimer-$this->startTimer)/$avg_count;\n\t}", "public function getCFUInAVG(): int\n {\n return array_reduce($this->esami, function ($acc, $esame) {\n return $acc + $esame->cfu * $esame->in_avg;\n }, 0);\n }", "public function getMoyenneAgeActors(){\n $ageMoyActors = DB::table('actors')\n ->avg(DB::raw('TIMESTAMPDIFF( YEAR, dob, NOW())'));\n return number_format($ageMoyActors, 1);\n }", "public function avg($column)\n {\n $results = $this->model->count($column);\n\n $this->resetModel();\n\n return $results;\n }", "public function getAverageRevenueConversion()\n {\n $resource = Mage::getModel('abandonment/orderflag')->getResource();\n $average = 0;\n\n $nbConvertedCarts = $resource->getSumNbConvertedCarts($this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod());\n if ($nbConvertedCarts > 0) {\n $sumAmout = $resource->getSumAmountConvertedCarts(\n $this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod()\n );\n $average = $sumAmout / $nbConvertedCarts;\n }\n\n return $average;\n }", "public function getTotalMPerYear(){\n // FROM [dbo].[MDeviceProfile]\n // GROUP BY YEAR([CreatedAt])\n $result = [];\n $this->db->select(\"YEAR([CreatedAt]) as year, count(DeviceId) as count\");\n $this->db->from($this->TBL_MDEVICEPROFILE);\n $this->db->group_by('YEAR([CreatedAt])');\n $q = $this->db->get();\n return $q->result_array();\n }", "public function computeAvgRating()\n {\n return Doctrine_Query::create()\n ->select('AVG(value) as avg_val')\n ->from('Rate')\n ->where('record_model = ? AND record_id = ?', array(\n $this->getModel(),\n $this->getItemId(),\n ))\n ->fetchOne()\n ->avg_val;\n }", "public function getAverageRevenueFirstConversion()\n {\n $average = 0;\n $resource = Mage::getModel('abandonment/orderflag')->getResource();\n\n $nbConvertedCarts= $resource->getNbFirstReminderConvertedCarts($this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod());\n if ($nbConvertedCarts) {\n $total = $resource->getSumAmountFirstReminderConvertedCarts($this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod());\n $average = $total / $nbConvertedCarts;\n }\n\n return $average;\n }", "public function getMonthPartnersIncome($year, $month) {\n //$vydaje = $this->db->table('translator_project')->where('accounted', 1)->where('translator_id=? OR translator_id=?', 1, 2)->where('project_id', $this->db->table('project')->select('id')->where('invoice_date LIKE ?', $year.'-'.$month.'%'))->sum('payment');\n //return $prijmy - $vydaje;\n return 0;\n }", "public function hasAvg() {\n return $this->_has(4);\n }", "public function getAvgRating(){\n if($this->ratings){\n return $this->ratings->avg('rating');\n }\n }", "function jumlah_ps4h($clock){\n\t\t$query1 = \"SELECT AVG(power) AS jumlah4 FROM sensor_4r3 WHERE t=$clock\";\n\t\treturn $this->db->query($query1)->result();\n\t}", "public function getAverageDurationOfSessions(Period $period);", "private function numberOfPhotos($month)\n {\n /**\n * Get album photos\n */\n $path = storage_path('app/public/') . 'albums/' . auth()->user()->id . '/' . $month . '/';\n\n // Verify if there is a folder for the project, if not creates one\n if (!File::isDirectory($path)) {\n File::makeDirectory($path, 0777, true, true);\n }\n\n // Get files from folder\n $filesInFolder = File::files(storage_path('app/public/albums/') . auth()->user()->id . '/' . $month);\n $files = array();\n foreach ($filesInFolder as $file) {\n array_push($files, [\n 'name' => $file->getFilename(),\n 'size' => $file->getSize(),\n 'type' => File::mimeType($file->getPathname()),\n 'file' => '/storage/albums/' . auth()->user()->id . '/' . $month . '/' . $file->getFilename(),\n ]);\n }\n\n return count($files);\n }", "public function getAverage()\r\n {\r\n $fSum = 0.0;\r\n foreach ($this->aNotes as $fNote) {\r\n $fSum += $fNote;\r\n }\r\n $fAverage = $fSum / count($this->aNotes);\r\n // get only 2 digits after comma\r\n $fAverage = floatval(number_format($fAverage, 2));\r\n return $fAverage;\r\n }", "protected function eventAverage(RacesEvent $event)\n {\n $results = [];\n foreach($event->sessions AS $session) {\n if (\\RacesSession::hasPoints($session)) {\n foreach ($session->entrants AS $entrant) {\n $carID = $entrant->car->id;\n $entrantID = $entrant->championshipEntrant->id;\n\n if (!isset($results[$carID])) {\n $results[$carID] = $this->initCar($entrant->car);\n }\n\n if (!isset($results[$carID]['points'][$entrantID])) {\n $results[$carID]['points'][$entrantID] = 0;\n }\n\n $results[$carID]['points'][$entrantID] += $entrant->points + $entrant->fastest_lap_points;\n\n if ($session->type == RacesSession::TYPE_RACE) {\n $results[$carID]['positions'][$entrantID] = $entrant->position;\n }\n\n foreach($entrant->penalties AS $penalty) {\n $results[$carID]['points'][$entrantID] -= $penalty->points;\n $results[$carID]['penalties'][] = $penalty;\n }\n }\n }\n }\n\n return $this->averagePoints($results);\n }", "public function mean() {\n $count = count($this->value);\n $sum = array_sum($this->value);\n return ((float) $sum) / $count;\n }", "public function getElapsedAverage()\n {\n $calls = $this->getCalls();\n if ($calls == 0) {\n // @todo do we throw an exception or return 0?\n /**\n * @see Zym_Timer_Exception\n */\n require_once 'Zym/Timer/Exception.php';\n throw new Zym_Timer_Exception(\n 'Cannot get average time because timer has not been started'\n );\n }\n\n $averageTime = $this->getElapsed() / $calls;\n return $averageTime;\n }", "public function monthlyReport($year, $month){\n\t\t$result = collect();\n\t\tforeach(Employee::getActiveEmployee(true, $year, $month) as $employee){\n\t\t\t$result->put($employee->nip, $employee->getAttendanceSummaryByMonth($year, $month));\n\t\t}\n\t\t\n\t\t$return = collect();\n\t\t$returnCount = $result->count();\n\t\tforeach($this->resutlKeys as $key){\n\t\t\t$val = collect($result->map(function($summary) use($key, $returnCount) {\n\t\t\t\t\t\treturn isset($summary[$key])? $summary[$key] : 0;\n\t\t\t\t\t}))->sum();\n\t\t\t$return->put($key, $val);\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "public function averageRating()\n {\n $total = 0;\n $average = null;\n\n foreach ($this->notes as $n) {\n $total += $n->note;\n }\n\n $nbNotes = $this->notes->count();\n if ($total > 0 && $nbNotes > 0) {\n $average = $total / $nbNotes;\n }\n\n return $average;\n }", "public function getAverageRevenueThirdConversion()\n {\n $average = 0;\n $resource = Mage::getModel('abandonment/orderflag')->getResource();\n\n $nbConvertedCarts= $resource->getNbThirdReminderConvertedCarts($this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod());\n if ($nbConvertedCarts) {\n $total = $resource->getSumAmountThirdReminderConvertedCarts($this->_getFilterStartingPeriod(), $this->_getFilterEndingPeriod());\n $average = $total / $nbConvertedCarts;\n }\n\n return $average;\n }", "public function calculate_average_karma($user_id)\n {\n $user = get_user_by_id($user_id);\n $karma = get_user_karma($user_id);\n \n if ($user)\n {\n $days = ceil(abs($user->row('register_date') - now())/86400);\n\n $average = round(($karma/$days), 2);\n\n return $average;\n } \n }", "function average_tropical_year_length(DateTime $d = null): float {\n $utc = new DateTimeZone('UTC');\n if ($d === null) {\n $d = new DateTime('now', $utc);\n }\n $d1 = new DateTime('2000-01-01 12:00:00', $utc);\n $di = date_diff($d, $d1);\n $t = $di->days / 36525;\n echo \"Number of Julian centuries since 2000-01-01T12:00:00UTC is $t<br>\";\n return 365.2421896698 - 6.15359e-6 * $t - 7.29e-10 * $t ** 2 + 2.64e-10 * $t ** 3;\n}", "function jumlah_ps1h($clock){\n\t\t$query1 = \"SELECT AVG(power) AS jumlah1 FROM sensor_1r3 WHERE t=$clock\";\n\t\treturn $this->db->query($query1)->result();\n\t}", "public function avg($matcher = null);", "private function calculateAvg($countHash, $params)\n {\n if (empty($countHash))\n {\n return;\n }\n\n $divisor = count($countHash['periodSum']);\n\n // Build locationsAvgSum array\n foreach ($countHash['locationsSum'] as $key=>$val)\n {\n $countHash['locationsAvgSum'][$key] = $val / $divisor;\n }\n\n // Build activitiesAvgSum array\n foreach ($countHash['activitiesSum'] as $key=>$val)\n {\n $countHash['activitiesAvgSum'][$key] = $val / $divisor;\n }\n\n // Calculate averages for periodAvg array while building locationAvgAvg array\n foreach ($countHash['periodAvg'] as $date=>$day)\n {\n $sessions = $day['sessions'];\n foreach ($sessions as $sessID => $sess)\n {\n foreach ($sess as $locationID => $count)\n {\n if (!isset ($countHash['periodAvg'][$date]['locations'][$locationID]))\n {\n $countHash['periodAvg'][$date]['locations'][$locationID] = array('count' => $count, 'divisor' => 1);\n $countHash['locationsAvgAvg']['days'][$date][$locationID] = array('count' => $count, 'divisor' => 1);\n }\n else\n {\n $countHash['periodAvg'][$date]['locations'][$locationID]['count'] += $count;\n $countHash['periodAvg'][$date]['locations'][$locationID]['divisor'] += 1;\n\n $countHash['locationsAvgAvg']['days'][$date][$locationID]['count'] += $count;\n $countHash['locationsAvgAvg']['days'][$date][$locationID]['divisor'] += 1;\n }\n }\n }\n }\n\n // periodAvg\n foreach ($countHash['periodAvg'] as $date=>$day)\n {\n $locations = $day['locations'];\n\n $avg = array_reduce($locations, function($memo, $location) {\n $val = $location['count'] / $location['divisor'];\n return $memo + $val;\n }, $memo = 0);\n\n $countHash['periodAvg'][$date]['count'] = $avg;\n }\n\n // locationsAvgAvg\n foreach ($countHash['locationsAvgAvg']['days'] as $date => $day)\n {\n foreach ($day as $locationID => $location)\n {\n if (!isset($countHash['locationsAvgAvg']['averages'][$locationID]))\n {\n $countHash['locationsAvgAvg']['averages'][$locationID] = array('avg' => $location['count'] / $location['divisor'], 'divisor' => 1);\n }\n else\n {\n $countHash['locationsAvgAvg']['averages'][$locationID]['avg'] += $location['count'] / $location['divisor'];\n $countHash['locationsAvgAvg']['averages'][$locationID]['divisor'] += 1;\n\n }\n }\n }\n\n foreach ($countHash['locationsAvgAvg']['averages'] as $locationID => $location)\n {\n if ($location['avg'] / $location['divisor'] > 0)\n {\n $countHash['locationsAvgAvg'][$locationID] = $location['avg'] / $location['divisor'];\n }\n elseif ($location['avg'] / $location['divisor'] === 0)\n {\n $countHash['locationsAvgAvg'][$locationID] = 0;\n }\n }\n\n // activitiesAvgAvg\n foreach ($countHash['activitiesAvgAvg']['days'] as $date => $day)\n {\n $sessions = $day['sessions'];\n foreach ($sessions as $sessID => $sess)\n {\n foreach ($sess as $activityID => $count)\n {\n if (!isset ($countHash['activitiesAvgAvg']['days'][$date]['activities'][$activityID]))\n {\n $countHash['activitiesAvgAvg']['days'][$date]['activities'][$activityID] = array('count' => $count, 'divisor' => 1);\n }\n else\n {\n $countHash['activitiesAvgAvg']['days'][$date]['activities'][$activityID]['count'] += $count;\n $countHash['activitiesAvgAvg']['days'][$date]['activities'][$activityID]['divisor'] += 1;\n }\n }\n }\n }\n\n foreach ($countHash['activitiesAvgAvg']['days'] as $date => $day)\n {\n $activities = $day['activities'];\n foreach($activities as $activityID => $activity)\n {\n if (!isset($countHash['activitiesAvgAvg']['averages'][$activityID]))\n {\n $countHash['activitiesAvgAvg']['averages'][$activityID] = array('avg' => $activity['count'] / $activity['divisor'], 'divisor' => 1);\n }\n else\n {\n $countHash['activitiesAvgAvg']['averages'][$activityID]['avg'] += $activity['count'];\n $countHash['activitiesAvgAvg']['averages'][$activityID] ['divisor'] += 1;\n }\n }\n }\n\n foreach ($countHash['activitiesAvgAvg']['averages'] as $activityID => $activity)\n {\n if ($activity['avg'] / $activity['divisor'] > 0)\n {\n $countHash['activitiesAvgAvg'][$activityID] = $activity['avg'] / $activity['divisor'];\n }\n elseif ($activity['avg'] / $activity['divisor'] === 0)\n {\n $countHash['activitiesAvgAvg'][$activityID] = 0;\n }\n }\n\n // dailyHourSummary averages\n $hourlyHash = $this->buildHourlyDivisors($params);\n\n foreach ($countHash['dailyHourSummary'] as $dayKey => $day)\n {\n foreach ($day as $hourKey => $hour)\n {\n $count = count($hour['hourCounts']);\n\n if ($count !== 0)\n {\n $avg = array_sum(array_values($hour['hourCounts'])) / $count;\n $countHash['dailyHourSummary'][$dayKey][$hourKey]['avg'] = $avg;\n\n $avgDays = array_sum(array_values($hour['hourCounts'])) / $hourlyHash[$dayKey];\n $countHash['dailyHourSummary'][$dayKey][$hourKey]['avgDays'] = $avgDays;\n }\n\n // Remove hourCounts array to reduce payload\n unset($countHash['dailyHourSummary'][$dayKey][$hourKey]['hourCounts']);\n }\n }\n\n // Avg of Avgs\n $avgAvgsDivisor = 0;\n $avgAvgsTotal = 0;\n foreach ($countHash['periodAvg'] as $dayKey => $day)\n {\n $avgAvgsDivisor = $avgAvgsDivisor += 1;\n $avgAvgsTotal = $avgAvgsTotal += $day['count'];\n }\n\n if ($avgAvgsDivisor > 0)\n {\n $countHash['totalAvgAvg'] = $avgAvgsTotal / $avgAvgsDivisor;\n }\n else\n {\n $countHash['totalAvgAvg'] = 0;\n }\n\n // Avg of Sums\n $avgSumsDivisor = 0;\n $avgSumsTotal = 0;\n\n foreach ($countHash['periodSum'] as $dayKey => $day)\n {\n $avgSumsDivisor = $avgSumsDivisor += 1;\n $avgSumsTotal = $avgSumsTotal += $day['count'];\n }\n\n if ($avgSumsDivisor > 0)\n {\n $countHash['totalAvgSum'] = $avgSumsTotal / $avgSumsDivisor;\n }\n else\n {\n $countHash['totalAvgSum'] = 0;\n }\n\n // Weekday Avgs\n foreach ($countHash['weekdaySummary'] as $dayKey => $day)\n {\n $numberOfDays = count($day['divisor']);\n\n if ($numberOfDays > 0)\n {\n $countHash['weekdaySummary'][$dayKey]['avg'] = $day['total'] / $numberOfDays;\n }\n else\n {\n $countHash['weekdaySummary'][$dayKey]['avg'] = 0;\n }\n }\n\n // Number of days with counts\n $countHash['daysWithObservations'] = $avgSumsDivisor;\n\n return $countHash;\n }", "public function graphmonthused()\n \t{\n \t\t// announce return variable\n \t\t$return \t= \tarray();\n \t\t$count \t\t=\tarray();\n \t\t// select logger collection \n \t\t$use_data \t= \t$this->mongo_db->db->used;\n \t\t// preparing query data\n \t\t$splitday \t= \texplode('-', $this->use_date);\n \t\t// check day in month\n \t\t$lastday \t= \tcal_days_in_month(CAL_GREGORIAN,$splitday[1],$splitday[0]);\n \t\tfor ($i = 1; $i <= $lastday; $i++) \n \t\t{\n \t\t\tif (strlen($i) == 1) \n \t\t\t{\n \t\t\t\t// build query data\n \t\t\t\t$querydata \t= \tarray(\n \t\t\t\t\t'use_date' \t\t=> \t\t$splitday[0].'-'.$splitday[1].'-0'.$i, \n \t\t\t\t\t'use_appid' \t=> \t\t$this->use_appid\n \t\t\t\t\t);\n \t\t\t\t// count and insert data to array\n \t\t\t\tarray_push($count, $use_data->count($querydata));\n \t\t\t} \n \t\t\telse \n \t\t\t{\n \t\t\t\t// build query data\n \t\t\t\t$querydata \t\t= \tarray(\n \t\t\t\t\t'use_date' \t=> \t$splitday[0].'-'.$splitday[1].'-'.$i, \n \t\t\t\t\t'use_appid' => \t$this->use_appid\n \t\t\t\t\t);\n \t\t\t\t// count and insert data to array\n \t\t\t\tarray_push($count, $use_data->count($querydata));\n \t\t\t}\n \t\t}\n\n \t\t$return\t\t=\tarray(\n \t\t\t'lastday'\t=>\t$lastday,\n \t\t\t'data'\t\t=>\tarray(\n\t\t\t\t'name'\t\t=>\t\t'User',\n \t\t\t\t'data'\t\t=>\t\t$count\n \t\t\t\t)\n \t\t\t);\n\n \t\treturn $return;\t\n \t}", "function evaporator($content, $evap_per_day, $threshold) {\n $result = 0;\n $percentage = 100; \n while ($percentage > $threshold) {\n $percentage = $percentage - $percentage * ($evap_per_day / 100);\n $result += 1;\n }\n return $result;\n}", "public static function average()\n {\n //retrieve the arguments passed to the function, and extracts the reference to the execution environment\n $args = func_get_args();\n $self = array_shift($args);\n\n //return the average of the array\n return array_sum($args) / count($args); \n }", "public function getCounterOfMonth($month = 0) {\n\t\t$month = (0 === $month OR $month > 12 OR $month < 1) ? $this->Request->month : $month;\n\t\t$this->Db->query(\"SELECT COUNT(*) FROM `yp_stat` \n\t\t\tWHERE `month` = {$month}\n\t\t\t\tAND `year` = {$this->Request->year}\");\n\t\t$stat = $this->Db->fetch_field();\n\n\t\treturn (int) $stat[0];\n\t}" ]
[ "0.6731473", "0.6534233", "0.5774728", "0.57666075", "0.5748297", "0.56826216", "0.5594135", "0.5580395", "0.55687326", "0.5542909", "0.5489903", "0.5447866", "0.5435564", "0.5427608", "0.54125357", "0.53928846", "0.53855795", "0.53708386", "0.5346335", "0.5311811", "0.53094697", "0.5306063", "0.53005165", "0.53004134", "0.52929574", "0.52911055", "0.5290973", "0.5283261", "0.5278602", "0.526355", "0.52394456", "0.52344203", "0.5208787", "0.51879525", "0.51854825", "0.5178063", "0.5166953", "0.51465553", "0.5140702", "0.51319295", "0.5112495", "0.51097727", "0.5095214", "0.5060439", "0.50595397", "0.5056178", "0.50455546", "0.5038451", "0.502768", "0.5027147", "0.5023058", "0.5022065", "0.50024045", "0.49932534", "0.4975185", "0.49729002", "0.49723718", "0.49721754", "0.496951", "0.49397528", "0.49237704", "0.4913143", "0.4910279", "0.48996082", "0.48988312", "0.48924425", "0.48884663", "0.488765", "0.48805383", "0.48718444", "0.48606446", "0.4858982", "0.48589686", "0.48433277", "0.4830163", "0.48065457", "0.4795734", "0.47901678", "0.47860068", "0.47840208", "0.4783217", "0.47810733", "0.47778895", "0.47747096", "0.47746176", "0.4773517", "0.47584498", "0.4755391", "0.4748968", "0.4744061", "0.47394493", "0.47374845", "0.47370052", "0.4729948", "0.47283813", "0.4721198", "0.47153157", "0.4709666", "0.47057977", "0.4705301" ]
0.6226479
2
Returns an array of event names this subscriber wants to listen to.
public static function getSubscribedEvents();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventNames()\n {\n return array_keys($this->events);\n }", "public static function getSubscribedEvents() {\n return [];\n }", "public static function getSubscribedEvents(): array\n {\n return [\n WsServerEvent::HANDSHAKE_SUCCESS => 'handshakeOk',\n WsServerEvent::MESSAGE_RECEIVE => 'messageReceive',\n WsServerEvent::CLOSE_BEFORE => 'messageReceive',\n ];\n }", "public function getEventNames(){\n return array($this->getEventName() => array($this,'handle'));\n }", "public static function getSubscribedEvents()\n {\n return array(\n DefaultEvents::default_pre_index => 'onCustomListener',\n DefaultEvents::default_pre_index => 'onCustomListener',\n OtherEvents::other_pre_index => 'onCustomListener',\n OtherEvents::other_pox_index => 'onCustomListener'\n );\n }", "public static function get_subscribed_events() {\r\n\t\treturn [\r\n\t\t\t'rocket_buffer' => [\r\n\t\t\t\t[ 'extract_ie_conditionals', 1 ],\r\n\t\t\t\t[ 'inject_ie_conditionals', 34 ],\r\n\t\t\t],\r\n\t\t];\r\n\t}", "public static function getEvents(): array\n {\n return is_array(static::$events) ? static::$events : [static::$events];\n }", "public function getEventNames()/*# : array */;", "public function getSubscribedEvents(): array\n {\n return [\n Events::prePersist,\n Events::preUpdate,\n ];\n }", "public static function getSubscribedEvents(): array\n {\n return [\n LoginActionEvent::NAME => [\n ['flashLoginEvent', self::FLASH_MESSAGE_PRIORITY],\n ['afterLogin'],\n ]\n ];\n }", "public static function getSubscribedEvents(): array\n\t{\n\t\t// Only subscribe events if the component is installed and enabled\n\t\tif (!ComponentHelper::isEnabled('com_ars'))\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t'onContentPrepare' => 'onContentPrepare',\n\t\t];\n\t}", "public function getSubscribedEvents(): array\n {\n return [\n Events::postLoad,\n Events::onFlush,\n Events::postFlush,\n ];\n }", "public static function getListeners() : array\n {\n return Event::$listeners;\n }", "public static function getSubscribedEvents()\n {\n return [NotificationEvent::NAME => ['handleNotificationEvent', self::getPriority()]];\n }", "public static function getSubscribedEvents()\n {\n return [\n SubscriptionController::USER_SUBSCRIBED => 'onUserSubscribed',\n ];\n }", "public static function getSubscribedEvents()\n {\n return array(\n ApplicationCreatedEvent::NAME => array(\n array( 'sendConfirmationMail', 0 ),\n array( 'createAdmissionSubscriber', - 2 ),\n ),\n );\n }", "static public function getSubscribedEvents()\n {\n return array(\n JobEventsMap::STATE_START => array('logJobEvent'),\n JobEventsMap::STATE_FAIL => array('logJobEvent'),\n JobEventsMap::STATE_ERROR => array('logJobEvent'),\n JobEventsMap::STATE_ADD => array('logJobEvent'),\n JobEventsMap::STATE_FINISH => array('logJobEvent'),\n \n WorkerEventsMap::WORKER_START => array('logWorkerEvent'),\n WorkerEventsMap::WORKER_FINISH => array('logWorkerEvent'),\n WorkerEventsMap::WORKER_ERROR => array('logWorkerEvent'),\n \n QueueEventsMap::QUEUE_LIST => array('logQueueListEvent'),\n QueueEventsMap::QUEUE_LOCK => array('logQueueLockEvent'),\n QueueEventsMap::QUEUE_UNLOCK => array('logQueueUnlockEvent'),\n \n QueueEventsMap::QUEUE_LOOKUP => array('logQueueLookupEvent'),\n QueueEventsMap::QUEUE_PURGE => array('logQueuePurgeEvent'),\n QueueEventsMap::QUEUE_PURGE_ACTIVITY => array('logQueuePurgeActivityEvent'),\n QueueEventsMap::QUEUE_QUERY_ACTIVITY => array('logQueueQueryActivityEvent'),\n \n QueueEventsMap::QUEUE_REC => array('logQueueReceiveEvent'),\n QueueEventsMap::QUEUE_REMOVE => array('logQueueRemoveEvent'),\n QueueEventsMap::QUEUE_SENT => array('logQueueSendEvent'),\n \n \n MonitoringEventsMap::MONITOR_COMMIT => array('logMonitorCommitEvent'),\n MonitoringEventsMap::MONITOR_LOCK => array('logMonitorLockEvent'),\n MonitoringEventsMap::MONITOR_QUERY => array('logMonitorQueryEvent'),\n MonitoringEventsMap::MONITOR_RUN => array('logMonitorRunEvent')\n );\n }", "public function getListeners($eventName): array;", "public static function getSubscribedEvents()\n {\n return [\n SetMessageStatusEvent::NAME => 'onSetMessageStatus',\n ];\n }", "public static function getSubscribedEvents(): array\n {\n return [\n KernelEvents::REQUEST => ['onKernelRequest', 110],\n KernelEvents::RESPONSE => ['onKernelResponse', 10],\n ];\n }", "public function getEvents()\n {\n return $this->eventListeners;\n }", "function getEvents() {\n return [];\n }", "public static function getSubscribedEvents()\n {\n return array(\n GetFormDataControllerEvent::NAME => array(\n array('getFormDataNewsController')\n )\n );\n }", "protected function getRegisteredEvents() {\n $events = [];\n foreach ($this->loadMultiple() as $rules_config) {\n foreach ($rules_config->getEventNames() as $event_name) {\n $event_name = $this->eventManager->getEventBaseName($event_name);\n if (!isset($events[$event_name])) {\n $events[$event_name] = $event_name;\n }\n }\n }\n return $events;\n }", "public static function getSubscribedEvents()\n {\n return [\n FOSUserEvents::REGISTRATION_INITIALIZE => [\n ['disableUser', 0],\n ],\n FOSUserEvents::REGISTRATION_SUCCESS => [\n ['registrationFlashMessage', 0],\n ],\n ];\n }", "public static function getEventNames()\n {\n return array(\n self::CREATE_CONNECTION,\n self::DEPLOY_COMMAND_COMPLETE,\n self::DEPLOY_RELEASE,\n self::DEPLOY_RELEASE_COMPLETE,\n self::DEPLOY_RELEASE_FAILED,\n self::GATHER_FACTS,\n self::GET_WORKSPACE,\n self::INITIALIZE,\n self::INSTALL_COMMAND_COMPLETE,\n self::INSTALL_RELEASE,\n self::INSTALL_RELEASE_COMPLETE,\n self::INSTALL_RELEASE_FAILED,\n self::LOG,\n self::PREPARE_DEPLOY_RELEASE,\n self::PREPARE_RELEASE,\n self::PREPARE_WORKSPACE,\n self::ROLLBACK_RELEASE,\n self::ROLLBACK_RELEASE_COMPLETE,\n self::ROLLBACK_RELEASE_FAILED,\n );\n }", "protected static function allowedEvents()\n\t{\n\t\treturn array();\n\t}", "public static function registeredSignals(): array\n {\n return array_keys(self::$callbacks);\n }", "public static function get_subscribed_events() {\r\n\t\treturn [\r\n\t\t\t'wp_head' => [ 'preload_fonts' ],\r\n\t\t];\r\n\t}", "public function getSubscribedEvents(): array\n {\n return [\n Events::onFlush\n ];\n }", "public function getSubscribedEvents(): array\n {\n return [\n Events::prePersist,\n ];\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postPersist,\n Events::postUpdate,\n Events::preRemove,\n ];\n }", "public function getSubscribedEvents()\n {\n return array(\n Events::onFlush,\n Events::loadClassMetadata\n );\n }", "private function registered_events () {\n\n\t\t$triggers = array();\n\n\t\tforeach( get_option( 'nce_triggers' ) as $trigger => $enabled ) {\n\n\t\t\tif( $enabled == \"1\" ) {\n\n\t\t\t\t$triggers[] = $trigger;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $triggers;\n\n\t}", "public function getSubscribedEvents()\n {\n return array(\n Events::prePersist,\n Events::onFlush,\n Events::loadClassMetadata\n );\n }", "public static function getSubscribedEvents(): array\n {\n return [\n ProductEvents::PRODUCT_LOADED_EVENT => 'onProductsLoaded',\n ProductEvents::PRODUCT_WRITTEN_EVENT => 'onProductCreated',\n OrderEvents::ORDER_LOADED_EVENT => 'onOrdersLoaded',\n ];\n }", "public static function getSubscribedEvents()\n {\n return array(\n Constants::OMNIPAY_REQUEST_BEFORE_SEND => array('onOmnipayRequestBeforeSend', self::PRIORITY),\n Constants::OMNIPAY_RESPONSE_SUCCESS => array('onOmnipayResponseSuccess', self::PRIORITY),\n Constants::OMNIPAY_REQUEST_ERROR => array('onOmnipayRequestError', self::PRIORITY),\n );\n }", "public static function getSubscribedEvents()\n {\n return [\n KernelEvents::CONTROLLER => \"onKernelController\",\n KernelEvents::EXCEPTION => \"onKernelException\"\n ];\n }", "public function getSubscribedEvents()\n {\n return [FeedFacade::FEED_EVENT];\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postUpdate,\n Events::postPersist,\n Events::preRemove\n ];\n }", "public function getSubscribedEvents()\n\t{\n\t\treturn [\n\t\t\t'Nette\\Application\\Application::onStartup' => 'appStartup',\n\t\t\t'Nette\\Application\\Application::onRequest' => 'appRequest',\n\t\t];\n\t}", "public function getSubscribedEvents()\n {\n return [\n Events::postFlush,\n Events::preRemove\n ];\n }", "public function getSubscribedEvents()\n {\n return [\n Events::prePersist,\n Events::postUpdate,\n Events::preRemove,\n ];\n }", "public function getSubscribedEvents(): array\n {\n return [\n 'postPersist',\n 'preUpdate',\n 'preRemove',\n ];\n }", "public function getSubscribedEvents()\n {\n return array(self::prePersist);\n }", "public static function getSubscribedEvents()\n {\n return [\n FOSUserEvents::REGISTRATION_CONFIRM => [\n ['onRegistrationConfirm', -10],\n ],\n ];\n }", "public static function getSubscribedEvents()\n {\n return [\n KernelEvents::VIEW => ['onKernelView', 30],\n KernelEvents::RESPONSE => ['onKernelResponse', 30],\n ];\n }", "public static function getSubscribedEvents(): array\n {\n return [\n 'Enlight_Controller_Front_RouteShutdown' => ['handleError', 1000],\n 'Enlight_Controller_Front_PostDispatch' => ['handleError', 1000],\n 'Shopware_Console_Add_Command' => ['handleError', 1000],\n 'Enlight_Controller_Front_DispatchLoopShutdown' => ['handleException', 1000],\n ];\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postPersist,\n Events::postUpdate,\n// Events::preUpdate,\n ];\n\n }", "public function getListeners($event): array;", "public static function getSubscribedEvents()\n {\n return [\n EVENTS::AUTHENTICATION_SUCCESS => 'onAuthenticationSuccessResponse',\n EVENTS::AUTHENTICATION_FAILURE => 'onAuthenticationFailure'\n ];\n }", "public function getSubscribedEvents();", "public static function getSubscribedEvents()\n\t{\n\t\treturn [\n\t\t\tMeetupEvents::MEETUP_JOIN\t=> 'onUserJoins',\n\t\t\tKernelEvents::TERMINATE\t\t=> 'generatePreferences'\n\t\t];\n\t}", "public function getSubscribedEvents()\n {\n return [\n 'postPersist',\n 'postUpdate',\n 'preRemove',\n ];\n }", "public function getSubscribedEvents()\n {\n return [\n 'postPersist',\n 'postUpdate',\n 'preRemove',\n ];\n }", "protected static function recordableEvents()\n {\n if (isset(static::$recordableEvents)) {\n return static::$recordableEvents;\n }\n\n return ['created', 'updated', 'deleted'];\n }", "public static function getSubscribedEvents()\n {\n return array(\n KernelEvents::REQUEST => array('onKernelRequest', 9999),\n KernelEvents::RESPONSE => array('onKernelResponse', 9999),\n //KernelEvents::EXCEPTION => 'onKernelException'\n );\n }", "public static function getSubscribedEvents()\n {\n return array(\n KernelEvents::REQUEST => 'onMatchRequest'\n );\n }", "public static function getSubscribedEvents()\n {\n return [\n [\n 'event' => 'serializer.pre_serialize',\n 'method' => 'onPreSerialize',\n ],\n [\n 'event' => 'serializer.post_serialize',\n 'method' => 'onPostSerialize',\n ],\n [\n 'event' => 'serializer.pre_deserialize',\n 'method' => 'onPreDeSerialize',\n ],\n [\n 'event' => 'serializer.post_deserialize',\n 'method' => 'onPostDeSerialize',\n ],\n ];\n }", "public static function getSubscribedEvents()\n {\n return array(\n Events::PreFlush => 'onPreFlush',\n Events::PostFlush => 'onPostFlush',\n );\n }", "public static function getSubscribedEvents()\n {\n return array(\n EasyAdminEvents::PRE_LIST => 'checkUserRights',\n EasyAdminEvents::PRE_EDIT => 'checkUserRights',\n EasyAdminEvents::PRE_SHOW => 'checkUserRights',\n EasyAdminEvents::PRE_NEW => 'checkUserRights',\n EasyAdminEvents::PRE_DELETE => 'checkUserRights',\n FOSUserEvents::RESETTING_RESET_SUCCESS => 'redirectUserAfterPasswordReset'\n );\n }", "public static function getSubscribedEvents()\n {\n return [\n //Step 4:Classname::ConstantName or event name 'kernel.request' => 'functionameyouliketocall' - onKernelRequest()\n KernelEvents::REQUEST => 'onKernelRequest',\n ];\n }", "public function getListeners(): array;", "public static function getSubscribedEvents()\n {\n return [\n CoucouEvent::NAME => 'onCoucou'\n ];\n }", "public static function getSubscribedEvents(): array\n {\n return [\n Events::FIGURE_CREATED => 'onFigureCreated',\n ];\n }", "public function getSubscribedEvents()\n\t{\n\t\treturn [\n\t\t\tEvents::onFlush\n\t\t];\n\t}", "public function getEvents()\n {\n $events = [];\n foreach ($this->servers as $server) {\n $serverEvents = $server->getEvents();\n if (empty($serverEvents))\n continue;\n $events = array_merge($events, $serverEvents);\n }\n\n return $events;\n }", "public function getSubscribedEvents()\n {\n return [\n Events::postLoad,\n Events::prePersist,\n ];\n }", "public function listeners($event)\n {\n if (!empty($this->listeners[$event])) {\n return $this->listeners[$event];\n }\n return array();\n }", "public static function getSubscribedEvents()\n {\n return array(\n KernelEvents::REQUEST => array('onKernelRequest', 10), // 10 is before Firewall listener.\n );\n }", "public function events()\n {\n return $this->events;\n }", "public function events()\n {\n return $this->events;\n }", "public static function getSubscribedEvents()\n {\n return array(\n AvisotaMessageEvents::POST_RENDER_MESSAGE_CONTENT => array(\n array('injectGA', -500),\n ),\n\n GetOperationButtonEvent::NAME => array(\n array('prepareButton'),\n ),\n\n BuildDataDefinitionEvent::NAME => array(\n array('injectGALegend'),\n ),\n );\n }", "public static function getSubscribedEvents()\n {\n return [\n // PluginEvents::INIT => ['init', PHP_INT_MAX]\n ];\n }", "public static function getSubscribedEvents()\n {\n return [\n AppBundleEvent::QUESTION_REGISTER => 'onQuestionRegister'\n ];\n }", "public function getSubscribedEvents(): array\n {\n return [\n DoctrineEvents::prePersist\n ];\n }", "public function getEventNameAllowableValues()\n {\n return [\n self::EVENT_NAME_EMAIL_RECEIVED,\n self::EVENT_NAME_NEW_EMAIL,\n self::EVENT_NAME_NEW_CONTACT,\n self::EVENT_NAME_NEW_ATTACHMENT,\n self::EVENT_NAME_EMAIL_OPENED,\n self::EVENT_NAME_EMAIL_READ,\n self::EVENT_NAME_DELIVERY_STATUS,\n self::EVENT_NAME_BOUNCE,\n self::EVENT_NAME_BOUNCE_RECIPIENT,\n self::EVENT_NAME_NEW_SMS,\n ];\n }", "public static function getEvents()\n {\n $events = parent::getEvents();\n $events[] = self::ON_FIRST_LOGIN;\n $events[] = self::ON_LOGIN;\n $events[] = self::ON_LOGOUT;\n $events[] = self::ON_PASSWORD_CHANGE;\n\n return $events;\n }", "public static function getSubscribedEvents() {\n return [\n ScriptEvents::POST_INSTALL_CMD => 'install',\n ScriptEvents::POST_UPDATE_CMD => 'install',\n ];\n }", "public function getSubscribedEvents()\n {\n return [\n 'preUpdate',\n 'prePersist',\n 'preRemove',\n 'preFlush',\n 'postFlush',\n 'postPersist',\n 'postUpdate',\n 'postRemove',\n 'postLoad',\n 'onFlush',\n ];\n }", "public function getSubscribedEvents(): array\n\t{\n\t\treturn [Events::postPersist];\n\t}", "public function getListeners($event = NULL)\n\t{\n\t\tif (!empty($event) && array_key_exists($event, static::$events))\n\t\t\treturn static::$events[$event];\n\t\treturn static::$events;\n\t}", "public static function getSubscribedEvents()\n {\n return [\n TheliaEvents::ORDER_UPDATE_STATUS => ['implementInvoice', 100]\n ];\n }", "public static function getSubscribedEvents()\n {\n return array(\n KernelEvents::RESPONSE => 'onKernelResponse',\n KernelEvents::REQUEST => 'onKernelRequest'\n );\n }", "public static function getSubscribedEvents()\n {\n return array(\n SubscriptionNotificationCenterBridgeEvents::BUILD_TOKENS_FROM_RECIPIENT => array(\n array('buildRecipientTokens'),\n ),\n );\n }", "public function getSubscribedEvents(): array\n {\n return [Events::loadClassMetadata, Events::postPersist, Events::postUpdate];\n }", "public static function getSubscribedEvents()\n {\n // event can be dispatch with dispatcher in a controller ...\n return [\n 'user.update' => 'updateUser'\n ];\n }", "private static function get_events() {\n\t\treturn array(\n\t\t\t'formidable_send_usage' => 'weekly',\n\t\t);\n\t}", "public static function getSubscribedEvents()\n {\n return array(\n FixEvents::APPLY => array(\n 'apply', 128\n )\n );\n }", "public function getSubscribedEvents()\n {\n return $this->wrapped->getSubscribedEvents();\n }", "public static function eventSubscriptions() : iterable;", "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 getSubscribedEvents()\n {\n return [\n 'prePersist',\n 'postPersist',\n 'preUpdate',\n 'postLoad',\n ];\n }", "public static function getSubscribedEvents()\n {\n return [\n ScriptEvents::POST_AUTOLOAD_DUMP => [\n ['onPostAutoloadDump', 0],\n ],\n ];\n }", "public static function getSubscribedEvents()\n {\n return [\n FormEvents::PRE_SET_DATA => 'onPreSetData',\n ];\n }", "public static function getSubscribedEvents()\n {\n return [\n FormEvents::PRE_SET_DATA => 'onPreSetData',\n ];\n }", "public function getSubscribedEvents()\n {\n return [\n InvitedExistingUserToTenancy::class => 'whenInvitedExistingUserToTenancy',\n InvitedNewUserToTenancy::class => 'whenInvitedNewUserToTenancy',\n ];\n }", "public static function getSubscribedEvents()\n {\n return array(\n ServiceCacheEvents::LOADED => 'onCacheLoaded',\n );\n }", "public static function getSubscribedEvents()\n {\n return array(\n KernelEvents::RESPONSE => array('onResponse', 200)\n );\n }" ]
[ "0.77089524", "0.76370233", "0.7409664", "0.73068905", "0.72839266", "0.7128449", "0.7105289", "0.70695966", "0.7054348", "0.701558", "0.70062685", "0.700399", "0.6978581", "0.6964584", "0.6951446", "0.6927608", "0.68864584", "0.6865167", "0.6854072", "0.68353397", "0.6833548", "0.6816227", "0.68139887", "0.68104476", "0.68042463", "0.67956066", "0.6791328", "0.67523736", "0.6747314", "0.67248505", "0.67206794", "0.67181814", "0.67154616", "0.6694994", "0.66933626", "0.66918164", "0.66873", "0.6675427", "0.666611", "0.6661266", "0.6659194", "0.6652795", "0.66461957", "0.66403604", "0.662421", "0.6603383", "0.65903413", "0.65898293", "0.6568636", "0.6565398", "0.65422446", "0.6540449", "0.65393806", "0.6534147", "0.6534147", "0.65310025", "0.6530698", "0.65185326", "0.65149045", "0.6503993", "0.6489991", "0.6480945", "0.64734435", "0.6466115", "0.64626676", "0.6462056", "0.64506525", "0.6447601", "0.6439219", "0.6428326", "0.6427775", "0.6427775", "0.64266545", "0.6424891", "0.64244074", "0.64130163", "0.640631", "0.64012134", "0.63994664", "0.63926226", "0.6392082", "0.6388036", "0.6384466", "0.6366309", "0.63570726", "0.63520396", "0.6350649", "0.6349935", "0.63480216", "0.6340595", "0.6335374", "0.6322569", "0.63215685", "0.63203794", "0.631764", "0.631764", "0.6309283", "0.6307351", "0.62944084" ]
0.6787687
28
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
Execute the console command.
public function handle() { app()->make(\Spatie\Permission\PermissionRegistrar::class)->forgetCachedPermissions(); $routeCollection = Route::getRoutes(); foreach ($routeCollection as $route) { $routeName = $route->getName(); if ($this->startWith($routeName, 'shop')) { $permission = Permission::findOrCreate($routeName); $tokens = explode('.', $routeName); if (isset($tokens[1])) { $permission->group = $tokens[1]; } if (isset($tokens[2])) { $permission->title = $tokens[2]; } $permission->module = 'shop'; $permission->save(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.61484164", "0.6146793", "0.6139144", "0.61347336", "0.6131662", "0.61164206", "0.61144686", "0.61109483", "0.61082935", "0.6105106", "0.6103338", "0.6102162", "0.61020017", "0.60962653", "0.6095482", "0.6091584", "0.60885274", "0.6083864", "0.6082142", "0.6077832", "0.60766655", "0.607472", "0.60739267", "0.607275", "0.60699606", "0.6069931", "0.6068753", "0.6067665", "0.6061175", "0.60599935", "0.6059836", "0.605693", "0.60499364", "0.60418284", "0.6039709", "0.6031963", "0.6031549", "0.6027515", "0.60255647", "0.60208166", "0.6018581", "0.60179937", "0.6014668", "0.60145515", "0.60141796", "0.6011772", "0.6008498", "0.6007883", "0.60072047", "0.6006732", "0.60039204", "0.6001778", "0.6000803", "0.59996396", "0.5999325", "0.5992452", "0.5987503", "0.5987503", "0.5987477", "0.5986996", "0.59853584", "0.5983282", "0.59804505", "0.5976757", "0.5976542", "0.5973796", "0.5969228", "0.5968169", "0.59655035", "0.59642595", "0.59635514", "0.59619296", "0.5960217", "0.5955025", "0.5954439", "0.59528315", "0.59513766", "0.5947869", "0.59456027", "0.5945575", "0.5945031" ]
0.0
-1
Get the console command arguments.
protected function getArguments() { return [ ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getArgs()\n {\n return $this->meta[Cli::ARGS] ?? [];\n }", "private function getArguments() {\n return array_slice($argv, 1);\n }", "public function getArgs() {\n return $this->commandArgs;\n }", "public function getCommandLineArguments()\n {\n return $this->commandLineArguments;\n }", "public function args()\n {\n return $this->arguments->get();\n }", "public function getArgs()\n {\n if ($this['args']) {\n return $this['args'];\n }\n\n return [];\n }", "public function getArgs()\n {\n return $this->args;\n }", "public function getArgs()\n {\n return $this->args;\n }", "public function getArgs()\n {\n return $this->args;\n }", "public function getArgs()\n {\n return $this->args;\n }", "public function getArgs()\n {\n return $this->args;\n }", "public function getArgs();", "public function getArgs();", "public function getArgs() {\n return $this->args;\n }", "public function getArgs()\n {\n return $this->args;\n }", "public function getArguments()\n {\n return sprintf(\n \"--%s %s \\\"%s\\\" %s %s %s\",\n $this->name,\n $this->getBoxOptionToString(),\n $this->message,\n $this->height,\n $this->width,\n $this->default\n );\n }", "protected function getArguments()\r\n\t{\r\n\t\treturn isset($this->arguments) ? $this->arguments : array();\r\n\t}", "public function args()\n {\n return [];\n }", "public function getArgs(): array\n {\n return $this->args;\n }", "public function getArguments()\n {\n return sprintf(\n \"--%s %s \\\"%s\\\" %s %s %s %s\",\n $this->name,\n $this->getBoxOptionToString(),\n $this->message,\n $this->height,\n $this->width,\n $this->height - 8,\n $this->getListString()\n );\n }", "public function getArgs() {\n\t\treturn $this->args;\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\n\t\treturn array(\n\t\t\tarray('run', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}", "protected function getArguments()\n {\n return [\n ['name', InputArgument::REQUIRED, 'The name of the command.'],\n ];\n }", "public function getArguments() {\n return $this->args;\n }", "public function getArgs() : array\n {\n return $this->args;\n }", "protected function getArguments()\n {\n return [\n ['name', InputArgument::REQUIRED, 'The name of the command.'],\n ['alias', InputArgument::OPTIONAL, 'The alias of module will be used.'],\n ];\n }", "public function getArgs()\n {\n return $this->noramlizeArgs($this->_args);\n }", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t['connection', InputArgument::OPTIONAL, 'Database connection name', Config::get('database.default')],\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t//\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}", "public function getArgs()\n {\n return $this->parsedArgs;\n }", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t// array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t// array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}", "protected function getArguments()\n {\n return array(\n //array('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }", "public function getArguments() : array\n {\n return $this->args;\n }", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t/*['example', InputArgument::REQUIRED, 'An example argument.'],*/\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t];\n\t}", "protected function getArguments()\n {\n return array( //\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }", "protected function getArguments()\n {\n return array( //\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t['example', InputArgument::OPTIONAL, 'An example argument.'],\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t['example', InputArgument::OPTIONAL, 'An example argument.'],\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}", "protected function getArguments()\n {\n return array(//\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t#array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t];\n\t}", "protected function getArguments()\n {\n return array(\n array('example', InputArgument::OPTIONAL, 'An example argument.'),\n );\n }", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}", "public function getArguments() {}", "public function getArguments() {}", "public function getArguments() {}", "public function getArguments() {}", "protected function getArguments()\n {\n return [\n // ['example', InputArgument::REQUIRED, 'An example argument.'],\n ];\n }", "protected function getArguments()\n {\n return [\n // ['example', InputArgument::REQUIRED, 'An example argument.'],\n ];\n }", "protected function getArguments()\n {\n return [\n // ['example', InputArgument::REQUIRED, 'An example argument.'],\n ];\n }", "protected function getArguments()\n {\n return [\n//\t\t\t['example', InputArgument::REQUIRED, 'An example argument.'],\n ];\n }", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\tarray('example', InputArgument::OPTIONAL, 'An example argument.'),\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\tarray('example', InputArgument::OPTIONAL, 'An example argument.'),\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\tarray('example', InputArgument::OPTIONAL, 'An example argument.'),\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\tarray('example', InputArgument::OPTIONAL, 'An example argument.'),\n\t\t);\n\t}", "public static function getArguments()\n {\n return func_get_args();\n }", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//TODO argument to do a single facade. Must be a valid facade\n\t\t\tarray('example', InputArgument::OPTIONAL, 'An example argument.'),\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n {\n return [];\n /*\t\treturn [\n ['example', InputArgument::REQUIRED, 'An example argument.'],\n ];\n */\n }", "protected function getArguments()\n {\n return [\n ['commit', InputArgument::OPTIONAL, 'A descricão do commit.'],\n // ['commit', InputArgument::REQUIRED, 'A descricão do commit.'],\n ];\n }", "protected function getArguments()\n {\n return [\n ['module', InputArgument::OPTIONAL, 'The module for the language file'],\n ['langFile', InputArgument::OPTIONAL, 'The language file to work on'],\n ['targetLocale', InputArgument::OPTIONAL, 'The target locale for which to add missing keys'],\n ];\n }", "protected function getArguments() {\n\t\treturn array();\n\t}", "protected function getArguments()\n {\n return [\n ['db_name', InputArgument::REQUIRED, 'Database name'],\n ];\n }", "public function getArguments()\n {\n return $this->arguments;\n }", "public function getArguments()\n {\n return $this->arguments;\n }", "public function getArguments()\n {\n return $this->arguments;\n }", "protected function getArguments()\n {\n return [\n ['name', InputArgument::REQUIRED, 'The name of the command.'],\n ['component', InputArgument::OPTIONAL, 'The name of component will be used.'],\n ];\n }", "protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getArguments()\n {\n return [\n ['example', InputArgument::REQUIRED, 'An example argument.'],\n ];\n }", "protected function getArguments() {\n\t\treturn array(\n\t\t);\n\t}" ]
[ "0.7929734", "0.79042095", "0.7831461", "0.7587314", "0.75166816", "0.70980483", "0.7015334", "0.7015334", "0.7015334", "0.7015334", "0.7015334", "0.7011597", "0.7011597", "0.6969377", "0.6941954", "0.6919662", "0.69183534", "0.6889421", "0.6861143", "0.68576336", "0.6853908", "0.68240553", "0.68163955", "0.6801406", "0.6779744", "0.6773187", "0.6766259", "0.6718356", "0.66868067", "0.6682031", "0.6665992", "0.6665992", "0.6662437", "0.6646087", "0.6639124", "0.66325283", "0.6631554", "0.6631554", "0.663134", "0.663134", "0.6630261", "0.6630261", "0.6630261", "0.6629428", "0.66274405", "0.66246825", "0.6616279", "0.6616279", "0.6616279", "0.6616279", "0.6616279", "0.6616279", "0.6616279", "0.6616279", "0.6593955", "0.6593955", "0.6593955", "0.6593955", "0.6580068", "0.6580068", "0.6580068", "0.65620434", "0.6558061", "0.6558061", "0.6558061", "0.6558061", "0.6557318", "0.65526676", "0.6550134", "0.6550134", "0.6550134", "0.6550134", "0.6550134", "0.6550134", "0.6550134", "0.6550134", "0.6550134", "0.6550134", "0.6550134", "0.6550134", "0.65485007", "0.65485007", "0.65485007", "0.65485007", "0.65485007", "0.65485007", "0.65485007", "0.65485007", "0.65436697", "0.6535705", "0.65260065", "0.6516756", "0.65142566", "0.6511927", "0.6511927", "0.6511927", "0.6510059", "0.65032375", "0.65032375", "0.6496519", "0.6488758" ]
0.0
-1
Get the console command options.
protected function getOptions() { return [ ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getOptions() {\n return [\n ['env', null, InputOption::VALUE_OPTIONAL, 'The environment the command should run under.', null],\n ];\n }", "protected function getOptions()\n {\n return [\n ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned', 'command:name'],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t['testMode', null, InputOption::VALUE_OPTIONAL, 'Runs the command in Test Mode.', false],\n\t\t];\n\t}", "protected function getOptions()\n {\n $options = [];\n\n // Here we will gather all of the command line options that have been specified with\n // the double hyphens in front of their name. We will make these available to the\n // Blade task file so they can be used in echo statements and other structures.\n foreach ($_SERVER['argv'] as $argument) {\n if (! Str::startsWith($argument, '--') || in_array($argument, $this->ignoreOptions)) {\n continue;\n }\n\n $option = explode('=', substr($argument, 2), 2);\n\n if (count($option) == 1) {\n $option[1] = true;\n }\n\n $optionKey = $option[0];\n\n $options[Str::camel($optionKey)] = $option[1];\n $options[Str::snake($optionKey)] = $option[1];\n }\n\n return $options;\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'],\n ['path', null, InputOption::VALUE_OPTIONAL, 'The path of migrations files to be executed.'],\n ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'],\n\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ['native-import', null, InputOption::VALUE_NONE, 'Use the native importer'],\n ];\n }", "protected function getOptions()\n {\n return array(\n array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'),\n array('pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'),\n array('seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run.'),\n array('force', null, InputOption::VALUE_NONE, 'Force the operation to run while in production.'),\n );\n }", "protected function getOptions()\n {\n return [\n ['port', null, InputOption::VALUE_OPTIONAL, 'The server port to use.', \\config('minions-server.port', 8085)],\n ];\n }", "protected function getOptions()\n {\n return [\n ['facade', '', InputOption::VALUE_NONE, 'Generate facade for current repository'],\n\n ['model', 'm', InputOption::VALUE_REQUIRED, 'Generate a resource repository for the given model'],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t['attach', '-a', InputOption::VALUE_OPTIONAL, 'The pipes to attach to the workflow.', null],\n\t\t\t['unguard', '-u', InputOption::VALUE_NONE, 'Do not make this workflow validate data.', null],\n\t\t];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "public final function getOptions()\n {\n return $this->_getOptions();\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "public function options()\n\t{\n\t\treturn [];\n\t}", "protected static abstract function getOptions();", "public function options()\n {\n return $this->options ?: [];\n }", "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n {\n\n return [\n ['dry-run' , 'd', InputOption::VALUE_NONE, 'Dry Run'],\n ['payment' , 'p', InputOption::VALUE_NONE, 'Payment Address Only'],\n ['public' , 'u', InputOption::VALUE_NONE, 'Public Address Only'],\n ];\n }", "public function options()\n {\n return $this->options;\n }", "public function options()\n {\n return $this->options;\n }", "public function options()\n {\n return $this->options;\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn isset($this->options) ? $this->options : array();\r\n\t}", "function get_options()\n{\n return php_sapi_name() == 'cli' ? get_options_cli() : get_options_url();\n}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n {\n return [\n ['format', 'f', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The names of formats you would like to generate.', null],\n ['regenerate', 'r', InputOption::VALUE_NONE, 'Whether all files must be regenerated even if exist.', null],\n ['temp', 't', InputOption::VALUE_NONE, 'Whether the temporary storage must be processed.', null],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray('dry-run', null, InputOption::VALUE_NONE, 'Displays the new cron without making any changes.', null),\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function _getCliOptions()\n {\n $cliOptions = array();\n\n foreach ($_SERVER['argv'] as $arg) {\n if (substr($arg, 0, 2) == '--' && strpos($arg, '=') !== false) {\n $option = substr($arg, 2);\n $option = explode('=', $option);\n\n $cliOptions[$option[0]] = $option[1];\n }\n }\n\n return $cliOptions;\n }", "protected function getOptions() {\n\t\treturn array();\n\t}", "public function getOpts(): array\n {\n return $this->opts;\n }", "public function getOpts(): array\n {\n return $this->opts;\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'Generate a repository for the given model.'],\n ];\n }", "public function getOptions()\n {\n return $this->options->getOptions();\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'Inject a model to the controller.'],\n ['repository', 'r', InputOption::VALUE_OPTIONAL, 'Inject a repository to the controller.'],\n ['view', '', InputOption::VALUE_OPTIONAL, 'Generate a view controller class.'],\n ];\n }", "protected function getOptions()\n {\n return [\n ['show', null, InputOption::VALUE_NONE, 'Simply display the key instead of modifying files.'],\n ];\n }", "protected function getOptions()\n {\n return array(\n array('dry-run', null, InputOption::VALUE_NONE, 'Only shows which files would have been modified.'),\n array('force', 'f', InputOption::VALUE_NONE, 'Do not confirm before editing files.'),\n array('path', null, InputOption::VALUE_OPTIONAL, 'Path containing the files to be fixed.', 'app')\n );\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }" ]
[ "0.7800682", "0.77591324", "0.751765", "0.7345173", "0.73404354", "0.7306238", "0.72790045", "0.7268271", "0.7237944", "0.71917665", "0.715652", "0.7155546", "0.7137", "0.71122515", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.70998144", "0.70998144", "0.7099153", "0.7092979", "0.7084178", "0.70818704", "0.70631355", "0.7055609", "0.7040382", "0.7040382", "0.7040382", "0.7036282", "0.70356953", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70281166", "0.70248216", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.7022473", "0.70166355", "0.70108926", "0.70108926", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.6996981", "0.6996434", "0.6994164", "0.6993292", "0.6984455", "0.69844353", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616" ]
0.0
-1
Find all classes which use a specific interface.
public function find(string $interface, ?string $directory = null, ?string $namespace = null): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findImplements($interface);", "public function testCanFindClasses()\n {\n foreach ($this->classes as $class) {\n $this->assertTrue(class_exists($class) || interface_exists($class));\n }\n }", "static public function getInterfaces();", "function getClassesThatImplements($psrInterface, string $inNamespace = NULL, \\Closure $callback = NULL) : array\n {\n $store = \\Cache::driver();\n $key = md5($psrInterface);\n\n if ( \\Cache::supportsTags() ) {\n $store = \\Cache::tags([ 'classes_that_implements' ]);\n }\n\n return $store->get($key, function() use($key, $psrInterface, $inNamespace, $callback){\n $map = [];\n\n\n foreach ( getClassesInNamespace($inNamespace) as $class ) {\n if ( in_array($psrInterface, class_implements($class)) ) {\n if ( $callback ) {\n $map = array_merge($map, $callback($class));\n } else {\n $map[] = $class;\n }\n }\n }\n\n if(\\Cache::supportsTags()){\n \\Cache::tags(['classes_that_implements'])->forever($key, $map);\n }else{\n \\Cache::forever($key, $map);\n }\n\n return $map;\n });\n }", "public function getInterfaces() {}", "function getOwnInterfaces();", "#[@test]\n public function classImplementsComparatorInterface() {\n $class= $this->classloader->loadClass($this->classname);\n $interface= XPClass::forName('util.Comparator');\n $interfaces= new HashSet();\n $interfaces->addAll($class->getInterfaces());\n $this->assertTrue($interfaces->contains($interface));\n }", "public function classSet() {\n $set= new HashSet();\n for ($i= 0; $i < $this->interfaces->length; $i++) {\n $set->addAll($this->interfaces[$i]->classSet());\n }\n return $set->toArray();\n }", "public function find($class);", "public function findExtends($class);", "function discoverCandidateClasses($recursive = FALSE);", "public function findClass($class);", "abstract public function getClasses();", "function discoverExistingClasses($recursive = FALSE);", "public function getClasses();", "public function getClasses();", "public function getClasses();", "protected function getClassesToScan()\n\t{\n\t\t$classes = [];\n\n\t\tforeach ($this->scan as $class)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$classes[] = new ReflectionClass($class);\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t//\n\t\t\t}\n\t\t}\n\n\t\treturn $classes;\n\t}", "public static function getAllMikrotikInterfaces(){\n $mikrotiklibrary = new MikrotikLibrary();\n return $mikrotiklibrary->getAllMikrotikinterfaces();\n }", "function implementing($class, $interface) {\n $interfaces = class_implements($class);\n return isset($interfaces[$interface]);\n}", "protected function getClassImplementations()\n {\n }", "protected function getRegisteredClasses() {}", "protected function processSourceTree () {\n\t\t$this->processFileTree();\n\t\tforeach (get_declared_interfaces() as $interface) {\n\t\t$ref = new ReflectionClass($interface);\n\t\t\tif ($ref->isUserDefined()) {\n\t\t\t\t$this->classes[] = $ref;\n\t\t\t}\n\t\t}\n\t\tforeach (get_declared_classes() as $class) {\n\t\t\t$ref = new ReflectionClass($class);\n\t\t\tif ($ref->isUserDefined() && !preg_match('/^Spd/', $class)) {\n\t\t\t\t$this->classes[] = $ref;\n\t\t\t}\n\t\t}\n\t}", "public function implementsInterface($interface) {\n assert (is_string($interface));\n $refl = new \\ReflectionClass($this->name);\n return self::anyNameMatches($refl->getInterfaceNames(), $interface);\n }", "public function getClasses()\n {\n $conf_classes = config('larinterface.classes');\n $conf_directories = config('larinterface.directories');\n $conf_ignore = config('larinterface.ignore');\n\n $classesArray = [];\n\n // Forge classes\n foreach ($conf_classes as $output => $classes) {\n if (is_numeric($output)) {\n $output = 0;\n }\n\n if (is_string($classes)) {\n $classes = [$classes];\n }\n\n if (isset($classesArray[$output])) {\n $classesArray[$output] = array_merge($classesArray[$output], $classes);\n } else {\n $classesArray[$output] = $classes;\n }\n }\n\n // Forge directories\n foreach ($conf_directories as $output => $directories) {\n if (is_numeric($output)) {\n $output = 0;\n }\n\n if (is_string($directories)) {\n $directories = [$directories];\n }\n\n foreach ($directories as $directory) {\n $classes = $this->classFinder->findClasses(base_path($directory));\n\n if (isset($classesArray[$output])) {\n $classesArray[$output] = array_merge($classesArray[$output], $classes);\n } else {\n $classesArray[$output] = $classes;\n }\n }\n }\n\n // Clean forged class\n foreach ($classesArray as $key => $value) {\n\n // Ignore files\n foreach ($conf_ignore as $class) {\n $classKey = array_search($class, $value);\n\n if ($classKey !== false) {\n unset($value[$classKey]);\n }\n }\n\n $classesArray[$key] = array_unique($value);\n }\n\n return $this->classes = $this->extractInterfacePathFromClasses($classesArray);\n }", "public static function getInterfaces($path)\n {\n return preg_match('/class\\s+\\S+\\s+(?:extends\\s+\\S+\\s+)?implements\\s+([\\\\\\\\A-Za-z0-9,\\s]+)/Ss', static::getHead($path), $match)\n ? array_map('trim', explode(',', $match[1]))\n : array();\n }", "static function getUserInstanciableClasses(){\n \n //get all the classes\n $AllClasses=get_declared_classes();\n \n foreach($AllClasses as $Class):\n \n $class = new ReflectionClass($Class);\n \n if($class->isInstantiable() && $class->isUserDefined()):\n \n $InstanciableClasses[]=$Class;\n \n endif;\n \n \n endforeach;\n \n return $InstanciableClasses;\n \n \n }", "public static function instanceOf(string $class, string $interface)\n {\n return collect(class_implements($class))->contains($interface);\n }", "protected function setInterfaces()\n {\n if (count($this->interfaces) === 0) {\n return $this->interfaces;\n }\n\n ksort($this->interface_usage);\n ksort($this->interfaces);\n\n foreach ($this->interfaces as $interface) {\n\n $interface->implemented_by = array();\n $interface->dependency_for = array();\n\n if (isset($this->interface_usage[$interface->qns])) {\n $this->setInterfaceValues($interface, $interface->qns);\n }\n }\n\n return $this->interfaces;\n }", "private function filterProviders($interface)\n {\n $interface = '\\Oink\\Auth\\\\' . $interface;\n\n return array_filter($this->providers, function (AuthProviderInterface $provider) use ($interface) {\n return is_a($provider, $interface);\n });\n }", "public function getInterfaces() {\n $list = array();\n $interfaces = $this->get('implements');\n if (null != $interfaces) {\n foreach ($interfaces as $interface) {\n $list[] = $this->mediator_->getContainerForName($interface, 'interface');\n }\n }\n return $list;\n }", "public function getInterfaces(): Collection\n {\n return collection($this->reflectionObject->getImmediateInterfaces())->map(function (ReflectionClass $interface) {\n return new ClassEntity($interface);\n });\n }", "function mdl_resolve_base_class_implementations($extends, $blueprint_definitions, &$interfaces)\n{\n $result = mdl_find_namespace_component($blueprint_definitions, $extends);\n if (isset($result['implements'])) {\n $interfaces = array_merge($result['implements'] ?? [], $interfaces ?? []);\n }\n if (isset($result['extends'])) {\n mdl_resolve_base_class_implementations($result['extends'], $blueprint_definitions, $interfaces);\n }\n}", "protected function findValidAdapters()\n {\n $adapterLocation = $this->getAdapterLocation();\n $finder = new Finder();\n $finder->files()->in($adapterLocation);\n $result = [];\n\n foreach ($finder as $file) {\n if ($file->getExtension() != 'php')\n continue;\n\n $fileName = $file->getBasename('.php');\n $className = $this->getAdapterNamespace() . '\\\\' . $fileName;\n\n $potentialAdapter = new $className(); // For some reason without instantiating, class_exists() sometimes fails\n if (!class_exists($className, false))\n continue;\n\n if (!is_subclass_of($className, BaseAdapterInterface::class))\n continue;\n\n // Class looks valid\n $result[] = $className;\n }\n\n return $result;\n }", "abstract protected function getSupportedClasses();", "public static function findClasses($path)\n {\n $extraTypes = PHP_VERSION_ID < 50400 ? '' : '|trait';\n if (defined('HHVM_VERSION') && version_compare(HHVM_VERSION, '3.3', '>=')) {\n $extraTypes .= '|enum';\n }\n try {\n $contents = @php_strip_whitespace($path);\n if (!$contents) {\n if (!file_exists($path)) {\n throw new \\Exception('File does not exist');\n }\n if (!is_readable($path)) {\n throw new \\Exception('File is not readable');\n }\n }\n } catch (\\Exception $e) {\n throw new \\RuntimeException('Could not scan for classes inside '.$path.\": \\n\".$e->getMessage(), 0, $e);\n }\n // return early if there is no chance of matching anything in this file\n if (!preg_match('{\\b(?:class|interface'.$extraTypes.')\\s}i', $contents)) {\n return [];\n }\n // strip heredocs/nowdocs\n $contents = preg_replace('{<<<\\s*(\\'?)(\\w+)\\\\1(?:\\r\\n|\\n|\\r)(?:.*?)(?:\\r\\n|\\n|\\r)\\\\2(?=\\r\\n|\\n|\\r|;)}s', 'null', $contents);\n // strip strings\n $contents = preg_replace('{\"[^\"\\\\\\\\]*+(\\\\\\\\.[^\"\\\\\\\\]*+)*+\"|\\'[^\\'\\\\\\\\]*+(\\\\\\\\.[^\\'\\\\\\\\]*+)*+\\'}s', 'null', $contents);\n // strip leading non-php code if needed\n if (substr($contents, 0, 2) !== '<?') {\n $contents = preg_replace('{^.+?<\\?}s', '<?', $contents, 1, $replacements);\n if ($replacements === 0) {\n return [];\n }\n }\n // strip non-php blocks in the file\n $contents = preg_replace('{\\?>.+<\\?}s', '?><?', $contents);\n // strip trailing non-php code if needed\n $pos = strrpos($contents, '?>');\n if (false !== $pos && false === strpos(substr($contents, $pos), '<?')) {\n $contents = substr($contents, 0, $pos);\n }\n preg_match_all('{\n (?:\n \\b(?<![\\$:>])(?P<type>class|interface'.$extraTypes.') \\s++ (?P<name>[a-zA-Z_\\x7f-\\xff:][a-zA-Z0-9_\\x7f-\\xff:\\-]*+)\n | \\b(?<![\\$:>])(?P<ns>namespace) (?P<nsname>\\s++[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+(?:\\s*+\\\\\\\\\\s*+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+)*+)? \\s*+ [\\{;]\n )\n }ix', $contents, $matches);\n $classes = [];\n $namespace = '';\n for ($i = 0, $len = count($matches['type']); $i < $len; $i++) {\n if (!empty($matches['ns'][$i])) {\n $namespace = str_replace([' ', \"\\t\", \"\\r\", \"\\n\"], '', $matches['nsname'][$i]).'\\\\';\n } else {\n $name = $matches['name'][$i];\n if ($name[0] === ':') {\n // This is an XHP class, https://github.com/facebook/xhp\n $name = 'xhp'.substr(str_replace(['-', ':'], ['_', '__'], $name), 1);\n } elseif ($matches['type'][$i] === 'enum') {\n // In Hack, something like:\n // enum Foo: int { HERP = '123'; }\n // The regex above captures the colon, which isn't part of\n // the class name.\n $name = rtrim($name, ':');\n }\n $classes[] = ltrim($namespace.$name, '\\\\');\n }\n }\n\n return $classes;\n }", "#[Pure]\nfunction class_implements($object_or_class, bool $autoload = true): array|false {}", "public function getImplementedInterfaces()\n {\n return $this->interfaces;\n }", "public function availableClasses()\n {\n }", "public function getClassesFromSource($source) { \n preg_match_all('{^\\s*(class|interface)\\s+(.*?)(\\s|$)}im', $source, $matches, PREG_PATTERN_ORDER); \n return $matches[2]; \n }", "public function testgetInterfacesFromReference()\n {\n if (is_null($this->ref)) {\n return;\n }\n\n foreach ($this->ref['interfaces'] as $intname => $range) {\n list($min, $max) = $range;\n if (!in_array($intname, $this->optionnalinterfaces)\n && (empty($min) || version_compare(PHP_VERSION, $min)>=0)\n && (empty($max) || version_compare(PHP_VERSION, $max)<=0)\n ) {\n $this->assertTrue(\n interface_exists($intname, false),\n \"Interface '$intname', found in Reference, does not exists.\"\n );\n }\n }\n }", "public function getInterfaces(): array\n {\n return $this->interfaces;\n }", "public function getInterfaces(): Collection\n {\n return $this->interfaces;\n }", "#[@test]\n public function classImplementsArchivedInterface() {\n $class= $this->classloader->loadClass($this->classname);\n $interface= $this->classloader->loadClass($this->interfacename);\n\n $interfaces= new HashSet();\n $interfaces->addAll($class->getInterfaces());\n $this->assertTrue($interfaces->contains($interface));\n }", "function checkInterface(DOMDocument $doc, DOMXPath $xpath, ReflectionClass $refClass)\n {\n $meta = $doc->getElementsByTagName('classmeta')->item(0);\n $nInterfaces = count($refClass->getInterfaces());\n\n if ($nInterfaces == 0\n && $xpath->evaluate('count(/classentry/classmeta/implements)') > 0\n ) {\n //remove all interfaces\n foreach ($xpath->query('/classentry/classmeta/implements') as $implements) {\n $meta->removeChild($implements);\n }\n } else if ($nInterfaces > 0) {\n $shortdesc = $xpath->query('/classentry/classmeta/shortdesc')->item(0);\n\n foreach ($refClass->getInterfaces() as $refInterface) {\n $strInterface = $refInterface->getName();\n if ($xpath->evaluate('count(/classentry/classmeta/implements[text()=\"' . $strInterface . '\"])') == 0) {\n //add new interface\n $meta->insertBefore(\n $doc->createTextNode(' '),\n $shortdesc\n );\n $meta->insertBefore(\n $doc->createElement('implements', $strInterface),\n $shortdesc\n );\n $meta->insertBefore(\n $doc->createTextNode(\"\\n\"),\n $shortdesc\n );\n }\n }\n }\n }", "public function interfaceDefinitions(): Collection\n {\n return $this->definitionsByType(InterfaceTypeDefinitionNode::class);\n }", "function class_uses_recursive($class)\n{\n if (is_object($class)) {\n $class = get_class($class);\n }\n\n $results = [];\n\n /* @phpstan-ignore-next-line */\n foreach (array_reverse(class_parents($class)) + [$class => $class] as $class) {\n $results += trait_uses_recursive($class);\n }\n\n return array_unique($results);\n}", "public function findClasses($directory, array $options = [])\n {\n $options += [\n 'ignoreAbstract' => false,\n 'mustBeA' => null\n ];\n\n $classes = $this->wrappedClassFinder->findClasses($directory);\n\n $classes = array_filter($classes, function($class) use (&$options) {\n $rc = new ReflectionClass($class);\n\n $ignored = ($options['ignoreAbstract'] && $rc->isAbstract()) ||\n ($options['mustBeA'] && !is_subclass_of($class, $options['mustBeA']));\n\n return !$ignored;\n });\n\n return $classes;\n }", "public function getInterface();", "function asdb_trait_uses_recursive($trait)\n {\n $traits = class_uses($trait);\n\n foreach ($traits as $trait) {\n $traits += asdb_trait_uses_recursive($trait);\n }\n\n return $traits;\n }", "public function getAllClasses () {\n\t\t$qry = \"SELECT * from $this->table_name\";\n\t\t$dbh = $this->db->prepare($qry);\n\t\t$dbh->execute();\n\t\tif($dbh->rowCount()) {\n\t\t\treturn $dbh->fetchAll();\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "private function _parseClass()\n {\n // check which interfaces are implemented\n $interfaces = $this->_reflectionClass->getInterfaceNames();\n foreach ($interfaces as $i) {\n if ($i == 'Webiny\\Component\\Rest\\Interfaces\\AccessInterface') {\n $this->_parsedClass->accessInterface = true;\n }\n\n if ($i == 'Webiny\\Component\\Rest\\Interfaces\\CacheKeyInterface') {\n $this->_parsedClass->cacheKeyInterface = true;\n }\n }\n }", "public function getInterfacesProvider(): array\n {\n return [\n [new A(), [IStrictPropertiesContainer::class]],\n [new B(), [IStrictPropertiesContainer::class]],\n [new C(), [ICustomPrefixedPropertiesContainer::class, IStrictPropertiesContainer::class]],\n [new ToString(), [IConvertibleToString::class, 'Stringable']],\n [new WithMagicPropertiesBaseClass(), [IMagicPropertiesContainer::class, IStrictPropertiesContainer::class]],\n ['string', []],\n ];\n }", "static function searchForListeners()\r\n\t{\r\n\t\t$classes_found = self::search();\r\n\t\t//for each plugin that is found get installed status\r\n\t\tforeach ($classes_found as $class)\r\n\t\t{\r\n\t\t\tif (!self::isInstalled($class->getClass()))\r\n\t\t\t{\r\n\t\t\t\t$class->install(); // install plugin\r\n\t\t\t\tself::insert($class);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// step 2: for all plugins that are in the db, delete any that do not exist\r\n\t\t$classes_installed = self::load();\t\t\r\n\t\tforeach ($classes_installed as $class)\r\n\t\t{\r\n\t\t\tif (!array_key_exists($class['class'],$classes_found))\r\n\t\t\t{\r\n\t\t\t\tself::deleteByClassName($class['class']);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// step 3: delete events cache since plugin data may have changed. \t\r\n\t\t//Events::instance()->clearEvents();\r\n\t\t//step 4: re-query db for all currently installed plugins\r\n\t\t$classes_installed = self::load();\t\r\n\t\treturn $classes_installed;\r\n\t}", "private function extractParentsInterfaces(Tokens $tokens): array\n {\n $interfaces = [];\n\n preg_match('/(?<implements>T_IMPLEMENTS (((T_NS_SEPARATOR |T_STRING )+)(, )?)*)/',\n $tokens->asString(),\n $matches1,\n PREG_OFFSET_CAPTURE);\n\n $implements = $matches1['implements'][0] ?? '';\n if ($implements!=='')\n {\n $tokens = TokenMatchHelper::codeBlock($matches1, $this->tokens, $this->tokens);\n\n preg_match_all('/(?<interface>(T_NS_SEPARATOR |T_STRING )+)/',\n $tokens->asString(),\n $matches2,\n PREG_OFFSET_CAPTURE | PREG_SET_ORDER);\n\n foreach ($matches2 as $match2)\n {\n $name = TokenMatchHelper::code('interface', $match2, $tokens);\n $interfaceTokens = TokenMatchHelper::codeBlock($match2, $tokens, $this->tokens);\n $lines = $interfaceTokens->lines();\n\n $interfaces[] = ['name' => $name,\n 'full_name' => NamespaceHelper::fullyQualifiedName($this->details['cls_namespace'], $name),\n 'start' => $lines['start'],\n 'end' => $lines['end'],\n 'tokens' => $interfaceTokens];\n }\n }\n\n return $interfaces;\n }", "private function findSubContextClasses() {\n $class_names = array();\n\n // Initialize any available sub-contexts.\n if (isset($this->parameters['subcontexts'])) {\n $paths = array();\n // Drivers may specify paths to subcontexts.\n if ($this->parameters['subcontexts']['autoload']) {\n foreach ($this->drupal->getDrivers() as $name => $driver) {\n if ($driver instanceof SubDriverFinderInterface) {\n $paths += $driver->getSubDriverPaths();\n }\n }\n }\n\n // Additional subcontext locations may be specified manually in behat.yml.\n if (isset($this->parameters['subcontexts']['paths'])) {\n $paths = array_merge($paths, $this->parameters['subcontexts']['paths']);\n }\n\n // Load each class.\n foreach ($paths as $path) {\n if ($subcontexts = $this->findAvailableSubContexts($path)) {\n $this->loadSubContexts($subcontexts);\n }\n }\n\n // Find all subcontexts, excluding abstract base classes.\n $classes = get_declared_classes();\n foreach ($classes as $class) {\n $reflect = new \\ReflectionClass($class);\n if (!$reflect->isAbstract() && $reflect->implementsInterface('Drupal\\DrupalExtension\\Context\\DrupalSubContextInterface')) {\n $class_names[] = $class;\n }\n }\n\n }\n\n return $class_names;\n }", "function trait_uses_recursive($trait)\n{\n $traits = class_uses($trait);\n\n foreach ($traits as $trait) {\n $traits += trait_uses_recursive($trait);\n }\n\n return $traits;\n}", "public function getDocumentedClasses(): array\n {\n return array_filter(\n $this->classes,\n fn ($class) => class_exists($class)\n );\n }", "public function getInterfaceInjectionInclusionPatterns()\n {\n return $this->interfaceInjectionInclusionPatterns;\n }", "protected function getAllClasses()\n {\n return $this->getClassesFromNamespace($this->getAppNamespace());\n }", "private function checkImplementsSearchableInterface($class)\n {\n $reflectionClass = new \\ReflectionClass($class);\n\n if (! $reflectionClass->implementsInterface(SearchableInterface::class)) {\n throw new \\InvalidArgumentException(\"The class: {$reflectionClass->name} doesn't implement leinonen\\\\Yii2Algolia\\\\SearchableInterface\");\n }\n }", "public function get_all_classes($workspace_name){\n //echo \"FUNCTION get_all_classes(workspace_name) Workspaces_model.php<br />\";\n \n $store_Mysql = $this->connect_workspace($workspace_name);\n \n $q = 'SELECT DISTINCT ?class WHERE {\n { \n ?class ?y <http://www.w3.org/2002/07/owl#Class> .\n }\n UNION\n { \n ?class ?y <http://www.w3.org/2000/01/rdf-schema#Class> .\n }\n FILTER isIRI(?class) .\n }ORDER BY ?class';\n \n $classes = $store_Mysql->query($q, 'rows');\n \n //echo \"END FUNCTION get_all_classes(workspace_name) Workspaces_model.php<br />\";\n \n return $classes;\n }", "protected function getDependencies($query = null) {\n $dependencyContainer = $this->dependencyInjector->getContainer();\n $dependencyInterfaces = $dependencyContainer->getDependencies();\n\n if ($query) {\n foreach ($dependencyInterfaces as $interface => $dependencies) {\n if (stripos($interface, $query) !== false) {\n continue;\n }\n\n foreach ($dependencies as $id => $dependency) {\n if (stripos($dependency->getClassName(), $query) !== false) {\n continue;\n }\n\n if (stripos($dependency->getId(), $query) !== false) {\n continue;\n }\n\n unset($dependencyInterfaces[$interface][$id]);\n }\n\n if (!$dependencyInterfaces[$interface]) {\n unset($dependencyInterfaces[$interface]);\n }\n }\n }\n\n ksort($dependencyInterfaces);\n\n return $dependencyInterfaces;\n }", "static function findAll() {$finder = self::getFinder( __CLASS__ ); return $finder->findAll();}", "static function findAll() {$finder = self::getFinder( __CLASS__ ); return $finder->findAll();}", "static function findAll() {$finder = self::getFinder( __CLASS__ ); return $finder->findAll();}", "function asdb_class_uses_recursive($class)\n {\n if (is_object($class)) {\n $class = get_class($class);\n }\n\n $results = [];\n\n foreach (array_reverse(class_parents($class)) + [$class => $class] as $class) {\n $results += asdb_trait_uses_recursive($class);\n }\n\n return array_unique($results);\n }", "public final function getRelsByClasses() {\n $chain = NULL;\n $classes = func_get_args();\n\n foreach ($classes as $i => $class) {\n if (strstr($class, ' -> ')) {\n if (!is_null($chain))\n throw new OrmInputException('Multiple chains have been passed. Already registered \"%s\" and now encountered \"%s\"', $chain, $class);\n\n $chain = $class;\n array_splice($classes, $i, 1); # remove the chain item from the classes array\n }\n }\n\n $destinations = array();\n # add this class first with input set, and no output\n $destinations[] = array('class' => $class = get_class($this),\n 'input' => $this->getKeyValues($class));\n\n # add the other classes as outputs\n foreach ($classes as $class)\n $destinations[] = array('class' => $class, 'output' => true);\n\n return self::objectsFromDestinations($destinations, $chain, $this->setup_name);\n }", "public function getClasses() {\n return $this->robot->getIndexedClasses();\n }", "function getClassesInNamespace($psrNamespace = NULL) : array\n {\n $store = \\Cache::driver();\n $key = $psrNamespace ? md5($psrNamespace) : 'all_classes';\n\n if ( \\Cache::supportsTags() ) {\n $store = \\Cache::tags([ 'classes_in_namespace' ]);\n }\n\n return $store->get($key, function() use ($psrNamespace, $key){\n $namespaces = array_keys(( new \\Facade\\Ignition\\Support\\ComposerClassMap() )->listClasses());\n\n if ( $psrNamespace ) {\n $namespaces = array_filter($namespaces, function ($n) use ($psrNamespace) {\n return \\Illuminate\\Support\\Str::startsWith($n, $psrNamespace);\n });\n }\n\n if(\\Cache::supportsTags()){\n Cache::tags(['classes_in_namespace'])->forever($key, $namespaces);\n }else{\n Cache::forever($key, $namespaces);\n }\n\n return $namespaces;\n });\n }", "public function withInterfaces(string ... $interfaces): ClassMatrixInterface;", "public function findTraitUse($trait);", "public static function findExtensions($dir, $extensionInterface, $ownDir = null)\n {\n $ownDir = $ownDir ? realpath($ownDir) : null;\n $classMap = ClassMapGenerator::createMap($dir);\n\n $extensions = [];\n\n foreach ($classMap as $className => $filePath) {\n if ($ownDir && strpos($filePath, $ownDir) !== false) {\n continue;\n }\n \n if (!class_exists($className)) {\n continue;\n }\n\n $reflected = new \\ReflectionClass($className);\n\n if (!$reflected->isInstantiable()) {\n continue;\n }\n\n try {\n if ($reflected->isSubclassOf($extensionInterface)) {\n $extensions[] = $className;\n }\n } catch (\\ReflectionException $e) {\n continue;\n }\n }\n\n return $extensions;\n }", "function hasChildren(string $interface) : bool;", "public function routeScans()\n {\n if ($this->scanEverything) {\n return $this->getAllClasses();\n }\n\n $classes = $this->scanRoutes;\n\n // scan the controllers namespace if the flag is set\n if ($this->scanControllers) {\n $classes = array_merge(\n $classes,\n $this->getClassesFromNamespace($this->getAppNamespace().'Http\\\\Controllers')\n );\n }\n\n return $classes;\n }", "public static function getInterfaceList() {\n\t\t$i = 0;\n\t\t$interfaces = array();\n\n\t\t$temp = Functions::shellCommand('ifconfig');\n\t\t$temp = explode(\"\\n\",$temp);\n\n\t\twhile($i < count($temp)){\n\t\t\tif(stristr($temp[$i],'flags')){\n\t\t\t\t$position = strpos($temp[$i],\":\",0);\n\t\t\t\t$tmp = substr($temp[$i],0,$position);\n\n\t\t\t\tif($tmp != 'lo0'){\n\t\t\t\t\t$interfaces[] = $tmp;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $interfaces;\n\t}", "public function trait_uses_recursive($trait)\n {\n $traits = class_uses($trait);\n\n foreach ($traits as $trait) {\n $traits += $this->trait_uses_recursive($trait);\n }\n\n return $traits;\n }", "public function getInterfaceList()\n {\n $this->getData();\n return array_keys($this->interfaces);\n }", "public function findDependentPackages(PackageInterface $package, Finder $finder);", "public function getInterface() {\n\t\t\treturn $this->implements;\t\n\t\t}", "public function find(): static\n {\n $finder = new Finder();\n\n $files = $finder->files()\n ->in($this->paths)\n ->name('*.php');\n\n foreach ($files as $file) {\n $this->classes[] = $this->getNamespace($file->getContents(), $file->getFilename());\n }\n return $this;\n }", "public function testgetClassesFromReference()\n {\n if (is_null($this->ref)) {\n return;\n }\n\n foreach ($this->ref['classes'] as $classname => $range) {\n list($min, $max) = $range;\n if (!in_array($classname, $this->optionnalclasses)\n && (empty($min) || version_compare(PHP_VERSION, $min)>=0)\n && (empty($max) || version_compare(PHP_VERSION, $max)<=0)\n ) {\n $this->assertTrue(\n class_exists($classname, false),\n \"Class '$classname', found in Reference, does not exists.\"\n );\n }\n if (($min && version_compare(PHP_VERSION, $min)<0)\n || ($max && version_compare(PHP_VERSION, $max)>0)\n ) {\n $this->assertFalse(\n class_exists($classname, false),\n \"Class '$classname', found in Reference ($min,$max), exists.\"\n );\n }\n }\n }", "public static function CheckClassInterface ($testClassName, $interfaceName, $checkStaticMethods = FALSE, $throwException = TRUE);", "public function class_uses_recursive($class)\n {\n if (is_object($class)) {\n $class = get_class($class);\n }\n\n $results = [];\n\n foreach (array_reverse(class_parents($class)) + [$class => $class] as $class) {\n $results += $this->trait_uses_recursive($class);\n }\n\n return array_unique($results);\n }", "public function reflectClassesIn($sourceCode, array $visited = []): ReflectionClassLikeCollection;", "private function find_all_jobs() {\n $jobs = array();\n foreach( glob( $this->crony_job_root . '/*.php') as $job_file ) {\n $job_class = basename( $job_file, '.php' );\n\n // Before we include this job in the job list, we need to make sure it implements \\Crony\\TaskInterface\n $implementations = class_implements( $this->crony_job_namespace . '\\\\' . $job_class );\n if ( in_array( 'Crony\\TaskInterface', $implementations ) ) {\n array_push( $jobs, $job_class );\n }\n }\n\n return $jobs;\n }", "function testSearchClasses() {\n $this->search->findClasses($this->test_class_dir . '/class.TestClass.php');\n\n // Create the array output that the class search should have generated.\n $comparison = array(\n $this->test_class_dir . '/class.TestClass.php' => array(\n 'TestClass'\n )\n );\n\n // Assert that they are equal.\n $this->assertEqual($this->search->getClassList(), $comparison,\n 'Single class search does not match expected result.');\n }", "public function subclassesOf($superClass);", "#[@test]\n public function getTestClasses() {\n $base= 'net.xp_framework.unittest.reflection.classes';\n $classes= \\lang\\reflect\\Package::forName($base)->getClasses();\n $this->assertEquals(sizeof(self::$testClasses), sizeof($classes), \\xp::stringOf($classes));\n foreach ($classes as $class) {\n $this->assertTrue(\n in_array(substr($class->getName(), strlen($base)+ 1), self::$testClasses), \n $class->getName()\n );\n }\n }", "public static function classes(): array;", "#[@test]\n public function providesTestClasses() {\n $p= \\lang\\reflect\\Package::forName('net.xp_framework.unittest.reflection.classes');\n foreach (self::$testClasses as $name) {\n $this->assertTrue($p->providesClass($name), $name);\n }\n }", "private function _discover() {\n\n $dir = new DirectoryIterator($this->dirname);\n\n foreach ($dir as $file) {\n\n if ($file->isFile() && !$file->isDot()) {\n\n $filename = $file->getFilename();\n $pathname = $file->getPathname();\n\n if (preg_match('/^(\\d+\\W*)?(\\w+)\\.php$/', $filename, $matches)) {\n require_once($pathname);\n $class = \"{$matches[2]}_{$this->suffix}\";\n $files[$filename] = new $class();\n }\n\n }\n\n }\n\n ksort($files);\n $plugins = array_values($files);\n\n return $plugins;\n\n }", "public function getBinding($interface, $targetClass = null);", "protected function scanPackageForModules(PackageInterface $package) {\n $install_path = $this->composer\n ->getInstallationManager()\n ->getInstallPath($package);\n\n return $this->findDrupalModules($install_path);\n }", "public function getImplementedInterfaceDefinitions()\n {\n return $this->implementedInterfaceDefinitions;\n }", "public function resolveRelatedInterfaces(InterfaceToCallRegistry $interfaceToCallRegistry): iterable;", "public function getAllClasses() {\n return array_unique(array_values($this->alias2class));\n }", "public function getInterfaces($extension = null, $version = null);", "public function isInterface()\n {\n $this->finder->filter(function (\\SplFileInfo $file) {\n return ReflectionManager::getClass($file)->isInterface();\n });\n\n return $this;\n }", "private function parseImplementsInterfaces() : \\GraphQL\\Language\\AST\\NodeList\n {\n }" ]
[ "0.7555399", "0.65174675", "0.6384638", "0.6324269", "0.62958807", "0.61957365", "0.6189861", "0.612726", "0.6086555", "0.60527927", "0.6016066", "0.60035926", "0.5887741", "0.5831081", "0.5706686", "0.5706686", "0.5706686", "0.5640261", "0.56118613", "0.5598916", "0.55813915", "0.5567938", "0.5562744", "0.5543396", "0.5509712", "0.5507566", "0.5498166", "0.54375887", "0.5436571", "0.5429874", "0.54293203", "0.5412539", "0.54088783", "0.5385214", "0.53620124", "0.5346306", "0.53424245", "0.53269815", "0.52931345", "0.5285867", "0.5210789", "0.52074075", "0.52022094", "0.51791036", "0.51743996", "0.516694", "0.51540214", "0.5152573", "0.51412135", "0.51351863", "0.5134948", "0.5113648", "0.51062673", "0.5089233", "0.50860035", "0.50794435", "0.506614", "0.50550187", "0.50548214", "0.5054157", "0.5042658", "0.5042032", "0.5034885", "0.5025707", "0.5025707", "0.5025707", "0.50225574", "0.5017122", "0.5014186", "0.500435", "0.49956435", "0.49928737", "0.4992861", "0.49831027", "0.49436513", "0.49415132", "0.4930397", "0.49062893", "0.48987412", "0.48938215", "0.48915642", "0.48861858", "0.48838386", "0.4875195", "0.4866185", "0.48534247", "0.48503134", "0.48467338", "0.48420346", "0.48328292", "0.48212618", "0.48131388", "0.48091984", "0.4803444", "0.4798625", "0.47912106", "0.4788591", "0.47817248", "0.47806102", "0.47797188" ]
0.6666894
1
put your code here
public function __construct() { parent::__construct(); $this->load->library('simple_html_dom'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n //\n \n }", "public function run()\n\t{\n\t\t//\n\t}", "public function preExecute(){\n\n\t\n\t}", "function script()\n {\n }", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public function custom()\n\t{\n\t}", "public function run()\n {\n //\n }", "public function run()\n {\n //\n }", "public function run()\r\n {\r\n\r\n }", "public function run(){\n parent::run();\n //Do stuff...\n }", "function run() {\r\n $this->set_demopage();\r\n\r\n $options_def = array(\r\n __class__ => '', // code CSS. ATTENTION [ ] à la place des {}\r\n 'id' => ''\r\n );\r\n\r\n $options = $this->ctrl_options($options_def);\r\n\r\n // il suffit de charger le code dans le head\r\n $this->load_css_head($options[__class__]);\r\n\r\n // -- aucun code en retour\r\n return '';\r\n }", "public function run()\n {\n\n parent::run();\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "function execute()\r\n\t{\r\n\t\t\r\n\t}", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "function use_codepress()\n {\n }", "public function run()\n {\n // Put your code here;\n }", "function run()\r\n {\r\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run() {\n }", "public static function run() {\n\t}", "public function onRun()\n {\n }", "public function run() {\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\tif(\\Yii::app()->user->isGuest === true) {\n\t\t\techo $content;\n\t\t} else {\n\t\t\t$this->render('header');\n\t\t}\n\t}", "public function run() {\n }", "public function render_content() {\n\t}", "public function main()\r\n {\r\n \r\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "function render() ;", "function execute()\n {\n }", "public function run(): void\n {\n //\n }", "protected function main()\n /**/\n {\n parent::run();\n }", "public function execute()\n {\n //echo __('Hello Webkul Team.');\n $this->_view->loadLayout();\n $this->_view->renderLayout();\n }", "public function render()\n {\n //\n }", "public function run(){\n echo CHtml::closeTag( \"div\" );\n $this->registerScript();\n }", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "function __desctuct(){\r\n\t\t?>\r\n\r\n\t\t</body>\r\n\t\t</html>\r\n\t\t<?php\r\n\t}", "public function run(){}", "public function demo()\n {\n // xu ly logic\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "public function render(){\n\t\t\n\t}", "public static function main(){\n\t\t\t\n\t\t}", "public function render() {\r\n\t\t\r\n\t}", "public function main()\n\t{\n\t}", "function handle() ;", "public function execute() {\n\t}", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "public function run() {}", "public\n\n\tfunction generate_code()\n\t{\n\t\t$data[\"hitung\"] = $this->Madmin->buat_code();\n\t\t$this->load->view('admin/Generate_code', $data);\n\t}", "public function display_code() {\n\t\techo '<h1>Premise Demo Page</h1>\n\t\t<div class=\"span10\">';\n\n\n\t\t\t// test a form with all possible fields.\n\t\t\t// pass your own arguments if you'd like.\n\t\t\t// new PWP_Demo_Form();\n\n\t\t\t// Premise_test::fields();\n\t\t\t// Premise_test::fields_hooks();\n\t\t\t// Premise_test::fields_demo();\n\t\t\t// Premise_test::videos_embed();\n\t\t\t// Premise_test::fields_duplicate();\n\t\t\t// Premise_test::google_map();\n\t\t\t// Premise_test::grids();\n\n\t\techo '</div>';\n\t}", "function main()\r\n {\r\n $this->setOutput();\r\n }", "public function run()\n\n {\n DB::table('actives')->insert([\n 'script_tag' => 0,\n 'status' =>0\n \n ]);\n //\n }", "protected function _exec()\n {\n }", "public function run() {\n\n\t\t// generate random string md5(uniqid(rand(), true));\n\t\t$this->goneta();\n\t\t$this->pamparam();\n\t\t$this->insideOut();\n\t\t$this->morfoza();\n\t\t$this->basorelief();\n\t\t$this->acajouWasZuSagen();\n\t}", "protected function after_load(){\n\n\n }", "public function work()\n {\n }", "function run();", "function run();", "public function run() {\n\t\t// include other classes\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-render.php';\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-sso.php';\n\t\t\n\t\t// enque styles for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_styles' \n\t\t) );\n\t\t// enque jquery scripts for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_script' \n\t\t) );\n\t\t// add submit action form to redirect and catch from admin.php\n\t\tadd_action ( 'admin_post_tr_action', array (\n\t\t\t\t$this,\n\t\t\t\t'prefix_admin_tr_action' \n\t\t) );\n\t\t\n\t\t// check if plugin tables exist\n\t\t$this->table_check ();\n\t\t\n\t\t// instantiate the render class for shortcodes to work\n\t\t$shortcodes = new Top_Ratter_Render ();\n\t}", "function tap_run_page_handler() \n {\n include(\"/var/www/html/run/tap_run.php\");\n \n $params = cargaArray('Torneo Argentino de Programación', $form, '');\n \n include('body.php'); \n }", "function run() {\r\n $this->view->data=$this->model->run();\r\n }", "function custom_construction() {\r\n\t\r\n\t\r\n\t}", "public function run()\n {\n \\App\\Model\\TemplateLib::create([\n 'name' => 'FNK Test',\n 'stylesheet' => 'body {background:white};',\n 'javascript' => '',\n 'code_header' => $this->codeHeader,\n 'code_footer' => $this->codeFooter,\n 'code_index' => $this->codeIndex,\n 'code_search' => '<h1>saya di search</h1>',\n 'code_category' => '<h1>saya di category</h1>',\n 'code_page' => $this->codePage,\n 'code_post' => $this->codePost,\n 'code_about' => '<h1>saya di about</h1>',\n 'code_404' => '<h1>saya di 404</h1>',\n ]);\n }", "public function helper()\n\t{\n\t\n\t}", "public function drawContent()\n\t\t{\n\t\t}" ]
[ "0.60586566", "0.59289104", "0.5919654", "0.5899511", "0.5838488", "0.5838488", "0.58356965", "0.5814271", "0.5814271", "0.57796824", "0.5701954", "0.5700516", "0.5685669", "0.5684617", "0.5684617", "0.5684617", "0.5639208", "0.563027", "0.56278986", "0.56231225", "0.5620407", "0.56068903", "0.56068903", "0.56068903", "0.56016845", "0.5597219", "0.5595339", "0.5591545", "0.558057", "0.55636305", "0.55034596", "0.5487096", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.54594034", "0.5446425", "0.5446197", "0.54451364", "0.54319674", "0.5426377", "0.54072845", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.53981763", "0.5394762", "0.5392594", "0.5392164", "0.5391672", "0.5391672", "0.5391672", "0.5386191", "0.53823715", "0.5374112", "0.5373851", "0.5371084", "0.5369742", "0.53666246", "0.5365522", "0.5358571", "0.53542304", "0.5353158", "0.5345768", "0.5339915", "0.53389114", "0.53339213", "0.5332912", "0.5323722", "0.5323722", "0.5321411", "0.5318719", "0.53184503", "0.5300535", "0.5290181", "0.52723837", "0.52723306" ]
0.0
-1
/$url = " $asunto = "Bridge Line "; $cuerpo = "HOLA te damos la bienvenida a Bridge Line\n Gracias por crear una cuenta.\nCuando verifiques tu correo electronico podras acceder a todos nuestros servicios. \nPara activar tu cuenta debes dar clic en el siguiente enlace \n$url"; return $this > sendEmail($correo, $nombre, $asunto, $cuerpo);
public function validAccount($correo, $nombre, $user){ return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enviarCorreoCliente(){\r\n\t$nombre \t\t = $_POST['nombre'];\r\n\t$body = '<p>Estimado ' . $nombre . ' , </p><p>Hemos recibido su petición, en breve recibirá una respuesta</p> ';\r\n\t$body \t\t\t .=\"<hr><p>FamInsurance SL</p><p>NIF 32XXXXXXXX</p><p>Avenida Páncreas 2017 888D 15000 A Coruña</p>\";\r\n\t$asunto = \"Contacto FamInsurance\";\r\n\t$from = \"email\";\t\r\n\t$to = $_POST['email'];\r\n\t$cabeceras = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n $cabeceras .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\r\n\t$cabeceras .=\"From: FamInsurance SL <$from>\\r\\n\";\r\n\tmail($to, $asunto, $body,$cabeceras);\r\n\techo \"</br></br>Un mensaje automático ha sido enviado a su dirección de correo\";\r\n}", "public static function sendEmail($nome,$email, $user)\n {\n $CI = &get_instance();\n\n $CI->load->library(['Fo_email']);\n\n\n $msg = '<div style=\"width: 800px\">\n<img style=\"margin-left: 160px; height: 125px; width: 250px\" src=\"https://gtxsports.com.br/wp-content/uploads/2017/07/gtxSports_blk.png\">\n\n <div style=\"\n padding: 30px 0px;\n font-size: 3rem;\n font-weight: bold;\n width: 100%;\n margin-left: 120px;\n height: auto;\n color: #4682B4;\n font-family:Multicolore;\">\n Seja bem vindo\n </div>\n <img height=\"290\" width=\"600\" style=\"margin-left 100px; border-radius: 20px\" src=\"https://gtxsports.com.br/wp-content/uploads/2017/07/slide_20estados.jpg\">\n'\n .'<div style=\" widt:80%; padding: 20px 0px;\">'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;display: inline-flex\"\"> Olá <div style=\"color: #4682B4; font-weight: bold;display: inline-flex; \"> &nbsp;'.$nome.'</div></p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px; display: inline-flex\">Seja bem vindo a <div style=\"color: #4682B4; font-weight: bold;display: inline-flex \"> &nbsp; GTX</div></p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"> Seu usuário foi cadastrado em nosso sistema,</p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"> logo seu pedido estará disponivel para acesso em: </p>' . base_url('home/cliente')\n . '</p></div>'\n . '<p style=\"color:#696969; padding: 0px 20px 20px 0px;font-weight: bold;font-size:20px;font-family:Multicolore;margin:0px;\"><b>Seu acesso:</b></p>\t'\n . '<div style=\" display: flex; justify-content: center; width: 100%; height: auto\">'\n .'<div style=\" width:550px; background-color:#e1efbc;border-radius: 10px; padding: 20px;\">'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"><b>Usuário:</b> ' . $user . ' ou seu E-mail </p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"><b>Senha: </b> Seu nome e sobrenome (sem espaço e sem letras maiusculas )</p>'\n .'</div></div></div>';\n $Data['to'] = $email;\n $Data['name'] = 'GTX';\n $Data['html'] = $msg;\n $Data['subject'] = 'Parabéns, você foi cadastrado em nosso sistema!';\n\n $resp_email = Fo_email::from_system($Data);\n\n }", "function sendEmail($forename,$email){\r\n /*sendMail($email,\"Registration to Unicycles\",\" Hey \".$forename.\"! /r/n\r\nThank you for registering for Unicycles! /r/n\r\n\r\nYou can start to hire bikes straight away now! To do so please head over to our website unicycles.ddns.net:156 log in and click on Hire a Bike. It can't be simpler. /r/n\r\n\r\nIf you need to know anything you can look on our website. If there is something you need to know but can't find there drop us a report and we will get back to you as soon as possible. /r/n\r\n\r\nThank you again for your registration. If you have any questions, please let me know. /r/n\r\n\r\nRegards, /r/n\r\nUniCycle Team\r\n\");*/\r\n}", "function send_consulenza($c) {\n\n require 'vendor/autoload.php';\n\n $toEmail = \"[email protected]\"; \n\n $mail = new PHPMailer();\n $mail->setFrom('[email protected]', \"Admin\");\n $mail->addReplyTo($c->get_email(), $c->get_nome() . \" \" . $c->get_cognome());\n $mail->addAddress($toEmail, 'Admin'); \n $mail->Subject = 'Richiesta consulenza da ' . $c->get_nome() . \" \" . $c->get_cognome();\n $mail->Body = \"Recapito telefonico: \" . $c->get_phone() . \"\\n\";\n $mail->Body .= $c->get_msg();\n\n if($mail->send()) {\n set_message(\"La tua email è stata inviata con successo\", \"alert-success\");\n } \n else {\n set_message(\"Oops, qualcosa è andato storto: \" . $mail->ErrorInfo, \"alert-danger\"); \n }\n\n}", "private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "public function sendMail()\n {\n $config = JFactory::getConfig();\n $mailer = JFactory::getMailer();\n $mailer->setSender($config->get('mailfrom'));\n\n\n\n $recipient = array('[email protected]', '[email protected]');\n $mailer->addRecipient($recipient);\n\n $mailer->setSubject('Registrazione supporting partner '.$config->get('sitename'));\n $mailer->isHTML(true);\n\n $body = '<h2>Dettagli account</h2>';\n $body .=\"Name: \" . $this->_parametri['name'] . \", <br>\";\n $body .=\"Username: \" . $this->_parametri['username'] . \", <br>\";\n $body .=\"Email: '\" . $this->_parametri['email'] . \", \";\n $body .=\"<br><br>\";\n\n $body .=\"<a \n href='http://framework.project-caress.eu/administrator/index.php?option=com_wizard' \n target='_blank'>Accedi al backend per abilitarlo</a>\";\n\n\n\n http://framework.project-caress.eu/administrator/index.php?option=com_wizard\n\n $mailer->setBody($body);\n\n if (!$mailer->Send())\n throw new RuntimeException('Error sending mail', E_USER_ERROR);\n\n }", "function enviar_contacto(){\n $this->asignar_ingreso();\n $nombre_sede = $this->sede;\n\n $resultado = $this->datoSede($nombre_sede);\n $cuerpo =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br /><br />\n\t\t<u>Datos de Entrada:</u><br />\";\n $cuerpo .=\"<br />\";\n $cuerpo .= \"<strong>Nombre Completo: </strong>\".utf8_decode($this->nombre).\"<br />\" ;\n $cuerpo .= \"<strong>Número de telefono: </strong>\".$this->telefono.\"<br />\" ;\n $cuerpo .= \"<strong>E-mail: </strong>\".$this->email.\"<br />\" ;\n $cuerpo .= \"<strong>Mensaje: </strong>\".$this->comentario.\"<br />\";\n $cuerpo .= \"<br />\";\n $cuerpo .= \"---- Fin ----\";\n $cuerpo .= \"<br />\";\n $subject= \"Contacto Web Prevaler\";\n $subject2= \"Contacto Web Prevaler\";\n $basemailfor=$resultado['email_sede'];\n //$basemailfor=\"[email protected]\";\n $basemailfrom = $this->email;\n $respuesta =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br />\n\t\t<strong>Saludos Sr(a).: $this->nombre $this->apellido</strong><br /><br />\n\t\tNosotros hemos recibido su mensaje, nuestro departamento de atención al cliente le responderá lo más pronto posible<br />\n\t\tGracias por contactar a Prevaler.<br />\n\t\tPrevaler<br /><br />\n\t\tTel&eacute;fonos: <br/>\n\t\t\".$resultado['telefono_sede'].\"<br />\n\t\tTwitter: <a href='https://twitter.com/Prevaler_VE'>@Prevaler_VE</a><br />\n\t\tInstagram: <a href='https://www.instagram.com/prevaler_ve/'>@prevaler_ve</a><br />\n\t\t\".$resultado['email_sede'].\"\n\t\t<br /><br />\n\t\tAtentamente,<br />\n\t\tClínica Prevaler.\";\n $this->mensaje=\"<strong>&iexcl;Excelente!</strong> Su Mensaje ha sido enviado exitosamente.\";\n\n $mail = new PHPMailer();\n $mail->From = $basemailfrom;\n $mail->FromName = utf8_decode($subject);\n $mail->AddAddress($basemailfor, $this->nombre.\" \".$this->apellido);\n $mail->Subject = utf8_decode($subject);\n $mail->Body = $cuerpo;\n $mail->AltBody = $cuerpo;\n $exito = $mail->Send();\n\n $mail2 = new PHPMailer();\n $mail2->From = $basemailfor;\n $mail2->FromName = utf8_decode($subject2);\n $mail2->AddAddress($basemailfrom, $this->nombre.\" \".$this->apellido);\n $mail2->Subject = utf8_decode($subject2);\n $mail2->Body = $respuesta;\n $mail2->AltBody = $respuesta;\n $exito = $mail2->Send();\n }", "function mail() {\n try {\n Mailer::setConfig(\n array(\n \"mailServer\" => \"simka.websitewelcome.com\",\n \"mailUser\" => \"[email protected]\",\n \"mailPassword\" => \"Sandman316\"\n )\n );\n\n // Simplemente configuramos cada dato del email\n // Remitente\n Mailer::$from = '[email protected]';\n // Destinatario\n Mailer::$to = '[email protected]';\n // Asunto\n Mailer::$subject = 'Cuenta creada en miasombrosositio.com';\n // Mensaje\n Mailer::$message = 'Tu cuenta ha sido creada!';\n // Indicamos si el mensaje es php ( true or false )\n Mailer::$html = true;\n\n // Mandamos el mensaje con send\n Mailer::send();\n } catch ( Exception $ex ) {\n print_r( $ex );\n } // end try catch\n }", "public function sendmailAction()\r\n\t{\r\n\t\t$email = $this->getRequest()->getParam('email');\r\n\t\t$this->view->email = $email;\r\n\t\t$url = $this->getRequest()->getParam('url');\r\n\t\t$this->view->url = $url;\r\n\t\t$to = $email;\r\n\t\t$subject = \"Bạn của bạn chia sẻ một bài viết rất hay!\";\r\n\t\t$message = \"Bạn của bạn chia sẻ một bài viết rất hay. Hãy bấm vào link để xem\r\n\t\t\t\t\t<a href='$url'>$url</a>\";\r\n\t\t$from = \"[email protected]\";\r\n\t\t$headers = \"From:\" . $from;\r\n\t\tmail($to,$subject,$message,$headers);\r\n\t\t$this->_helper->layout->disableLayout();\r\n\t}", "private function sendMail() {\n $BodyMail = new BodyMail();\n //$to = $this->_datPerson[email];\n $to = '[email protected]';\n\n $url = baseUri.\"linkCode?code=\".base64_encode($this->_code).\"&email=\".base64_encode($this->_datPerson[email]);\n\n $subject = \"DEV-Validación de Email\";\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\n $headers .= 'From: Evaluacione Red UNOi <[email protected]>'.\"\\r\\n\";\n $headers .= 'Reply-To: NoReply <[email protected]>' . \"\\r\\n\";\n $headers .= 'Bcc: [email protected]' . \"\\r\\n\";\n $message = $BodyMail->run($this->_datPerson['name'], $this->_code, $url);\n mail($to, $subject, $message, $headers, '-f [email protected]');\n }", "function sendMail($serveur, $port, $login, $password, $Emetteur, $Destinataire, $Subject = \"\", $Message=\"\")\n{\t\n\t// On va pouvoir envoyer un message\n\t$ListeDestinataires = \"\";\n\tif (is_array($Destinataire)) {\n\t\tforeach ($Destinataire as $unDestinataire) {\n\t\t\tif ($ListeDestinataires != \"\")\n\t\t\t\t$ListeDestinataires .= \",\";\n\t\t\t$ListeDestinataires .= $unDestinataire;\n\t\t}\n\t\t$ListeDestinataires = $Destinataire;\n\t}\n\telse\n\t\t$ListeDestinataires = array($Destinataire);\n\t\t\t\n\tif ((count($ListeDestinataires) > 0) && ($Message != \"\")) {\n\t\t// On prend le message\n\t\t$headers[\"From\"] = $Emetteur;\n\t\t$headers[\"To\"] = $ListeDestinataires;\t\t\n\t\t$headers[\"Cc\"] = array($Emetteur);\n\t\t$headers[\"Subject\"] = $Subject; \n\n\t\t$params[\"host\"] = $serveur; \n\t\t$params[\"port\"] = $port; \n\t\t$params[\"auth\"] = false; \n\t\t$params[\"username\"] = $login; \n\t\t$params[\"password\"] = $password; \n\n\t\tsendMailToServer($params, $headers, $Message);\n\t}\n}", "public function enviarEmailBienvenida(){\n\t\t$params ['url'] = Yii::$app->urlManager->createAbsoluteUrl ( [ \n\t\t\t'ingresar/' . $this->txt_token \n\t\t] );\n\t\t$params ['user'] = $this->nombreCompleto;\n\t\t$params ['usuario'] = $this->txt_email;\n\t\t$params ['password'] = $this->password;\n\t\t\n\t\t\n\t\t\t$email = new Email();\n\t\t\t$email->emailHtml = \"@app/modules/ModUsuarios/email/bienvenida\";\n\t\t\t$email->emailText = \"@app/modules/ModUsuarios/email/layouts/text\";\n\t\t\t$email->to = $this->txt_email;\n\t\t\t$email->subject = \"Bienvenido\";\n\t\t\t$email->params =$params ;\n\t\t\t\n\t\t\t// Envio de correo electronico\n\t\t\t$email->sendEmail();\n\t\t\treturn true;\n\t\t\n\n\t}", "function enviarEmail($email, $nombre, $asunto, $cuerpo)\n {\n\n require_once '../../login/PHPMailer/PHPMailerAutoload.php'; //lebreria phpmailer se usa para el funcionamiento del envio de correo\n\n $mail = new PHPMailer();\n $mail->isSMTP(); // protocolo de transferencia de correo\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = 'ssl'; //habilita la encriptacion SSL\n $mail->Host = 'smtp.gmail.com'; // Servidor GMAIL\n $mail->Port = 465; //puerto\n\n $mail->Username = '[email protected]'; //correo emisor\n $mail->Password = 'lapizzeria2019'; //contraseña del correo del emisor\n\n $mail->setFrom('[email protected]', 'La Pizzeria'); //se establece quien envia el correo\n $mail->addAddress($email, $nombre); //email y nombre del receptor guardados en sus respectivas variables\n\n $mail->Subject = $asunto; //se configura cual es el asunto del correo\n $mail->Body = $cuerpo; //se configura cual es el cuerpo del correo\n $mail->IsHTML(true);\n\n if ($mail->send())\n return true;\n else\n return false;\n }", "public function sendEmail()\n {\n $body = '<h1>Бронь тура с сайта</h1>\n <p>\n <a href=\"'. Yii::$app->request->hostInfo .'/admin/booking/view/'. $this->id .'\">Ссылка на бронь</a>\n </p>\n <h2>Информация</h2>\n <p> Дата бронирования: '.Yii::$app->formatter->asDate($this->created_at, 'long').'</p>\n <p> Время бронирования: '.Yii::$app->formatter->asTime($this->created_at).'</p>\n <p> Имя: '.$this->customer_name.'</p>\n <p> Телефон: '.$this->customer_phone . '</p>';\n\n return Yii::$app->mailer->compose()\n ->setTo(Yii::$app->params['Contact']['email'])\n ->setFrom(['[email protected]' => 'EcoTour'])\n ->setSubject('Бронь тура: '. $this->tour->title)\n ->setHtmlBody($body)\n ->send();\n }", "function envoi_email($email_expediteur, $nom_expediteur, $email_destinataire, $email_retour, $sujet_email, $body_mail)\n{\n\t$mail = new PHPMailer();\n\t$mail->IsMail();\n\t$mail->From = $email_expediteur;\n\t$mail->FromName = $nom_expediteur;\n\t$mail->AddAddress($email_destinataire);\n\t$mail->AddReplyTo($email_retour);\n\t$mail->IsHtml(true);\n\t$mail->Subject = $sujet_email;\n\t$mail->Body= $body_mail;\n\t\n\tif(!$mail->Send())\n\t{ \n\t \treturn FALSE;\n\t}\n\telse\n\t{\t \n\t \treturn TRUE;\n\t}\n}", "public function common_email_send($eamil_vaues = array()){\n\t\tif (is_file('settings/smtp_settings.php')){\n\t\t\tinclude('smtp_settings.php');\n\t\t}\n\t\t// Set SMTP Configuration\n\t\tif($config['smtp_user'] != '' && $config['smtp_pass'] != ''){\n\t\t\t$emailConfig = array(\n\t\t\t\t'protocol' => 'smtp',\n\t\t\t\t'smtp_host' => $config['smtp_host'],\n\t\t\t\t'smtp_port' => $config['smtp_port'],\n\t\t\t\t'smtp_user' => $config['smtp_user'],\n\t\t\t\t'smtp_pass' => $config['smtp_pass'],\n\t\t\t\t'auth' => true\n\t\t\t);\n\t\t}\n\t\t// Set your email information\n\t\t$from = array('email' => $eamil_vaues['from_mail_id'],'name' => $eamil_vaues['mail_name']);\n\t\t$to = $eamil_vaues['to_mail_id'];\n\t\t$subject = $eamil_vaues['subject_message'];\n\t\t$message = stripslashes($eamil_vaues['body_messages']);\n\t\t#echo $message; die;\n\t\t// Load CodeIgniter Email library\n\t\tif($config['smtp_user'] != '' && $config['smtp_pass'] != ''){\t\t\t\n\t\t\t$this->load->library('email', $emailConfig);\n\t\t}else {\n\t\t\t$this->load->library('email');\n\t\t}\n\t\t//Sometimes you have to set the new line character for better result\t\t\t\n\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t//Set email preferences\n\t\t$this->email->set_mailtype($eamil_vaues['mail_type']);\n\t\t$this->email->from($from['email'],$from['name']);\n\t\t$this->email->to($to);\n\t\tif($eamil_vaues['cc_mail_id'] != ''){\n\t\t\t$this->email->cc($eamil_vaues['cc_mail_id']); \n\t\t}\n\t\tif($eamil_vaues['bcc_mail_id'] != ''){\n\t\t\t$this->email->bcc($eamil_vaues['bcc_mail_id']); \n\t\t}\n\n\t\t$this->email->subject($subject);\n\t\t$this->email->message($message);\n\t\t//Ready to send email and check whether the email was successfully sent\n\t\t\t\n\t\tif (!$this->email->send()){\n\t\t\t// Raise error message\n\t\t\t//show_error($this->email->print_debugger());\n\t\t\t$this->load->library('email');\n\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t// Set email preferences\n\t\t\t$this->email->set_mailtype($eamil_vaues['mail_type']);\n\t\t\t$this->email->from($from['email'],$from['name']);\n\t\t\t$this->email->to($to);\t\t\t\t\n\t\t\tif($eamil_vaues['cc_mail_id'] != ''){\n\t\t\t\t$this->email->cc($eamil_vaues['cc_mail_id']); \n\t\t\t}\t\n\t\t\tif($eamil_vaues['bcc_mail_id'] != ''){\n\t\t\t\t$this->email->bcc($eamil_vaues['bcc_mail_id']); \n\t\t\t}\t\t\t\t \n\t\t\t$this->email->subject($subject);\n\t\t\t$this->email->message($message);\n\t\t\t$this->email->send();\n\t\t}else{\n\t\t\t#echo 'Success to send email';\n\t\t\treturn 1;\n\t\t}\n\t}", "function enviarEmail($asunto, $cuerpo)\n {\n require_once '../../login/PHPMailer/PHPMailerAutoload.php'; //lebreria phpmailer se usa para el funcionamiento del envio de correo\n $mail = new PHPMailer();\n $mail->isSMTP(); // protocolo de transferencia de correo\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = 'ssl'; //habilita la encriptacion SSL\n $mail->Host = 'smtp.gmail.com'; // Servidor GMAIL\n $mail->Port = 465; //puerto\n $mail->Username = '[email protected]'; //correo emisor\n $mail->Password = 'lapizzeria2019'; //contraseña del correo del emisor\n $mail->setFrom('[email protected]', 'La Pizzeria'); //se establece quien envia el correo\n $mail->addAddress('[email protected]', 'Raul'); //email y nombre del receptor guardados en sus respectivas variables\n $mail->Subject = $asunto; //se configura cual es el asunto del correo\n $mail->Body = $cuerpo; //se configura cual es el cuerpo del correo\n $mail->IsHTML(true);\n if ($mail->send())\n return true;\n else\n return false;\n }", "function contactSendMail()\r\n {\r\n $subject = 'Contact : ' . $_POST['contactNom'];\r\n $body = $_POST['contactMsg'];\r\n\r\n\r\n $this->sendMail($subject, $body);\r\n }", "function enviar_email($email,$sujeto, $msj, $headers){\n\treturn mail($email,$sujeto, $msj, $headers);\n\t\n}", "function enviarEmail($destinatario,$asunto,$cuerpo) {\r\n\r\n\r\n\t# Defina el número de e-mails que desea enviar por periodo. Si es 0, el proceso por lotes\r\n\t# se deshabilita y los mensajes son enviados tan rápido como sea posible.\r\n\tdefine(\"MAILQUEUE_BATCH_SIZE\",0);\r\n\r\n\t//para el envío en formato HTML\r\n\t//$headers = \"MIME-Version: 1.0\\r\\n\";\r\n\t\r\n\t// Cabecera que especifica que es un HMTL\r\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\n\t\r\n\t//dirección del remitente\r\n\t$headers .= utf8_decode(\"From: GUSTAVO OMAR AVILA - PROCOMEX <[email protected]>\\r\\n\");\r\n\t\r\n\t//ruta del mensaje desde origen a destino\r\n\t$headers .= \"Return-path: \".$destinatario.\"\\r\\n\";\r\n\t\r\n\t//direcciones que recibirán copia oculta\r\n\t$headers .= \"Bcc: [email protected]\\r\\n\";\r\n\t\r\n\tmail($destinatario,$asunto,$cuerpo,$headers); \t\r\n}", "static function sendEmail($args=array())\r\n\t{\r\n global $smarty;\r\n //include_once ('applicationlibraries/phpmailer/class.phpmailer.php');\r\n //include(\"libraries/phpmailer/class.smtp.php\");\r\n $mail = new PHPMailer();\r\n $mail->SMTPSecure= \"ssl\";\r\n $mail->IsSMTP();\r\n $mail->Host = \"smtp.gmail.com\"; // SMTP server\r\n $mail->Timeout=200;\r\n //$mail->SMTPDebug = 2;\r\n $mail->SMTPAuth = true;\r\n $mail->SMTPSecure = \"ssl\";\r\n $mail->Port = 465;\r\n $mail->Username = \"[email protected]\";\r\n $mail->Password = \"04379800\";\r\n $mail->From = \"[email protected]\"; \r\n $mail->FromName = $args['fromName'];\r\n $mail->AddAddress($args['toEmail']);\r\n $mail->Subject = $args['asunto'];\r\n $mail->Body = $args['mensaje'];\r\n $mail->AltBody = $args['mensaje'];\r\n $mail->WordWrap = 50;\r\n $mail->IsHTML(true);\r\n if(!$mail->Send()) {\r\n return $mail->ErrorInfo;\r\n \t \t}else {\r\n return \"1\";\r\n \t\t}\r\n\t}", "function enviar_correo($nombre, $email, $asunto, $contenido) {\n // cargamos las constantes por si acaso.\n require_once './lib/class.phpmailer.php';\n require_once './lib/constantes.php';\n\n if (!empty($email)) { // Enviamos el correo.\n \n // Creamos un objeto de la clase phpmailer.\n $correo = new PHPMailer();\n\n // Ahora configuramos ese objeto.\n $correo->IsSMTP(); // indicamos que enviamos por SMTP.\n $correo->SMTPAuth = true; // Nos autenticaremos en el servidor de correo.\n $correo->CharSet = 'UTF-8';\n $correo->Host = MAIL_SERVIDOR;\n $correo->Port = MAIL_PUERTO;\n\n // Si enviamos correo por GMAIL (chequeando el puerto),habilitamos\n // el protocolo SSL.\n if (MAIL_PUERTO == 465 || MAIL_PUERTO == 587) //usamos GMAIL\n $correo->SMTPSecure = 'ssl';\n\n // Si usais XAMPP, teneis que habilitar en \\xampp\\php\\php.ini \n // la siguiente extensión: \n // extension= php_openssl.dll\n // Datos del correo.\n $correo->Username = MAIL_PROPIO;\n $correo->Password = MAIL_PASSWORD;\n $correo->SetFrom($email, $nombre);\n $correo->AddReplyTo($email, $nombre);\n\n $correo->AddAddress(MAIL_PROPIO, MAIL_NOMBRE_PROPIO);\n $correo->Subject = $asunto;\n $correo->AltBody = 'Cambia de cliente de correo, lo que usas es una basura';\n $correo->MsgHTML($contenido);\n $correo->IsHTML(true);\n\n // Enviamos el correo.\n if ($correo->Send())\n echo 'Se ha enviado correctamente el correo.';\n else\n echo 'Error enviado correo: ' . $correo->ErrorInfo;\n } \n}", "public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }", "function enviarCorreo($tipo,$nombreUsuario,$nombreCliente,$comentario){\n try{\n $phpmailer = new PHPMailer();\n $phpmailer->Username = \"\"; //Correo de origen\n $phpmailer->Password = \"\"; //Contraseña del correo\n $phpmailer->IsSMTP();\n $phpmailer->Host = \"\"; //servidor de correo\n $phpmailer->Port = 25; //puerto SMTP\n $phpmailer->SMTPAuth = true;\n $phpmailer->From = \"\"; //Correo de origen\n $phpmailer->FromName = \"Nueva incidencia\";\n $phpmailer->AddAddress(\"\"); //Email destino\n $phpmailer->Subject = \"Nueva incidencia\"; //Asunto del correo\n $phpmailer->Body .=\"<h1 style='color:#3498db;'>Nuev@ $tipo</h1>\";\n $phpmailer->Body .= \"<p>Comercial: $nombreUsuario</p>\";\n $phpmailer->Body .= \"<p>Cliente: $nombreCliente</p>\";\n $phpmailer->Body .= \"<p>Comenatario del comercial: $comentario</p>\";\n $phpmailer->Body .= \"<p>Fecha de creacion: \".date(\"d/m/Y h:i:s\").\"</p>\";\n $phpmailer->IsHTML(true);\n if(!$phpmailer->Send()) {\n return \"Error al enviar: \" . $phpmailer->ErrorInfo;\n } else {\n return \"Enviado..\";\n }\n }catch (Exception $e){\n die('Error: ' . $e->getMessage());\n }\n}", "function pendaftaran_siswa($post)\n{\n $data['destination'] = $post['r_email'];\n $data['subject'] = 'Pendaftaran Akun Baru Peserta Didik Portal Akademik ' . profil()->nama_sekolah;\n $data['massage'] = \"\n <p>\n <html>\n <body>\n Hallo, Pendaftaran Akun Baru untuk Peserta didik berhasil, dengan rincian sebagai berikut : <br>\n No. Pendaftaran : \" . $post['no_reg'] . \" <br>\n NISN Peserta : \" . $post['r_nisn'] . \" <br>\n Expired Aktivasi : \" . date('D, d M Y') . \" at 23.59 <br>\n Silahkan Klik Tombol Aktivasi Dibawah ini untuk aktivasi akun anda... <br>\n <center>\n <a href='\" . site_url('auth/aktivasi/' . $post['id_user']) . '?d=' . date('dmy') . '&w=' . date('hi') . \"' target='_blank'> Aktivasi </a>\n </center>\n </body>\n </html>\n </p>\n \";\n return smtp_email($data);\n}", "function _enviar_email($usuarios, $titulo, $asunto, $cuerpo){\n //Se definen los parametros de configuracion\n $config['protocol'] = $this->protocolo;\n $config['smtp_host'] = $this->servidor_correo;\n $config['smtp_timeout'] = '10';\n $config['wordwrap'] = true;\n $config['smtp_user'] = $this->usuario_sistema;\n $config['smtp_pass'] = $this->password_sistema;\n $config['mailtype'] = 'html';\n\n //Se inicializa la configuracion\n $this->email->initialize($config);\n\n //Preparando el mensaje\n $this->email->from($this->correo_sistema, 'Sistema de Gestión Socio Ambiental - Hatovial S.A.S.');\n $this->email->to($usuarios); \n //$this->email->cc(''); \n $this->email->bcc(array('[email protected]')); \n $this->email->subject($asunto);\n\n $mensaje = file_get_contents('application/views/email/plantilla.php');\n $mensaje = str_replace('{TITULO}', $titulo, $mensaje);\n $mensaje = str_replace('{CUERPO}', $cuerpo, $mensaje);\n\n $this->email->message($mensaje);\n $this->email->send();\n //echo $this->email->print_debugger();\n }", "public function sendnotificationemails($type,$to,$subject,$username,$linkhref){\r\n\r\n $bodyhead=\"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\n <html xmlns='http://www.w3.org/1999/xhtml'>\r\n <head>\r\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\r\n <title>\".$this->getsettings('sitetitle','text').\"</title>\r\n </head><body>\";\r\n if( $this->getsettings('email','logoshow') == '1' ) {\r\n $body = \"<img src='\".$this->getsettings('logo','url').\"' alt='\".$this->getsettings('sitetitle','text').\"' title='\".$this->getsettings('sitetitle','text').\"'/>\";\r\n }\r\n else {\r\n $body = '';\r\n }\r\n\r\n $link = \"<a href='\".$linkhref.\"'>\".$this->getsettings($type,'linktext').\"</a>\";\r\n $emContent = $this->getsettings($type,'text');\r\n $emContent = str_replace(\"[username]\",$username,$emContent);\r\n $emContent = str_replace(\"[break]\",\"<br/>\",$emContent);\r\n $emContent = str_replace(\"[linktext]\",$link,$emContent);\r\n\r\n $body .=\"<p>\".$emContent.\"</p>\";\r\n\r\n $from = $this->getsettings('email','fromname');\r\n $from_add = $this->getsettings('email','fromemail');\r\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\r\n $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\r\n $headers .= \"From: =?UTF-8?B?\". base64_encode($from) .\"?= <$from_add>\\r\\n\" .\r\n 'Reply-To: '.$from_add . \"\\r\\n\" .\r\n 'X-Mailer: PHP/' . phpversion();\r\n mail($to,$subject,$bodyhead.$body.'</body></html>',$headers, '-f'.$from_add);\r\n\r\n if( $type == 'forgotpwdemail' ) {\r\n return '7#email';\r\n }\r\n else {\r\n return '7#register';\r\n }\r\n\r\n die();\r\n\t}", "function SendMailHtml($destinatario, $contenido, $asunto)\n{\n\t$mensaje = '<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\" />\n<title>Documento sin título</title>\n</head>\n\n<body>\n<table width=\"100%\" border=\"0\" cellspacing=\"3\" cellpadding=\"3\" style=\"\">\n <tr>\n <td><img src=\"http://loopsdancestudio.se/img/loops_dance_studio.svg\" width=\"\" height=\"65\" /></td>\n </tr>\n <tr>\n\t<td>\n\t\t<br/>'; \n\t\t$mensaje.= $nombre;\n\t\t':\n\t\t<br/>\n\t\t<br/>\n\t\t<p>';\n\t\t$mensaje.= $contenido;\n\t\t$mensaje.='</p>\n\t\t<br/><br/>\n\t</td>\n </tr>\n <tr>\n\t<td>\n\t<p style=\"color:#666;\">FRISKVÅRDSBIDRAG?</p>\n\t<br/>\n\t<p style=\"font-size:12px; color:#666;\">Detta mejl gäller som kvitto och går hos de flesta arbetsgivare att använda för friskvårdsbidrag. \n\tOm du vill ha ett mer utfärligt intyg så kan du kontakta oss på <a style=\"font-size:14px;\" href=\"mailto:[email protected]\">[email protected]</a> </p>\n\t</td>\n </tr>\n</table>\n</body>\n</html>';\n\n\t// Para enviar correo HTML, la cabecera Content-type debe definirse\n\t$cabeceras = 'MIME-Version: 1.0' . \"\\n\";\n\t$cabeceras .= 'Content-type: text/html; charset=iso-8859-1' . \"\\n\";\n\t// Cabeceras adicionales\n\t$cabeceras .= 'From: [email protected]' . \"\\n\";\n\t$cabeceras .= 'Bcc: [email protected]' . \"\\n\";\n\t\n\t// Enviarlo\n\tmail($destinatario, $asunto, $mensaje, $cabeceras);\n\techo $mensaje;\n\t\n}", "function send()\n\t\t{\n\t\t\t// converte, se necessario, l'array dei destinatari in un'unica stringa (indirizzi separati da virgola)\n\t\t\t$to = (is_array($this->to)) ? implode(\",\", array_keys($this->to)) : $this->to;\n\t\t\t// invia il messaggio e ritorna il risultato\n\t\t\treturn mail($to, $this->subject, $this->body, $this->headers);\n\t\t}", "public function enviarCorreo ($email_destino,$encabezado,$mensaje,$listado)\r\n {\r\n //-----------> array de configuraciones para poder enviar el mail con GMAIL\r\n $config = array(\r\n 'protocol' => 'smtp',\r\n 'smtp_host' => 'smtp.googlemail.com', \r\n 'smtp_user' => '[email protected]', //Su Correo de Gmail Aqui\r\n 'smtp_pass' => 'aplicacionadopta2', // Su Password de Gmail aqui\r\n 'smtp_port' => '465',\r\n 'smtp_crypto' => 'ssl',\r\n 'mailtype' => 'html',\r\n 'wordwrap' => TRUE,\r\n 'charset' => 'utf-8',\r\n 'validate' => TRUE\r\n );\r\n //----> inicializo el email\r\n $this -> email -> initialize($config);\r\n $this->email->set_newline(\"\\r\\n\");\r\n \r\n if ($listado != null){\r\n foreach ($listado as $adoptante)\r\n {\r\n $this->email->from('[email protected]','Adopta2 app'); //----> el correo de google del que se envia\r\n $this->email->to($adoptante -> email_adoptante);\r\n $this->email->subject($encabezado);\r\n $this->email->message($mensaje);\r\n //----> Lo que esta comentado es por si falla, muestra los datos del mail y errores si es que se envio mal\r\n if ($this -> email -> send(FALSE)){\r\n /*echo \"enviado<br/>\";\r\n echo $this->email->print_debugger(array('headers'));*/\r\n return true;\r\n }else{\r\n /*echo \"fallo <br/>\";\r\n echo \"error: \".$this->email->print_debugger(array('headers'));*/\r\n return false;\r\n }\r\n }\r\n } else {\r\n $this->email->from('[email protected]','Adopta2 app'); //----> el correo de google del que se envia\r\n $this->email->to($email_destino);\r\n $this->email->subject($encabezado);\r\n $this->email->message($mensaje);\r\n //----> Lo que esta comentado es por si falla, muestra los datos del mail y errores si es que se envio mal\r\n if ($this -> email -> send(FALSE)){\r\n /*echo \"enviado<br/>\";\r\n echo $this->email->print_debugger(array('headers'));*/\r\n return true;\r\n }else{\r\n /*echo \"fallo <br/>\";\r\n echo \"error: \".$this->email->print_debugger(array('headers'));*/\r\n return false;\r\n }\r\n }\r\n \r\n }", "public function TesEmail()\n\t{\n\t\t// $template = $query_template->row();\n\n\t\t$data = array(\n\t\t\t'judul' => \"EMAIL TELAH TERDAFTAR\",\n\t\t\t'tanggal' => date(\"d-M-Y\"),\n\t\t\t'description' => \"Selamat Email anda telah Terdaftar di Mitrarenov.com\",\n\t\t\t'nama' => \"Fajar Nugraha\",\n\t\t\t'project_id' => '124324ffsd',\n\t\t\t'password' => 'Fajaroentyil', 'email' => '[email protected]',\n\t\t\t'reg_no' => base64_encode(\"@#$@#$\")\n\t\t);\n\t\t$emailData = array(\n\t\t\t'from' => '[email protected]',\n\t\t\t'name' => 'SIMPRO',\n\t\t\t'to' => array('[email protected]'),\n\t\t\t'cc' => \"\",\n\t\t\t'bcc' => \"\",\n\t\t\t'subject' => \"Aktivasi SIMPRO\",\n\t\t\t'template' => $this->load->view('v_email', $data, true),\n\t\t\t'attach' => 'pantotukang/attachment/syarat.pdf'\n\t\t);\t\t\n\t\t\n\t\t// $this->load->view('v_email', $data);\n\t\t\t\t\t\t\t\t\t\n\t\t$this->sendEmailAktifasi($emailData);\n\t\t// print_r($this->sendEmailAktifasi($emailData));\n\t}", "function smtp_email($post)\n{\n $ci = &get_instance();\n $config = [\n 'mailtype' => 'html',\n 'charset' => 'utf-8',\n 'protocol' => 'smtp',\n 'smtp_host' => 'smtp.gmail.com',\n 'smtp_user' => '[email protected]', // Email gmail\n 'smtp_pass' => 'Masbowo2017', // Password gmail\n 'smtp_crypto' => 'ssl',\n 'smtp_port' => 465,\n 'crlf' => \"\\r\\n\",\n 'newline' => \"\\r\\n\"\n ];\n\n // Load library email dan konfigurasinya\n $ci->load->library('email', $config);\n\n // Email dan nama pengirim\n $ci->email->from('[email protected]', 'Operator Portal Akademik Sekolah ' . profil()->nama_sekolah);\n\n // Email penerima\n $ci->email->to($post['destination']); // Ganti dengan email tujuan\n\n // Subject email\n $ci->email->subject($post['subject']);\n\n // Isi email\n $ci->email->message($post['massage']);\n\n // Tampilkan pesan sukses atau error\n if ($ci->email->send()) {\n return 1;\n } else {\n return 0;\n }\n}", "public function send_mail($mensaje,$lat,$long) {\n\t\t$correosExt = $this->Dashboard_model->M_obtenerCorreosExt();\n\t\t$mailDefault = \"\";\n\t\tforeach ($correosExt as $fila) {\n\t\t\t$mailDefault .= $fila->email.\",\";\n\t\t}\n\n\t\t$mailDefault.=\"[email protected]\";\n\n\t\t// Ubicación\n\t\tif($lat != \"\" && $long != \"\"){\n\t\t\t$MapAPI = '<a href=\"https://www.google.com/maps/search/?api=1&query='.$lat.','.$long.'\" target=\"_blank\">Ver ubicación</a><br><br>';\n\t\t}else{\n\t\t\t$MapAPI =\"\";\n\t\t}\n\t\t// en caso de no tener destinatarios externos\n\n\t\t$from_email = \"[email protected]\";\n $to_email = $mailDefault;\n\n $this->email->from($from_email, 'Bitácora de '.str_replace(\".\",\" \",$this->session->userdata('usuario')));\n $this->email->to($to_email);\n $this->email->subject('['.str_replace(\".\",\" \",$this->session->userdata('usuario')).'] Nuevo Hito');\n $this->email->message(\"Hola! <br>Se ha registrado un nuevo hito de viaje.<br><br>Club: \".str_replace(\".\",\" \",$this->session->userdata('usuario')).\"<br><br>=== Inicio del mensaje === <br><br>\".$mensaje.\"<br><br>\".$MapAPI.\" === fin del mensaje ===<br><br>Atentamente,<br>Administración\");\n //Send mail\n if($this->email->send())\n $this->session->set_flashdata(\"email_sent\",\"Congragulation Email Send Successfully.\");\n else\n $this->session->set_flashdata(\"email_sent\",\"You have encountered an error\");\n \n }", "public function sendMsg()\n {\n $msg = $this->request->post('msg');\n $email = $this->request->post('email');\n \n $emailbody = $this->EmailFunc->msg(\"Code: \" .$msg, \"Your Trail Code\");\n \n $this->Email->sendE($email, 'Trail From IPTV', $emailbody);\n \n $this->load->model('Trail')->sendMsg($msg, $email);\n \n return $this->showTrails();\n }", "function send_mail() {\n $email=$_GET['email'];\n $pcode=$_GET['pcode'];\n $url = 'http://api.sendcloud.net/apiv2/mail/send';\n $API_USER = 'zhexiaolong_test_YFAWCy';\n $API_KEY = '6U6wJSwJ7Rrc8LiM';\n $vars = json_encode( array(\"to\" => array($email),\n \"sub\" => array(\"%code%\" => Array('123456'))\n)\n);\n\n //您需要登录SendCloud创建API_USER,使用API_USER和API_KEY才可以进行邮件的发送。\n $param = array(\n 'apiUser' => $API_USER,\n 'apiKey' => $API_KEY,\n 'from' => '[email protected]',\n 'fromName' => '软科商城的问候',\n 'xsmtpapi' => $vars,\n 'templateInvokeName' => 'test_template',\n 'subject' => '尊敬的客户,谢谢您注册软科商城',\n 'html' => '您的验证码是'.$pcode.'仅注册有效',\n 'respEmailId' => 'true');\n\n $data = http_build_query($param);\n\n $options = array(\n 'http' => array(\n 'method' => 'POST',\n 'header' => 'Content-Type: application/x-www-form-urlencoded',\n 'content' => $data\n ));\n\n $context = stream_context_create($options);\n $result = file_get_contents($url, false, $context);\n\n return $result;\n }", "function sendMail_dis($to_email,$extraMsg)\n{\n //$to_email \t=\"[email protected]\";\n $from \t=\"[email protected]\";\n\t$subject\t=\"List of cancelled transaction in last 1 week\";\n $msgTxt\t\t=\"Hi, <br><br>\n\t \tPlease find the list of usernames whose transaction has been cancelled in last 1 week (From: $last_7day - $dateEnd).<br><br>\";\n\n $msgTxt \t.=$extraMsg.\"<br><br>\";\n $msgTxt \t.=\"Thanks,<br>Team Jeevansathi<br>\";\n send_email($to_email,$msgTxt,$subject,$from);\n}", "public function sendEmail(): void\n {\n echo 'email sent';\n }", "public function sendAction() {\n __mail::send('[email protected]', '[email protected]', 'title', 'me', 'hello world');\n\n return false;\n }", "public function myMail()\n {\n Log::info('Masuk My Email') ;\n\n $myEmail = '[email protected]';\n Mail::to($myEmail)->send(new MyMail());\n\n Log::info('Lewat Proses Send Email') ;\n\n return \"Mail Send Successfully\";\n }", "public function enviar_email()\n {\n $data = Input::all();\n\n //Validation rules\n $rules = array(\n 'name' => 'required|min:5',\n 'email' => 'required|email',\n 'subject' => 'required|min:5',\n 'message' => 'required|min:5',\n );\n\n //Validate data\n $validator = Validator::make($data, $rules);\n //dd($validator->errors());\n //If everything is correct than run passes.\n if ($validator->passes()) {\n //Mail::to('[email protected]')->send(new SendMailContact($data));\n\n /* Mail::send('emails.contato', $data, function ($message) use ($data) {\n $message->from($data['email'], $data['name']);\n // $message->from('[email protected]', 'Contato site CEEP');\n $message->to('[email protected]', 'Contato')->subject($data['sub ject'])->send(new SendMailContact($data));*/\n //});\n // Redirect to page\n $urlBack = redirect()->back()->getTargetUrl();\n return redirect($urlBack . '#contato2')->with('contact_message', 'Sua mensagem foi enviada com sucesso!');\n // return Redirect::route('index')->with('contact_message', 'Sua mensagem foi enviada com sucesso!');\n\n //return View::make('contact');\n } else {\n //return contact form with errors\n //return back()->withErrors($validator->errors());\n //$url = request()->headers->get('referer');\n $urlBack = redirect()->back()->getTargetUrl();\n return redirect($urlBack . '#contato2')->withErrors($validator->errors());\n }\n }", "function enviarEmail($assunto, $descrição, $emailDe, $nomeDe, $emailPara, $nomePara)\n {\n $mail = new PHPMailer();\n // Define os dados do servidor e tipo de conexão\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->IsSMTP(); // Define que a mensagem será SMTP\n $mail->Host = \"mail.codeboys.pt\"; // Endereço do servidor SMTP\n $mail->SMTPAuth = true; // Autenticação\n $mail->Username = '[email protected]'; // Usuário do servidor SMTP\n $mail->Password = 'codeboys2016'; // Senha da caixa postal utilizada\n // Define o remetente\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->From = $emailDe; // Seu e-mail\n $mail->FromName = $nomeDe; // Seu nome\n // Define os destinatário(s)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n //$mail->AddAddress('[email protected]', 'Luis Filipe');\n $mail->AddAddress($emailPara, $nomePara);\n /* $sql1 = \"select email from utilizador where id='$idMaterial' and hospital='$hospital' and utilizado=0\";\n $resultado1=$this->bd->executarSQL($sql1);\n while ($row = $resultado1->fetch(PDO::FETCH_ASSOC)) {\n\n }*/\n// $mail->AddAddress('[email protected]');\n //$mail->AddCC('[email protected]', 'Ciclano'); // Copia\n //$mail->AddBCC('[email protected]', 'Fulano da Silva'); // Cópia Oculta\n // Define os dados técnicos da Mensagem\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->IsHTML(true); // Define que o e-mail será enviado como HTML\n //$mail->CharSet = 'iso-8859-1'; // Charset da mensagem (opcional)\n // Define a mensagem (Texto e Assunto)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n $mail->Subject = utf8_decode($assunto); // Assunto da mensagem\n $mail->Body = utf8_decode($descrição);\n $mail->AltBody = utf8_decode($assunto);\n // Define os anexos (opcional)\n // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n //$mail->AddAttachment(\"c:/temp/documento.pdf\", \"novo_nome.pdf\"); // Insere um anexo\n // Envi a o e-mail\n $enviado = $mail->Send();\n // Limpa os destinatários e os anexos\n $mail->ClearAllRecipients();\n $mail->ClearAttachments();\n // Exibe uma mensagem de resultado\n if ($enviado) {\n// echo \"E-mail enviado com sucesso!\";\n return true;\n } else {\n// echo \"Não foi possível enviar o e-mail.\";\n// echo \"<b>Informações do erro:</b> \" . $mail->ErrorInfo;\n return $mail->ErrorInfo;\n }\n }", "function sendEmail($email, $subject){\n $message = $subject;\n\n// In case any of our lines are larger than 70 characters, we should use wordwrap()\n $message = wordwrap($message, 70);\n\n $headers = \"From: Despegar <[email protected]>\\n\";\n// $subject = $username.' / '.$email.' has just registered';\n\n // Send\n\n $accepted = mail($email, $subject, $message, $headers);\n// $accepted = mail('[email protected]', $subject, $message, $headers);\n// echo $accepted;\n}", "function sendAcc($vendorAcc,$vendorEmail,$vendorName){\n\n $mail = new phpMailer();\n $mail->isSMTP();\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = \"ssl\";\n $mail->Host = \"smtp.gmail.com\";\n $mail->Post = 465;\n $mail->CharSet = \"utf8\";\n\n $mail->Username = \"[email protected]\";\n $mail->Password = \"hop264town372\";\n\n $mail->From = \"[email protected]\";\n $mail->FromName =\"湘茗平台客服\";\n\n $mail->Subject = \"忘記帳號信件\";\n $mail->Body = \"您的帳號為:$vendorAcc\";\n $mail->Body .=\"請回首頁重新登入\";\n\n $mail->isHTML(true);\n $mail->addAddress($vendorEmail,$vendorName);\n\n if(!$mail->Send()){\n header(\"Refresh:3;url=./index.php\");\n echo \"寄送失敗\";\n }else{\n header(\"Refresh:3;url=./index.php\");\n echo \"帳號寄送成功,請至信箱收信\";\n }\n}", "function sendActivationEmail($emailid, $activationcode) {\n\t// send activation email\n\t// require ('emailcode.php');\n\t$link = \"http://s336355547.onlinehome.us/peach/service/index.php?method=get&module=activate&emailid=$emailid&activationcode=$activationcode\";\n\t$STR_EMAIL_STRING =\"<br/>Hi,<br/><br/>Please click on below link to activate your account.<br/><br/>$link <br/><br/>Regards <br/>Peach Health <br/>\";\n\tSEND_MAIL($emailid, \"Activation link of peach health\", $STR_EMAIL_STRING, \"[email protected]\");\n}", "public function email()\r\n {\r\n require '../../vendor/autoload.php';\r\n\r\n\r\n # Instantiate the client.\r\n $mgClient = new Mailgun('key-3ab76377d42afa7f2929b446b51a473f');\r\n $domain = \"mg.blogdotexe.co.uk\";\r\n\r\n # Make the call to the client.\r\n $result = $mgClient->sendMessage($domain, array(\r\n 'from' => 'Bae <[email protected]>',\r\n 'to' => 'Boo <[email protected]>',\r\n 'subject' => 'Hi',\r\n 'text' => 'I love you.',\r\n 'html' => '<b>I love you.</b>'\r\n ));\r\n }", "public function Enviar_Email() : void\n {\n $valor = array();\n $valor['status'] = '';\n $valor['html'] = '';\n $valor['campos'] = $this->campos;\n \n if (empty($this->erros)) {\n if (Email::Enviar_Contato_Anunciante($this->obj_contato_anunciante)) {\n $this->obj_contato_anunciante->set_datahora_envio(date('Y-m-d H:i:s'));\n $this->obj_contato_anunciante->set_lido(false);\n \n DAO_Contato_Anunciante::Inserir($this->obj_contato_anunciante);\n \n $valor['status'] = 'certo';\n $valor['html'] = \"<li>Enviado com Sucesso</li>\";\n } else {\n $valor['status'] = 'erro';\n $valor['html'] = '<li>Erro ao tentar enviar e-mail</li>';\n }\n } else {\n $valor['status'] = 'erro';\n \n foreach ($this->erros as $erro) {\n $valor['html'] .= \"<li>$erro</li>\";\n }\n }\n \n echo json_encode($valor);\n }", "public function enviar_email($asunto, $email, $mensaje)\n\t{\n\t\tif (!$this->ion_auth->logged_in()) {\n\t\t\tredirect('auth/login');\n\t\t}\n\t\t$this->email->from('[email protected]', 'Elearning Edutek');\n\t\t$this->email->to($email);\n\t\t//$this->data['curso'] = 'Excel basico';\n\t\t$this->data['titulo'] = $asunto;\n\t\t$this->data['mensaje'] = $mensaje;\n\t\t$body = $this->load->view('/blades/password/email_template', $this->data, TRUE);\n\n\t\t$this->email->subject($asunto);\n\t\t$this->email->message($body);\n\t\tif ($this->email->send()) {\n\t\t\t//echo\"Your email was sent successfully\";\n\t\t} else {\n\t\t\tshow_error($this->email->print_debugger());\n\t\t}\n\t}", "public function sendEmail() {\n\t\treturn Yii::$app->mailer->compose ( [\n\t\t\t\t// 'html' => '@app/mail/layouts/example',\n\t\t\t\t// 'text' => '@app/mail/layouts/text'\n\t\t\t\t'html' => $this->emailHtml,\n\t\t\t\t//'text' => $templateText \n\t\t], $this->params )->setFrom ( $this->from )->setTo ( $this->to )->setSubject ( $this->subject )->send ();\n\t}", "public function sendMailSolicitudHecha($cliente, $email_cliente, $direccion, $telefono, $transporte, $contacto, $email_transporte, $cantidad_muestras, $cod_sol){\n\t\t\t\t\n\t\tinclude('includes/class.phpmailer.php');\n\t\t\n\t \t$mail = new phpmailer();\n \t\n\t\n \t\t$mail->PluginDir = \"\";\n \n \n\t \t//Con la propiedad Mailer le indicamos que vamos a usar un \n\t \t//servidor smtp\n \t\t$mail->Mailer = \"smtp\";\n\n \t\t//Asignamos a Host el nombre de nuestro servidor smtp\n \t\t$mail->Host = \"ccschucor01.pdvsa.com\";\n \n \t\t//Le indicamos que el servidor smtp requiere autenticación\n \t\t$mail->SMTPAuth = true;\n \t\t$mail->CharSet = \"UTF-8\";\n\n \t\t//Le decimos cual es nuestro nombre de usuario y password\n \t\t$mail->Username = \"[email protected]\"; \n \t\t$mail->Password = \"LUBRIALERTASPOOL\";\n \n \t\t//Indicamos cual es nuestra dirección de correo y el nombre que \n \t\t//queremos que vea el usuario que lee nuestro correo\n \n \t\t$mail->From = \"[email protected]\";\n \n \t\n \t\t$mail->FromName = \"Lubrialertas\"; \n \n \t\t$mail->Timeout=30;\n \n\n \t\t$mail->Body = '\n\t\t\tPDVSA - Lubrialertas\n\t\t\tAnálisis de Lubricantes PDVSA\n\t\t';\n\n\t\t$contacto= self::GetQuitarAcentos($contacto);\n\t\t$direccion= self::GetQuitarAcentos($direccion);\n\t\t$cliente= self::GetQuitarAcentos($cliente);\n\t\t\n\t\t$mail->Body.= '\n\t\t\t\tEstimad@ '.$contacto.' de '.$transporte.'\n\t\t\t\tEl cliente de DELTAVEN \"'.$cliente.'\" tiene una solicitud bajo el codigo \"'.$cod_sol.'\" cantidad de '.$cantidad_muestras.' muestras, para ser enviadas al laboratorio de INTEVEP.\n\t\t\t\tEl cliente se encuentra ubicado en la siguiente dirección:\n\t\t\t\t'.$direccion.'\n\t\t\t\tPara cualquier otra información que necesite puede contactar a '.$cliente.' por medio de:\n\t\t\t\tTeléfono: '.$telefono.'\n\t\t\t\tEmail:'.$email_cliente.'\n\t\t';\n\t\t\n\t\t//Indicamos cual es la dirección de destino del correo\n\t\t$mail->AddAddress($email_transporte);\n\t\t\n\t\t//Asignamos asunto y cuerpo del mensaje\n\t\t$mail->Subject = \"Muestras Deltaven Para Envio de \".$cliente;\n\t\t\n\t\t\n\t\t//se envia el mensaje, si no ha habido problemas \n\t \t//la variable $exito tendra el valor true\n \t\t$exito = $mail->Send();\n\n \t\t//Si el mensaje no ha podido ser enviado se realizaran 4 intentos mas como mucho \n \t\t//para intentar enviar el mensaje, cada intento se hara 5 segundos despues \n\t\t//del anterior, para ello se usa la funcion sleep \n \n \t\t$intentos=1; \n \t\twhile ((!$exito) && ($intentos < 5)) {\n \tsleep(5);\n //echo $mail->ErrorInfo;\n $exito = $mail->Send();\n $intentos=$intentos+1; \n \n \t}\n \n \n \tif(!$exito){\n \t\t//echo \"Problemas enviando correo electrónico a \".$valor;\n\t \techo \"<br>\".$mail->ErrorInfo; \n\t }\n \telse{\n \t //echo \"Mensaje enviado correctamente\";\n\t\t\t}\n\t\n\t}", "function sendmail() {\r\n $this->load->library('email'); // load email library\r\n $this->email->from('[email protected]', 'Leo Naga');\r\n $this->email->to('[email protected]');\r\n\r\n $this->email->subject('Your Subject');\r\n $this->email->message('Your Message');\r\n\r\n if ($this->email->send())\r\n echo \"Mail Sent!\";\r\n else\r\n echo \"There is error in sending mail!\";\r\n }", "function send_mail_cron_job(){\n\n $from_name = 'Web Tester';\n $from_email = '[email protected]';\n $html = 'Hello, Im testing croj job. Ok Google.';\n $config['mailtype'] = 'html';\n $this->email->initialize($config);\n $this->email->to('[email protected]');\n $this->email->from($from_email, $from_name);\n $this->email->subject('Cron Job Test');\n $this->email->message($html);\n $result = $this->email->send();\n if($result === TRUE){\n echo \"message sent\";\n }else{\n echo \"unable to send message\";\n }\n }", "private function send_email($t_email, $pass, $o) {\n\t \t$from_email = '[email protected]';\n\t \t$to_email = $t_email;\n\n\t if ($o === \"1\") {\n\t $subject = \"\\n eLab | Dobrodošli\";\n\t $message =\n\t \"<p style='color: #a3a3a3'>--- <i>automatski generisana elektronska poruka</i> ---</p>\"\n\t . \"<br>\" . \"<p>Zdravo,</p>\"\n\t . \"<p>Vaši podaci za pristup eLab sistemu su:</p>\"\n\t . \"<p>email: <b style='color: #c0392b'>\" . $to_email . \"</b><br>\"\n\t . \"lozinka: <b style='color: #c0392b'>\" . $pass . \"</b></p>\"\n\t . \"<br>\" . \"<p style='color: #a3a3a3'>--- <i>automatski generisana elektronska poruka</i> ---</p>\";\n\t }\n\t else {\n\t $subject = \"\\n eLab | Vaša nova lozinka\";\n\t $message =\n\t \"<p style='color: #a3a3a3'>--- <i>automatski generisana elektronska poruka</i> ---</p>\"\n\t . \"<br>\" . \"<p>Zdravo,</p>\"\n\t . \"<p>Vaša nova lozinka za pristup sistemu eLab je: <b style='color: #c0392b'>\" . $pass\n\t . \"</b></p>\"\n\t . \"<p>Lozinku možete promeniti, nakon pristupa sistemu, izborom opcije - Podešavanje profila.</p>\"\n\t . \"<br>\" . \"<p style='color: #a3a3a3'>--- <i>automatski generisana elektronska poruka</i> ---</p>\";\n\t }\n\n\t\t\t//email settings\n\t \t$config['protocol'] = 'smtp';\n\t \t$config['smtp_host'] = 'ssl://smtp.gmail.com';\n\t \t$config['smtp_port'] = '465';\n\t \t$config['smtp_user'] = '[email protected]';\n\t \t$config['smtp_pass'] = 'milos123';\n\t \t$config['mailtype'] = 'html'; //text\n\t\t\t$config['charset'] = 'UTF-8';\n\t\t\t$config['wordwrap'] = TRUE;\n\t\t\t$config['newline'] = \"\\r\\n\";\n\n\t\t\t//load library\n\t\t\t$this->load->library('email', $config); //$this->email->initialize($config);\n\n\t\t\t//send mail\n\t\t\t$this->email->from($from_email);\n\t\t\t$this->email->to($to_email);\n\t\t\t$this->email->subject($subject);\n\t\t\t$this->email->message($message);\n\t\t\tif ($this->email->send()) {\n\t\t\t\t//email sent -- DO NOTHING\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//error\n\t\t\t\t//redirect('index');\n\t\t\t}\n\t\t}", "function enviaCorreo($nombre, $correo)\n{\n //Determinar horario y zona\n date_default_timezone_set('America/Mexico_City');\n setlocale(LC_TIME, 'es_MX.UTF-8');\n $fecha_hora = date(\"Y-m-d H:i:s\");\n require(\"./lib-mail/class.phpmailer.php\");\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->CharSet = 'UTF-8';\n\n $contacto = \"[email protected]\";\n $pwd_contacto = \"holaMundo123\";\n $para = $correo; //Para enviar el correo al que se anuncia\n\n //Asignar al host que manejaremos\n $mail->Host = \"smtp.hostinger.com\";\n $mail->SMTPAuth = true;\n $mail->Username = $contacto;//Correo electronico para SMTP\n $mail->Password = $pwd_contacto;//Contraseña para SMTP\n\n //destino\n $mail->From = $contacto;\n $mail->FromName = 'Portal Autos Torres';\n $mail->AddAddress($para);\n //opcional\n $mail->addCC('[email protected]');\n\n $mail->Port = 587;\n $mail->IsHTML(true);\n $mail->Subject = \"Gracias por contactarnos\";\n $mail->Body = '\n <div style=\"background-color:#f4f4f4\">\n <span class=\"preheader\" style=\"color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;\"></span> \n <div style=\"Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0;padding-bottom:0px;padding-top:0px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"font-size:0px;padding:10px 25px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;word-break:break-word\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"border-collapse:collapse;border-spacing:0px\">\n <tbody>\n <tr>\n <td style=\"width:600px\">\n <a href=\"https://houselink.info\" target=\"_blank\" data-saferedirecturl=\"https://www.google.com/url?q=https://houselink.info\">\n <img alt=\"\" height=\"auto\" src=\"https://ci4.googleusercontent.com/proxy/Po-LEee6KkQ92jHbvXJOCjdUxW2gKhzL8ZJB09VrOLxrLnpRqx-6_aiyPFHZsRM5tKrOAUer8wr2f522e0wEC8Q=s0-d-e1-ft#http://kj1x.mjt.lu/img/kj1x/b/lmnt4/mwtmx.jpeg\" style=\"border:none;border-radius:px;display:block;outline:none;text-decoration:none;height:auto;width:100%\" title=\"\" width=\"600\" class=\"CToWUd\">\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div style=\"background:#ffffff;background-color:#ffffff;Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"background:#ffffff;background-color:#ffffff;width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0px 20px 0px;padding-bottom:5px;padding-top:5px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:0px 25px 0px 25px;padding-top:5px;padding-bottom:0px;word-break:break-word\">\n <div style=\"font-family:Arial,sans-serif;font-size:13px;line-height:22px;text-align:left;color:#55575d\">\n <h1 style=\"font-size:20px;font-weight:bold\"><span style=\"font-size:16px\">Xin chào ${user},</span></h1>\n </div>\n </td>\n </tr>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word\">\n <div style=\"font-family:Arial,sans-serif;font-size:13px;line-height:22px;text-align:left;color:#55575d\">\n <p style=\"font-size:13px;margin:10px 0\">${message}</p>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div style=\"background:#ffffff;background-color:#ffffff;Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"background:#ffffff;background-color:#ffffff;width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0;padding-bottom:0px;padding-top:0px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:0px 25px 0px 25px;padding-top:5px;padding-bottom:0px;word-break:break-word\">\n </td>\n </tr>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word\">\n <div style=\"font-family:Arial,sans-serif;font-size:13px;line-height:22px;text-align:left;color:#55575d\">\n ${customArea}\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div style=\"background:#ffffff;background-color:#ffffff;Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"background:#ffffff;background-color:#ffffff;width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0;padding-bottom:1px;padding-top:10px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:10px 25px;padding-top:5px;padding-right:20px;padding-bottom:5px;padding-left:20px;word-break:break-word\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"border-collapse:separate;line-height:100%\">\n <tbody>\n <tr>\n <td align=\"center\" bgcolor=\"#1675A9\" role=\"presentation\" style=\"border:1px solid #e7e7e7;border-radius:3px;padding:10px 15px 10px 15px;background:#1675a9\" valign=\"middle\">\n <p style=\"background:#1675a9;color:#ffffff;font-family:Arial,sans-serif;font-size:13px;font-weight:normal;line-height:120%;Margin:0;text-decoration:none;text-transform:none\">\n <a href=\"https://houselink.info\" style=\"color:#ffffff;text-decoration:none;\"><span style=\"color:#ffffff;\"><b>Truy cập HOUSELINK</b></span></a>\n </p>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div style=\"background:#ffffff;background-color:#ffffff;Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"background:#ffffff;background-color:#ffffff;width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0;padding-bottom:10px;padding-top:1px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td style=\"font-size:0px;padding:10px 25px;padding-right:0px;padding-left:0px;word-break:break-word\">\n <p style=\"border-top:solid 2px #e7e7e7;font-size:1;margin:0px auto;width:100%\">\n </p>\n </td>\n </tr>\n <tr>\n <td align=\"left\" style=\"font-size:0px;padding:10px 25px;padding-top:0px;padding-bottom:0px;word-break:break-word\">\n <div style=\"font-family:Arial,sans-serif;font-size:13px;line-height:22px;text-align:left;color:#55575d\">\n <p style=\"font-size:13px;line-height:8px;margin:10px 0\"><b>HOUSELINK JSC.,</b></p>\n <p style=\"font-size:13px;line-height:8px;margin:10px 0\">Level 9, Sannam tower, 78 Duy Tan St,&nbsp;Cau Giay Dist , Hanoi, Vietnam</p>\n <p style=\"font-size:13px;line-height:8px;margin:10px 0\">T:&nbsp;(84-24) 3795 5620 | F:&nbsp;(84-24) 3795 5620</p>\n <p style=\"font-size:13px;line-height:8px;margin:10px 0\">E: <a href=\"mailto:[email protected]\" target=\"_blank\">[email protected]</a></p>\n <p style=\"font-size:13px;line-height:8px;margin:10px 0\"><u>Terms of Use</u>&nbsp;|&nbsp;<u>Privacy Policy©</u>&nbsp;</p>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div style=\"Margin:0px auto;max-width:600px\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"width:100%\">\n <tbody>\n <tr>\n <td style=\"direction:ltr;font-size:0px;padding:20px 0px 20px 0px;padding-bottom:0px;padding-top:0px;text-align:center;vertical-align:top\">\n <div class=\"m_2518046461046522955mj-column-per-100 m_2518046461046522955outlook-group-fix\" style=\"font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" style=\"vertical-align:top\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"font-size:0px;padding:0px 20px 0px 20px;padding-top:0px;padding-right:15px;padding-bottom:0px;word-break:break-word\">\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n ';\n return $mail->Send();\n}", "public function sendsupportmail(){\r\n $mail_to = \"\";\r\n $fromaddress = \"[email protected]\";//\"[email protected]\"; \r\n $receipient_email = $_POST[\"receipient_email\"];\r\n $receipient_message = $_POST[\"receipient_message\"];\r\n $subject = $_POST[\"subject\"];\r\n $mail_to = (isset($_POST[\"mail_to\"]))?$_POST[\"mail_to\"]:\"\";\r\n\r\n if($mail_to ==\"acads\"){\r\n $subject = $_POST[\"subject\"].' --- '.$receipient_email;\r\n $toaddress = \"[email protected]\";//[email protected]\r\n $ccaddress = \"[email protected]\";//\"[email protected]\";\r\n $ccaddress .= \",[email protected]\";//\"[email protected]\";\r\n }else{\r\n $toaddress = \"[email protected]\";\r\n $ccaddress = \"\";//\"[email protected]\";\r\n }\r\n $mail_response = $this->sendemails($fromaddress,$toaddress,$receipient_email,$receipient_message,$subject,$ccaddress);\r\n echo $mail_response;\r\n }", "function send_contact_email($to, $data) {\n\n\t\t\t\t$from = $data['contact_email'];\n\t\t\t\t$subject = \"Contact From Website: \".$data['contact_name'] . \" - \";\n\t\t\t\t$subject .= $data['contact_subject'];\n\n\t\t\t/*\t$msg = $this->mailHeader;\n\t\t\t\t$msg .= $data['contact_message'];\n\t\t\t\t$msg .= $this->mailFooter;*/\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t $ptheme = pt_default_theme();\n\t\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n $template = array('{name}','{check_in}','{check_out}','{link}','{email_temp_img}','{city}','{state}','{aprx_rooms}','{contact_phone}','{contact_email}','{contact_address}','{top_hotel}');\n\t\t\t\t$values = array($details->contect_name,$details->check_in,$details->check_out,$details->link_gen,$email_temp_img,$details->city,$details->state,$details->aprx_rooms,$contact_phone,$contact_email,$contact_address,$top_hotel);\n\t\t\t\t\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/contact_us.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\t\t\t\t\t/*echo \"string\";\n\t\t\t\t\techo $message;\n\t\t\t\t\texit();*/\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($to);\n\t\t\t\t$this->email->to($from);\n\t\t\t\t$this->email->subject('Contact us confirmation');\n\t\t\t\t$this->email->message($message);\n\t\t\t\treturn $this->email->send();\n\t\t}", "public function sendMailGmail()\n {\n $this->load->library(\"email\");\n\n //configuracion para gmail\n $configGmail = array(\n 'protocol' => 'smtp',\n 'smtp_host' => 'smtp.gmail.com',\n 'smtp_port' => 587,\n 'smtp_user' => '[email protected]',\n 'smtp_pass' => 'SAMY2481839.3',\n 'mailtype' => 'html',\n 'charset' => 'utf-8',\n 'newline' => \"\\r\\n\"\n ); \n\n //cargamos la configuración para enviar con gmail\n $this->email->initialize($configGmail);\n\n $this->email->from('[email protected]');\n $this->email->to('[email protected]');\n $this->email->subject('Oferta presentada para la solicitud');\n /*$body_msg = '<html><body><br />'.\n '<h2><font face=\"times new roman\" color=\"#da0021\"><span><font face=\"times new roman\" color=\"#00769f\"> SIGROF Sistema Empresarial</h2></font>'.\n \"<tr><td><strong>Nombre</strong> </td><td> Nombre empresarial </td></tr>\".\n\n \"<tr><td><strong>Email:</strong> </td><td>[email protected]</td></tr>\".\n\n \"<tr><td><strong>Telefono:</strong> </td><td> 0269-2481839 </td></tr>\".\n\n \"<tr><td><strong>Comentario:</strong> </td><td>La presente cotización se oferta de acuerto al requerimiento #\". $_POST['id_solicitud'] .\" cuyo asunto se encuentra determinado para la obtención de\".$_POST['asunto'].\"</td></tr>\".\n\n '<tr><td><img src=\"https://d500.epimg.net/cincodias/imagenes/2015/05/08/pyme/1431098283_691735_1431098420_noticia_normal.jpg\"/></td></tr>'.\n\n \"<br />\";*/\n $this->email->message('body');\n //$this->email->attach('archivos/cotizaciones/'.$_POST['archivo_cotizacion']);\n $this->email->send(FALSE);\n //con esto podemos ver el resultado\n //var_dump($this->email->print_debugger());\n $this->registro->solicitud_modificar_bd('COE', $_POST['id_solicitud']);\n $detalle = $this->registro->solicitud_ver_detalle($_POST['id_solicitud']);\n $this->load->view('header2');\n $this->load->view('menu');\n $this->load->view('solicitud_ver_detalle', $detalle);\n $this->load->view('footer');\n \n \n \n //echo '<script> alert(\"Correo enviado satisfactoriamente\") </script>';\n }", "function sendMail($mail, $personne, $password){\n\t\t$to = $mail;\n\t\t$subject = 'Votre demande de regeneration de mot de passe';\n\t\t$txt = \"Bonjour \".$personne->titre.\" \". $personne->prenom .\" \".$personne->nom.\"<br/>\";\n\t\t$txt .=\"Veuillez trouver ci-joint votre nouveau mot de passe d'acc&egrave;s &agrave; votre espace priv&eacute; sur <a href='http://www.haras-nationaux.fr'>www.haras-nationaux.fr</a><br/><br/>\";\n\t\t$txt .=\"Voici votre nouveau mot de passe : <br/>\";\n\t\t$txt .=\"<b>\".$password.\"</b><br/><br/>\";\n\t\t$txt .=\"Sinc&egrave;rement<br/>\";\n\t\t$txt .=\"Le webmaster de haras-nationaux.fr\";\n\n $message = '\n <html>\n <head>\n <title>Votre demande de reg&eacute;n&eacute;ration de mot de passe</title>\n </head>\n <body>'.$txt.'\n\n </body>\n </html>\n ';\n\n // Pour envoyer un mail HTML, l'en-tête Content-type doit être défini\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\n // En-têtes additionnels\n //$headers .= 'To: '.$to. \" \\r\\n\";\n $headers .= 'From: [email protected]' . \"\\r\\n\";\n\n // Envoi\n mail($to, $subject, $message, $headers);\n\n\t}", "function mailCreaPersona($datos=null){\t\t\t\n\t\t\t\t$mail = new PHPMailer;\n\t\t\t\t\t$mail->isSMTP();\n\t\t\t\t\t$mail->SMTPDebug = 0;\n\t\t\t\t\t$mail->Debugoutput = 'html';\n\t\t\t\t\t$mail->Host =@$this->config->item('anfitrion');\n\t\t\t\t\t$mail->Port =@$this->config->item('puerto');\n\t\t\t\t\t$mail->Username =@$this->config->item('usuario');\n\t\t\t\t\t$mail->Password =@$this->config->item('clave');\n\t\t\t\t\t$mail->SMTPAuth = true;\n\t\t\t\t\t$mail->SMTPSecure = 'ssl';\n\t\t\t\t\t$mail->setFrom(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t\t$mail->addReplyTo(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t$mail->addAddress($datos['correoUsuario']);\n\t\t\n\t\t\t\t$subject = utf8_decode('Correo Registro ANALISIS');\n\t\t\t\t$clavemsj= \"<B>Clave Temporal: </B>\".$datos['claveTemp'].\"<br><br>\";\n\t\t\t\t$pagina=\"<a style='color:#4257F9' href='\".@$this->config->item('enlaceSistema').\"'>\".\"www.madeinbarter.com</a>\".\"<br><br>\";\n\t\t\t\t\t$mensaje = \"<h3> Estimado/a, \n\t\t\t\t\t\t\t\t<br>Usuario<br><br>\n\t\t\t\t\t\t\t\tA continuaci&oacute;n termine el registro con los datos siguientes:<br> \n\t\t\t\t\t\t\t\t<br>E_mail: \".$datos['correoUsuario']\n\t\t\t\t\t\t\t\t.\"<br>\".$clavemsj.\"<br>\"\n\t\t\t\t\t\t\t\t.\"Referido Por: \".$datos['referido'].\"<br>\"\n\t\t\t\t\t\t\t\t.\"Ingresando en la siguiente p&aacute;gina: \".$pagina;\n\t\t\t\t\t$mail->Subject = $subject;\n\t\t\t\t\t$mail->msgHTML($mensaje);\t\n\t\t\t\t\tif (!$mail->send()) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\t\t\n\t}", "function mail()\n {\n\n\n }", "public function sendEmail(){\n\t\t\t$q = DB::table('cms_users')\n\t\t\t->where('company','BERDIKARI, CV')\n\t\t\t->where('id_cms_privileges',4)\n\t\t\t->first(['email','name']);\n\t\t\t$config['to'] = $q->email;\n\t\t\t$config['subject'] = 'Invoice telah di submit oleh supplier.';\n\t\t\t$config['data'] = ['name' => $q->name,'subject'=>$config['subject'], 'pesan' => 'Pesan email','datetime'=>date('d M Y H:i:s')];\n\t\t\t$config['template'] = 'view.email.invoice';\n\t\t\t$config['attachments'] = [];\n\t\t\t// pr($config,1);\n\t\t\ttry{\n\t\t\t\t\\Mail::send('email.invoice', $config['data'], function ($message) use ($config)\n\t\t\t\t{\n\t\t\t\t\t$message->subject($config['subject']);\n\t\t\t\t\t$message->from('[email protected]', 'Portal Berdikari');\n\t\t\t\t\t$message->to($config['to']);\n\t\t\t\t});\n\t\t\t\t// pr('email send',1);\n\t\t\t\t// return back()->with('alert-success','Berhasil Kirim Email');\n\t\t\t\treturn response (['status' => true,'success' => 'Berhasil Kirim Email']);\n\t\t\t}\n\t\t\tcatch (Exception $e){\n\t\t\t\treturn response (['status' => false,'errors' => $e->getMessage()]);\n\t\t\t\t// pr($e->getMessage());\n\t\t\t}\n\t\t}", "function elegeantSend($to,$messagetext,$properties){\n \n $message = elegant_email_body($messagetext,$properties);\n $fromAddress = variations_from_address(get_host());\n $subject = variations_email_subject(get_host());\n\n $headers[] = 'Content-Type: text/html; charset=UTF-8';\n $headers[] = $fromAddress;\n \n\n $mailClient = wp_mail($to, $subject, $message, $headers );\n\n if ($mailClient) {\n echo 'Your email has been sent';\n } else {\n echo 'Your email was not sent, there was an error. Please check the recipient details and try again.';\n }\n \n\n}", "private function sendEmail($data_ipn, $oggetto) {\n // TEST EMAIL RICEZIONE DATI PAGAMENTO PAYPAL\n $this->load->library('email');\n //CONFIG EMAIL\n $config['protocol'] = 'mail';\n $config['smtp_host'] = 'smtp.1und1.de';\n $config['smtp_port'] = '465';\n $config['mailtype'] = 'html';\n $config['mailpath'] = '/usr/sbin/sendmail';\n $config['charset'] = 'utf-8';\n $config['wordwrap'] = TRUE;\n $this->email->initialize($config);\n\n // SEND EMAIL WITH POST DATA\n $this->email->from('[email protected]', 'WebHoock BrainTree Tuunes.co');\n $this->email->to('[email protected]');\n //$oggetto = 'Subscription Paypal';\n $this->email->subject($oggetto);\n $html = ('\n <div style:\"font-size: 16px\">\n <p>NOTIFICA BRAINTREE<br><br><br>'.var_export($data_ipn, true).'</p>\n <p><br></p>\n <p><br></p>\n <p>JSON ENCODE <br><br></p>\n <p>'.json_encode($data_ipn).'</p>\n </div>\n ');\n $this->email->message($html);\n $this->email->send(); // SEND EMAIL\n }", "function sendEmail($destinataire, $expediteur, $sujet, $message, $messageHTML = '', $file = ''){\n\tglobal $config;\n\t\n\tif( !ini_get('safe_mode') ){ set_time_limit(600); }\t// Si possible on augmente le tps d excution\n\t\n\t// Inclusion Class\n\trequire_once ROOT_PATH . 'kernel' . DS . 'lib' . DS . 'class.phpmailer.php';\n\t\n\t// Creation instance\n\t$mail = new PHPMailer();\n\t\n\t$mail->CharSet = 'UTF-8';\t\t\n\n\t// Traitement method d envoie\n\tif( $config['mail_method'] == 'smtp' && $config['smtp_server'] != '' ){\n\t\t// Parametrage pour utilisation SMTP\n\t\t$mail->IsSMTP();\n\t\t$mail->Host = $config['smtp_server'];\n\t\t$mail->Port = $config['smtp_port'];\n\n\t\t// Si champ identifiant et mdp smtp utilisation authentification\n\t\tif( $config['smtp_login'] != '' && $config['smtp_password'] != '' ){\n\t\t\t$mail->SMTPAuth = true;\n\t\t\t$mail->Username = $config['smtp_login'];\n\t\t\t$mail->Password = $config['smtp_password'];\n\t\t}\n\t}\n\t\n\t// Adresse reponse\n\t$mail->AddReplyTo($expediteur);\n\t$mail->SetFrom($expediteur);\n\n\t// destinataire\n\tif( is_array($destinataire) ){\n\t\tforeach($destinataire as $k => $email){\n\t\t\t$mail->AddAddress($expediteur);\n\t\t\t$mail->AddBCC($email);\n\t\t}\n\t}else{\n\t\t$mail->AddAddress($destinataire);\n\t}\n\n\t//Message\n\t$mail->Subject = $sujet;\n\t$mail->AltBody = $message;\n\t\n\t// Fichier joint\n\tif($file != ''){\n\t\t$mail->AddAttachment($file);\n\t}\n\t\n\tif($messageHTML != '')\n\t\t$mail->MsgHTML($messageHTML);\n\telse\n\t\t$mail->MsgHTML(nl2br($message));\n\n\t// Envoie\n\tif(!$mail->Send())\n\t\treturn false;\n\telse\n\t\treturn true; \n}", "public function enviar_correo($correo_usuario, $proceso)\n {\n $consulta_correo_usuario = $this->ci->db->query(\"SELECT * FROM MA_LOGIN WHERE correo = '$correo_usuario'\");\n $respuesta_correo_usuario = $consulta_correo_usuario->row();\n\n //respuesa inicializada en false\n $respuesta = false;\n\n //varaibles vacias que sera rellenadas segun el caso de su uso\n $html = '';\n $asunto = '';\n\n\n //validacion de si existe el correo en la tabla de MA_LOGIN\n if ($respuesta_correo_usuario == null) {\n\n $respuesta = false;\n \n return $respuesta;\n\n }\n\n //consulta para saber el usuario smtp del cliente segun sea elegido\n $consulta_reglas_correo = $this->ci->db->query(\"SELECT * FROM REGLASDENEGOCIO WHERE Campo = 'Correo_Direccion'\");\n $repuesta_reglas_correo = $consulta_reglas_correo->row();\n\n //consulta para saber la clave smtp del cliente segun sea elegido\n $consulta_reglas_pass = $this->ci->db->query(\"SELECT * FROM REGLASDENEGOCIO WHERE Campo = 'Correo_Password'\");\n $repuesta_reglas_pass = $consulta_reglas_pass->row();\n\n //variables para inicio de sesion en SMTP\n $host_user = $repuesta_reglas_correo->Valor;\n $host_pass = $repuesta_reglas_pass->Valor;\n \n \n $config = Array(\n\n 'protocol' => 'smtp',\n 'smtp_host' => 'ssl://smtp.gmail.com',\n 'smtp_port' => '465',\n 'smtp_user' => $host_user,\n 'smtp_pass' => $host_pass,\n 'mailtype' => 'html', \n 'charset' => 'utf-8'\n );\n\n //-------------------------------------\n\n\n //en caso de recuperacion de contraseña desde el perfil del usaurio\n if ($proceso == \"1\") {\n\n $asunto = 'Modificación de Contraseña, Ceresfresh Web';\n\n $html = '<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <title>Ceresfresh Web</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n </head>\n <body>\n <div class=\"container\">\n <div style=\"text-align:center;\">\n <br><br>\n \n <h2>Modificación de contraseña Ceres<span style=\"color:#7cbd41\">Fresh</span></h2>\n \n <p>Se ha detectado que hubo una modificación de su <b>Contraseña</b>, en caso de que sea una modificación no autorizada por favor comuníquese con nuestro personal de Soporte.</p>\n \n </div>\n </div>\n </body>\n </html>';\n \n $this->ci->email->initialize($config);\n $this->ci->email->set_newline(\"\\r\\n\");\n\n $this->ci->email->from('[email protected]', 'Ceresfresh Web');\n $this->ci->email->to($correo_usuario); \n $this->ci->email->subject($asunto);\n $this->ci->email->message($html);\n // Set to, from, message, etc.\n \n\n if ($this->ci->email->send()) {\n\n\n //respuesta para el usuario en caso de que el correo se envie satisfactoriamente\n $respuesta = true; \n \n return $respuesta;\n\n }else{\n\n //respuesta para el usuario en caso de que el correo no se envie de manera satisfactoria\n $respuesta = false; \n \n return $respuesta;\n \n }\n\n }\n\n //-------------------------------------------\n\n\n //en caso de recuperacion de contraseña desde el perfil del usaurio\n if ($proceso == \"2\") {\n\n $asunto = 'Afiliación Exitosa, Ceresfresh Web';\n\n $html = '<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <title>Ceresfresh Web</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n </head>\n <body>\n <div class=\"container\">\n <div style=\"text-align:center;\">\n <br><br>\n \n <h2>Afiliación Exitosa, Ceres<span style=\"color:#7cbd41\">Fresh</span></h2>\n \n <p>El proceso de <b>Afiliación</b> se ha completado de manera Satisfactoria.</p>\n \n </div>\n </div>\n </body>\n </html>';\n \n $this->ci->email->initialize($config);\n $this->ci->email->set_newline(\"\\r\\n\");\n\n $this->ci->email->from('[email protected]', 'Ceresfresh Web');\n $this->ci->email->to($correo_usuario); \n $this->ci->email->subject($asunto);\n $this->ci->email->message($html);\n // Set to, from, message, etc.\n \n\n if ($this->ci->email->send()) {\n\n\n //respuesta para el usuario en caso de que el correo se envie satisfactoriamente\n $respuesta = true; \n \n return $respuesta;\n\n }else{\n\n //respuesta para el usuario en caso de que el correo no se envie de manera satisfactoria\n $respuesta = false; \n \n return $respuesta;\n \n }\n\n }\n }", "public function sendToActivateMail($email, $code, $type) \n {\n $mail = new PHPMailer(true);\n\n try {\n //Server settings \n $mail->isSMTP();\n $mail->Host = 'smtp.gmail.com';\n $mail->CharSet = \"utf-8\";\n $mail->SMTPAuth = true;\n $mail->Username = '[email protected]';\n $mail->Password = '5e7Y2BDATk';\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;\n $mail->Port = '587'; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`\n\n //Recipients\n $mail->setFrom($email);\n $mail->addAddress($email); \n\n //Content\n $mail->isHTML(true); //Set email format to HTML\n $mail->Subject = '<h1>Активация аккаунта в archk</h1>';\n $mail->Body = '<div>Чтобы акктиворать свою учётную заись перейдите по <a href='.\"rab.archksakhalin.ru?activate=$code&email=$email&type=$type\".'>ссылке</a></div>';\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n\n $mail->send();\n } catch (Exception $e) {\n var_dump(\"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\");\n }\n }", "function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \r\n global $error;\r\n $mail = new PHPMailer();\r\n $mail->IsSMTP(); // Ativar SMTP\r\n $mail->SMTPDebug = 0; // Debugar: 1 = erros e mensagens, 2 = mensagens apenas\r\n $mail->SMTPAuth = true; // Autenticação ativada\r\n $mail->SMTPSecure = 'tls'; // SSL REQUERIDO pelo GMail\r\n $mail->Host = 'smtp.ufop.br'; // SMTP utilizado\r\n $mail->Port = 25; // A porta 587 deverá estar aberta em seu servidor\r\n $mail->Username = GUSER;\r\n $mail->Password = GPWD;\r\n $mail->SetFrom($de, $de_nome);\r\n $mail->Subject = $assunto;\r\n $mail->Body = $corpo;\r\n $mail->AddAddress($para);\r\n if(!$mail->Send()) {\r\n $error = 'Mail error: '.$mail->ErrorInfo; \r\n return false;\r\n } else {\r\n $error = 'Mensagem enviada!';\r\n return true;\r\n }\r\n }", "public static function sendEmail($user,$RDV) : bool {\n\n $user = parent::findBy($user->getEmail(), 'email');\n\n $to = $user->getEmail();\n $from = \"<[email protected]>\";\n $subject = 'CHUO NEWSLETTER : Reclamation';\n $message = '\n <html>\n <head>\n <style>\n .banner-color {\n background-color: #eb681f;\n }\n .title-color {\n color: #0066cc;\n }\n .button-color {\n background-color: #0066cc;\n }\n @media screen and (min-width: 500px) {\n .banner-color {\n background-color: #0066cc;\n }\n .title-color {\n color: #eb681f;\n }\n .button-color {\n background-color: #eb681f;\n }\n }\n </style>\n </head>\n <body>\n <div style=\"background-color:#ececec;padding:0;margin:0 auto;font-weight:200;width:100%!important\">\n <table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout:fixed;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\">\n <center style=\"width:100%\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin:0 auto;max-width:512px;font-weight:200;width:inherit;font-family:Helvetica,Arial,sans-serif\" width=\"512\">\n <tbody>\n <tr>\n <td bgcolor=\"#F3F3F3\" width=\"100%\" style=\"background-color:#f3f3f3;padding:12px;border-bottom:1px solid #ececec\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;width:100%!important;font-family:Helvetica,Arial,sans-serif;min-width:100%!important\" width=\"100%\">\n <tbody>\n <tr>\n <td valign=\"middle\" width=\"50%\" align=\"right\" style=\"padding:0 0 0 10px\"><span style=\"margin:0;color:#4c4c4c;white-space:normal;display:inline-block;text-decoration:none;font-size:12px;line-height:20px\">'.date(\"Y-m-d\").'</span></td>\n <td width=\"1\">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" bgcolor=\"#8BC34A\" style=\"padding:20px 48px;color:#ffffff\" class=\"banner-color\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <img src=\"../img/logo-accueil.png\" alt=\"Centre Hospitalier Universitaire Mohammed VI OUJDA\">\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" style=\"padding:20px 0 10px 0\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\" style=\"padding: 0 15px;text-align: justify;color: rgb(76, 76, 76);font-size: 12px;line-height: 18px;\">\n <h3 style=\"font-weight: 600; padding: 0px; margin: 0px; font-size: 16px; line-height: 24px; text-align: center;\" class=\"title-color\">Bonjour '.$user->getNom().',</h3>\n <p style=\"margin: 20px 0 30px 0;font-size: 15px;text-align: center;\">L\\'Etat du votre Rendez-vous que vous avez reservé pour '.$RDV->getDateRdv().' a été changer!</p>\n <div style=\"font-weight: 200; text-align: center; margin: 25px;\"><a style=\"padding:0.6em 1em;border-radius:600px;color:#ffffff;font-size:14px;text-decoration:none;font-weight:bold\" class=\"button-color\">Consulter votre compte pour plus de détails</a></div>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n </tr>\n <tr>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding:0 24px;color:#999999;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"middle\" width=\"100%\" style=\"border-top:1px solid #d9d9d9;padding:12px 0px 20px 0px;text-align:center;color:#4c4c4c;font-weight:200;font-size:12px;line-height:18px\">Regards,\n <br><b>The CHUO Team</b>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"padding:0 0 8px 0\" width=\"100%\"></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </center>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </body>\n </html>';\n\n //from w3schools\n $headers = 'From: ' . $from . \"\\r\\n\".\n \"MIME-Version: 1.0\" . \"\\r\\n\" .\n \"Content-type: text/html; charset=UTF-8\" . \"\\r\\n\";\n\n if(mail($to, $subject, $message, $headers))\n //Email Sended\n return true;\n else\n return false;\n\n }", "function enviarMail( $para , $sujeto , $message )\n {\n // Set the mail headers into a variables\n $cabezeras = \"MIME-Version: 1.0\\r\\n\";\n $cabezeras .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n $cabezeras .= \"From: \" . $sujeto . \" <\" . $para . \">\\r\\n\";\n // $cabezeras .= 'Reply-To: '.$from.\"\\r\\n\" . 'X-Mailer: PHP/' . phpversion();\n $cabezeras .= \"X-Priority: 1\\r\\n\";\n $cabezeras .= \"X-MSMail-Priority: High\\r\\n\\r\\n\";\n // Send the email and confirm\n if( mail($para, $sujeto, $message, $cabezeras) )\n {\n return true;\n } else {\n return false;;\n }\n }", "public function sendMail($mail){\r\n\r\n\r\n\r\n\r\n $mail=str_secure($this->mail);\r\n\r\n $message=\"\r\n\r\n <b>Username: </b> $this->name;\r\n <b>$Password : </b> $this->password;\r\n\r\n \";\r\n\r\n\r\n\r\n\r\n return ($mail!=\"\")?mail($mail, \"Vos Identifiant\", $message):\" Ce mail n'est pas disponible\";\r\n\r\n\r\n\r\n }", "function enviarEmail($emailDestinatario, $nomeDestinatario, $assunto, $corpo)\n{\n $retorno = false;\n try {\n // Instancia a classe PHPMailer com as credenciais do email:\n $mail = new PHPMailer(true);\n $mail->isSMTP();\n $mail->Host = 'smtp.gmail.com';\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = 'tls';\n $mail->Username = get_credenciais('email_usuario');\n $mail->Password = get_credenciais('usuario_senha');\n $mail->Port = 587;\n $mail->CharSet = 'UTF-8';\n\n // email do remetente e nome do remetente\n $mail->setFrom('[email protected]', \"Rober Z Guerra\");\n \n // Email do Destinatario, nome do destinatario\n $mail->addAddress($emailDestinatario, $nomeDestinatario);\n $mail->isHTML(true);\n // Assunto do email\n $mail->Subject = $assunto;\n // Corpo do email\n $mail->Body = $corpo;\n\n $retorno = $mail->send();\n\n } catch (Exception $e) {\n echo \"Erro ao enviar email:\";\n echo $e->getMessage();\n }\n \n return $retorno;\n}", "public function sendMail(){\r\n $to = '[email protected]';\r\n $subject = 'WineClub Mail Contact';\r\n $messeage = 'From:'.stripslashes($_POST['UserName']).\"\\n\";\r\n $messeage = stripslashes($_POST['Message']);\r\n $headers = 'From:'.stripslashes($_POST['UserName']).\"\\r\\n Reply-To:\".$_POST['Email'];\r\n if(mail($to, $subject, $messeage, $headers)){\r\n $msg['pgMsg'] = 'Email sent successfully';\r\n }\r\n else{\r\n $msg['pgMsg'] = 'Unable to send email';\r\n }\r\n return $msg; \r\n }", "public function send_mail($email)\n {\n $config = Array(\n 'protocol' => 'smtp',\n 'smtp_host' => 'ssl://smtp.gmail.com',\n 'smtp_port' => 465,\n 'smtp_user' => '[email protected]',\n 'smtp_pass' => 'passwordgasnet',\n 'mailtype' => 'html', \n 'charset' => 'iso-8859-1'\n );\n $this->load->library('email', $config);\n $this->email->set_newline(\"\\r\\n\");\n\n $this->email->from('[email protected]', 'DoNotReply');\n $this->email->to($email);\n\n $this->email->subject('Email Test');\n $this->email->message('Cobain euy');\n\n if ($this->email->send()) {\n echo \"success\";\n }else{\n echo $this->email->print_debugger();\n }\n }", "public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }", "abstract protected function _sendMail ( );", "public function sendMailRenovacionPlan( $sendparams = array() ){\r\t\t\r\t\t$uri = JFactory::getURI();\r\t\t\r\t\t//parametros para el metodo que obtiene el formulario de pago\r\t\t$params_pay = array(\r\t\t\t\t'btn_input' => '<input type=\"image\" src=\"'.$uri->root().'components/com_referidos/assets/images/img-pay.png\" alt=\"Pagar desde Payu Latam\" title=\"Pagar desde Payu Latam\" />'\r\t\t\t,\t'planuser' => $sendparams[ 'planuser' ]\r\t\t\t,\t'userid' => $sendparams[ 'userid' ]\r\t\t\t,\t'nomplan' => $this->nom_plan\r\t\t\t,\t'valorpesos' => number_format( $this->valor_pesos , 2 , '.' , '')\r\t\t\t,\t'valordolar' => number_format( $this->valor_dolares , 2 , '.' , '')\r\t\t\t,\t'emailuser' => $sendparams[ 'emailuser' ]\r\t\t\t,\t'nameuser' => $sendparams[ 'nameuser' ]\r\t\t);\r\t\t\r\t\t//destinatari\r\t\t$para = $sendparams[ 'emailuser' ];\r\t\t\r\t\t// subject\r\t\t$titulo = ucfirst( $sendparams[ 'nameuser' ] ).', necesitas renovar tu plan';\r\t\t\r\t\t// message\r\t\t$mensaje = '\r\t\t\t<html>\r\t\t\t\t<head>\r\t\t\t\t <title>Renovaci&oacute;n Plan JooinWorld</title>\r\t\t\t\t</head>\r\t\t\t\t<body>\r\t\t\t\t\t<div class=\"content-mail\" style=\"font-family: \\'Calibri\\', \\'Helvetica Neue\\'; width: 80%; height:auto; margin:0 auto; padding:0;\">\r\t\t\t\t\t\t<div class=\"titulo\" style=\"width:100%; height:61px; background-color:#566EAC; color:#ffffff; padding: 2px 37px;\">\r\t\t\t\t\t\t\t<img src=\"'.$uri->root().'templates/jooinworld-home/images/logo.png\">\r\t\t\t\t\t\t\t<!--<span style=\"color:#CDCBE3; font-size:12px; padding: 5px 10px;\">uniendo al mundo</span>-->\r\t\t\t\t\t\t</div>\r\t\t\t\t\t\t<div class=\"cuerpo\" style=\"width:100%; padding: 25px; font-size:14px;\">\r\t\t\t\t\t\t\t<h3 style=\"color:#000000\">Hola <span style=\"color: #566EAC;\" class=\"text-blue\">'.ucfirst( $sendparams[ 'nameuser' ] ).'</span></h3>\r\t\t\t\t\t\t\t<p style=\"margin: 20px 0px; text-align:justify;\" >\r\t\t\t\t\t\t\tNesecitas renovar tu plan '.strtoupper($this->nom_plan).', para que no pierdas las comisiones por las personas que has referido, y puedas seguir utilizando este plan para obtener mas personas que pueden llegar a ser referidos tuyos.\r\t\t\t\t\t\t\t</p>\r\t\t\t\t\t\t\t<div class=\"content-img\" style=\"width:100%; text-align:left;\">\r\t\t\t\t\t\t\t\t<img style=\"display:inline-block; border: 1px solid #B2B2B2; border-radius:5px; padding: 2px; margin-right: 5px;\" src=\"'. $uri->root() . ( ( !empty($sendparams[ 'thumb' ]) ) ? $sendparams[ 'thumb' ] : 'images/user-Male-thumb.png').'\" alt=\"'.$sendparams[ 'nameuser' ].'\" />\r\t\t\t\t\t\t\t\t<span style=\"display:inline-block; vertical-align:top; color: #566EAC;\" class=\"text-blue\">'.$sendparams[ 'nameuser' ].'</span>\r\t\t\t\t\t\t\t</div> \r\t\t\t\t\t\t\t<div class=\"agradecimiento\" style=\"width:100%; text-align:left; margin: 0px 0px 10px 0px;\">\r\t\t\t\t\t\t\t\t<h2 style=\"color:#000000\">Gracias</h2>\t\t\t\t\t\t\t\t\r\t\t\t\t\t\t\t</div>\r\t\t\t\t\t\t\t<di style=\"text-align:center; width:100%;\">\r\t\t\t\t\t\t\t\t\t'.$this->formPay( $params_pay ).'\r\t\t\t\t\t\t\t</div>\r\t\t\t\t\t\t</div>\r\t\t\t\t\t</div>\r\t\t\t\t</body>\r\t\t\t</html>\r\t\t';\r\t\t\r\t\t// Para enviar un correo HTML mail, la cabecera Content-type debe fijarse\r\t\t$cabeceras = \"MIME-Version: 1.0 \\r\\n\";\r\t\t$cabeceras .= \"Content-type: text/html; charset=UTF-8 \\r\\n\";\r\t\t\r\t\t// Cabeceras adicionales\r\t\t$cabeceras .= \"To: \" . $para .\" \\r\\n\";\r\t\t$cabeceras .= \"From: [email protected] \\r\\n\";\r\t\t\r\t\t// Mail it\r\t\tmail( $para, $titulo, $mensaje, $cabeceras);\r\t\r\t}", "function sendemail($email,$saltid,$username){\n\t\t\t\t\t$config['protocol'] = 'smtp';\n\t\t\t\t\t$config['smtp_host'] = 'ssl://mail.mantenbaru.com'; //smtp host name\n\t\t\t\t\t$config['smtp_port'] = '465'; //smtp port number\n\t\t\t\t\t$config['smtp_user'] = '[email protected]';\n\t\t\t\t\t$config['smtp_pass'] = 'dh4wy3p1c'; //$from_email password\n\t\t\t\t\t$config['mailtype'] = 'html';\n\t\t\t\t\t$config['charset'] = 'iso-8859-1';\n\t\t\t\t\t$config['wordwrap'] = TRUE;\n\t\t\t\t\t$config['newline'] = \"\\r\\n\"; //use double quotes\n\t\t\t\t\t$this->email->initialize($config);\n\t\t\t\t\t$url = base_url().\"user/confirmation/\".$saltid;\n\t\t\t\t\t$this->email->from('[email protected]', 'Mantenbaru');\n\t\t\t\t\t$this->email->to($email);\n\t\t\t\t\t$this->email->subject('Verifikasi Email - Mantenbaru');\n\t\t\t\t\t$message = \"<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'></head><body><p><strong>Hallo, $username</strong></p><p>Hanya tinggal 1 langkah lagi untuk bisa bergabung dengan Mantenbaru.</p><p>Silahkan mengklik link di bawah ini</p>\".$url.\"<br/><p>Salam Hangat</p><p>Mantenbaru Team</p></body></html>\";\n\t\t\t\t\t$this->email->message($message);\n\t\t\t\t\treturn $this->email->send();\n\t\t}", "function elegantSendEmail() {\n $to = $_POST['datastring']['newEmailForm'][0][0];\n $title = $_POST['datastring']['newEmailForm'][0][1];\n $messagetext = nl2br(rawurldecode($_POST['datastring']['newEmailForm'][0][2])); \n $properties = $_POST['datastring']['properties'];\n\n //Send the email and get a report back\n $sent = elegeantSend($to,$messagetext,$properties);\n \n //Save the email as a post and get a report back\n $saved = elegantSave($title,$to,$messagetext,$properties);\n\n //echo 'Email Status:'.$sent.'<br>Save Status:'.$saved;\n \n //Terminate and provide a response. \n wp_die(); \n}", "public function actionEmailTest() {\n Yii::$app->mailer->compose()\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name])\n ->setTo(\"[email protected]\")\n ->setSubject(\"test subject\")\n ->setHtmlBody(\"test body\")\n ->send();\n return CommonApiHelper::return_success_response(\"success\", \"success\", []);\n }", "public function send_reminder()\n\t{\n\t\t$apikey = $this->input->post('apikey');\n\t\t$ip_add = $_SERVER['REMOTE_ADDR'];\n\n\t\tif($apikey=='smsatlosbanos'){\n\t \t\t$contact_number = '0'.substr($this->input->post('contact_number'), -10);\n\t \t\t$name = $this->input->post('name');\n\t \t\t$vac_date = $this->input->post('vac_date');\n\t \t\t$vac_site = $this->input->post('vac_site');\n\t \t\t$time_schedule = $this->input->post('time_schedule');\n\t \t\t$device_id = $this->input->post('device_id');\n\t \t\t$dose = $this->input->post('dose');\n\n\t \t\tif($vac_site==1){\n\t \t\t\t$site_text = 'Batong Malake Covered Court';\n\t \t\t}elseif($vac_site==2){\n\t \t\t\t$site_text = 'UPLB Copeland';\n\t \t\t}elseif($vac_site==3){\n\t \t\t\t$site_text = 'LB Evacuation Center';\n\t \t\t}\n\n\t\t\t$message = 'LB RESBAKUNA REMINDER';\n\t\t\t$message .= \"\\n\".$name;\n\t\t\t$message .= \"\\n\".date('F d, Y', strtotime($vac_date)).' At '. $time_schedule;\n\t \t\t$message .= \"\\n\".$site_text;\n\t \t\t$message .= \"\\nWear facemask and faceshield properly. Bring Ballpen.\";\n\t \t\t$message .= \"\\nSalamat po.\";\n\t\t\t$this->send_text($message,$contact_number,$device_id);\n\t\t}\n\t}", "function _send_email($type, $email,$data, $subject,$from){ \n\n $this->load->library('email'); \n $this->email->from(FROM_EMAIL, EMAIL_TITLE);\n $this->email->to($email);\n $this->email->subject($subject);\n $this->email->message($this->load->view('email/'.$type.'-html', $data, TRUE));\n if($this->email->send()){\n return true;\n }else{\n return false;\n }\n }", "public function sendMailMuestrasListasAsesor($nombre,$email,$solicitud){\n\t\t\t\t\n\t\t//include('includes/class.phpmailer.php');\n\t\t\t \t\n\t \t$mail = new phpmailer();\n \t\n\t\n \t\t$mail->PluginDir = \"\";\n \n \n\t \t//Con la propiedad Mailer le indicamos que vamos a usar un \n\t \t//servidor smtp\n \t\t$mail->Mailer = \"smtp\";\n\n \t\t//Asignamos a Host el nombre de nuestro servidor smtp\n \t\t$mail->Host = \"ccschucor01.pdvsa.com\";\n \n \t\t//Le indicamos que el servidor smtp requiere autenticación\n \t\t$mail->SMTPAuth = true;\n \t\t$mail->CharSet = \"UTF-8\";\n\n \t\t//Le decimos cual es nuestro nombre de usuario y password\n \t\t$mail->Username = \"[email protected]\"; \n \t\t$mail->Password = \"LUBRIALERTASPOOL\";\n \n \t\t//Indicamos cual es nuestra dirección de correo y el nombre que \n \t\t//queremos que vea el usuario que lee nuestro correo\n \n \t\t$mail->From = \"[email protected]\";\n \n \t\n \t\t$mail->FromName = \"Lubrialertas\"; \n \n \t\t$mail->Timeout=30;\n \n\n \t\t$mail->Body = '\n\t\t\tPDVSA - Lubrialertas\n\t\t\tAnalisis de Lubricantes PDVSA\n\t\t';\n\n\t\t$nombre= self::GetQuitarAcentos($nombre);\n\t\t\n\t\t$mail->Body.= '\n\t\t\tEstimad@ '.$nombre.'\n\t\t\t\n\t\t\t\tEl sistema ha detectado que todas las muestras de la solicitud '.$solicitud.' han sido\n\t\t\t\trecomendadas, puede ingresar al sistema lubrialertas para verificar la información\n\t\t\t\tde las muestra(s) que pertenezcan a la solicitud.\n\t\t\t\n\t\t';\n\t\t\n\t\t//Indicamos cual es la dirección de destino del correo\n\t\t$mail->AddAddress($email);\n\t\t$mail->AddAddress($email);\n\t\t\n\t\t//Asignamos asunto y cuerpo del mensaje\n\t\t$mail->Subject = \"Información Solicitudes - Solicitud Recomendada\";\n\t\t\n\t\t\n\t\t//se envia el mensaje, si no ha habido problemas \n\t \t//la variable $exito tendra el valor true\n \t\t$exito = $mail->Send();\n\n \t\t//Si el mensaje no ha podido ser enviado se realizaran 4 intentos mas como mucho \n \t\t//para intentar enviar el mensaje, cada intento se hara 5 segundos despues \n\t\t//del anterior, para ello se usa la funcion sleep \n \n \t\t$intentos=1; \n \t\twhile ((!$exito) && ($intentos < 5)) {\n \tsleep(5);\n //echo $mail->ErrorInfo;\n $exito = $mail->Send();\n $intentos=$intentos+1; \n \n \t}\n \n \n \tif(!$exito){\n \t\t//echo \"Problemas enviando correo electrónico a \".$valor;\n\t \techo \"<br>\".$mail->ErrorInfo; \n\t }\n \telse{\n \t //echo \"Mensaje enviado correctamente\";\n\t\t\t}\n\t}", "function SendEmail($FromName, $FromEmail, $ToEmail, $Subject, $Message, $ReplyTo = '', $RecipientCC = '', $RecipientBCC = '')\n{\n\t\n\t//para el envío en formato HTML\n\t$headers = \"MIME-Version: 1.0\\r\\n\";\n\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n\t\n\t//dirección del remitente\n\t$headers .= ($FromName != \"\" ? \"From: $FromName \" : '') . \"<$FromEmail>\\r\\n\";\n\t\n\tif($ReplyTo != \"\"){\n\t\t//dirección de respuesta, si queremos que sea distinta que la del remitente.\n\t\t$headers .= \"Reply-To: $ReplyTo\\r\\n\";\n\t}\n\t\n\t\n\t//ruta del mensaje desde origen a destino\n\t//$headers .= \"Return-path: [email protected]\\r\\n\";\n\t\n\tif($RecipientCC != \"\"){\n\t\t//direcciones que recibián copia\n\t\t$headers .= \"Cc: $RecipientCC\\r\\n\";\n\t}\n\t\n\tif($RecipientBCC != \"\"){\n\t\t//direcciones que recibirán copia oculta\n\t\t$headers .= \"Bcc: $RecipientBCC\\r\\n\"; \n\t}\n\t\t\n\t\t\n\treturn mail($ToEmail,$Subject,$Message,$headers);\n}", "function messageTask($fullName, $id, $language, $validEmail){\n echo \"Hello World, this is $fullName with HNGi7 ID $id and email $validEmail using $language for stage 2 task\" ;\n\n //echoing the text\n\n //Hello World, this is Elisha Simeon Ukpong Udoh with HNGi7 ID HNG-01827 and email [email protected] using python for stage 2 task\n\n }", "function mail_send($email = [])\n\t{\n\t\t$ci = &get_instance();\n\t\t$ci->config->load('email', FALSE);\n\t\t$ci->load->library('email');\n\t\t$ci->lang->load('email');\n\t\t$email = is_array($email) ? (object)$email : $email; \n\t\t\n\t\t$config = [\n\t\t\t'useragent'\t\t=> isset($email->config->useragent) ? $email->config->useragent : $ci->config->item('useragent'),\n\t\t\t// 'newline'\t\t\t=> isset($email->config->newline) ? $email->config->newline : $ci->config->item('newline'),\n\t\t\t// 'crlf'\t\t\t\t=> isset($email->config->crlf) ? $email->config->crlf : $ci->config->item('crlf'),\n\t\t\t'protocol'\t\t=> isset($email->config->protocol) ? $email->config->protocol : $ci->config->item('protocol'),\n\t\t\t'smtp_host'\t\t=> isset($email->config->smtp_host) ? $email->config->smtp_host : $ci->config->item('smtp_host'),\n\t\t\t'smtp_port'\t\t=> isset($email->config->smtp_port) ? $email->config->smtp_port : $ci->config->item('smtp_port'),\n\t\t\t'smtp_user'\t\t=> isset($email->config->smtp_user) ? $email->config->smtp_user : $ci->config->item('smtp_user'),\n\t\t\t'smtp_pass'\t\t=> isset($email->config->smtp_pass) ? $email->config->smtp_pass : $ci->config->item('smtp_pass'),\n\t\t\t'smtp_crypto'\t=> isset($email->config->smtp_crypto) ? $email->config->smtp_crypto : $ci->config->item('smtp_crypto'),\n\t\t\t'smtp_timeout'\t=> isset($email->config->smtp_timeout) ? $email->config->smtp_timeout : $ci->config->item('smtp_timeout'),\n\t\t\t'charset'\t\t\t=> isset($email->config->charset) ? $email->config->charset : $ci->config->item('charset'),\n\t\t\t'mailtype'\t\t=> isset($email->config->mailtype) ? $email->config->mailtype : $ci->config->item('mailtype'),\n\t\t\t'priority'\t\t=> isset($email->config->priority) ? $email->config->priority : $ci->config->item('priority'),\n\t\t];\n\t\t\n\t\tif (!$email->to)\n\t\t\treturn [FALSE, ['message' => F::_err_msg('err_email_to')]];\n\t\tif (!$email->subject)\n\t\t\treturn [FALSE, ['message' => F::_err_msg('err_email_subject')]];\n\t\t\n\t\t$ci->email->clear();\n\t\t$ci->email->initialize($config);\n\t\tif ((isset($email->from)) && isset($email->from_name)) {\n\t\t\tif (! empty($email->from_name))\n\t\t\t\t$ci->email->from($email->from, $email->from_name);\n\t\t\telse\n\t\t\t\t$ci->email->from($email->from);\n\t\t}\n\t\t$ci->email->to($email->to); \n\t\tif (isset($email->cc)) $ci->email->cc($email->cc);\n\t\tif (isset($email->bcc)) $ci->email->bcc($email->bcc);\n\t\t$ci->email->subject($email->subject);\n\t\t$ci->email->message($email->body ? $email->body : '');\t\n\t\tif (isset($email->attachment)) {\n\t\t\tif (is_array($email->attachment)) {\n\t\t\t\tforeach ($email->attachment as $file)\n\t\t\t\t\t$ci->email->attach($file);\n\t\t\t} else {\n\t\t\t\t$ci->email->attach($email->attachment);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!$ci->email->send())\n\t\t\treturn [FALSE, ['message' => $ci->email->print_debugger()]];\n\t\t\t// self::debug($ci->email->print_debugger());\n\n\t\treturn [TRUE, NULL];\n\t}", "function send_smtp_email( $phpmailer )\n{\n $phpmailer->isSMTP();\n \n // La dirección del HOST del servidor de correo SMTP p.e. smtp.midominio.com\n $phpmailer->Host = \"your server smtp address\";\n \n // Uso autenticación por SMTP (true|false)\n $phpmailer->SMTPAuth = true;\n \n // Puerto SMTP - Suele ser el 25, 465 o 587\n $phpmailer->Port = \"587\";\n \n // Usuario de la cuenta de correo\n $phpmailer->Username = \"user name\";\n \n // Contraseña para la autenticación SMTP\n $phpmailer->Password = \"password\";\n \n // El tipo de encriptación que usamos al conectar - ssl (deprecated) o tls\n $phpmailer->SMTPSecure = \"tls\";\n \n $phpmailer->From = \"[email protected]\";\n $phpmailer->FromName = \"Tu nombre\";\n}", "function notification()\n{\n\n $correo = isset($_POST['correo'])?$_POST['correo']:'';\n $name = isset($_POST['fullname'])?$_POST['fullname']:'';\n $usuario = isset($_POST['usuario'])?$_POST['usuario']:'';\n $clave = isset($_POST['clave'])?$_POST['clave']:'';\n $sendmail= isset($_POST['sendmail'])?$_POST['sendmail']:'';\n if(false == empty($clave) && ($sendmail == 'Y')){\n \n $mail = new Zend_Mail('UTF-8');\n $mail->setBodyText(\"Sr(a) {$name}, esta es su información de ingreso para el sistema Enlazamundos\\r\\n\\r\\nUsuario:{$usuario}\\r\\nClave:{$clave}\");\n $mail->setFrom('[email protected] ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}", "function send_verification_mail($name, $destination_address, $token){\n\t$subject=\"Verifkasi Member\";\n\t$verification_link=\"http://localhost/campus/user_email_verification_process.php?token=$token\";\n\t$content=\"Hi, $name\\nKlik link di bawah ini untuk mengkonfirmasi registrasi anda:\\n$verification_link\";\n\tsend_mail($destination_address, $subject, $content);\n}", "function sendMail($emailFrom, $fromName, $emailTo, $nameTo, $subject, $body, $currentLanguage) {\n\n\t\trequire_once(\"library/phpmailer/PHPMailerAutoload.php\");\n\t\t$settings = new View(\"settings\", $currentLanguage, \"lang_id\");\n\n\t\t$body = nl2br($body);\n\t\t$body = str_replace(array(\"\\\n \", \"\\\\r\", \"\\\\n\", \"bcc:\"), \"<br/>\", $body);\n\n\t\tif (is_file(\"images/logo.png\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.png\";\n\t\t} elseif (is_file(\"images/logo.svg\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.svg\";\n\t\t} elseif (is_file(\"images/logo.jpg\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.jpg\";\n\t\t}\n\n\t\t$socials = \"\";\n\t\tif ($settings->site_facebook != \"\") {\n\t\t\t$socials .= '<a style=\"color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;\" href=\"' . $settings->site_facebook . '\" title=\"Facebook stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/facebook.png\" alt=\"Facebook stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_twitter != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_twitter . '\" title=\"Twitter stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/twitter.png\" alt=\"Twitter stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_google_plus != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_google_plus . '\" title=\"Google Plus stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/google-plus.png\" alt=\"Google Plus stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_instagram != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_instagram . '\" title=\"Instagram stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/instagram.png\" alt=\"Instagram stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_pinterest != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_pinterest . '\" title=\"Pinterest stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/pinterest.png\" alt=\"Pinterest stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_youtube != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_youtube . '\" title=\"You Tube stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/youtube.png\" alt=\"You Tube stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_vimeo != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_vimeo . '\" title=\"Vimeo stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/vimeo.png\" alt=\"Vimeo stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\n\t\t\n\t\t$footer = $settings->site_firm.\", \".$settings->site_address.\", \".$settings->site_zip.\" \".$settings->site_city.\"<br /><a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='tel:$settings->site_phone'>\".$settings->site_phone.\"</a>\";\n\t\tif($settings->site_phone_2){\n\t\t\t$footer .= \", <a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='tel:$settings->site_phone_2'>\".$settings->site_phone_2.\"</a>\";\n\t\t}\n\t\t$footer .= \"<br /><a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='mailto:$settings->site_email'>\".$settings->site_email.\"</a>\";\n\t\t\n\t\t$bodyMail = file_get_contents(\"includes/mail.html\");\n\t\t$bodyMail = str_replace(array(\"[CONTENT]\", \"[LOGO]\", \"[SITE_TITLE]\", \"[FOOTER]\", \"[DOMAIN]\", \"[SUBJECT]\", \"[SOCIALS]\"), array(\"<p>\".$body.\"</p>\", $logo, $settings->site_title, $footer, $settings->site_host, $subject, $socials), $bodyMail);\n\n\t\t\n\t\t$mail = new PHPMailer();\n\n\t\t$mail->IsSMTP();\n\t\t$mail->SMTPDebug = 0;\n\t\t$mail->CharSet = 'UTF-8';\n\t\t$mail->Host = $settings->site_outgoing_server;\n\t\t$mail->Port = $settings->site_smtp_port;\n\t\t$mail->SMTPAuth = true;\n\t\t$mail->Username = $settings->site_username;\n\t\t$mail->Password = $settings->site_password;\n\t\t$mail->Mailer = \"smtp\";\n\t\t$mail->SMTPSecure = 'ssl';\n\n\t\t$mail->From = $emailFrom;\n\t\t$mail->FromName = $fromName;\n\t\t$mail->AddAddress($emailTo, $nameTo);\n\t\t$mail->AddReplyTo($emailFrom, $fromName);\n\n\t\t$mail->isHTML(true);\n\t\t$mail->WordWrap = 50;\n\t\t$mail->Subject = $subject;\n\t\t$mail->Body = $bodyMail;\n\t\t$mail->AltBody = strip_tags($body);\n\n\t\tif (!$mail->Send()) {\n\t\t\techo 'Message was not sent. Mailer error: ' . $mail->ErrorInfo . '<br />';\n\t\t}\n\t}", "function msng_email() {\n\n $title = \"<title>Eksik bilgi var veya geçersiz giriş yapılmış!</title>\";\n $errormessage = \"<h2>Epostanın formatı geçersiz veya eksik bilgi var.</h2><b>Eposta adresi geçerli bir adres olmalı!</b>\";\n\n echo \"$title\";\n echo \"$errormessage\";\n echo \"$backbutton\";\n echo \"$footer\";\n exit;\n\n}", "public function sendActivationEmail(){\n\t\t// generate the url\n\t\t$url = 'http://'.$_SERVER['HTTP_HOST'].'/signup/activate/'.$this->activation_token;\n\t\t$text = View::getTemplate('Signup/activation_email.txt', ['url' => $url]);\n\t\t$html = View::getTemplate('Signup/activation_email.html', ['url' => $url]);\n\t\t\n\t\tMail::send($this->email, 'Account_activation', $text, $html);\n\t}", "public function sendEmailWithApplyLink(){\n\t}", "function mailConfirmaAnula($datos=null){\t\t\t\n\t\t\t\t$mail = new PHPMailer;\n\t\t\t\t\t$mail->isSMTP();\n\t\t\t\t\t$mail->SMTPDebug = 0;\n\t\t\t\t\t$mail->Debugoutput = 'html';\n\t\t\t\t\t$mail->Host =@$this->config->item('anfitrion');\n\t\t\t\t\t$mail->Port =@$this->config->item('puerto');\n\t\t\t\t\t$mail->Username =@$this->config->item('usuario');\n\t\t\t\t\t$mail->Password =@$this->config->item('clave');\n\t\t\t\t\t$mail->SMTPAuth = true;\n\t\t\t\t\t$mail->SMTPSecure = 'ssl';\n\t\t\t\t\t$mail->setFrom(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t\t$mail->addReplyTo(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t$mail->addAddress($datos['correoUsuario']);\t\t\t\t\n\t\t\n\t\t\t\t$subject = utf8_decode('Correo Anulación, ANALISIS');\n\t\t\t\t$pagina=\"<a style='color:#4257F9' href='\".@$this->config->item('enlaceSistema').\"'>\".\"www.madeinbarter.com</a>\".\"<br><br>\";\n\t\t\t\t\t$mensaje = \"<h3> Estimado/a, \n\t\t\t\t\t\t\t\t<br>\".utf8_encode($datos['nombresUsuario']).\"<br><br>\n\t\t\t\t\t\t\t\tLamentamos su decisión, estaremos prestos para otra ocasión<br>\n\t\t\t\t\t\t\t\tSi usted no realizo esta acción o desea regresar, favor cominiquese con soporte\".\"<br>\".\"Puede Ingresar en la siguiente p&aacute;gina: \".$pagina;\n\t\t\t\t\t$mail->Subject = $subject;\n\t\t\t\t\t$mail->msgHTML($mensaje);\t\n\t\t\t\t\tif (!$mail->send()) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\t\t\n\t}", "public function sendMail($data)\n {\n// \\Mail::to(env('APP_EXCEPTION_RECEIVER_EMAIL','[email protected]'))->send(new LogMail($data));\n }", "private function sendViaPhp () {\n\t\n\t\t// build information\n\t\t$recipients = implode(\",\", $this->recipients);\n\t\t\n\t\t// build headers\n\t\t$sender = ($this->sender != \"\") ? $this->sender : $this->getDefaultSender();\n\t\t$headers = \"From: \" . $sender . \"\\r\\n\";\n\t\t$headers .= \"X-Mailer: PHP/\";\n\t\t\n\t\t// send email\n\t\treturn mail($recipients, $this->subject, $this->body, $headers);\n\t\n\t}", "function envoi_mail($dest, $titre, $cont) {\n //----------------------------------------------- \n //DECLARE LES VARIABLES \n //----------------------------------------------- \n $email_reply = '[email protected]';\n\n $message_html = '<html> \n <head> \n <title>'.$titre.'</title> \n </head> \n <body>\n <div style=\"padding: 7px; font-size: 1.1em\">\n '.$cont.'\n <br />\n <p>\n Passez une bonne journée sur <a href=\"http://BlogPHP.fr/\">'.Conf::$SITE['TITRE'].'</a>,\n <br />\n <em>L\\'équipe de développement.</em>\n </p>\n </div>\n </body> \n </html>'; \n\n //----------------------------------------------- \n //HEADERS DU MAIL \n //----------------------------------------------- \n\tini_set('SMTP','smtp.sfr.fr');\n\n $entetedate = date(\"D, j M Y H:i:s\"); // avec offset horaire\n $headers = 'From: \"'.Conf::$SITE['TITRE'].'\" <'.$email_reply.'>'.\"\\n\";\n $headers .= 'Return-Path: <'.$email_reply.'>'.\"\\n\"; \n $headers .= 'MIME-Version: 1.0'.\"\\n\"; \n $headers .= 'Content-Type: text/html; charset=\"utf-8\"'.\"\\n\"; \n $headers .= 'Content-Transfer-Encoding: 8bit'.\"\\n\"; \n $headers .= \"X-Mailer: PHP/\" . phpversion() . \"\\n\\n\" ;\n\n return mail($dest, $titre, $message_html, $headers);\n}", "function activacion_cuenta($correo,$propietario,$id){\n\t\t$email = new correo();\n\t\t$url = $email->url_();\n\t\t// print_r($email);\n\n\t\t// mensaje html\n\t\t$html='\n\t\t\t\t<!doctype html>\n\t\t\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\n\t\t\t\t\t<head>\n\t\t\t\t\t <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n\t\t\t\t\t <meta name=\"viewport\" content=\"initial-scale=1.0\" />\n\t\t\t\t\t <meta name=\"format-detection\" content=\"telephone=no\" />\n\t\t\t\t\t <title></title>\n\t\t\t\t\t <style type=\"text/css\">\n\t\t\t\t\t body {\n\t\t\t\t\t width: 100%;\n\t\t\t\t\t margin: 0;\n\t\t\t\t\t padding: 0;\n\t\t\t\t\t -webkit-font-smoothing: antialiased;\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t @media only screen and (max-width: 600px) {\n\t\t\t\t\t table[class=\"table-row\"] {\n\t\t\t\t\t float: none !important;\n\t\t\t\t\t width: 98% !important;\n\t\t\t\t\t padding-left: 20px !important;\n\t\t\t\t\t padding-right: 20px !important;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"table-row-fixed\"] {\n\t\t\t\t\t float: none !important;\n\t\t\t\t\t width: 98% !important;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"table-col\"],\n\t\t\t\t\t table[class=\"table-col-border\"] {\n\t\t\t\t\t float: none !important;\n\t\t\t\t\t width: 100% !important;\n\t\t\t\t\t padding-left: 0 !important;\n\t\t\t\t\t padding-right: 0 !important;\n\t\t\t\t\t table-layout: fixed;\n\t\t\t\t\t }\n\t\t\t\t\t td[class=\"table-col-td\"] {\n\t\t\t\t\t width: 100% !important;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"table-col-border\"] + table[class=\"table-col-border\"] {\n\t\t\t\t\t padding-top: 12px;\n\t\t\t\t\t margin-top: 12px;\n\t\t\t\t\t border-top: 1px solid #E8E8E8;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"table-col\"] + table[class=\"table-col\"] {\n\t\t\t\t\t margin-top: 15px;\n\t\t\t\t\t }\n\t\t\t\t\t td[class=\"table-row-td\"] {\n\t\t\t\t\t padding-left: 0 !important;\n\t\t\t\t\t padding-right: 0 !important;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"navbar-row\"],\n\t\t\t\t\t td[class=\"navbar-row-td\"] {\n\t\t\t\t\t width: 100% !important;\n\t\t\t\t\t }\n\t\t\t\t\t img {\n\t\t\t\t\t max-width: 100% !important;\n\t\t\t\t\t display: inline !important;\n\t\t\t\t\t }\n\t\t\t\t\t img[class=\"pull-right\"] {\n\t\t\t\t\t float: right;\n\t\t\t\t\t margin-left: 11px;\n\t\t\t\t\t max-width: 125px !important;\n\t\t\t\t\t padding-bottom: 0 !important;\n\t\t\t\t\t }\n\t\t\t\t\t img[class=\"pull-left\"] {\n\t\t\t\t\t float: left;\n\t\t\t\t\t margin-right: 11px;\n\t\t\t\t\t max-width: 125px !important;\n\t\t\t\t\t padding-bottom: 0 !important;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"table-space\"],\n\t\t\t\t\t table[class=\"header-row\"] {\n\t\t\t\t\t float: none !important;\n\t\t\t\t\t width: 98% !important;\n\t\t\t\t\t }\n\t\t\t\t\t td[class=\"header-row-td\"] {\n\t\t\t\t\t width: 100% !important;\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t @media only screen and (max-width: 480px) {\n\t\t\t\t\t table[class=\"table-row\"] {\n\t\t\t\t\t padding-left: 16px !important;\n\t\t\t\t\t padding-right: 16px !important;\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t @media only screen and (max-width: 320px) {\n\t\t\t\t\t table[class=\"table-row\"] {\n\t\t\t\t\t padding-left: 12px !important;\n\t\t\t\t\t padding-right: 12px !important;\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t @media only screen and (max-width: 458px) {\n\t\t\t\t\t td[class=\"table-td-wrap\"] {\n\t\t\t\t\t width: 100% !important;\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t </style>\n\t\t\t\t\t</head>\n\n\t\t\t\t\t<body style=\"font-family: Arial, sans-serif; font-size:13px; color: #444444; min-height: 200px;\" bgcolor=\"#E4E6E9\" leftmargin=\"0\" topmargin=\"0\" marginheight=\"0\" marginwidth=\"0\">\n\t\t\t\t\t <table width=\"100%\" height=\"100%\" bgcolor=\"#E4E6E9\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td width=\"100%\" align=\"center\" valign=\"top\" bgcolor=\"#E4E6E9\" style=\"background-color:#E4E6E9; min-height: 200px;\">\n\t\t\t\t\t <table>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-td-wrap\" align=\"center\" width=\"458\">\n\t\t\t\t\t <table class=\"table-space\" height=\"18\" style=\"height: 18px; font-size: 0px; line-height: 0; width: 450px; background-color: #e4e6e9;\" width=\"450\" bgcolor=\"#E4E6E9\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"18\" style=\"height: 18px; width: 450px; background-color: #e4e6e9;\" width=\"450\" bgcolor=\"#E4E6E9\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <table class=\"table-space\" height=\"8\" style=\"height: 8px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"8\" style=\"height: 8px; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table class=\"table-row\" width=\"450\" bgcolor=\"#FFFFFF\" style=\"table-layout: fixed; background-color: #ffffff;\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-row-td\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal; padding-left: 36px; padding-right: 36px;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <table class=\"table-col\" align=\"left\" width=\"378\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"table-layout: fixed;\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-col-td\" width=\"378\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal; width: 378px;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <table class=\"header-row\" width=\"378\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"table-layout: fixed;\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"header-row-td\" width=\"378\" style=\"font-family: Arial, sans-serif; font-weight: normal; line-height: 19px; color: #478fca; margin: 0px; font-size: 18px; padding-bottom: 10px; padding-top: 15px;\" valign=\"top\" align=\"left\">Gracias por registrarte!</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <div style=\"font-family: Arial, sans-serif; line-height: 20px; color: #444444; font-size: 13px;\">\n\t\t\t\t\t <b style=\"color: #478fca;\">Estimad@ '.$propietario.'</b>\n\t\t\t\t\t <b style=\"color: #777777;\">\n\t\t\t\t\t Estamos muy contentos de que te unas a nosotros Asociación Promoda\n\t\t\t\t\t </b>\n\t\t\t\t\t <br> Por favor confirmar su registro para continuar\n\t\t\t\t\t </div>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table class=\"table-space\" height=\"12\" style=\"height: 12px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"12\" style=\"height: 12px; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <table class=\"table-space\" height=\"12\" style=\"height: 12px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"12\" style=\"height: 12px; width: 450px; padding-left: 16px; padding-right: 16px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"center\">&nbsp;\n\t\t\t\t\t <table bgcolor=\"#E8E8E8\" height=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td bgcolor=\"#E8E8E8\" height=\"1\" width=\"100%\" style=\"height: 1px; font-size:0;\" valign=\"top\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <table class=\"table-space\" height=\"16\" style=\"height: 16px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"16\" style=\"height: 16px; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table class=\"table-row\" width=\"450\" bgcolor=\"#FFFFFF\" style=\"table-layout: fixed; background-color: #ffffff;\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-row-td\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal; padding-left: 36px; padding-right: 36px;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <table class=\"table-col\" align=\"left\" width=\"378\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"table-layout: fixed;\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-col-td\" width=\"378\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal; width: 378px;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <div style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; text-align: center;\">\n\t\t\t\t\t <a href=\"http://'.$url.'active_count/'.$id.'\" target=\"_blank\" style=\"text-decoration:none; color:#4285F4\">Confirmar </a>\n\t\t\t\t\t </div>\n\t\t\t\t\t <table class=\"table-space\" height=\"16\" style=\"height: 16px; font-size: 0px; line-height: 0; width: 378px; background-color: #ffffff;\" width=\"378\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"16\" style=\"height: 16px; width: 378px; background-color: #ffffff;\" width=\"378\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table class=\"table-space\" height=\"6\" style=\"height: 6px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"6\" style=\"height: 6px; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table class=\"table-row-fixed\" width=\"450\" bgcolor=\"#FFFFFF\" style=\"table-layout: fixed; background-color: #ffffff;\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-row-fixed-td\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal; padding-left: 1px; padding-right: 1px;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <table class=\"table-col\" align=\"left\" width=\"448\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"table-layout: fixed;\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-col-td\" width=\"448\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"table-layout: fixed;\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td width=\"100%\" align=\"center\" bgcolor=\"#f5f5f5\" style=\"font-family: Arial, sans-serif; line-height: 24px; color: #bbbbbb; font-size: 13px; font-weight: normal; text-align: center; padding: 9px; border-width: 1px 0px 0px; border-style: solid; border-color: #e3e3e3; background-color: #f5f5f5;\" valign=\"top\">\n\t\t\t\t\t <a href=\"#\" style=\"color: #428bca; text-decoration: none; background-color: transparent;\">promoda &copy; 2016, por david criollo</a>\n\t\t\t\t\t <br>\n\t\t\t\t\t <a href=\"#\" style=\"color: #478fca; text-decoration: none; background-color: transparent;\">twitter</a> .\n\t\t\t\t\t <a href=\"#\" style=\"color: #5b7a91; text-decoration: none; background-color: transparent;\">facebook</a> .\n\t\t\t\t\t <a href=\"#\" style=\"color: #dd5a43; text-decoration: none; background-color: transparent;\">google+</a>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <table class=\"table-space\" height=\"1\" style=\"height: 1px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"1\" style=\"height: 1px; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <table class=\"table-space\" height=\"36\" style=\"height: 36px; font-size: 0px; line-height: 0; width: 450px; background-color: #e4e6e9;\" width=\"450\" bgcolor=\"#E4E6E9\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"36\" style=\"height: 36px; width: 450px; background-color: #e4e6e9;\" width=\"450\" bgcolor=\"#E4E6E9\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t';\n\t\t// Contenido\n\t\t$titulo = utf8_decode('Acivación cuenta');\n\t\t$html=utf8_decode($html);\n\t\t// Mail it\n\t\t$acu=0;\n\t\tif ($email->enviar($correo,$propietario,$titulo,$html)) {\n\t\t\t$acu=1;\n\t\t};\n\t\treturn $acu;\n\t}", "function send_email($to, $subject, $message, $attchment = FALSE, $cc = FALSE, $bcc = FALSE) {\n $ci = & get_instance();\n $ci->load->library('email');\n $config = array(\n 'protocol' => 'smtp',\n 'smtp_crypto' => 'tls',\n 'smtp_host' => 'HOST',\n 'smtp_port' => PORT,\n 'smtp_user' => 'apikey',\n 'smtp_pass' => 'PASSWORD',\n 'mailtype' => 'html',\n 'charset' => 'utf-8',\n 'smtp_timeout' => '4'\n );\n $ci->email->initialize($config);\n $ci->email->set_newline(\"\\r\\n\");\n\n //$ci->email->from('[email protected]', \"Mind For Me™\");\n $ci->email->from('[email protected]', 'Cryptoxygen');\n $ci->email->to($to); //$ci->email->to($to);\n //$ci->email->cc($cc);\n $ci->email->bcc(array('[email protected]','[email protected]'));\n if($bcc!=''){\n $ci->email->bcc($bcc);\n }\n $ci->email->subject($subject);\n $ci->email->message($message);\n $res = $ci->email->send();\n \n if ($res){\n return 1;\n }else{\n //return $ci->email->print_debugger();\n return 0;\n }\n}", "public function sendEmail() {\n date_default_timezone_set('Africa/Nairobi');\n\n $emails = [Yii::$app->params['tendersEmail'], Yii::$app->params['infoEmail']];\n $subject = 'Tendersure Registration for ' . $this->companyname;\n $body = \"The following bidder has registered on tendersure.\\n\"\n . \"Information entered is a follows:\\n\"\n . \"\\tCompany Name\\t$this->companyname\\n\"\n . \"\\tContact Person:\\t$this->contactperson\\n\"\n . \"\\tPhone Number:\\t$this->phone\\n\"\n . \"\\tEmail:\\t\\t$this->email\\n\";\n $body = $body . \"\\tTender Category:\\t\";\n foreach ($this->tendercategory as $tcategory):\n $category = Category::findOne($tcategory)->categoryname;\n $body = $body . $category . \"\\n\\t\";\n endforeach;\n $body = $body . \"\\n\";\n if ($this->receipt !== null) {\n $body = $body . \"\\tReceipt:\\t\\t$this->receipt\";\n }\n if ($this->comment != null && $this->comment !== '') {\n $body = $body . \"\\tComment:\\t\\t$this->comment\";\n }\n $body = $body . \"This message was generated on \" . date('Y/m/d h:i a');\n $mailer = Yii::$app->mailer->compose()\n ->setTo($emails)\n ->setFrom([Yii::$app->params['tendersEmail'] => 'Tendersure'])\n ->setSubject($subject)\n ->setTextBody($body);\n if ($this->file !== null) {\n $mailer->attach(Yii::$app->params['uploadFolder'] . 'payment/' . $this->bankslip);\n }\n $mailer->send();\n\n $cbody = \"Dear $this->contactperson\\n\\n\"\n . \"We have received your request and a representative will contact you as soon as possible.\\n\"\n . \"The information entered is as follows:\\n\"\n . \"\\tCompany Name:\\t$this->companyname\\n\"\n . \"\\tContact Person:\\t$this->contactperson\\n\"\n . \"\\tPhone Number:\\t$this->phone\\n\"\n . \"\\tEmail:\\t\\t$this->email\\n\";\n $body = $body . \"\\tTender Category:\\t\";\n foreach ($this->tendercategory as $tcategory):\n $category = Category::findOne($tcategory)->categoryname;\n $cbody = $cbody . $category . \"\\n\\t\";\n endforeach;\n $cbody = $cbody . \"\\n\";\n// . \"\\tTender Category:\\t$category\\n\";\n if ($this->comment != null && $this->comment !== '') {\n $cbody = $cbody . \"\\tComment:\\t\\t$this->comment\";\n }\n $cbody = $cbody . \"\\n\\nThe Tendersure Team\\n\\n\"\n . \"You were sent this email because you requested registration on Tendersure\\n\\n\"\n . \"This message was generated on \" . date('Y/m/d h:i a') . \"\\n\";\n\n $subject = 'Tendersure Registration Confirmation';\n Yii::$app->mailer->compose()\n ->setTo($this->email)\n ->setFrom([Yii::$app->params['tendersEmail'] => 'Tendersure'])\n ->setReplyTo(Yii::$app->params['tendersEmail'])\n ->setSubject($subject)\n ->setTextBody($cbody)\n// ->setHtmlBody($htmlbody)\n ->send();\n\n return true;\n }", "function enviar_mensaje($con, $username, $password, $mobile, $emailadd, $identificacion, $matricula, $codigo_activacion, $tipo_usuario)\r\n{\r\n $mail = new PHPMailer(true);\r\n $mail->CharSet = \"UTF-8\";\r\n\r\n try {\r\n//Server settings\r\n $mail->SMTPDebug = 0; // Enable verbose debug output\r\n $mail->isSMTP(); // Send using SMTP\r\n\r\n //$mail->Helo = \"smtp.gmail.com\"; //Muy importante para que llegue a hotmail y otros\r\n $mail->Host = \"smtp.live.com\"; // Set the SMTP server to send through\r\n $mail->SMTPAuth = true; // Enable SMTP authentication\r\n $mail->Username = '[email protected]'; // SMTP username\r\n $mail->Password = 'commer123'; // SMTP password\r\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` also accepted\r\n $mail->Port = 587; // TCP port to connect to\r\n\r\n//Recipients\r\n $mail->setFrom('[email protected]', 'Commer');\r\n $mail->addAddress($emailadd); // Add a recipient\r\n //$mail->addAddress('[email protected]'); // Name is optional\r\n //$mail->addReplyTo('[email protected]', 'Information');\r\n //$mail->addCC('[email protected]');\r\n //$mail->addBCC('[email protected]');\r\n\r\n// Attachments\r\n\r\n//$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments\r\n //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\r\n\r\n $base_url = \"http://localhost/ionic-php-mysql/\";\r\n\r\n $mail->isHTML(true); // Set email format to HTML\r\n $mail->Subject = 'Verificación de correo Commer';\r\n $mail->Body = '<p>Hola ' . $username . ' <br/> <br/> ¡Por favor! ingrese al link para verificar su cuenta de correo y poder ingresar al aplicativo, ¡gracias! . <br/> <br/> <a href=\"' . $base_url . 'verificacion_email.php?activation_code=' . $codigo_activacion . '\">' . $base_url . 'verificacion_email.php?activation_code=' . $codigo_activacion . '</a>';\r\n $mail->send();\r\n //echo 'El mensaje se ha enviado';\r\n\r\n if ($tipo_usuario == '2') {\r\n\r\n $sql = \"INSERT INTO clientes (id_rol, nombre_cli, clave_cli, telefono_cli, correo_cli, identificacion_cli, matricula_mercantil_cli, estado_correo_cli, codigo_activacion_cli)\r\n VALUES (2,'$username', '$password', '$mobile', '$emailadd', '$identificacion', '$matricula','false','$codigo_activacion')\";\r\n\r\n if ($con->query($sql) === true) {\r\n\r\n $response = 'El mensaje se ha enviado';\r\n\r\n } else {\r\n\r\n $response = \"Error: \" . $sql . \"<br>\" . $db->error;\r\n\r\n }\r\n\r\n echo json_encode($response);\r\n\r\n } else {\r\n\r\n $sql = \"INSERT INTO usuarios (id_rol, nombre_usu, clave_usu, telefono_usu, correo_usu, estado_correo_usu, codigo_activacion_usu)\r\n VALUES (3, '$username', '$password', '$mobile', '$emailadd','false','$codigo_activacion')\";\r\n\r\n if ($con->query($sql) === true) {\r\n\r\n $response = 'El mensaje se ha enviado';\r\n\r\n } else {\r\n\r\n $response = \"Error: \" . $sql . \"<br>\" . $db->error;\r\n }\r\n\r\n echo json_encode($response);\r\n\r\n }\r\n\r\n } catch (Exception $e) {\r\n //echo \"El mensaje no se pudo enviar: {$mail->ErrorInfo}\";\r\n $response = \"El mensaje no se pudo enviar: {$mail->ErrorInfo}\";\r\n echo json_encode($response);\r\n\r\n }\r\n\r\n}", "public function mail()\n\t{\n $this->load->model('mailsjabloon_model');\n $this->load->model('gebruiker_model');\n $data['titel'] = 'Send mails';\n $data['auteur'] = \"<u>Lorenzo M.</u>| Arne V.D.P. | Kim M. | Eloy B. | Sander J.\";\n $data['gebruiker'] = $this->authex->getGebruikerInfo();\n $data['link'] = 'admin/index';\n \n $data['sjablonen'] = $this->mailsjabloon_model->getSjablonen();\n \n $partials = array('hoofding' => 'main_header','menu' => 'main_menu', 'inhoud' => 'mails_versturen');\n $this->template->load('main_master', $partials, $data);\n\t}", "function sendMail($assunto,$mensagem,$remetente,$nomeRemetente,$destino,$nomeDestino,$reply = NULL,$replyNome = NULL){\n\n\t\t\trequire_once('mail/class.phpmailer.php'); //Include pasta/classe do PHPMailer\n\n\t\t\t$mail = new PHPMailer(); //STARTS CLASSE\n\t\t\t$mail->IsSMTP(); //HABILITA ENVIO SMTP\n\t\t\t$mail->SMTPAuth = TRUE; //ATIVA EMAIL AUTENTICADO\n\t\t\t$mail->IsHTML(TRUE); //AQUI DETERMINAMOS QUE PODEMOS UTILIZAR HTML NO ENVIO DOS EMAILS\n\n\t\t\t$mail->Host = MAILHOST; //SERVIDOR DE ENVIO\n\t\t\t$mail->Port = MAILPORT; //PORTA DE ENVIO\n\t\t\t$mail->Username = MAILUSER; //EMAIL PARA SMTP AUTENTICADO\n\t\t\t$mail->Password = MAILPASS; //PORTA DE ENVIO\n\n\t\t\t$mail->From = utf8_decode($remetente); //REMETENTE\n\t\t\t$mail->FromName = utf8_decode($nomeRemetente); //REMETENTE NOME\n\n\t\t\t// CONDICAO PARA CHAMAR EMAIL DE RESPOSTA\n\t\t\tif ($reply != NULL) {\n\t\t\t\t$mail->AddReplyTo(utf8_decode($reply),utf8_decode($replyNome));\n\t\t\t}\n\t\t\t\n\t\t\t$mail->Subject = utf8_decode($assunto); //ASSUNTO\n\t\t\t$mail->Body = utf8_decode($mensagem); //MENSAGEM echo '<span>Erro ao enviar email. Por favor entre em contato pelo e-mail [email protected]!</span>';\n\t\t\t$mail->AddAddress(utf8_decode($destino),utf8_decode($nomeDestino)); //EMAIL E NOME DESTINO echo '<span>Mensagem enviada com sucesso! Obrigado.</span>';\n\n\t\t\tif($mail->Send()){\n\t\t\t return TRUE;\n\t\t\t}else{\n\t\t\t return FALSE;\n\t\t\t}\n\t\t}" ]
[ "0.74825454", "0.7177285", "0.7109426", "0.7063023", "0.69445384", "0.6924649", "0.6921704", "0.68692446", "0.6865233", "0.6860887", "0.6793282", "0.67910564", "0.67838776", "0.6777742", "0.6756514", "0.6746554", "0.6745508", "0.6728046", "0.6725462", "0.66429657", "0.66403174", "0.66258895", "0.6625542", "0.66232634", "0.6613238", "0.66106784", "0.660493", "0.6579796", "0.65729195", "0.6571369", "0.6569541", "0.65465707", "0.65348744", "0.6527616", "0.6527086", "0.6526288", "0.6524586", "0.6521552", "0.6516084", "0.65101206", "0.6502816", "0.6500885", "0.6492883", "0.64892423", "0.6487827", "0.64775294", "0.6450103", "0.64463955", "0.643045", "0.6417029", "0.64111704", "0.6408189", "0.64030665", "0.64023584", "0.6395161", "0.6395126", "0.6394641", "0.6383923", "0.63760316", "0.6362415", "0.63606936", "0.63591784", "0.63535273", "0.63516724", "0.6348671", "0.63468623", "0.63380706", "0.6335704", "0.633489", "0.6329819", "0.6329815", "0.6329298", "0.6316823", "0.6315863", "0.6314984", "0.6312828", "0.63111776", "0.63062334", "0.6284133", "0.62767154", "0.62742954", "0.6266414", "0.6265206", "0.6260878", "0.6258852", "0.6257301", "0.62553626", "0.6250007", "0.6248236", "0.6247916", "0.6244227", "0.62428457", "0.624144", "0.6234182", "0.6233665", "0.6229486", "0.6226995", "0.6225483", "0.6224202", "0.62216073", "0.6220244" ]
0.0
-1
Busca solicitudes pendientes del usuario
public function ingresoPrestamoFiadorController($user){ $resultadoPrest = Datos::buscarSolicitudModel($user, 1, 0); $resultadoInver = Datos::buscarSolicitudModel($user, 2, 0); // valida que no tenga solicitudes pendientes if (count($resultadoPrest) == 0 && count($resultadoInver) == 0){ //valida que no haya campos vacios $datos = $this->solicitudPrestamoVacioFiador($_POST["cantidad"], $_POST["plazo"], $_POST["cedulaF"], $user); if (!is_null($datos)){ //Valida que el fiador sea un cliente $fiador = Datos::buscarClienteModel($_POST["cedulaF"]); if (count($fiador) > 0) { //Registra la solicitud if(Datos::registroPrestamoFiadorModel($datos, "solicitud")){ echo "<div class=\"alert alert-success\" role=\"alert\"> La solicitud se ha registrado correctamente </div>"; } else { echo "<div class=\"alert alert-danger\" role=\"alert\"> Datos incorrectos </div>"; } } else { echo "<div class=\"alert alert-danger\" role=\"alert\"> El fiador no existe </div>"; } } else { echo "<div class=\"alert alert-danger\" role=\"alert\"> Campos vacios </div>"; } } else { echo "<div class=\"alert alert-warning\" role=\"alert\"> Ya tienes una solicitud en proceso </div>"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "public function EncargarTransResponsable(){\n $conn = new conexion();\n $user = null;\n try {\n if($conn->conectar()){\n $str_sql = \"SELECT usuarios.nom_usu,usuarios.id_usu from usuarios \"\n . \"WHERE usuarios.id_tp_usu = 2 and usuarios.estado = 'Activo' or usuarios.id_tp_usu = 4 and usuarios.estado = 'Activo'\";\n $sql = $conn->getConn()->prepare($str_sql);\n $sql->execute();\n $resultado = $sql->fetchAll();\n foreach ($resultado as $row){\n $user[] = array(\n \"Nom_usu\" => $row['nom_usu'],\n \"Id_usu\" => $row['id_usu']\n );\n }\n }\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n $conn->desconectar();\n return $user;\n }", "public function getUsuariosParaEmail(){\r\n\r\n $queryBuilder = $this->createQueryBuilder('u')\r\n ->where('u.recibeNotificaciones = true'); \r\n\r\n return $queryBuilder;\r\n \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}", "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 }", "public function api_entry_getprofile() {\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 unset($user->password);\n\n $this->load->model('Mdl_Requests');\n $this->load->model('Mdl_Prays');\n\n $user->ipray_praying_for_me = 0;\n $user->ipray_i_am_praying_for = 0;\n $user->ipray_request_attended = 0;\n\n $prays = $this->Mdl_Prays->getAll();\n $requests = array();\n\n if (count($prays)) {\n foreach ($prays as $key => $val) {\n $request = $this->Mdl_Requests->get($val->request);\n $prayer = $this->Mdl_Users->get($val->prayer);\n\n if ($_POST[\"user\"] == $request->host) {\n if ($val->status == 1) $user->ipray_request_attended++;\n $user->ipray_praying_for_me++;\n }\n if ($_POST[\"user\"] == $val->prayer) {\n $user->ipray_i_am_praying_for++;\n }\n }\n }\n \n\n parent::returnWithoutErr(\"User profile fetched successfully.\", $user);\n }", "private function processarParametros() {\n\n /**\n * Busca os usuarios definidos para notificar quando acordo ira vencer, ordenando pelo dia\n */\n $oDaoMensageriaUsuario = db_utils::getDao('mensagerialicenca_db_usuarios');\n $sSqlUsuarios = $oDaoMensageriaUsuario->sql_query_usuariosNotificar('am16_sequencial', 'am16_dias');\n $rsUsuarios = db_query($sSqlUsuarios);\n $iTotalUsuarios = pg_num_rows($rsUsuarios);\n\n if ($iTotalUsuarios == 0) {\n throw new Exception(\"Nenhum usuário para notificar.\");\n }\n\n /**\n * Percorre os usuarios e define propriedades necessarias para buscar acordos\n */\n for ($iIndiceUsuario = 0; $iIndiceUsuario < $iTotalUsuarios; $iIndiceUsuario++) {\n\n /**\n * Codigo do usuario para notificar: mensageriaacordodb_usuario.ac52_sequencial\n */\n $iCodigoMensageriaLicencaUsuario = db_utils::fieldsMemory($rsUsuarios, $iIndiceUsuario)->am16_sequencial;\n\n /**\n * Codigo dos usuarios que serao notificados\n * - usado para verificar os usuarios que ja foram notificados\n * - mensageriaacordodb_usuario.ac52_sequencial\n */\n $this->aCodigoMensageriaLicencaUsuario[] = $iCodigoMensageriaLicencaUsuario;\n\n /**\n * Usuario para notificar\n * - mensageriaacordodb_usuario\n */\n $oMensageriaLicencaUsuario = MensageriaLicencaUsuarioRepository::getPorCodigo($iCodigoMensageriaLicencaUsuario);\n\n /**\n * Codigo do usuario do sistema\n * - db_usuarios.id_usuario\n */\n $iCodigoUsuario = $oMensageriaLicencaUsuario->getUsuario()->getCodigo();\n\n /**\n * Data de vencimento:\n * - Soma data atual com dias definidos na rotina de parametros de mensageria\n */\n $iDias = $oMensageriaLicencaUsuario->getDias();\n $this->aDataVencimento[] = date('Y-m-d', strtotime('+ ' . $iDias . ' days'));\n }\n\n return true;\n }", "public function read_tiendas_user($idu){\r\n\r\n $sql=\"select p.id_proveedor, p.nombre_establecimiento, p.direccion_fisica, p.direccion_web,\r\n p.descripcion_tienda, t.telefono_usuario, p.id_usuario\r\n from proveedor p\r\n INNER JOIN usuario u on p.id_usuario = u.id_usuario\r\n INNER JOIN no_telefonos_usuario t on p.id_usuario = t.id_usuario\r\n where p.id_usuario=$idu\";\r\n $resul=mysqli_query($this->con(),$sql);\r\n \r\n while($row=mysqli_fetch_assoc($resul)){\r\n $this->proveedores[]=$row;\r\n }\r\n return $this->proveedores;\r\n \r\n }", "public function solicitaUsuario()\n {\n // Lo emitimos por evento\n $this->emit('cambioUsuario', $this->usuario);\n }", "public function usuariosActivos(){\n\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT idUsuario, identificacion, nombre, apellido FROM tb_usuarios WHERE estado = 'A' AND agenda = 'Si'\";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n \tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado[] = $filas;\n } \n \n }//fin if\n\t\t\n return $resultado;\t\t\t\n\t\t\n\t}", "public function recepcionUsuario($nombre , $password){\n\t\t\t$result_child = $this->_db->query(\"SELECT * FROM usuario WHERE login_usu = '\".$nombre.\"'\");\n\t\t\t$retorna_child = $result_child->fetch_all(MYSQL_ASSOC);\n\n\t\t\t//mensaje por defecto indicando que no se registro\n\t\t\t//genera mensaje para el sistema\n\t\t\t$outp = array('activo'=> \"0\");\n\n\t\t\t//verifica que exista el usuario\n\t\t\tif (!$result_child) {\n \t\t\treturn \"Falló SELECT usuario: (\" . $this->_db->errno . \") \" . $this->_db->error;\n\t\t\t}else{\n\n\t\t\t\tif (count($retorna_child) > 0) {\n\t\t\t\t\t//print_r(count($retorna_child));\n\t\t\t\t\t//busca su grupo de usuario para asignar un rol \n\t\t\t\t\t$result_master = $this->_db->query(\"SELECT * FROM grupousu WHERE idGrupoUsu = '\".$retorna_child[0]['GrupoUsu_idGrupoUsu'].\"'\");\n\t\t\t\t\t$retorna_master = $result_master->fetch_all(MYSQL_ASSOC);\n\n\t\t\t\t\t//verifique que tenga un grupo de usuario\n\t\t\t\t\tif (!$result_child) {\n\t \t\t\t\treturn \"Falló SELECT grupousu: (\" . $this->_db->errno . \") \" . $this->_db->error;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//verifica la contrasena\n\t\t\t\t\t\tif (md5($retorna_child[0]['pass_usu']) == $password) {\n\t\t\t\t\t\t\t//genera mensaje para el sistema\n\t\t\t\t\t\t\t$outp[] = array('idUsuario'=> \"\".$retorna_child[0]['idUsuario'].\"\",\n\t\t\t\t\t\t\t\t\t\t\t'nombres_usu'=> \"\".$retorna_child[0]['nombres_usu'].\"\",\n\t\t\t\t\t\t\t\t\t\t\t'apellidos_usu'=> \"\".$retorna_child[0]['apellidos_usu'].\"\",\n\t\t\t\t\t\t\t\t\t\t\t'GrupoUsu_idGrupoUsu'=> \"\".$retorna_master[0]['idGrupoUsu'].\"\",\n\t\t\t\t\t\t\t\t\t\t\t'idGrupoUsu'=> \"\".$retorna_master[0]['idGrupoUsu'].\"\",\n\t\t\t\t\t\t\t\t\t\t\t'activo'=> \"1\",\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn $outp;\n\t\t\t\t\t\t\t$result_child->close();\n\t\t\t\t\t\t\t$result_master->close();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//genera mensaje para el sistema\n\t\t\t\t\t\t\t$outp[] = array('activo'=> \"0\"\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t//genera mensaje para el sistema\n\t\t\t\t\t$outp[] = array('activo'=> \"0\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn $outp;\n\t\t\t\n\t\t}", "public function getPontosAteDataAtual($cpf_usuario){\r\n\t\t$strQuery = \"\t\r\n\t\t\t\t\t \tSELECT SUM(qtd_pontos) as qtdPontos \r\n\t\t \r\n\t\t\t\t\tFROM \".$this->_table.\" h where h.cpf_usuario = \".$cpf_usuario.\" and data_venc_pontos <= CURDATE() and expirado = 0 \";\r\n\t\t$arrRet = ControlDB::getRow($strQuery,3);\r\n\t\treturn $arrRet;\r\n\t}", "private function getListaUsuarioAutorizado()\r\n\t {\r\n\t \treturn [\r\n\t \t\t'adminteq',\r\n\t \t\t'pfranco',\r\n\t \t\t'kperez',\r\n\t \t];\r\n\t }", "public function listaProyectosTerminados(){\n\t\t$query = \"SELECT * FROM alm_proyecto WHERE ISNULL(alm_proy_usr_baja) AND \talm_proy_estado='13'\";\n\t\treturn $this->mysql->query($query);\n\t}", "public function getRUser($post)\n\t{\n\t\ttry {\n\t\t\t$condicion = '';\n\t\t\t$aux_ids = array();\n\t\t\t#Si existe el id del personal, buscar los bienes de la persona\n\t\t\tif ( isset($post['servidor_id']) && !empty($post['servidor_id']) ) \n\t\t\t{\n\t\t\t\t$servidor = $post['servidor_id']; \n\n\t\t\t\t$this->sql = \" SELECT bien_id FROM asignacion WHERE personal_id = ? \";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->bindParam( 1,$servidor );\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$bienes_ids = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\tforeach ($bienes_ids as $key => $id) {\n\t\t\t\t\tarray_push($aux_ids,$id->bien_id);\n\t\t\t\t}\n\t\t\t\t/*Conversion a string*/\n\t\t\t\t$aux_ids = implode(',',$aux_ids);\n\t\t\t\t\n\t\t\t\t/*Buscar en la tabla de bienes , las asignaciones registradas*/\n\t\t\t\t$this->sql = \" SELECT \n\t\t\t\t\tb.id,\n\t\t\t\t\tb.descripcion,\n\t\t\t\t\tb.serie,\n\t\t\t\t\tb.status,\n\t\t\t\t\tb.inventario,\n\t\t\t\t\tb.desc_ub,\n\t\t\t\t\tm.nombre AS marca,\n\t\t\t\t\tg.nombre AS grupo,\n\t\t\t\t\tt.nombre AS tipo,\n\t\t\t\t\tmo.nombre AS modelo,\n\t\t\t\t\tb.fecha_reg AS registro,\n\t\t\t\t\tb.fecha_adq AS adquisicion,\n\t\t\t\t\tUPPER(c.nombre) AS color,\n\t\t\t\t\tma.nombre AS material,\n\t\t\t\t\tp.nombre AS proveedor,\n\t\t\t\t\tCONCAT(\n\t\t\t\t\t pe.nombre,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_pat,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_mat\n\t\t\t\t\t) AS asignadoa\n\t\t\t\t FROM bienes AS b\n\t\t\t\t INNER JOIN marcas AS m\n\t\t\t\t ON\n\t\t\t\t m.id = b.marca_id\n\t\t\t\t INNER JOIN grupos AS g\n\t\t\t\t ON\n\t\t\t\t g.id = b.grupo_id\n\t\t\t\t INNER JOIN t_bienes AS t\n\t\t\t\t ON\n\t\t\t\t t.id = b.tipo_id\n\t\t\t\t INNER JOIN modelos AS mo\n\t\t\t\t ON\n\t\t\t\t mo.id = b.modelo_id\n\t\t\t\t INNER JOIN color AS c\n\t\t\t\t ON\n\t\t\t\t c.id = b.color_id\n\t\t\t\t INNER JOIN materiales AS ma\n\t\t\t\t ON\n\t\t\t\t ma.id = b.material_id\n\t\t\t\t INNER JOIN proveedores AS p\n\t\t\t\t ON\n\t\t\t\t p.id = b.pro_id\n\t\t\t\t INNER JOIN asignacion AS a\n\t\t\t\t ON\n\t\t\t\t a.bien_id = b.id\n\t\t\t\t INNER JOIN personal AS pe\n\t\t\t\t ON\n\t\t\t\t pe.id = a.personal_id WHERE b.id IN ($aux_ids) \";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$bienes = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\t\n\t\t\t\treturn json_encode($bienes) ;\n\t\t\t} \n\t\t\telseif( isset($post['area']) && !empty($post['area']) )\n\t\t\t{\n\t\t\t\t$area = $post['area'];\n\t\t\t\t#Buscar a los usuarios pertenecientes al area\n\t\t\t\t$this->sql = \"SELECT id FROM personal WHERE area_id = ?\";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->bindParam(1,$area);\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$personas = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\tforeach ($personas as $key => $id) {\n\t\t\t\t\tarray_push($aux_ids,$id->id);\n\t\t\t\t}\n\t\t\t\t$aux_ids = implode(',',$aux_ids);\n\t\t\t\t#ubicar los bienes con las personas (En asignaciones)\n\t\t\t\t$this->sql = \"SELECT bien_id FROM asignacion WHERE personal_id IN (?)\";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->bindParam(1,$aux_ids);\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$asignaciones = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\t#Limpiar arreglo auxiliar\n\t\t\t\tunset($aux_ids);\n\t\t\t\t$aux_ids = array();\n\t\t\t\tforeach ($asignaciones as $key => $id) {\n\t\t\t\t\tarray_push($aux_ids,$id->bien_id);\n\t\t\t\t}\n\t\t\t\t$aux_ids = implode(',',$aux_ids);\n\t\t\t\t#Buscar los bienes (Bienes)\n\t\t\t\t$this->sql = \"SELECT \n\t\t\t\t\tb.id,\n\t\t\t\t\tb.descripcion,\n\t\t\t\t\tb.serie,\n\t\t\t\t\tb.status,\n\t\t\t\t\tb.inventario,\n\t\t\t\t\tb.desc_ub,\n\t\t\t\t\tm.nombre AS marca,\n\t\t\t\t\tg.nombre AS grupo,\n\t\t\t\t\tt.nombre AS tipo,\n\t\t\t\t\tmo.nombre AS modelo,\n\t\t\t\t\tb.fecha_reg AS registro,\n\t\t\t\t\tb.fecha_adq AS adquisicion,\n\t\t\t\t\tUPPER(c.nombre) AS color,\n\t\t\t\t\tma.nombre AS material,\n\t\t\t\t\tp.nombre AS proveedor,\n\t\t\t\t\tCONCAT(\n\t\t\t\t\t pe.nombre,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_pat,\n\t\t\t\t\t ' ',\n\t\t\t\t\t pe.ap_mat\n\t\t\t\t\t) AS asignadoa\n\t\t\t\t FROM bienes AS b\n\t\t\t\t INNER JOIN marcas AS m\n\t\t\t\t ON\n\t\t\t\t m.id = b.marca_id\n\t\t\t\t INNER JOIN grupos AS g\n\t\t\t\t ON\n\t\t\t\t g.id = b.grupo_id\n\t\t\t\t INNER JOIN t_bienes AS t\n\t\t\t\t ON\n\t\t\t\t t.id = b.tipo_id\n\t\t\t\t INNER JOIN modelos AS mo\n\t\t\t\t ON\n\t\t\t\t mo.id = b.modelo_id\n\t\t\t\t INNER JOIN color AS c\n\t\t\t\t ON\n\t\t\t\t c.id = b.color_id\n\t\t\t\t INNER JOIN materiales AS ma\n\t\t\t\t ON\n\t\t\t\t ma.id = b.material_id\n\t\t\t\t INNER JOIN proveedores AS p\n\t\t\t\t ON\n\t\t\t\t p.id = b.pro_id\n\t\t\t\t INNER JOIN asignacion AS a\n\t\t\t\t ON\n\t\t\t\t a.bien_id = b.id\n\t\t\t\t INNER JOIN personal AS pe\n\t\t\t\t ON\n\t\t\t\t pe.id = a.personal_id\n\t\t\t\t WHERE b.id IN ($aux_ids)\";\n\t\t\t\t$this->stmt = $this->pdo->prepare( $this->sql );\n\t\t\t\t$this->stmt->execute();\n\t\t\t\t$bienes = $this->stmt->fetchAll( PDO::FETCH_OBJ );\n\t\t\t\treturn json_encode($bienes);\n\t\t\t}else{\n\t\t\t\treturn json_encode( array('message'=>'No selecciono ningún criterio') );\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$this->result = array('error' => $e->getMessage() );\n\t\t}\t\n\t}", "public function buscarUsuarios(){\n\t\t}", "public function calificacionPendiente($changuita, $usuario, $contraparte) {\n $sql = \"select nombre, mail, aviso_ca from usuarios where id = $usuario and activo = '2'\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n if ($fila[\"aviso_ca\"] == 1) {\n $mail = $fila[\"mail\"];\n $nombre = $fila[\"nombre\"];\n $sql = \"select nombre, apellido, mail, celular_area, celular from usuarios where id = $contraparte\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n //$cNombre = $fila[\"nombre\"].\" \".$fila[\"apellido\"];\n $cNombre = $fila[\"nombre\"];\n $cMail = $fila[\"mail\"];\n // $cTel = $fila[\"telefono_area\"].\" \".$fila[\"telefono\"];\n $cCel = $fila[\"celular_area\"] . \" \" . $fila[\"celular\"];\n $sql = \"select usuario, titulo from changuitas where id = $changuita\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n $titulo = $fila[\"titulo\"];\n $txtContrato = \"fuiste elegido por\";\n if ($usuario == $fila[\"usuario\"])\n $txtContrato = \"elegiste a\";\n $this->mailer->Subject = \"Tenés que calificar a $cNombre por la changuita $titulo\";\n $this->mailer->Body = $this->bodyIni;\n $this->mailer->Body .= \"Estimado/a $nombre:<br/><br/>Ya pasaron varios días desde que $txtContrato $cNombre para realizar la changuita <a href='\" . Sitio . \"/#/changuita|\" . $changuita . \"'><strong>$titulo</strong></a>. Por este motivo, te pedimos que lo/a califiques por su amabilidad, claridad y efectividad en el intercambio. Si la changuita ya fue concretada, podés <a href='\" . Sitio . \"/#/changuita|\" . $changuita . \"'>calificarlo/a ahora</a>. De no haberse concretado el intercambio en el tiempo indicado, podés indicarlo y calificar a tu contraparte para obtener una bonificación de los cargos. En ese caso, la reputación de $cNombre se verá afectada negativamente.<br/>Te recordamos sus datos de contacto:<br/>E-mail: $cMail<br/>\";\n // if(trim($cTel) != \"\")\n // $this->mailer->Body .= \"Tel.: $cTel<br/>\";\n if (trim($cCel) != \"\")\n $this->mailer->Body .= \"Cel.: $cCel<br/>\";\n $this->mailer->Body .= \"<br/>\" . $this->bodyFin;\n $this->mailer->ClearAddresses();\n $this->mailer->AddAddress($mail);\n $this->mailer->Send();\n }\n }", "function solicitarAprobacion(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_SOLAPRO_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n \n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "abstract public function getQueuedSignups();", "public function vacation_register() {\n\n\t\t// Get all users\n\t\t$colaboradores=$this->user_model->getPagination(null);\n\n\t\tforeach ($colaboradores as $colaborador){\n\n\t\t\t//Calculo de aniversario y expiracion de vacaciones generadas\n\t\t\t$ingreso = new DateTime($colaborador->fecha_ingreso);\n\t\t\t$hoy = new DateTime(date('Y-m-d'));\n\t\t\t$diferencia = $ingreso->diff($hoy);\n\t\t\t$ingreso->add(new DateInterval('P'.$diferencia->y.'Y'));\n\t\t\t$actualidad = new DateTime($ingreso->format('Y-m-d'));\n\t\t\t$actualidad->add(new DateInterval('P18M'));\n\t\t\t$caducidad = $actualidad->format('Y-m-d');\n\n\t\t\t$dias = null;\n\t\t\t$datos = array();\n\n\t\t\t//Calculo de dias correspondientes al año transcurrido\n\t\t\tswitch ($diferencia->y):\n\t\t\t\tcase 1: $dias=6;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 2: $dias=8;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 3: $dias=10;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 4: $dias=12;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 5:case 6:case 7:case 8:case 9: $dias=14;\t\t\tbreak;\n\t\t\t\tcase 10:case 11:case 12:case 13:case 14: $dias=16;\t\tbreak;\n\t\t\t\tcase 15:case 16:case 17:case 18:case 19: $dias=18;\t\tbreak;\n\t\t\t\tcase 20:case 21:case 22:case 23:case 24: $dias=20;\t\tbreak;\n\t\t\t\tdefault: $dias=22;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\tendswitch;\n\n\t\t\t//echo \"<br>\".\"<br>\".$colaborador->id.\"<br>\".$colaborador->nombre;\n\n\t\t\tif( ($acumulados = $this->solicitudes_model->getAcumulados($colaborador->id) ) && ($diferencia->y > $acumulados->anos) ){\n\t\t\t\t//echo \"<br>Aniversario\";\n\n\t\t\t\tif(($acumulado = $acumulados->dias_acumulados) < 0){\n\n\t\t\t\t\t$dias+=$acumulado;\n\n\t\t\t\t\tif($dias < 0){\n\t\t\t\t\t\t$datos['dias_dos'] = 0;\n\t\t\t\t\t\t$datos['vencimiento_dos'] = null;\n\t\t\t\t\t\t$datos['dias_acumulados'] = $dias;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$datos['dias_dos'] = $dias;\n\t\t\t\t\t\t$datos['vencimiento_dos'] = $caducidad;\n\t\t\t\t\t\t$datos['dias_acumulados'] = $acumulados->dias_uno + $dias;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$datos['dias_dos'] = $dias;\n\t\t\t\t\t$datos['vencimiento_dos'] = $caducidad;\n\t\t\t\t\t$datos['dias_acumulados'] = $acumulados->dias_uno + $dias;\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\t/*$datos['dias_dos'] = $dias;\n\t\t\t\t$datos['vencimiento_dos'] = $caducidad;\n\t\t\t\t$datos['dias_acumulados'] = (int)$acumulados->dias_acumulados + (int)$dias;\n\t\t\t\t$datos['anos'] = $diferencia->y;*/\n\n\t\t\t\t$this->solicitudes_model->actualiza_dias_vacaciones($colaborador->id,$datos);\n\t\t\t}elseif(!$acumulados && $diferencia->y == 1){\n\t\t\t\t//echo \"<br>Primer Aniversario\";\n\n\t\t\t\t$datos['dias_uno'] = $dias;\n\t\t\t\t$datos['vencimiento_uno'] = $caducidad;\n\t\t\t\t$datos['dias_acumulados'] = $dias;\n\t\t\t\t$datos['anos'] = $diferencia->y;\n\n\t\t\t\t$this->solicitudes_model->actualiza_dias_vacaciones($colaborador->id,$datos);\n\t\t\t}else{\n\t\t\t\t//echo \"<br>Normal\";\n\t\t\t}\n\n\t\t\t//$this->solicitudes_model->actualiza_dias_vacaciones($colaborador->id,$datos);\n\n\t\t}//exit;\n\t}", "private static function getRemainingRequestsParams()\n {\n return [\n Config::$itones_request_maximum,\n MyRadio_User::getInstance()->getID(),\n Config::$itones_request_period,\n ];\n }", "public function buscarVacacionesPorUsuarios($codUser)\n\t{\n\t\t$this->link= new Conexion(); \n\t\t$this->listaVacaciones = array();\n\t\t$this->query = \"call pVacacionesPorUsuario(?)\"; // AGREGAMOS LA SENTENCIA DE LA FUNCIÓN/ DEL PROCEDIMIENTO\n\t\t$this->stmt = $this->link->getConexion()->prepare($this->query); // PREPARAMOS LA SENTENCIA ALMACENADA\n\t\t$this->stmt->bind_param(\"i\", $codUser); // AGREGAMOS LOS PARAMETROS PREPARADOS NECESARIOS\n\t\t$this->stmt->execute(); // EJECUTAMOS EL PROCEDIMIENTO\n\t\t$resultado = $this->stmt->get_result(); // RECOGEMOS EL RESULTADO EN UNA VARIABLE\n\t\twhile ($fila = $resultado->fetch_assoc()) // RECORREMOS EL ARRAY DE JORNADAS\n {\n\t\t\t$this->vacaciones = new Vacaciones();\n\t\t\t$this->vacaciones->setFecha($fila['diaVacaciones']);\n\t\t\t$this->vacaciones->setCodUsuario($fila['cod_usuario']);\n\t\t\t$this->listaVacaciones[] = $this->vacaciones->jsonSerialize();\n }\n\t\t$resultado->free();\n\t\t$this->stmt->close(); // CERRAMOS LA SENTENCIA PREPARADA (TAMBIEN CIERRA LA CONEXIÓN)\n\t\t$this->link->desconectar(); // CIERRA LA CONEXIÓN DEL OBJETO CONEXION\n\t\treturn $this->listaVacaciones; // DEVOLVEMOS EL RESULTADO DE LA FUNCIÓN / DEL PROCEDIMIENTO\n\t}", "private function preAddUser(){\n $LMS = new LMS();\n $api = $LMS->getDataXUserPass($this->_user, $this->_pass, 'https://www.sistemauno.com/source/ws/uno_wsj_login.php');\n $this->_person = \"\";\n if ($this->isObjectAPI($api)) {\n //validar Permisos\n $FilterAPI = new FilterAPI($api);\n $this->_datPerson = $FilterAPI->runFilter($this->_user, $this->_pass);\n if (is_array($this->_datPerson)) {\n //si el usuario cuenta con un perfil apropiado se le pide que valide sus coreo\n $this->validateEmailUser();\n if($this->validUniqueMail()){\n $this->sendMail();\n $this->_response = \"1|\" . $this->_datPerson[email] . \"|\" . $this->_datPerson[personId] . \"|\" . $this->_code . \"|\" . $this->_datPerson['name'];\n }else{\n $this->_response = \"2|\" . $this->_datPerson[email] . \"|\" . $this->_datPerson[personId] . \"|\" . $this->_code . \"|\" . $this->_datPerson['name'];\n }\n } else {\n $this->_response = $this->_datPerson;\n }\n } else {\n $this->_response = $api;\n }\n }", "function get_usuarios_res($area_evaluacion){\n\t\t\t$condicion=array('pa_usuario_evaluacion');\n\t\t\t\n\t\t\t\n\t\t}", "function BuscarPessoas()\r\n {\r\n require_once(\"UsuarioController.php\");\r\n $UsuarioController = new UsuarioController();\r\n\r\n $ret = $this->DAO->BuscarPessoas($_SESSION[\"DadosUser\"][\"Id\"]);\r\n $Lista = [];\r\n $Count = 0;\r\n\r\n foreach($ret as $Item)\r\n {\r\n if($Item[\"USUARIO_1\"] != $_SESSION[\"DadosUser\"][\"Id\"])\r\n {\r\n $_POST[\"Usuario\"] = $Item[\"USUARIO_1\"]; \r\n }\r\n else\r\n {\r\n $_POST[\"Usuario\"] = $Item[\"USUARIO_2\"];\r\n }\r\n \r\n $InfoUser = $UsuarioController->BuscarUsuario(1);\r\n\r\n $Lista[$Count] = $InfoUser;\r\n\r\n $Count++;\r\n }\r\n\r\n echo json_encode($Lista);\r\n }", "private function respuesta_provincias(){\n\t\t\n\t\t$user = $this->session->userdata('cliente_id');\n\n\t\t//Crear mensaje preguntando\n\n\t\t$data_in = array(\n 'from_id' \t=> 0,\n 'to_id' \t=> $user,\n 'mensaje' => 'Para brindarle más información, por favor indique la ubicación del proyecto en el que está interesado.',\n 'date'\t\t=> applib::fecha()\n );\n\n applib::create(applib::$mensajes_table,$data_in);\n\n\t\t//Crear mensaje de botones\n\n\t\t$mensaje = $this->load->view('frontend/comunes/botones_provincia',null,true);\n\n\t\t$data_in['mensaje'] = $mensaje;\n\t\t$data_in['sin_fondo'] = 1;\n \n applib::create(applib::$mensajes_table,$data_in);\n\n return true;\n\t}", "function listaUtentiToChangePassword($pending = 1, $confirmed = 1) {\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT a.id_utente, a.cognome, a.nome, a.email, b.request_date, b.id_request \"\n . \" FROM scuola.utenti_scuola as a,\"\n . \" scuola.change_password_request as b \"\n . \" WHERE b.pending = %s AND b.confirmed = %s AND a.id_utente = b.from_user\"\n . \" ORDER BY b.request_date, a.cognome, a.nome \", $pending, $confirmed);\n\n // Perform Query\n $result = mysql_query($query);\n //$array = mysql_fetch_assoc($result);\n }\n $this->closeConnection();\n return $result;\n }", "function listarCuentaBancariaUsuario(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_sel';\n\t\t$this->transaccion='TES_USRCTABAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('permiso','permiso','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_baja','date');\n\t\t$this->captura('nro_cuenta','varchar');\n\t\t$this->captura('fecha_alta','date');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('nombre_institucion','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_moneda','integer');\n\t\t$this->captura('codigo_moneda','varchar');\n\t\t$this->captura('denominacion','varchar');\n\t\t$this->captura('centro','varchar');\n\t\t$this->captura('id_finalidads','varchar');\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "private function findTokeTimeParams()\n {\n // user token from database store token and token_expire field\n $userToken = $this->user->getUserTokenData();\n\n // user token\n $token = $userToken->token;\n\n // get token param id and time created\n $tokenParam = $this->getTokenData($token);\n\n // user token expire\n $tokenExpire = $userToken->token_expire;\n\n //assign received value to property\n $this->tokenExpire = $tokenExpire;\n $this->tokenTime = $tokenParam->time;\n }", "public function interesadosPorCiclo(Request $request)\n {\n\n //Sacar año y ciclo del request\n $year = $request->year;\n $ciclo = $request->ciclo;\n\n $interesados = array();\n\n $respuestas = DB::table('respuestas')\n ->join('users', 'users.id', '=', 'respuestas.user_id')\n ->join('preguntas', 'preguntas.id', '=', 'respuestas.pregunta_id')\n ->select('users.*', 'respuestas.respuesta')\n ->where('preguntas.ciclo', $ciclo)\n ->where('respuestas.year', $year)\n ->orderBy('users.id')\n ->get();\n\n //Ahora tenemos que ir sumando las respuestas por usuario\n $usuario = \"\";\n $total = 0;\n foreach($respuestas as $interesado) {\n if ($usuario == $interesado->email) {\n switch ($interesado->respuesta) {\n case 'A':\n $valor=2;\n break;\n case 'B':\n $valor=1;\n break;\n case 'C':\n $valor=-1;\n break;\n case 'D':\n $valor=0;\n break;\n \n default:\n # code...\n break;\n }\n\n $total += $valor;\n\n } else { //Si el usuario no coincide cambiamos y empezamos a calcular\n //Vemos el total del usuario anterior, si es mayor que 10 está interesado\n if ($total > 10) {\n array_push($interesados, $interesado->name.\" \".$interesado->surname.\", \".\n $usuario.\", \".$interesado->curso); \n }\n //echo \"FINAL- \".$usuario.\" - \".$total.\"<br>\";\n\n //Cambiamos de usuario\n $total = 0;\n $usuario = $interesado->email;\n }\n\n //echo $interesado->email.\" - \".$interesado->respuesta.\" total: \".$total.\"<br>\";\n }\n\n //Vemos el total del usuario anterior, si es mayor que 10 está interesado\n if ($total > 10) {\n array_push($interesados, $interesado->name.\", \".$usuario.\", \".$interesado->curso); \n }\n //echo \"FINAL- \".$usuario.\" - \".$total.\"<br>\";\n\n //Pintamos la vista preguntas con las preguntas del grado medio\n return view('interesados', [ 'interesados' => $interesados, \n 'ciclo' => $ciclo,\n 'year' => $year\n ]);\n }", "function usuario($usuario) {\r\n $u = $this->consultar($usuario);\r\n $p = $this->perfil($u[\"perfil\"]);\r\n return(array_merge($u, $p));\r\n }", "public function get_paid_trainee() {\n $matches = array();\n $query_string = htmlspecialchars($_POST['q'], ENT_QUOTES, 'UTF-8');\n $result = $this->classtraineemodel->get_paid_user($this->tenant_id, '', $query_string);\n if ($result) {\n foreach ($result as $row) {\n $matches[] = array(\n 'key' => $row->user_id,\n 'label' => $row->first_name . ' ' . $row->last_name . ' (Tax Code: ' . $row->tax_code . ')',\n 'value' => $row->first_name . ' ' . $row->last_name,\n );\n }\n }\n echo json_encode($matches);\n exit();\n }", "private function consultar_usuario_por_correo() {\n $sentencia = \"select id,nombrecompleto ,correo,token \"\n . \"from usuario u where u.correo ='{$this->referencia_a_buscar}'; \";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }", "function recuperarSeguidosPor($nombre){\n\t\t\t$query= \"select usuario from seguir \n\t\t\twhere seguidor='\".$nombre.\"'\";\n\t\t\t$result = $this->mysqli->query($query);\n\t\t\t$usuarios = Array();\n\t\t\twhile($fila = $result -> fetch_assoc()){\n\t\t\t$usuarioSeguido= $this->recuperarUsuario($fila[\"usuario\"]);\n\t\t\t$usuarios[]=($usuarioSeguido);\n\t\t\t}\n\t\t\treturn $usuarios;\n\t\t}", "public function ObtenerPaciente() {\n $sql= $this->config_mdl->_get_data_condition('os_rx',array(\n 'triage_id'=> $this->input->post('triage_id')\n ));\n $info= $this->config_mdl->_get_data_condition('os_triage',array(\n 'triage_id'=> $this->input->post('triage_id')\n ));\n if(!empty($sql)){\n $this->setOutput(array('accion'=>'1','rx'=>$sql[0],'paciente'=>$info[0]));\n }else{\n $this->setOutput(array('accion'=>'2'));\n }\n }", "public function consultarUsuario(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT c.*, a.permissao FROM tbusuarios c, tbpermissao a where c.idpermissao = a.idpermissao and permissao <> 'SUPER-ADMIN'order by c.nome\";\n $sql = $this->conexao->query($sql);\n\n $dados = array();\n\n while ($row = $sql->fetch_assoc()) {\n $idusuario = $row[\"idusuario\"];\n $nome = $row[\"nome\"];\n $email = $row[\"email\"];\n $dtnascimento = $row[\"dt_nascimento\"];\n $telefone = $row[\"telefone\"];\n $dtnascimento = $row[\"dt_nascimento\"];\n $habilitado = $row[\"habilitado\"];\n $permissao = $row[\"permissao\"]; \n $idpermissao = $row[\"idpermissao\"]; \n\n $dado = array();\n $dado['idusuario'] = $idusuario;\n $dado['nome'] = $nome;\n $dado['email'] = $email;\n $dado['senha'] = $row['senha'];\n $dado['senha_confirma'] = $row['senha_confirma'];\n $dado['idpermissao'] = $idpermissao;\n $dado['permissao'] = $permissao;\n $dado['telefone'] = $telefone;\n $dado['dtnascimento'] = $dtnascimento;\n $dado['habilitado'] = $habilitado; \n $dados[] = $dado;\n }\n\n return $dados;\n\n }", "private function consultar_usuario_por_id() {\n\n if (is_numeric($this->referencia_a_buscar)) {\n $id_a_buscar = intval($this->referencia_a_buscar);\n $sentencia = \"select id,nombrecompleto ,correo,token from usuario u where u.id= {$id_a_buscar};\";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n } else {\n $this->respuesta = null;\n }\n }", "public function all_user_connected() {\n try\n {\n $max_last_ping = time() - 31;\n $stmt = $this->db->prepare(\"SELECT * FROM connected_user WHERE last_ping > :last_ping\");\n $stmt->execute(array(\n 'last_ping' => $max_last_ping\n ));\n\n while($result = $stmt->fetch()) {\n $listid[] = $result['id_user'];\n }\n \n return $listid;\n }\n catch(PDOException $e) {\n die('<h1>ERREUR LORS DE LA CONNEXION A LA BASE DE DONNEE. <br />REESAYEZ ULTERIEUREMENT</h1>');\n }\n }", "function status_user($pseudo){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT status_utilisateur FROM utilisateur WHERE pseudo = :pseudo\");\n\t\t$req->execute(array(\"pseudo\"=>$pseudo));\n\n\t\twhile($results = $req->fetch()){\n\t\t\t$result = $results[\"status_utilisateur\"];\n\t\t}\n\n\t\treturn $result;\n\t}", "public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"user01\"])){\n\n\t\t//\t if(preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"ingresoEmail\"]) && preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingresoPassword\"])){\n\n\t\t\t \t//$encriptar = crypt($_POST[\"ingresoPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\t\t\t\t$encriptar = crypt($_POST[\"passwords01\"], '$2a$07$asxx54ahjppf17sd87a5a4dDDGsystemdevmybebe$');\n\n\t\t\t \t$tabla = \"genusuario\";\n\t\t\t \t$item = \"usunombre\";\n\t\t\t \t$valor = $_POST[\"user01\"];\n\n\t\t\t \t$respuesta = UserModel::mdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t//echo \"<pre>\".print_r($respuesta).\"</pre>\";\n\n\t\t\t \tif($respuesta[\"usunombre\"] == $_POST[\"user01\"] && $respuesta[\"usuclave\"] == $encriptar){\n\n\t\t\t \t\tif($respuesta[\"usuverific\"] == 0){\n\n\t\t\t \t\t\techo'<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\t\t \ttitle: \"¡ERROR!\",\n\t\t\t\t\t\t\t\t \ttext: \"¡El correo electrónico aún no ha sido verificado, por favor revise la bandeja de entrada o la carpeta SPAM de su correo electrónico para verificar la cuenta, o contáctese con nuestro soporte a [email protected]!\",\n\t\t\t\t\t\t\t\t \tshowConfirmButton: true,\n\t\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\t\tif(result.value){ \n\t\t\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t\treturn;\n\n\t\t\t \t\t}else{\n\n\t\t\t \t\t\t$_SESSION[\"validarSesion\"] = \"ok\";\n\t\t\t \t\t\t$_SESSION[\"id\"] = $respuesta[\"oid\"];\n\n\t\t\t \t\t\t$ruta = RouteController::ctrRoute();\n\n\t\t\t \t\t\techo '<script>\n\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"'.$ruta.'backoffice\";\t\t\t\t\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t \t\t}\n\n\t\t\t \t}else{\n\n\t\t\t \t\techo'<script>\n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\t \ttitle: \"¡ERROR!\",\n\t\t\t\t\t\t\t \ttext: \"¡El email o contraseña no coinciden!\",\n\t\t\t\t\t\t\t \tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\tif(result.value){ \n\t\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t});\n\n\t\t\t\t\t</script>';\n\n\t\t\t \t}\n\n\n\t\t/*\t }else{\n\n\t\t\t \techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\ttitle: \"¡CORREGIR!\",\n\t\t\t\t\t\ttext: \"¡No se permiten caracteres especiales en ninguno de los campos!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\thistory.back();\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\t\n\n\t\t\t\t</script>';\n\n\t\t\t }*/\n\n\t\t}\n\n\t}", "public function Select_pendentes(){\n\t\t\t$sql=\"SELECT p.*, e.* FROM tbl_paciente AS p INNER JOIN tbl_endereco AS e ON p.id_endereco = e.id_endereco WHERE status = 0;\";\n\n\t\t\t//Instancio o banco e crio uma variavel\n\t\t\t$conex = new Mysql_db();\n\n\t\t\t/*Chama o método para conectar no banco de dados e guarda o retorno da conexao\n\t\t\tna variavel que $PDO_conex*/\n\t\t\t$PDO_conex = $conex->Conectar();\n\n\t\t\t//Executa o select no banco de dados e guarda o retorno na variavel select\n\t\t\t$select = $PDO_conex->query($sql);\n\n\t\t\t//Contador\n\t\t\t$cont = 0;\n\n\t\t\t//Estrutura de repetição para pegar dados\n\n $lista_pacientes = array();\n\n\t\t\twhile ($rs = $select->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t#Cria um array de objetos na classe contatos\n\n //var_dump($rs);exit();\n\n\t\t\t\t$lista_paciente[] = $rs;\n\n\t\t\t\t// Soma mais um no contador\n\t\t\t\t$cont+=1;\n\t\t\t}\n\n\t\t\t$conex::Desconectar();\n\n\t\t\t//Apenas retorna o $list_contatos se existir dados no banco de daos\n\t\t\tif (isset($lista_paciente)) {\n\t\t\t\t# code...\n\t\t\t\treturn $lista_paciente;\n\t\t\t}\n }", "public function getDataUsers($order, $start, $end){ \n if (empty($order))\n $query = \"SELECT idUser,nick,name,email FROM final_usuario LIMIT \".$start.\",\".$end;\n else\n $query = \"SELECT idUser,nick,name,email FROM final_usuario ORDER BY \".$order.\" LIMIT \".$start.\",\".$end;\n\n return $this->con->action($query);\n }", "public function actualizarEstadoAplicante($uid_aplicante, $nid_puesto, $tid_estado){\n\t \t$request_url = base_url().'rrhh/api/users/user/'. $uid_aplicante;\t\n\n \t//validar los argumentos url\n \tif(!is_numeric($nid_puesto) || !is_numeric($uid_aplicante) || !is_numeric($tid_estado)){\n \t\t$data['success'] = false;\n\t\t\t$data['error'] = 'Alguno de los argumentos no es numérico';\n\t\t\t$data['code'] = '406';\n \t}else{\n\t \t\t$auth_data = $this->autenticacion();\n\t\t \t\n\t\t \t//validar sesion del usuario\n\t\t \tif($auth_data['valido']){\n\t\t\t\t$csrf_token = $auth_data['csrf_token'];\n\t\t\t\t$session_cookie = $auth_data['session_cookie'];\n\n\t\t\t\t//validar existencia del puesto\n\t\t\t\t$node = $this->Node->load($nid_puesto);\n\t\t\t\tif((int)count($node) > 0){\n\n\t\t\t\t\t//validar el usuario si existe\n\t\t\t\t\t$user = $this->Users->load($uid_aplicante);\n\t\t\t\t\tif((int)count($user) > 0){\n\n\t\t\t\t\t\t$puesto = $this->Node->load($nid_puesto);\n\t\t\t\t\t\t$usuario_admin = $this->Users->load($puesto[0]->uid);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//validar autoria\n\t\t\t\t\t\t//validar usuario administrador\n\t\t\t\t\t\tif($_POST['mail'] == $usuario_admin[0]->mail){\n\t\t\t\t\t\t\t//Obtener el aplicante\n\t\t\t\t\t\t\t$aplicante_url = base_url('/rrhh/api/users/detalle-aplicante-blip.xml?user_id='.$uid_aplicante);\n\t\t\t\t\t\t\t$obtener_aplicante = consumirServicio($aplicante_url, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t$validar_aplicante = false;\n\t\t\t\t\t\t\tforeach ($obtener_aplicante->results as $key => $value) {\n\t\t\t\t\t\t\t\tforeach ($value as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t$pais_trabajar = $value2->field_pais_trabajar;\n\t\t\t\t\t\t\t\t\tforeach ($pais_trabajar as $key3 => $value3) {\n\t\t\t\t\t\t\t\t\t\tforeach ($value3->item as $key4 => $value4) {\n\t\t\t\t\t\t\t\t\t\t\t//validar si el aplicante desea laborar en Costa Rica\n\t\t\t\t\t\t\t\t\t\t\tif($value4->target_id == '10'){\n\t\t\t\t\t\t\t\t\t\t\t\t$validar_aplicante = true;\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}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//validar el aplicante\n\t\t\t\t\t\t\tif($validar_aplicante){\t\n\t\t\t\t\t\t\t\t//validar si el estado ingresado es el que corresponde\n\t\t\t\t\t\t\t\t$estados_url = base_url('/rrhh/api/filtros/filtros-taxonomias-estados-bitacora.xml');\n\t\t\t\t\t\t\t\t$estados = consumirServicio($estados_url, $session_cookie, $csrf_token);\n\t\t\t\t\t\t\t\t$estado_valido = false;\n\t\t\t\t\t\t\t\tforeach ($estados->results as $key => $value) {\n\t\t\t\t\t\t\t\t\tforeach ($value as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t\tif($tid_estado == (int)$value2->tid){\n\t\t\t\t\t\t\t\t\t\t\t$estado_valido = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif($estado_valido){\n\t\t\t\t\t\t\t\t\t//verificar si el puesto a modificar es el correcto al usuario\n\t\t\t\t\t\t\t\t\t//extrar todas las aplicaciones del usuario\n\t\t\t\t\t\t\t\t\t//Obtener todos los puestos aplicados por el aplicante\n\t\t\t\t\t\t\t\t\t$puestos_aplicados_url = base_url('/rrhh/api/users/listado-puestos-aplicados-por-aplicante.xml?uid_aplicante='.$uid_aplicante);\n\t\t\t\t\t\t\t\t\t$puestos_aplicados_por_aplicante = consumirServicio($puestos_aplicados_url, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t\t\t$aplicacion_encontrada = false;\n\t\t\t\t\t\t\t\t\tforeach ($puestos_aplicados_por_aplicante->results as $key => $value) {\n\t\t\t\t\t\t\t\t\t\tforeach ($value as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t\t\tif($nid_puesto == (int)$value2->Nid){\n\t\t\t\t\t\t\t\t\t\t\t\t$aplicacion_encontrada = true;\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}\n\n\t\t\t\t\t\t\t\t\t// Obtener todos los puestos aplicados por el aplicante\n\t\t\t\t\t\t\t\t\t$puestos_aplicados_url = base_url('/rrhh/api/puestos/puestos_aplicados_por_aplicante.xml?uid='.$uid_aplicante);\n\t\t\t\t\t\t\t\t\t$puestos_aplicados = consumirServicio($puestos_aplicados_url, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t\t\t//validar si el puesto esta asignado al usuario, de lo contrario se realizara una auto asignacion\n\t\t\t\t\t\t\t\t\tif($aplicacion_encontrada){\n\t\t\t\t\t\t\t\t\t\t//validar preselecciones\n\t\t\t\t\t\t\t\t\t\t$listado_puestos = array();\n\t\t\t\t\t\t\t\t\t\tforeach ($puestos_aplicados->items as $value) {\n\t\t\t\t\t\t\t\t\t\t\tforeach ($value->item as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t\t\t\t$puesto = $value2;\n\t\t\t\t\t\t\t\t\t\t\t\tarray_push($listado_puestos, array('estado' => (string)$puesto->tid_estado));\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$count_preselecciones = 0;\n\t\t\t\t\t\t\t\t\t\tforeach ($listado_puestos as $key => $value) {\n\t\t\t\t\t\t\t\t\t\t\tif($value['estado'] == '29')\n\t\t\t\t\t\t\t\t\t\t\t\t$count_preselecciones++;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif(($count_preselecciones < 1) || (($count_preselecciones == 1) && ($tid_estado != 29))) {\n\n\t\t\t\t\t\t\t\t\t\t\t$user_data = array(\"field_estado\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"und\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$tid_estado => $tid_estado\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"field_ultimo_puesto_aplicado\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"und\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$nid_puesto => $nid_puesto\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\n\t\t\t\t\t\t\t\t\t\t\t//verificar el estado del puesto\n\t\t\t\t\t\t\t\t\t \t\t$estado_puesto_url = base_url().'rrhh/api/puestos/obtener_estado_puesto/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t$resultado_estado_puesto = consumirServicioSinToken($estado_puesto_url, $session_cookie);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$cambiarEstado = false;\n\t\t\t\t\t\t\t\t\t\t\tif($resultado_estado_puesto == '0'){\n\t\t\t\t\t\t\t\t\t\t\t\t$cambiarEstado = true;\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t$actualizar_puesto_url = base_url().'rrhh/api/puestos/actualizar_puesto_temporalmente/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t\t$resultado_puesto_actualizado = consumirServicioSinToken($actualizar_puesto_url, $session_cookie);\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$result = ServicioActualizar($request_url, $user_data, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t\t\t\t\tif($cambiarEstado){\n\t\t\t\t\t\t\t\t\t\t\t\t$actualizar_puesto_url = base_url().'rrhh/api/puestos/actualizar_puesto_temporalmente/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t\t$resultado_puesto_actualizado = consumirServicioSinToken($actualizar_puesto_url, $session_cookie);\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif($result){\n\t\t\t\t\t\t\t\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t\t\t\t\t\t\t\t$data['code'] = $result['httpcode'];\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tif($data['code'] != 200){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data['mensaje'] = $result['mensaje'];\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}else{\n\t\t\t\t\t\t\t\t\t\t\t//no se encontro ninguna aplicacion con el id ingresado desde el url\n\t\t\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t\t\t$data['error'] = 'Ha excedido la cantidad de preselecciones por aplicante';\n\t\t\t\t\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t//validar cantidad de aplicaciones y preselecciones\n\t\t\t\t\t\t\t\t\t\tif((int)count($puestos_aplicados_por_aplicante->results->item) < 3){\n\n\t\t\t\t\t\t\t\t\t\t\t//validar preselecciones\n\t\t\t\t\t\t\t\t\t\t\t$listado_puestos = array();\n\t\t\t\t\t\t\t\t\t\t\tforeach ($puestos_aplicados->items as $value) {\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($value->item as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$puesto = $value2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray_push($listado_puestos, array('estado' => (string)$puesto->tid_estado));\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\n\t\t\t\t\t\t\t\t\t\t\t$count_preselecciones = 0;\n\t\t\t\t\t\t\t\t\t\t\tforeach ($listado_puestos as $key => $value) {\n\t\t\t\t\t\t\t\t\t\t\t\tif($value['estado'] == '29')\n\t\t\t\t\t\t\t\t\t\t\t\t\t$count_preselecciones++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t//exit(var_dump($count_preselecciones));\n\n\t\t\t\t\t\t\t\t\t\t\tif(($count_preselecciones < 1) || (($count_preselecciones == 1) && ($tid_estado != 29))) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t//obtener el estado general, si esta en lista negra se sobreescribe el estado a aplicar\n\t\t\t\t\t\t\t\t\t\t\t\t$estado_general_url = base_url('/rrhh/api/users/obtener_estado_general/retrieve.xml?uid_aplicante='. $uid_aplicante);\n\t\t\t\t\t\t\t\t\t\t\t\t$estado_general = consumirServicio($estado_general_url, $session_cookie, $csrf_token);\n\t\t\t\t\t\t\t\t\t\t\t\t$tid_estado_general = 0;\n\n\t\t\t\t\t\t\t\t\t\t\t\tif(isset($estado_general->item)){\n\t \t\t\t\t\t\t\t\t\t\t\t\tforeach($estado_general->item as $key => $value){\n\t \t\t\t\t\t\t\t\t\t\t\t\t\t$tid_estado_general = $value->tid_estado;\n\t \t\t\t\t\t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\t\t\t\t\tif($tid_estado_general == 28){\n\t \t\t\t\t\t\t\t\t\t\t\t\t$tid_estado = $tid_estado_general;\n\t \t\t\t\t\t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\t\t\t\t\t//$data['message'] = $tid_estado;\n\n\t \t\t\t\t\t\t\t\t\t\t\t//Se realizará una asignacion automática\n\t\t\t\t\t\t\t\t\t\t\t\t$user_data = array(\"field_estado\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"und\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(int)$tid_estado => (int)$tid_estado\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"field_ultimo_puesto_aplicado\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"und\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$nid_puesto => (int)$nid_puesto\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"field_puesto\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"und\" => array()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\n\t\t\t\t\t\t\t\t\t\t\t\t$listado_puestos = array();\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($puestos_aplicados->items as $value) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($value->item as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$puesto = $value2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$listado_puestos[(string)$puesto->nid_puesto] = (int)$puesto->nid_puesto;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t//asignar el arreglo de los puestos aplicados junto con el que hay que agregar\n\t\t\t\t\t\t\t\t\t\t\t\t$user_data[\"field_puesto\"][\"und\"] = $listado_puestos;\n\t\t\t\t\t\t\t\t\t\t\t\t$user_data[\"field_puesto\"][\"und\"][$nid_puesto] = $nid_puesto;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t//exit(var_dump($user_data));\n\n\t\t\t\t\t\t\t\t\t\t\t\t//verificar el estado del puesto\n\t\t\t\t\t\t\t\t\t\t \t\t$estado_puesto_url = base_url().'rrhh/api/puestos/obtener_estado_puesto/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t\t$resultado_estado_puesto = consumirServicioSinToken($estado_puesto_url, $session_cookie);\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\t$cambiarEstado = false;\n\t\t\t\t\t\t\t\t\t\t\t\tif($resultado_estado_puesto == '0'){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cambiarEstado = true;\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$actualizar_puesto_url = base_url().'rrhh/api/puestos/actualizar_puesto_temporalmente/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$resultado_puesto_actualizado = consumirServicioSinToken($actualizar_puesto_url, $session_cookie);\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t$result = ServicioActualizar($request_url, $user_data, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t\t\t\t\t\tif($cambiarEstado){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$actualizar_puesto_url = base_url().'rrhh/api/puestos/actualizar_puesto_temporalmente/retrieve?nid_puesto=' . $nid_puesto . '.xml';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$resultado_puesto_actualizado = consumirServicioSinToken($actualizar_puesto_url, $session_cookie);\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t// cURL - utiliza el helper SevicioActualizar\n\t\t\t\t\t\t\t\t\t\t\t\t//$result = ServicioActualizar($request_url, $user_data, $session_cookie, $csrf_token);\n\n\t\t\t\t\t\t\t\t\t\t\t\tif($result){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data['code'] = $result['httpcode'];\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data['mensaje'] = 'Se ha aplicado satisfactoramiente al puesto con el id: ' . $nid_puesto;\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($data['code'] != 200){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$data['mensaje'] = $result['mensaje'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t//no se encontro ninguna aplicacion con el id ingresado desde el url\n\t\t\t\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t\t\t\t$data['error'] = 'Ha excedido la cantidad de preselecciones por aplicante';\n\t\t\t\t\t\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t//no se encontro ninguna aplicacion con el id ingresado desde el url\n\t\t\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t\t\t$data['error'] = 'No es posible realizar la aplicación, se ha excedido el máximo permitido de 3 puestos por usuario';\n\t\t\t\t\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//no se encontro ninguna aplicacion con el id ingresado desde el url\n\t\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t\t$data['error'] = 'Has ingresado un codigo de estado incorrecto, favor verifique';\n\t\t\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t//no se pudo validar que el aplicante sea nacional\n\t\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t\t$data['error'] = 'El usuario aplicante con el id #'.$uid_aplicante. ', no es es permitido para hacer la asignación';\n\t\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t\t$data['error'] = 'Error: El puesto con el identificador #'.$nid_puesto.', no pertenece al usuario: '.$_POST['mail'];\n\t\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//no se pudo validar que el aplicante sea nacional\n\t\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t\t$data['error'] = 'No existe el aplicante con el codigo: '.$uid_aplicante.', por favor verifique';\n\t\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t//no se pudo validar que el aplicante sea nacional\n\t\t\t\t\t$data['success'] = false;\n\t\t\t\t\t$data['error'] = 'No existe el puesto con el codigo: '.$nid_puesto.', por favor verifique';\n\t\t\t\t\t$data['code'] = '406';\n\t\t\t\t}\t\t\t\n\n\t\t\t} else {\n\t\t\t\t//mensaje de error al fallar la autenticacion\n\t\t\t\t$data['success'] = false;\n\t\t\t\t$data['error'] = $auth_data['mensaje'];\n\t\t\t\t$data['code'] = '406';\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t\t$data['response'] = $data;\n\t\t\t$this->load->view('user/user-response', $data);\n \t}", "function getListaPermissoesTransacoes($usuID) {\n\n\t\t$this->setLsMapeamento(\n\t\t\tarray(\t'pe_id' => 'ID',\n\t\t\t\t\t'tr_id' => 'transacaoID',\n\t\t\t\t\t'tr_nome'=>'nomeTransacao',\n\t\t\t\t\t'pe_permissao'=>'permissao',\n\t\t\t\t\t'tr_m' =>'m',\n\t\t\t\t\t'tr_u' => 'u', \n\t\t\t\t\t'tr_a' => 'a',\n\t\t\t\t\t'tr_acao'=>'acao',\n\t\t\t\t\t'tr_permissao_default'=>'permissaoDefault',\n\t\t\t\t\t'tr_tr_agregadora' => 'transacaoAgregadoraID'\n\t\t));\n\n\n\t\t$vo = new VOGenerico(array_values($this->getLsMapeamento()));\n\n\t\t$this->setVO($vo);\n\n\t\t$q = new DBQuery();\n\t\t$q->addTable('tb_sys_permissao_usuario','pu');\n\t\t$q->addTable('tb_sys_permissao','p');\n\t\t$q->addTable('tb_sys_transacao','t');\n\t\t$q->addWhere('pu.pu_usu_id = ?');\n\t\t$q->addWhere('pu.pu_id = p.pe_id');\n\t\t$q->addWhere('p.pe_tr_id = t.tr_id');\n\t\t$q->addWhere('length(t.tr_nome) > 0');\n//\t\t$q->addWhere('t.tr_id in ('.join(\",\",$lsIDs).')');\n\t\t$q->setVO($vo);\n\t\t$q->setMapaVO(array_keys($this->getLsMapeamento()));\n\t\t$sql = $q->prepareSelect();\n\t\t\n//\t\techo join(\",\",$lsIDs);\n//\t\techo $sql; exit;\n\n\t\t$lista = $this->listar($sql,array($usuID));\n\n\t\treturn $lista;\n\t}", "public function UserRequest(){\n\t\t \t\n\t\t\t $user = $this->Model->find(\"first\", array(\n 'conditions' => array('ip' => $this->IP),\n 'order' => 'id DESC'\n ));\n\t\t\t\n\t\t\t// si l'adresse existe \n\t\t\t\n\t\t\tif ( !empty($user) ){\n\t\t\t\t\n\t\t\t\t $temp = explode(\"-\", $user['Analytique']['date_visit']);\n\t\t\t\t\n\t\t\t\t//on recupere le nouveau temps de session\n $newTime = $this->Time['hours']*60 + $this->Time['minutes'];\n\t\t\t\t\n\t\t\t\tif ( ( $newTime - $user['Analytique']['time_en_minute'] ) > $this->TimeOut || $temp[0] < $this->Time['mday'] || $temp[1] < $this->Time['mon']) {\n\n \n \n \n //on fait un input de l'adresse\n\t\t\t $this->request->data['ip'] = $this->IP; \n\t\t\t \n\t\t\t // on fait un input de l'heure de le connection\n\t\t\t $this->request->data['time'] = $this->Time['hours'].':'. $this->Time['minutes']; \n\t\t\t \n\t\t\t // on fait un input de l'heure de le connection converti minutes en pour des besoins de calculs\n\t\t\t $this->request->data['time_en_minute'] = $this->Time['hours']*60 + $this->Time['minutes'];\n\t\t\t \n\t\t\t // on fait un input de la date de la visite\n\t\t\t $this->request->data['date_visit'] = $this->Time['mday'] . \"-\" . $this->Time['mon'] . \"-\" . $this->Time['year']; \n\t\t\t \n // initialisation de la classe . avant toute sauvegarde de données\n\t\t\t $this->Model->create(); \n\t\t\t \n // on sauvegarde les données en base.\n $this->Model->save($this->data);\n }\n\t\t\t\t\n\t\t\t\tprint_r($temp);\n\t\t\n\t\t\techo \" Trouvé\";\n\t\n\t\t\t} else { // si l'adresse n'est pas en base\n\t\t\t\t\n\t\t echo \"Non Trouvé\";\n\t\t\t \n\t\t\t //on fait un input de l'adresse\n\t\t\t $this->request->data['ip'] = $this->IP; \n\t\t\t \n\t\t\t // on fait un input de l'heure de le connection\n\t\t\t $this->request->data['time'] = $this->Time['hours'].':'. $this->Time['minutes']; \n\t\t\t \n\t\t\t // on fait un input de l'heure de le connection converti minutes en pour des besoins de calculs\n\t\t\t $this->request->data['time_en_minute'] = $this->Time['hours']*60 + $this->Time['minutes'];\n\t\t\t \n\t\t\t // on fait un input de la date de la visite\n\t\t\t $this->request->data['date_visit'] = $this->Time['mday'] . \"-\" . $this->Time['mon'] . \"-\" . $this->Time['year']; \n\t\t\t \n\t\t\t // initialisation de la classe . avant toute sauvegarde de données\n\t\t\t $this->Model->create(); \n\t\t\t \n // on sauvegarde les données en base.\n $this->Model->save($this->data); \n\t\t\t}\n\t\t }", "private function consultar_usuario_por_nombre() {\n $sentencia = \"select id,nombrecompleto ,correo,token \"\n . \"from usuario u where u.nombrecompleto ilike '%{$this->referencia_a_buscar}%'; \";\n $this->respuesta = $this->obj_master_select->consultar_base($sentencia);\n }", "public static function TraerTodos(): array\n {\n $tablaUno = 'usuarios';\n $tablaDos = 'perfiles';\n\n $listaUsuarios = array();\n\n $objetoAccesoDatos = AccesoDatos::RetornarObjetoAcceso();\n\n $consulta = $objetoAccesoDatos->RetornarConsulta(\"SELECT $tablaUno.id, $tablaUno.nombre, $tablaUno.correo,\n $tablaUno.clave,$tablaDos.descripcion AS perfil,$tablaUno.id_perfil \n FROM $tablaUno \n INNER JOIN $tablaDos \n ON $tablaUno.id_perfil = $tablaDos.id\");\n\n $consulta->execute();\n\n while($fila = $consulta->fetch(PDO::FETCH_OBJ)){\n $empleado = new Usuario($fila->id,\n $fila->nombre,\n $fila->correo,\n $fila->clave,\n $fila->id_perfil,\n $fila->perfil);\n\n array_push($listaUsuarios,$empleado);\n }\n\n \n\n return $listaUsuarios;\n }", "private function respuesta_preguntas($id){\n\n\t\t$user = $this->session->userdata('cliente_id');\n\n\t\t$this->load->model('clientes_model');\n\n\t\t$cliente = $this->clientes_model->get_by(array('c.id' => $user));\n\n\t\t//Responder pregunta del usuario\n\n\t\t$mensaje[] = applib::get_field(applib::$res_cualidades_table,array('id' => $id),'respuesta');\n\n\t\t//Buscar las preguntas que aun no han sido respondidas al usuario\n\n\t\t$this->load->model('cualidades_model');\n\n\t\t$data['cualidades'] = $this->cualidades_model->get_faltantas($cliente['proyecto_id']);\n\t\t\n\t\t$data['msg'] = '¿Deseas saber algo más?';\n\n\t\t$mensaje[] = \"sin_fondo\";\n\n\t\t$mensaje[] = $this->load->view('frontend/comunes/mas_pregutas',$data,true);\n\n\t\t$sin_fondo = 0;\n\n\t\tforeach ($mensaje as $key => $value) {\n\t\t\t\t\t\t\n\t\t\tif($value == \"sin_fondo\"){\n\t\t\t\t$sin_fondo = 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$data_in = array(\n\t\t 'from_id' \t=> 0,\n\t\t 'to_id' \t=> $user,\n\t\t 'mensaje' => $value,\n\t\t 'sin_fondo' => $sin_fondo,\n\t\t 'date'\t\t=> applib::fecha()\n\t\t );\n\n\t applib::create(applib::$mensajes_table,$data_in);\n\t\t}\n\n\t\treturn true;\n\t}", "public function vacation_registerPT() {\n\t\t$colaboradores=$this->user_model->getPagination(null);\n\n\t\tforeach ($colaboradores as $colaborador):\n\t\t\t\n\t\t\t$aniversario = date('m-d',strtotime($colaborador->fecha_ingreso));\n\n\t\t\t$ingreso = new DateTime($colaborador->fecha_ingreso);\n\t\t\t$hoy = new DateTime(date('Y-m-d'));\n\t\t\t$diferencia = $ingreso->diff($hoy);\n\t\t\t$ingreso->add(new DateInterval('P'.$diferencia->y.'Y'));\n\t\t\t$actualidad = new DateTime($ingreso->format('Y-m-d'));\n\t\t\t$actualidad->add(new DateInterval('P18M'));\n\t\t\t$caducidad = $actualidad->format('Y-m-d');\n\t\t\t\n\t\t\techo $colaborador->id.\"<br>\".$colaborador->nombre.\"<br>Ingreso: \".$colaborador->fecha_ingreso.\"<br>Años: \".$diferencia->y.\"<br>Cumplimiento: \".$ingreso->format('Y-m-d').\"<br>Caducidad: \".$caducidad.\"<br><br>\";\n//-----------------------------\n\t\t\t/*echo \"<br>\".$colaborador->id.\"<br>\".$colaborador->nombre.\"<br>Ingreso: \".$colaborador->fecha_ingreso;\n\t\t\t$fecha = new DateTime($colaborador->fecha_ingreso);\n\n\t\t\t$hoy = new DateTime(date('Y-m-d'));\n\n\t\t\t\n\t\t\t$diff = $fecha->diff($hoy);\n\n\t\t\t$fecha->add(new DateInterval('P'.$diff->y.'Y'));\n\t\t\techo \"<br>Cumplimiento: \".$fecha->format('Y-m-d').\"<br> Años: \".$diff->y.\"<br>\";\n\t\t\t//echo \"<br>\".$diff->y;\n\n\t\t\t$fv = new DateTime($fecha->format('Y-m-d'));\n\t\t\t$fv->add(new DateInterval('P18M'));\n\t\t\techo \"Caducidad: \".$fv->format('Y-m-d').\"<br>\";*/\n\t\t\t//echo strtotime('+18 month',strtotime($colaborador->fecha_ingreso)).\"<br>\";\n\n\t\t\t/*$fecha = new DateTime($colaborador->fecha_ingreso);\n\t\t\t\t\techo $fecha->add(new DateInterval('P18M'))->format('Y-m-d').\"<br>\";*/\n\t\t// ---------------------------\n\n\t\t\tif($aniversario == date('m-d')):\n\n\t\t\t\t$ingreso=new DateTime($colaborador->fecha_ingreso);\n\t\t\t\t$hoy=new DateTime(date('Y-m-d'));\n\t\t\t\t$diff = $ingreso->diff($hoy);\n\t\t\t\t\n\t\t\t\tswitch ($diff->y):\n\t\t\t\t\tcase 0: $dias=0;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1: $dias=6;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2: $dias=8;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3: $dias=10;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4: $dias=12;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:case 6:case 7:case 8:case 9: $dias=14;\t\t\tbreak;\n\t\t\t\t\tcase 10:case 11:case 12:case 13:case 14: $dias=16;\t\tbreak;\n\t\t\t\t\tcase 15:case 16:case 17:case 18:case 19: $dias=18;\t\tbreak;\n\t\t\t\t\tcase 20:case 21:case 22:case 23:case 24: $dias=20;\t\tbreak;\n\t\t\t\t\tdefault: $dias=22;\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tendswitch;\n\t\t\t\t\n\t\t\t\t$ingreso = new DateTime($colaborador->fecha_ingreso);\n\t\t\t\t$hoy = new DateTime(date('Y-m-d'));\n\t\t\t\t$diferencia = $ingreso->diff($hoy);\n\t\t\t\t$ingreso->add(new DateInterval('P'.$diferencia->y.'Y'));\n\t\t\t\t$actualidad = new DateTime($ingreso->format('Y-m-d'));\n\t\t\t\t$actualidad->add(new DateInterval('P18M'));\n\t\t\t\t$caducidad = $actualidad->format('Y-m-d');\n\n\t\t\t\tif($acumulados = $this->solicitudes_model->getAcumulados($colaborador->id)){\n\t\t\t\t\t\n\t\t\t\t\t/*$datos['dias_dos']=$dias;\n\t\t\t\t\t$datos['vencimiento_dos'] = strtotime('+18 month',strtotime($colaborador->fecha_ingreso));\n\t\t\t\t\t$datos['dias_acumulados'] = (int)$acumulados->dias_acumulados + (int)$dias;*/\n\n\t\t\t\t\t$datos['dias_dos'] = $dias;\n\t\t\t\t\t$datos['vencimiento_dos'] = $caducidad;\n\t\t\t\t\t$datos['dias_acumulados'] = (int)$acumulados->dias_acumulados + (int)$dias;\n\t\t\t\t\n\t\t\t\t}else{\n\n\t\t\t\t\t/*$datos['dias_uno']=$dias;\n\t\t\t\t\t$datos['vencimiento_uno'] = strtotime('+18 month',strtotime($colaborador->fecha_ingreso));\n\t\t\t\t\t$datos['dias_acumulados'] = $dias;*/\n\n\t\t\t\t\t$datos['dias_uno'] = $dias;\n\t\t\t\t\t$datos['vencimiento_uno'] = $caducidad;\n\t\t\t\t\t$datos['dias_acumulados'] = $dias;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->solicitudes_model->actualiza_dias_vacaciones($colaborador->id,$datos);\n\n\t\t\tendif;\n\n\t\tendforeach;\nexit;\n\t}", "public function verificaAppartenenza(){\n \n $sess_user=$this->session->get_userdata('LOGGEDIN');\n $this->utente=$sess_user[\"LOGGEDIN\"][\"userid\"];\n if(isset($sess_user[\"LOGGEDIN\"][\"business\"])){\n \n $this->azienda=$sess_user[\"LOGGEDIN\"][\"business\"];\n \n \n }\n \n \n }", "public function carregarUltimasNotificacoes(Usuario $usuario) {\n $sql = \"select *\n from notificacoes\n where usuario_id = $1\n and excluida = false\n and data_expiracao >= now()\n order by \\\"data\\\" desc limit 10\";\n \n $p = $this->getConn()->prepare($sql);\n \n // Seta os parãmetros\n $p->setParameter(1, $usuario->getId(), PreparedStatement::INTEGER);\n \n // Pega o resultado\n $rs = $p->getResult();\n \n // Itera sobre o resultado\n $list = array();\n while($rs->next()){\n \n // Monta o objeto \n $list[] = $this->montarNotificacao($rs, $usuario);\n }\n \n // Retorna a lista montada.\n return $list;\n }", "private static function obtenerEventosUsuario($id_usuario)\n {\n try {\n \n //se obtienen los eventos propios\n $consulta = \"SELECT * FROM \" . self::NOMBRE_TABLA_EVENTO . \" E JOIN \" . self::NOMBRE_TABLA_USUARIO . \" U ON U.id_usuario=E.id_usuario WHERE E.id_usuario=?\";\n \n // Preparar sentencia\n $sentencia = ConexionBD::obtenerInstancia()->obtenerBD()->prepare($consulta);\n $sentencia->bindParam(1, $id_usuario);\n \n\n // Ejecutar sentencia preparada\n if ($sentencia->execute()) {\n http_response_code(200);\n return\n [\n \"estado\" => self::EXITO,\n \"datos\" => $sentencia->fetchAll(PDO::FETCH_ASSOC)\n ];\n } else\n throw new ExcepcionApi(self::ERROR_BDD, \"Se ha producido un error\");\n\n } catch (PDOException $e) {\n throw new ExcepcionApi(self::ERROR_BDD, $e->getMessage());\n }\n }", "function get_realizado_pend_por($dni_usu){\n\t$connect=@mysqli_connect(server,user,pass) or die('Database connect error');\n\t@mysqli_select_db($connect,database)or die('Database not found');\n\tmysqli_set_charset($connect, \"utf8mb4\");\n\t\n\t$cons_pers = \"SELECT apellidos_usu,nombres_usu FROM usuario WHERE dni_usu='$dni_usu'\";\n\t$resp_pers = mysqli_query($connect,$cons_pers);\n\t$name = \"\";\n\tif($row = mysqli_fetch_array($resp_pers)){\n\t\t$apellidos = $row['apellidos_usu'];\n\t\t$nombres = $row['nombres_usu'];\n\t\t$name = $nombres.' '.$apellidos;\n\t\t$name = mb_convert_case($name, MB_CASE_UPPER, \"UTF-8\");\n\t}else{\n\t\t$name = \"--\";\n\t}\n\treturn $name;\n}", "function conf__cuadro_pasadas()\r\n\t{\r\n\t\treturn array($this->pasadas_por_solapa);\r\n\t}", "public function get_notpaid_trainee() {\n $matches = array();\n $query_string = htmlspecialchars($_POST['q'], ENT_QUOTES, 'UTF-8');\n $result = $this->classtraineemodel->get_notpaid_user($this->tenant_id, '', $query_string);\n if ($result) {\n foreach ($result as $row) {\n $matches[] = array(\n 'key' => $row->user_id,\n 'label' => $row->first_name . ' ' . $row->last_name . ' (Tax Code: ' . $row->tax_code . ')',\n 'value' => $row->first_name . ' ' . $row->last_name,\n );\n }\n }\n echo json_encode($matches);\n exit();\n }", "function mostrar_preguntas(){\n\n\t\t$user = $this->session->userdata('cliente_id');\n\n\t\t$this->load->model('clientes_model');\n\n\t\t$cliente = $this->clientes_model->get_by(array('c.id' => $user));\n\n\t\t//Buscar las preguntas que aun no han sido respondidas al usuario\n\n\t\t$this->load->model('cualidades_model');\n\n\t\t$data['cualidades'] = $this->cualidades_model->get_faltantas($cliente['proyecto_id']);\n\n\t\t$data['msg'] = 'Para obtener más información, elije una opción.';\n\n\t\t$mensaje = $this->load->view('frontend/comunes/mas_pregutas',$data,true);\n\n\t\t//Enviar mensaje\n\n\t\t$data_in = array(\n\t 'from_id' \t=> 0,\n\t 'to_id' \t=> $user,\n\t 'mensaje' => $mensaje,\n\t 'sin_fondo' => 1,\n\t 'date'\t\t=> applib::fecha()\n\t );\n\n applib::create(applib::$mensajes_table,$data_in);\n\n\t\treturn true;\n\t}", "private function ofertas() {\n\t\t$data = date ( 'Y/m/d' );\n\t\t$params = array (\n\t\t\t\t'OffersUser' => array (\n\t\t\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t\t\t'user_id' => $this->Session->read ( 'userData.User.id' ),\n\t\t\t\t\t\t\t\t'Offer.status' => 'ACTIVE',\n\t\t\t\t\t\t\t\t'Offer.begins_at <= ' => $data,\n\t\t\t\t\t\t\t\t'Offer.ends_at >= ' => $data \n\t\t\t\t\t\t) \n\t\t\t\t),\n\t\t\t\t'Offer' \n\t\t);\n\t\t$contador = $this->Utility->urlRequestToGetData ( 'offers', 'count', $params );\n\t\t\n\t\tif ($this->Session->check ( 'ofertasIds' )) {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'desejos' );\n\t\t} else if (! $contador > 0 && ! $this->Session->check ( 'Ofertas-Assinaturas' )) {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'publico' );\n\t\t} else {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'personalizado' );\n\t\t}\n\t}", "function event_proveerCampos($sNombreReporte, $tuplaSQL)\n {\n global $config;\n $oACL=getACL();\n $input=$apellido=$nombre=$email=\"\";\n\n //echo \"<pre>\";print_r($tuplaSQL);echo \"</pre>\";\n\n switch ($sNombreReporte) {\n case \"CALIFICAR_CALIFICABLES\":\n $apellido=$tuplaSQL['APELLIDO'];\n $nombre=$tuplaSQL['NOMBRE'];\n $fecha_realizacion=$tuplaSQL['FECHA_REALIZACION'];\n $email=$tuplaSQL['EMAIL'];\n $estatus=$tuplaSQL['ESTATUS'];\n\n if($estatus=='T' || $estatus=='V')\n $alumno= \"<a href='\".$this->sBaseURL.\n \"&calificar_calificable=Calificar&id_calificable=\".$tuplaSQL['ID_CALIFICABLE'].\n \"&id_alumno_calificable=\".$tuplaSQL['ID_ALUMNO_CALIFICABLE'].\"'>\".$tuplaSQL['ALUMNO'].\"</a>\";\n else\n $alumno=$tuplaSQL['ALUMNO'];\n\n $puntuacion=$tuplaSQL['PUNTUACION'];\n $sQuery = \" SELECT SUM(puntuacion) \".\n \" FROM ul_alumno_pregunta \".\n \" WHERE id_alumno_calificable='\".$tuplaSQL['ID_ALUMNO_CALIFICABLE'].\"' \".\n \" AND puntuacion IS NOT NULL\";\n $result = $this->oDB->getFirstRowQuery($sQuery);\n if(is_array($result)){\n if(count($result)>0)\n $puntuacion=$result[0];\n }else{\n }\n\n switch($estatus){\n case 'N':\n $estatus='No Realizado';\n break;\n case 'V':\n $estatus=\"<div style='color:#aa5500'>Visto</div>\";\n break;\n case 'T':\n $estatus=\"<div style='color:green;'>Terminado\";\n break;\n case 'A':\n $estatus='Anulado';\n break;\n default:\n $estatus=\"<div style='color:red;'>No Asignado</div>\";\n }\n\n return array(//\"INPUT\" => $input,\n \"ALUMNO\" => $alumno,\n \"APELLIDO\" => $apellido,\n \"NOMBRE\" => $nombre,\n \"EMAIL\" => $email,\n \"FECHA_REALIZACION\" => $fecha_realizacion,\n \"ESTATUS\" => $estatus,\n \"PUNTUACION\" => sprintf(\"%.2f\",$puntuacion),\n \"TOTAL\" => sprintf(\"%.2f\",$puntuacion*$tuplaSQL['PONDERACION']),\n\n );\n default:\n }\n\n return array(//\"INPUT\" => $input,\n \"APELLIDO\" => $apellido,\n \"NOMBRE\" => $nombre,\n \"EMAIL\" => $email,\n );\n }", "public function recuperarClaveUsuario($cedula,$pregunta_secreta,$respuesta_secreta)\r\n\t{\r\n\t\t$admins=array();\r\n\t\ttry{\r\n\t\t\t//realizamos la consulta de todos los items\r\n\t\t\t$consulta = $this->db->prepare(\"select * from administrador WHERE ADMIN_CEDULA='$cedula' AND ADMIN_FK_ID_PRE='$pregunta_secreta' AND ADMIN_RESP_SECRETA='$respuesta_secreta'\");\r\n\t\t\t$consulta->execute();\r\n\t\t\tfor($i=0; $row = $consulta->fetch(); $i++)\r\n\t\t\t{\r\n\t\t $fila['admin_cedula']=$row['ADMIN_CEDULA'];\r\n\t\t\t$fila['admin_pregunta_secreta']=$row['ADMIN_FK_ID_PRE'];\r\n\t\t\t$fila['admin_respuesta_secreta']=$row['ADMIN_RESP_SECRETA'];\r\n\t\t\t$fila['admin_clave']=$row['ADMIN_CONTRASENA'];\r\n\t\t\t$admins[]=$fila;\t\r\n\t\t\t}\r\n\t\t\t//print_r($admins);\r\n\t\t}\r\n\t\t\t\t\r\n\t\tcatch(PDOException $e)\r\n\t\t{\r\n\t\t\techo $e;\r\n\t\t}\r\n\t\treturn $admins;\t\t\r\n\t}", "function get_reptarjcredito_ventas($fecha1, $fecha2, $usuario_id)\r {\r if($usuario_id == 0){\r $cadusuario = \"\";\r }else{\r $cadusuario = \" and v.usuario_id = \".$usuario_id.\" \";\r }\r $egresos = $this->db->query(\"\r select \r concat(v.venta_fecha, ' ', v.venta_hora) as fecha, concat('Venta(TARJ. CREDITO) N°: ', v.venta_id, ', ', if(f.factura_numero>0, concat('Fact.: ',f.factura_numero, ', '),''), 'Cliente: ', c.cliente_nombre) as detalle,\r v.venta_total as ingreso, 0 as egreso,\r 0 as utilidad, 22 as tipo\r from\r venta v\r left join cliente c on v.cliente_id = c.cliente_id\r left join factura f on v.venta_id = f.venta_id\r where\r date(v.venta_fecha) >= '\".$fecha1.\"'\r and date(v.venta_fecha) <= '\".$fecha2.\"'\r and v.forma_id = 4\r \".$cadusuario.\" \r order by v.venta_fecha desc, v.venta_hora desc\r \")->result_array();\r \r return $egresos;\r }", "function consultarUserEmpleado(){\n\t\t\n\t\t$usu=$this->objEmpleado->getUsuario();\n\t\t//SELECT ESTADO FROM `cliente` WHERE `usuario`=\"lili\"\n\t\t$objConexion = new ControlConexion();\n\t\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t\t//$comandoSql=\"SELECT cedula, nombre_tmp, tipoCliente, fechaRegistro, imagen_tmp, email_tmp, telefono_tmp, cupoCredito, contrasena FROM CLIENTE WHERE USUARIO='\".$usu.\"' \";\n\t\t$comandoSql=\"SELECT * FROM EMPLEADO WHERE USUARIO='\".$usu.\"' \";\n\t\t\n\t\t$recordSet=$objConexion->ejecutarSelect($comandoSql);\n\n\t\t \n\t\t\n\t\twhile($registro = $recordSet->fetch_array(MYSQLI_ASSOC)){\n\t\t\n\t\t\t$this->objEmpleado->setNombre($registro[\"nombre\"]);\n\t\t\t$this->objEmpleado->setCedula($registro[\"cedula\"]);\n\t\t\t$this->objEmpleado->setFechaIngreso($registro[\"fechaIngreso\"]);\n\t\t\t$this->objEmpleado->setFechaRetiro($registro[\"fechaRetiro\"]);\n\t\t\t$this->objEmpleado->setSalarioBasico($registro[\"salarioBasico\"]);\n\t\t\t$this->objEmpleado->setDeducciones($registro[\"deducciones\"]);\n\t\t\t$this->objEmpleado->setFoto($registro[\"foto\"]);\n\t\t\t$this->objEmpleado->setHojaVida($registro[\"hojaVida\"]);\n\t\t\t$this->objEmpleado->setEmail($registro[\"email\"]);\n\t\t\t$this->objEmpleado->setTelefono($registro[\"telefono\"]);\n\t\t\t$this->objEmpleado->setCelular($registro[\"celular\"]);\n\t\t\t$this->objEmpleado->setEstado($registro[\"estado\"]);\n\t\t\t$this->objEmpleado->setContrasena($registro[\"contrasena\"]);\n\t\t\t$this->objEmpleado->setNombreTmp($registro[\"nombre_tmp\"]);\n\t\t\t$this->objEmpleado->setFotoTmp($registro[\"foto_tmp\"]);\n\t\t\t$this->objEmpleado->setHojaVidaTmp($registro[\"hojaVida_tmp\"]);\n\t\t\t$this->objEmpleado->setEmailTmp($registro[\"email_tmp\"]);\n\t\t\t$this->objEmpleado->setTelefonoTmp($registro[\"telefono_tmp\"]);\n\t\t\t$this->objEmpleado->setCelularTmp($registro[\"celular_tmp\"]);\n\n\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t$objConexion->cerrarBd(); \n\t\t\treturn $this->objEmpleado; \t\t\n\t}", "public function dadosUsuarios()\n\t\t{\n\t\t\t$select = \"\n\t\t\t\tSELECT id, login, pri_nome, ult_nome, email, permissao\n\t\t\t\tFROM usuario\";\n\t\t\t$result = $this->mysqli->query($select);\n\t\t\tself::checaBuscaVazia($result); // Confere se o select retornou algo\n\n\t\t\twhile($row = $result->fetch_assoc()){\t\t\t\t\t\n\t\t\t\tself::defineNomePermissao($row['permissao']);\n\t\t\t\t// Gera conteudo da tabela\n\t\t\t\t$this->usuarios .= \"\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td id='alinhamento'>\".$row['login'].\"</td>\n\t\t\t\t\t<td id='alinhamento'>\".$row['pri_nome'].\"</td>\n\t\t\t\t\t<td id='alinhamento'>\".$row['ult_nome'].\"</td>\n\t\t\t\t\t<td id='alinhamento'>\".$row['email'].\"</td>\n\t\t\t\t\t<td id='alinhamento'>\".$this->nomPermissao.\"</td>\n\t\t\t\t\t<form method='POST' action='interacao_bd/update_permissao.php'?>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class='form-group'>\t\t\t\n\t\t\t\t\t\t\t\t<select class='form-control' onchange='submitForm(this.form);' name='alt_perm'>\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<option value=''>Permissão</option>\n\t\t\t\t\t\t\t\t\t<option value='1'>Total</option>\n\t\t\t\t\t\t\t\t\t<option value='2'>Média</option>\n\t\t\t\t\t\t\t\t\t<option value='3'>Mínima</option>\n\t\t\t\t\t\t\t\t\t<option value='4'>Nenhuma</option>\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t</div>\t\t\t\t\t\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<input name='id' type=hidden value='\".$row['id'].\"' />\n\t\t\t\t\t</form>\n\t\t\t\t\t<td align='center'><a onclick='deletaUsuario(\".$row['id'].\");' style='cursor: pointer;' class='fas fa-user-times fa-3x'></a></td>\n\t\t\t\t</tr>\";\t\t\t\t\t\t \n\t\t\t}\n\t\t\techo $this->usuarios;\n\t\t}", "public function atualizarUsuarios($idusuario, $nome, $email, $senha, $senha_confirma, $telefone, $dtnascimento, $habilitado, $idpermissao){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT count(*) as total from tbusuarios WHERE email = '$email' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n \n if($senha != $senha_confirma){\n return 2;\n }elseif ($senha == '' || $senha == null && $senha_confirma == '' || $senha_confirma == null ) {\n $sql = \"UPDATE tbusuarios SET nome = '$nome', email='$email', dt_nascimento='$dtnascimento', telefone='$telefone', data_modificado = NOW(), habilitado='$habilitado', idpermissao='$idpermissao' WHERE idusuario = '$idusuario' \";\n echo $this->conexao->query($sql);\n }else{\n $sql = \"UPDATE tbusuarios SET nome = '$nome', email='$email', senha='$senha', senha_confirma='$senha_confirma' dt_nascimento='$dtnascimento', telefone='$telefone', data_modificado = NOW(), habilitado='$habilitado', idpermissao='$idpermissao' WHERE idusuario = '$idusuario' \";\n\n echo $this->conexao->query($sql);\n }\n }", "public function calificarRespuestaUsuario($curs_id, $tall_id,$usua_id,$preg_id, $resp_id)\n {\n $curso = Curso::find($curs_id);\n // Verificamos que el curso exista en bd, si no es así informamos al usuario y redireccionamos.\n if (!isset($curso)) {\n flash('El curso con ID: '.$curs_id.' no existe. Verifique por favor.')->error();\n return redirect()->route('profesor.curso');\n }\n $taller = Taller::find($tall_id);\n // Verificamos que el curso exista en bd, si no es así informamos al usuario y redireccionamos.\n if (!isset($taller)) {\n flash('El taller con ID: '.$tall_id.' no existe. Verifique por favor.')->error();\n return redirect()->route('profesor.curso.ver',['curs_id' => $taller->tall_id]);\n }\n $usuario = User::find($usua_id);\n if (!isset($usuario)) {\n flash('El usuario con ID: '.$usua_id.' no existe. Verifique por favor.')->error();\n return redirect()->route('profesor.curso.taller.ver',['curs_id'=>$curso->curs_id,'tall_id'=>$taller->tall_id]);\n }\n $pregunta = Pregunta::find($preg_id);\n if (!isset($pregunta)) {\n flash('la pregunta con ID: '.$preg_id.' no existe. Verifique por favor.')->error();\n return redirect()->route('profesor.curso.taller.pregunta.respuesta.calificacion.estudiante',['curs_id'=>$curso->curs_id,'tall_id'=>$taller->tall_id,'usua_id'=>$usuario->id]);\n }\n $respuesta = Respuesta::find($resp_id);\n if (!isset($respuesta)) {\n flash('la respuesta con ID: '.$resp_id.' no existe. Verifique por favor.')->error();\n return redirect()->route('profesor.curso.taller.pregunta.respuesta.calificacion.estudiante',['curs_id'=>$curso->curs_id,'tall_id'=>$taller->tall_id,'usua_id'=>$usuario->id]);\n }\n return view('profesor.curso.taller.pregunta.calificacion.hacer_calificacion_estudiante')\n ->with('curso', $curso)\n ->with('taller', $taller)\n ->with('usuario', $usuario)\n ->with('pregunta', $pregunta)\n ->with('respuesta', $respuesta);\n }", "public function infoUsuariosPorProyectoList(){\n\n $usuarios = UsersModel::infoUsuariosPorProyecto(\"usuario\", $_SESSION[\"id_project\"]);\n \n foreach ($usuarios as $row => $item) {\n echo '<option value=\"'.$item[\"Email\"].'\">'.$item[\"Email\"].'</option>'; \n }\n\n }", "public function findTodosLosUsuarios()\n {\n $em = $this->getEntityManager();\n \n $consulta = $em->createQuery('SELECT u FROM UsuarioBundle:Usuario u');\n \n return $consulta->getResult();\n }", "public function recunotas($idempresa){\r\n \t/*\r\n \t$sql = \"(SELECT 'Sistema','',comentario, calificacion, fecha_registro from calificaciones where id_empresa = '$idempresa' and id_clasificacion = '1' \r\n \tand comentario LIKE '%(GENERADO POR EL SISTEMA)%' order by id desc limit 2) UNION ALL (SELECT 'Supervisor',(SELECT username from users \r\n \t\twhere users.id = id_user),comentario, calificacion, fecha_registro from calificaciones where id_empresa = '$idempresa' and id_clasificacion = '1' \r\n \tand comentario NOT LIKE '%(GENERADO POR EL SISTEMA)%' order by id desc limit 1)\";\r\n\t\t*/\r\n\t\t$sql = \"(SELECT 'Sistema','' as 'Usuario',comentario as 'Comentario', calificacion as 'Calificacion', fecha_registro as 'Fecha' from calificaciones where id_empresa = '$idempresa' and id_clasificacion = '1' \r\n \tand comentario LIKE '%(GENERADO POR EL SISTEMA)%' order by id desc limit 2) UNION ALL (SELECT 'Supervisor',(SELECT username from users \r\n \t\twhere users.id = id_user) as 'Usuario',comentario as 'Comentario', calificacion as 'Calificacion', fecha_registro as 'Fecha' from calificaciones where id_empresa = '$idempresa' and id_clasificacion = '1' \r\n \tand comentario NOT LIKE '%(GENERADO POR EL SISTEMA)%' order by id desc limit 1)\";\r\n \treturn db::query(Database::SELECT, $sql)->execute();\r\n }", "public function PregResp() { \n $consulta = $this->ejecutar(\"SELECT * FROM cappiutep.t_usuario_pregunta WHERE pregunta = '$this->Preg' AND respuesta = '$this->Resp' and id_usuario=\".$_SESSION['userTemp'].\" \");\n return $this->setNoTupla( $consulta);\n }", "public function findTodasLasReservas($usuario)\n {\n $em = $this->getEntityManager();\n \n $consulta = $em->createQuery('SELECT r FROM ReservaBundle:Reserva r JOIN r.espacio e WHERE r.usuario = :id ORDER BY r.fecha DESC');\n $consulta->setParameter('id', $usuario); \n \n return $consulta->getResult();\n }", "public static function obtenerNotificaciones()\n {\n //$consulta = \"SELECT * FROM notificaciones WHERE ((estado=0) AND (id_user= ?)) ORDER BY id_notificacion DESC\";\n $consulta = \"SELECT * FROM notificaciones WHERE estado=1 ORDER BY id_notificacion DESC\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n \n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n return false;\n }\n }", "function getConversacion($usuario, $otro_usuario) {\n $usuario_ok = trim(filter_var($usuario, FILTER_SANITIZE_STRING));\n $otro_usuario_ok = trim(filter_var($otro_usuario, FILTER_SANITIZE_STRING));\n $link = crearConexion();\n $query = \"SELECT `usu_remitente`, `usu_destinatario`, `texto`, `censurado` FROM `mensaje` WHERE (mensaje.usu_remitente='$usuario_ok' AND mensaje.usu_destinatario='$otro_usuario_ok') OR (mensaje.usu_destinatario='$usuario' AND mensaje.usu_remitente='$otro_usuario') ORDER BY mensaje.fecha_hora ASC\";\n $result = mysqli_query($link, $query);\n cerrarConexion($link);\n $conversaciones = [];\n while ($linea = mysqli_fetch_array($result)) {\n $conversaciones[] = [$linea['usu_remitente'], $linea['texto'], $linea['censurado']];\n }\n return $conversaciones;\n}", "public function valorhoraAction() {\n\n $em = $this->getDoctrine()->getManager(\"ms_haberes_web\");\n\n //Session\n $session = $this->getRequest()->getSession();\n\n //Seguridad\n $securityContext = $this->get('security.context');\n\n\n if ($this->getUser()->multidep_multi){\n $usuarioDependencia = $this->getUser()->multidep_actual_codigo;\n } else {\n $usuarioDependencia = $this->getUser()->IdEstablecimiento;\n }\n\n $depe = $em->getRepository('LiquidacionesHaberesBundle:HADependencias')->findOneBy(array('id' => $usuarioDependencia));\n\n return array(\n 'depe' => $depe,\n );\n}", "function ListaUsuario() {\n\t\n\t\t\t$sql = \"SELECT usu.*, CONCAT_WS(' ', per.primer_nombre, per.primer_apellido) as nombre_completo, usu.nombre_usuario, rol.descripcion FROM usuario usu\n\t\t\t\t\tINNER JOIN rol rol ON rol.id = usu.rol_id\n\t\t\t\t\tINNER JOIN persona per ON per.id = usu.persona_id\";\n\t\t\t$db = new conexion();\n\t\t\t$result = $db->consulta($sql);\n\t\t\t$num = $db->encontradas($result);\n\t\t\t$respuesta->datos = [];\n\t\t\t$respuesta->mensaje = \"\";\n\t\t\t$respuesta->codigo = \"\";\n\t\t\tif ($num != 0) {\n\t\t\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t\t\t}\n\t\t\t\t$respuesta->mensaje = \"Ok\";\n\t\t\t\t$respuesta->codigo = 1;\n\t\t\t} else {\n\t\t\t\t$respuesta->mensaje = \"No existen registros de roles.\";\n\t\t\t\t$respuesta->codigo = 0;\n\t\t\t}\n\t\t\treturn json_encode($respuesta);\n\t\t}", "public function getUsuario(){\n $sql=\"SELECT id, tipo, tipo_identificacion, numero_identificacion, apellidos, nombres, razon_social, codigo, \n direccion, telefono1, telefono2, celular1, celular2, email1, email2, fecha_nacimiento, profesion, \n actividades, rol, fecha_registro, descripcion FROM ctk_usuario where estado=1\";\n //$sentencia=$this->conexion_db->prepare($sql);\n //$sentencia->execute(array());\n //$resultado=$sentencia->fetchAll(PDO::FETCH_ASSOC);\n //otra opcion \n //$resultado=$this->conexion_db->query($sql)->fetchAll(PDO::FETCH_ASSOC);\n $resultado=$this->conexion_db->query($sql)->fetchAll(PDO::FETCH_OBJ);\n //$sentencia->closeCursor();\n return $resultado;\n $this->conexion_db=null;\n \n //El ejemplo que se encuentra a continuacion realiza la consulta con la libreria mysqli\n /*\n $resultado=$this->conexion_db->query(\"SELECT codigo_ticket, abierto_por, fecha_apertura, fecha_cierre, \n descripcion_evento, tecnico_ctk FROM ctk_ticket WHERE tecnico_ctk='\".$buscar.\"'\");\n $ticket=$resultado->fetch_all(MYSQLI_ASSOC);\n return $ticket;\n */\n }", "public function verPagosUsuario($id){\n $local = Local_User::findorfail($id);\n\n //Validación Encargado, Premium, Bloqueado\n $locales = Local_User::where('user_id', Auth::user()->id)\n ->where('estado', '!=', 'Desvinculado')\n ->where('local_id', $local->local_id)\n ->where('rol', 'Encargado')\n ->first();\n\n if (empty($locales)) {\n session()->flash('danger', 'Usted no tiene privilegios suficientes.');\n return redirect()->action('HomeController@index');\n }elseif($locales->Local->cuenta != 'Premium'){\n session()->flash('danger', 'Opción sólo para locales premium.');\n return redirect()->action('UsuarioController@empaques', ['id' => $local->local_id]);\n }elseif($locales->Local->estado == 'Bloqueado'){\n session()->flash('danger', 'El local se encuentra temporalmente bloqueado.');\n return redirect()->action('UsuarioController@misLocales');\n }\n //fin validación\n\n\n\n $pagos = Pago::where('local_user_id', $id)->orderBy('pagoHasta', 'desc')->paginate(10);\n\n\n if($pagos->count() == 0) {\n session()->flash('danger', 'Aún no se registran pagos');\n return redirect()->route('usuario.local.empaques', ['id' => $local->local_id]);\n //return redirect()->action('UsuarioController@misLocales');\n }else{\n //Query para obtener la última fecha pagada\n $lastPagoHasta = Pago::select('pagoHasta')->where('local_user_id', $id)->orderBy('pagoHasta', 'desc')->take(1)->get();\n\n //editamos la fecha\n $lastPagoHasta = $lastPagoHasta[0]['pagoHasta'] . ' 00:00:00';\n\n //verificamos si la persona tomó un turno después de la última fecha pagada\n $deuda=Planilla_Turno_User::where('local_user_id', $id)->where('created_at', '>', $lastPagoHasta)->count();\n\n //si count es arriba de 0 es porque tomó un turno y aún no paga\n if($deuda > 0 && $local->Local->cuenta == 'Premium'){\n $deuda = \"Si\";\n }else{\n $deuda = \"No\";\n }\n\n $meses = array('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic');\n $months = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');\n\n foreach ($pagos as $pago){\n $pago->fechaPago= date('d-m-Y', strtotime($pago->fechaPago));\n $pago->pagoDesde= str_replace($months, $meses, date('d-M-Y', strtotime($pago->pagoDesde)));\n $pago->pagoHasta= str_replace($months, $meses, date('d-M-Y', strtotime($pago->pagoHasta)));\n }\n return view ('usuario.ver-pagos')\n ->with('pagos', $pagos)\n ->with('local', $local)\n ->with('deuda', $deuda);\n }\n }", "function buscarTipoUsuario(){\n\t$queryUsuario = sprintf(\"SELECT id_usuario, nombre_usuario,\n CONCAT_WS(' ', nombre_empleado, apellido) AS nombre,\n clave_filtro,\n\t\t(CASE clave_filtro\n\t\t\t WHEN 1 THEN 'Ventas'\t\t\n WHEN 2 THEN 'Ventas'\n\t\t\t WHEN 4 THEN 'Postventa'\n WHEN 5 THEN 'Postventa'\n WHEN 6 THEN 'Postventa'\n WHEN 7 THEN 'Postventa'\n WHEN 8 THEN 'Postventa'\n WHEN 26 THEN 'Postventa'\n WHEN 400 THEN 'Postventa'\n\t\tEND) AS tipo\n \n\tFROM pg_usuario\n\t\tINNER JOIN pg_empleado ON pg_usuario.id_empleado = pg_empleado.id_empleado\n\t\tINNER JOIN pg_cargo_departamento ON pg_empleado.id_cargo_departamento = pg_cargo_departamento.id_cargo_departamento\n\tWHERE id_usuario = %s \",\n\tvalTpDato($_SESSION['idUsuarioSysGts'],\"int\"));\n\t\n\t$rsUsuario = mysql_query($queryUsuario);\n\tif (!$rsUsuario) return array(false, mysql_error().\"\\nError Nro: \".mysql_errno().\"\\nLine: \".__LINE__.\"\\n\".$queryUsuario);\n\t$row = mysql_fetch_array($rsUsuario);\n\n\treturn array(true, $row['tipo']);\n}", "public function get_usuario_por_id_ventas($id_usuario)\n {\n\n\n $conectar = parent::conexion();\n parent::set_names();\n\n\n $sql = \"select u.id_usuario,v.id_usuario\n \n from usuarios u \n \n INNER JOIN ventas v ON u.id_usuario=v.id_usuario\n\n\n where u.id_usuario=?\n\n \";\n\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $id_usuario);\n $sql->execute();\n\n return $resultado = $sql->fetchAll(PDO::FETCH_ASSOC);\n }", "public function get_config_usuario($usuario) {\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT t1.*,t2.*,t3.*,t4.*,t5.* \n\t\t\t\t FROM sys_empresa_contrato as t1, \n\t\t\t\t\t\t \t sys_empresa as t2,\n\t\t\t\t\t\t\t sys_contrato as t3,\n\t\t\t\t\t\t\t mod_modulo as t4,\n\t\t\t\t\t\t\t sys_ciudad as t5 \n\t\t\t\t WHERE t1.cod_empresa = t2.cod_empresa AND\n\t\t\t\t\t\t t1.cod_contrato = t3.cod_contrato AND\n\t\t\t\t\t\t\t t1.cod_modulo = t4.cod_modulo AND\n\t\t\t\t\t\t\t t2.cod_ciudad = t5.cod_ciudad AND\n\t\t\t\t\t\t\t t1.cod_estado = 'AAA' AND \n\t\t\t\t\t\t t1.cod_usuario = '\" . $usuario . \"'\";\n $this->get_results_from_query();\n if (count($this->rows) >= 1) {\n foreach ($this->rows as $pro => $va) {\n $this->_empresa[] = array($pro => $va);\n }\n }\n #traemos las notificaciones\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT CONCAT('\" . INI_NOT . \"',\n 'data=',cod_notificacion, ' data-rel=notificaciones',\n\t\t\t\t '\" . MED_NOT . \"', des_notificacion, \n '\" . FIN_NOT . \"') as des_notificacion \n\t\t FROM sys_notificacion \n\t\t\t WHERE cod_estado = 'NAA'\t \n AND cod_usuario = '\" . $usuario . \"'\n ORDER BY cod_notificacion DESC\";\n $this->get_results_from_query();\n $this->_numNotificacion[0] = array('num_notificacion' => 0);\n $this->_notificacion[0] = array('des_notificacion' => \"\");\n if (count($this->rows) >= 1) {\n $this->_numNotificacion[0] = array('num_notificacion' => count($this->rows));\n foreach ($this->rows as $pro => $va) {\n $this->_notificacion[] = $va;\n }\n }\n #traemos los mensajes\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT CONCAT('\" . INI_MSJ . \"', \n\t\t\t\t\t\t\t\t\t 'data=',t1.cod_mensajes,' data-rel=mensajes',\n\t\t\t\t\t\t\t\t\t '\" . MED_MSJ . \"', t2.nom_usuario, \n\t\t\t\t\t\t\t\t\t '\" . MED_MSJ_1 . \"',t1.fec_mensajes,'\" . MED_MSJ_2 . \"',\n\t\t\t\t\t\t\t\t\t SUBSTRING(t1.des_mensajes,1,45) ,'\" . FIN_MSJ . \"') as des_mensajes \n\t\t\t\t FROM sys_mensajes as t1, sys_usuario as t2 \n\t\t\t\t WHERE t1.cod_estado = 'MAA'\t AND\n\t\t\t\t\t\t \t t1.de_cod_usuario = t2.cod_usuario AND \n\t\t\t\t\t\t t1.a_cod_usuario = '\" . $usuario . \"'\";\n $this->get_results_from_query();\n $this->_numMensajes[0] = array('num_mensajes' => 0);\n $this->_mensajes[0] = array('des_mensajes' => \"\");\n if (count($this->rows) >= 1) {\n $this->_numMensajes[0] = array('num_mensajes' => count($this->rows));\n foreach ($this->rows as $pro => $va) {\n $this->_mensajes[] = $va;\n }\n }\n #traemos los menus y submenus\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT CONCAT('\" . INI_NAV . \"', t1.met_menu,\n\t\t\t '\" . MED_NAV . \"', t1.icon_menu,\n\t\t\t\t\t\t\t\t '\" . MED_NAV_1 . \"',t1.nom_menu,\n\t\t\t\t\t\t\t\t '\" . FIN_NAV . \"', '\" . INI_SNAV . \"',\n\t\t\t\t\t\t\t\t fbArmaSubMenu(t1.cod_menu,t3.cod_usuario),'\" . FIN_SNAV . \"') as menu \n FROM sys_menu as t1, sys_usuario_menu as t3 \n\t\t\t\t\t\t WHERE t3.cod_menu = t1.cod_menu and \n\t\t\t\t\t\t\t t3.cod_usuario = '\" . $usuario . \"' \n\t\t\t\t\t ORDER BY t1.cod_indice\";\n $this->get_results_from_query();\n if (count($this->rows) >= 1) {\n foreach ($this->rows as $pro => $va) {\n $this->_menu[] = $va;\n }\n } else {\n $this->_menu[0] = array('menu' => \"\");\n }\n #traemos los menusHeader\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaSubMenuHeader($usuario) as menu_header\";\n $this->get_results_from_query();\n if (count($this->rows) >= 1) {\n foreach ($this->rows as $pro => $va) {\n $this->_menuHeader[] = $va;\n }\n } else {\n $this->_menuHeader[0] = array('menu_header' => \"\");\n }\n #traemos los shortcut\n $this->rows = \"\";\n $this->query = \"\"; \n $this->query = \" SELECT fbArmaSubMenuHeaderShortCut($usuario) as menu_shortcut\";\n $this->get_results_from_query();\n if(count($this->rows) >= 1){\n foreach ($this->rows as $pro=>$va) { \n $this->_menuShorcut[] = $va;\n }\n }else{$this->_menuShorcut[0] = array('menu_shortcut'=>\"\");}\n }", "static public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"ingUsuario\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUsuario\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])){\n\n\t\t\t\t$tabla = \"usuarios\";\n\n\t\t\t\t// $encriptar = crypt($_POST[\"ingPassword\"], '$2a$07$usesomesillystringforsalt$');\n\n\t\t\t\t$item = \"usu_descri\";\n\t\t\t\t$valor = $_POST[\"ingUsuario\"];\n\t\t\t\t$pass = $_POST[\"ingPassword\"];\n\n\t\t\t\t$respuesta = ModeloUsuarios::MdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t// var_dump($respuesta);\n\t\t\t\t// die();\n\n\t\t\t\tif($respuesta[\"usu_descri\"] == $_POST[\"ingUsuario\"] && $respuesta[\"clave\"] == $_POST[\"ingPassword\"])\n\t\t\t\t{\n\n\t\t\t\t\tif($respuesta['estado'] == 'A')\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$_SESSION[\"iniciarSesion\"] = \"ok\";\n\t\t\t\t\t\t$_SESSION[\"id\"] = $respuesta[\"id\"];\n\t\t\t\t\t\t// $_SESSION[\"nombre\"] = $respuesta[\"nombre\"];\n\t\t\t\t\t\t$_SESSION[\"usuario\"] = $respuesta[\"usu_descri\"];\n\t\t\t\t\t\t// $_SESSION[\"foto\"] = $respuesta[\"foto\"];\n\t\t\t\t\t\t// $_SESSION[\"perfil\"] = $respuesta[\"perfil\"];\n\n\t\t\t\t\t\techo '<script>\n\t\n\t\t\t\t\t\twindow.location = \"inicio\";\n\t\n\t\t\t\t\t\t</script>';\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 '<br><div class=\"alert alert-danger\">El usuario no esta activo, porfavor, comuniquese con el administrador</div>';\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\n\t\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo</div>';\n\n\t\t\t\t}\n\n\t\t\t}\t\n\n\t\t}\n\n\t}", "public function ctrIngresoUsuario(){\n\t\tif(isset($_POST[\"ingUsuario\"])){\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/',$_POST[\"ingUsuario\"]) && \n\t\t\t\tpreg_match('/^[a-zA-Z0-9]+$/',$_POST[\"ingPassword\"])){\n\n\t\t\t\t$tabla=\"usuarios\";\n\t\t\t$item=\"usuario\";\n\t\t\t$valor=$_POST[\"ingUsuario\"];\n\t\t\t$respuesta=ModeloUsuarios::MdlMostrarUsuarios($tabla,$item,$valor);\t\n\t\t\t //var_dump($respuesta[\"usuario\"]);\n\t\t\tif($respuesta[\"usuario\"]==$_POST[\"ingUsuario\"] && $respuesta[\"password\"]==$_POST[\"ingPassword\"]){\n\t\t\t\t$_SESSION[\"iniciarSesion\"]=\"ok\";\n\t\t\t\techo '<script>\n\t\t\t\twindow.location=\"inicio\";\n\t\t\t\t</script>';\n\t\t\t}else{\n\t\t\t\techo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelva a intentarlo</div>';\n\t\t\t}\n\t\t}\n\t}\n }", "function get_puestos(){\r\n\r\n $salida=array();\r\n if($this->controlador()->dep('datos')->tabla('cargo')->esta_cargada()){\r\n $datos = $this->controlador()->dep('datos')->tabla('cargo')->get();\r\n //recupera el nodo al que pertenece el cargo\r\n $id_nodo=$this->controlador()->dep('datos')->tabla('cargo')->get_nodo($datos['id_cargo']); \r\n if($id_nodo<>0){\r\n $salida=$this->controlador()->dep('datos')->tabla('puesto')->get_puestos($id_nodo);\r\n }\r\n }\r\n return $salida;\r\n }", "public function usuarios()\n {\n $parametros = Input::only('term');\n\n $data = SisUsuario::with(\"SisUsuariosGrupos\", \"SisUsuariosContactos\")->where(function($query) use ($parametros) {\n $query->where('nombre','LIKE',\"%\".$parametros['term'].\"%\")\n ->orWhere('email','LIKE',\"%\".$parametros['term'].\"%\");\n });\n\n $data = $data->get();\n return $this->respuestaVerTodo($data);\n }", "public function obtenerListaPaises() { \r\n\r\n //objeto que maneja los requerimientos/peticiones\r\n $request = new simpleRest();\r\n //obtiene los datos de la peticion\r\n //$json = $request->getHttpRequestBody();\r\n //objeto que maneja las codificaciones/descodificaciones\r\n $handler = new requestRestHandler();\r\n \r\n //if (filter_var($username, FILTER_VALIDATE_EMAIL)) { \r\n $consulDB = new consultasDB(); \r\n //$this->mostrarRespuesta($this->convertirJson($respuesta), 200); \r\n $responsePaises = $consulDB->obtenerListaPaises();\r\n\r\n //echo $responseUsuario;\r\n //$datosRespuesta = (array)$handler->decodeJson($responsePaises);\r\n $datosRespuesta = $responsePaises;\r\n //$datosRespuesta = $handler->decodeJson($responsePaises);\r\n\r\n if (!isset($datosRespuesta[\"error\"])){\r\n //$respuesta['usuario'] = $username;\r\n $responseObtenerPaises[\"error\"] = \"false\";\r\n $responseObtenerPaises[\"status\"] = \"OK\";\r\n $responseObtenerPaises[\"message\"] = \"SUCCESS\";\r\n $responseObtenerPaises['fecha'] = ObtenerFecha(); //Obtiene la fecha actual\r\n //Aqui se implementa el manejo del token\r\n $responseObtenerPaises[\"respuesta\"] = $datosRespuesta;\r\n\r\n }\r\n else {\r\n //Hay posiblidades: 1 - usuario no existe 2 - clave invalida\r\n $responseObtenerPaises[\"error\"] = \"true\";\r\n $responseObtenerPaises[\"status\"] = \"error\";\r\n $responseObtenerPaises[\"message\"] = $datosRespuesta['error'];\r\n $responseObtenerPaises['fecha'] = \"\";\r\n $responseObtenerPaises[\"respuesta\"] = \"{}\";\r\n }\r\n\r\n $consulDB = null;\r\n //enviar respuesta\r\n return $responseObtenerPaises;\r\n\r\n //}\r\n \r\n }", "public function getProcesosEtapas(){\n log_message('INFO','#TRAZA | #TRAZ-PROD-TRAZASOFT | Etapa | getProcesosEtapas() ');\n\n $empr_id = empresa();\n\n $rsp = $this->Etapas->getProcesosEtapas($empr_id);\n // $rsp['data'] = $this->Etapas->getProcesosEtapas($empr_id)->procesos->proceso;\n \n if(!empty($rsp)){\n // $rsp['status'] = true;\n $rsp['data'] = selectBusquedaAvanzada(false, false, $rsp['data'], 'etapa_etap_id', 'etapa_nombre', false);\n echo json_encode($rsp);\n }else{\n echo json_encode(array(\"status\" => false,\"msj\" => \"No se encontraron etapas\"));\n }\n }", "public function cumpleanos_usuarios(){\n $date_now = date('m-d');\n $data_usua = $this->usuario_model->getUsuarioAll();\n $data_birthday = array();\n if(isset($data_usua)):\n foreach ($data_usua as $key => $usua):\n $usua_date = date('m-d', strtotime($usua->usua_fecha_nacimiento));\n if($date_now === $usua_date):\n $data_birthday[] = $usua;\n endif;\n endforeach;\n endif;\n\n /* REPORTE NRO. 03 QUE CORRESPONDE A LOS CUMPLEAÑOS DEL PERSONAL */\n $data_rexu = $this->reportexusuario_model->getReportexusuarioAllByREMACOD('03');\n $email_cc = '';\n $email_subject = '';\n $email_descripcion = '';\n if(isset($data_rexu)){\n foreach ($data_rexu as $item => $rexu) {\n $rema_id = $rexu->rema_id;\n $usua_id = $rexu->usua_id;\n $usua_nombre = $rexu->usua_nombre;\n $usua_apellido = $rexu->usua_apellido;\n $usua_email = $rexu->usua_email;\n $rema_titulo = $rexu->rema_titulo;\n $rema_descripcion= $rexu->rema_descripcion;\n if($usua_email != ''){\n $email_cc .= ($email_cc === '') ? $usua_email : ','.$usua_email;\n $email_subject = $rema_titulo;\n $email_descripcion = $rema_descripcion;\n }//end if\n }//end foreach\n }//end if\n\n if($email_cc != '' && count($data_birthday) > 0){\n foreach ($data_birthday as $key => $usua):\n $data_palabras_reservadas = array(\n '[CUMPLEANOS]' => $usua->usua_nombre.' '.$usua->usua_apellido\n );\n $email_to = ($usua->usua_email != '') ? $usua->usua_email : $usua->usua_email_personal;\n $email_message = reemplazar_palabras_reservadas($this, $email_descripcion, $data_palabras_reservadas);\n $mail_request = enviar_email($this, $email_to, $email_subject, $email_message, $email_cc);\n endforeach;\n }//end if\n }", "function notificacionAprobacionAgetic_sss() {\n\t\t$datoJSONAgetic = file_get_contents(\"php://input\");\n\t\t// $arrayAgetic = json_decode($datoJSONAgetic, true);\n\t\t// $this->objParam->addParametro('aceptado', $arrayAgetic['aceptado']);\n\t\t// $this->objParam->addParametro('introducido', $arrayAgetic['introducido']);\n\t\t// $this->objParam->addParametro('request_uuid', $arrayAgetic['requestUuid']);\n\t\t// $this->objParam->addParametro('codigo_operacion', $arrayAgetic['codigoOperacion']);\n\t\t// $this->objParam->addParametro('mensaje', $arrayAgetic['mensaje']);\n\t\t// $this->objParam->addParametro('transaction_id', $arrayAgetic['transaction_id']);\n\t\t// $this->objParam->addParametro('fecha_hora_solicitud', $arrayAgetic['fechaHoraSolicitud']);\n\t\t// $this->objParam->addParametro('hash_datos', $arrayAgetic['hashDatos']);\n\t\t// $this->objParam->addParametro('ci', $arrayAgetic['ci']);\n\n\t\t$curl = curl_init();\n\n\t\tcurl_setopt_array($curl, array(\n\t\t CURLOPT_URL => \"https://erp.obairlines.bo/lib/rest/ciudadania_digital/NotificacionSolicitudAprobacion/notificacionAprobacionAgetic\",\n\t\t CURLOPT_RETURNTRANSFER => true,\n\t\t CURLOPT_ENCODING => \"\",\n\t\t CURLOPT_MAXREDIRS => 10,\n\t\t CURLOPT_TIMEOUT => 0,\n\t\t CURLOPT_FOLLOWLOCATION => true,\n\t\t CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t CURLOPT_CUSTOMREQUEST => \"POST\",\n\t\t CURLOPT_POSTFIELDS => $datoJSONAgetic,\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t \"Php-Auth-User: U6H4vXSf2pNP2GI+Fahh9kxAOCbibL07XZI/r3c2FE0=\",\n\t\t \"Pxp-user: breydi.vasquez\",\n\t\t \"Content-Type: application/json\"\n\t\t ),\n\t\t));\n\n\t\t$response = curl_exec($curl);\n\t\t$error = curl_error($curl);\n\n\t\tcurl_close($curl);\n\n\t\t if ($error) {\n\t\t\t $error_service = array('finalizado' => false, 'mensaje' => $err);\n\t\t\t echo json_encode($error_service);\n\t\t } else {\n\t\t\t $data_erp = json_decode($response);\n\t\t\t $data_error = $data_erp->ROOT->error;\n\n\t\t\t if (!$data_error){\n\t\t\t\t $sucess = array('finalizado' => true, 'mensaje' =>$data_erp->ROOT->datos->mensaje);\n\t\t\t\t \techo json_encode($sucess);\n\t\t\t }else{\n\t\t\t\t $error_service = array('finalizado' => false, 'mensaje' => 'Registro de notificacion: '.$data_erp->ROOT->detalle->mensaje);\n\t\t\t\t echo json_encode($error_service);\n\t\t\t }\n\t\t }\n\t}", "public function solicitudesRecibidas(Request $request,$filtro){\n //datos para el filtrado\n $nombre = $request->get('nombre');\n $id_carrera = $request->get('carrera_id');\n $numc = $request->get('numc');\n $roleid = $request->get('role_id');\n\n $visto = ($request->get('visto')) ? true :null;\n \n $id_carreras=UserCarrera::where('identificador',usuario()->identificador)->pluck('carrera_id');\n $carreras = Carrera::whereIn('id',$id_carreras)->get();\n //toma los id de carreras de las cuales tiene permiso\n if(!$id_carrera){\n $id_carrera = $id_carreras;\n }else{\n $id_carrera = array($id_carrera);\n }\n $respuesta = ($filtro == 'pendientes') ? '=' : '!='; \n $permisod = UserAdscripcion::where('identificador','=',usuario()->identificador)->pluck('adscripcion_id');\n $permisod = Adscripcion::whereIn('id',$permisod)->orWhere('tipo','administrativo')->pluck('id');\n\n\n //solicitudes de estudiantes y docentes que no han sido revisadas\n $solicitudes = Solicitud::join('users','solicituds.identificador','=','users.identificador')\n ->leftJoin('recomendacions','solicituds.id','=','recomendacions.id_solicitud')\n ->leftJoin('observaciones',function($join){\n $join->on('observaciones.solicitud_id', '=', 'solicituds.id')\n ->where('observaciones.identificador', '=', usuario()->identificador);\n })\n ->select('solicituds.*','observaciones.voto','observaciones.descripcion','observaciones.visto')\n ->where('recomendacions.respuesta',$respuesta,null)\n ->where(function ($query) use ($id_carrera,$permisod){\n $query->where('solicituds.enviadocoor','=',true)\n ->whereIn('users.carrera_id', $id_carrera)\n ->orWhere(function ($query) use ($permisod){\n $query->where('solicituds.enviado','=',true)\n ->whereIn('users.adscripcion_id',$permisod);});})\n ->whereHas('user', function($query) use ($nombre,$numc,$roleid) {\n $query->nombre($nombre)\n ->identificador($numc)\n ->role($roleid);})\n ->when($filtro == 'pendientes', function($query) use ($visto){\n $query->where('observaciones.visto',$visto);\n })\n ->paginate(5);\n $reuniones = Calendario::whereDate('start','<=',hoy())->orderBy('start','desc')->pluck('start'); \n if($filtro == 'finalizadas'){\n //si se filtran las solicitudes por finalizadas(vistas en reunion) se retorna la vista\n return view('jefe.solicitudesTerminadas',compact('solicitudes','carreras','reuniones'));\n }else{\n if(!$request->get('visto')){\n //si las solicitudes se filtran por recibidas(nuevas solicitudes) y que no han sido vistas\n //se hace un conteo esas solicitudes pendientes para notificar al usuario por si quedan solicitudes pendientes por revisar\n Notificacion::where([['identificador','=',usuario()->identificador],['tipo','=','solicitud']])->update(['num' => $solicitudes->total()]);\n }\n return view('jefe.solicitudesRecibidas',compact('solicitudes','carreras','reuniones'));\n }\n}", "public function select($usuario_has_hojaruta);", "public function getHoras_solicitadas() {\n return $this->horas_solicitadas;\n }", "public function selectIndEventos(string $fechaInicio,string $fechaFin){\n\n \n $this->intIdUser = $_SESSION['idUser'];\n $this->fechaInicio =$fechaInicio;\n $this->fechaFin =$fechaFin;\n\n $noAdmin=\"\";\n $dateRange=\"\";\n\n if($fechaInicio !=\"\" AND $fechaFin !=\"\")\n {\n $dateRange = \" AND l.fecha BETWEEN '$this->fechaInicio' AND '$this->fechaFin'\";\n }\n\n if($_SESSION['idUser']>2)\n {\n $noAdmin=\" AND l.personaid = $this->intIdUser\";\n }\n\n\n $sql=\"SELECT p.idcolaborador,\n CONCAT(p.nombre, ' ', p.apellido) as nombreCompleto,s.empresa,\n COUNT(case when l.tipoevento = 1 then 1 end) as pos,\n COUNT(case when l.tipoevento = 2 then 1 end) as neg,\n COUNT(case when l.tipoevento = 1 or l.tipoevento = 2 then 1 end) as total\n FROM libretalider l\n INNER JOIN colaborador p ON l.colaboradorid = p.idcolaborador\n INNER JOIN persona s ON l.personaid = s.idpersona\n WHERE l.status !=0 $dateRange $noAdmin \n GROUP BY l.colaboradorid\";\n\n $request = $this->select_all($sql);\n return $request;\n\n }", "public function pasar_a_pendientes_enviar()\n\t{\n\n $num_registro = $_REQUEST['num_registro'];\n $code = $_REQUEST['code'];\n $estatus = $_REQUEST['estatus'];\n\n $data_pago = array(\n\n 'estatus' => $estatus\n\n );\n\n $respuesta = false;\n\n //actualizacion de estatus segun la opcion que se selecciono\n $this->db->where('codeorden', $code);\n\n if ($this->db->update('PAGO_MA', $data_pago)){\n\n $consulta_correo_usuario = $this->db->query(\"SELECT correo FROM MA_LOGIN WHERE num_registro = '$num_registro'\");\n $respuesta_correo_usuario = $consulta_correo_usuario->row();\n \n $correo_usuario = $respuesta_correo_usuario->correo;\n\n //data que se enviara a la taba de notificaciones para actualizar la notificacion del usuario\n $data_notificacion = array(\n\n 'correo' => $correo_usuario,\n 'tipo' => $estatus,\n 'num_registro' => $num_registro\n );\n\n //insercion de la notificaicion en la tabla de notificaicones para e usuario \n $this->db->insert('NOTIFICACIONES', $data_notificacion);\n\n //definicion de datos para llamar al servico de envio de correos electronicos de notificacion\n $this->load->model('admin/Correoservice_model');\n\n $respuesta_correo = $this->Correoservice_model->enviar_correo($correo_usuario, $estatus);\n\n //----------------------------\n\n $respuesta = true;\n\n $response = array(\n\n 'respuesta' => $respuesta\n\n );\n\n echo json_encode($response);\n \n }else{\n\n $respuesta = false;\n\n $response = array(\n\n 'respuesta' => $respuesta\n\n );\n\n echo json_encode($response);\n\n }\n \n }", "abstract public function getQueuedSignup($username);", "public function obtenerTiposResiduos(){\n $this->tipoResiduoAccesoDatos->conectar();\n $resultado = $this->tipoResiduoAccesoDatos->obtenerTiposResiduos();\n $this->tipoResiduoAccesoDatos->cerrarConexion();\n return $resultado;\n }", "public function consultarUsuario($parametros)\n {\n //echo \"<h1>$correo -- $contrasena</h1>\";\n // header('Location: ../vistas/index.php');\n\n #LLAMO LA CONEXION PARA PODER CONSULTAR A LA BASE DE DATOS\n $modelo = new Conexion_PDO();\n $conexion = $modelo->get_Conexion_Mysql();\n #PREPARO LA SQL PARA VERIFICAR SI EL USUARIO EXISTE Y ESTA ACTIVO\n $sql = \"SELECT priape,segape,nom from datosiniciales\";\n $statement = $conexion->prepare($sql);\n $statement->execute();\n $resultados = $statement->fetch();\n // VERIFICA SI EL RESULTADO ES DIFERENTE DE VACIO QUIERE DECIR QUE EL CORREO SI EXISTE Y ESTA ACTIVO\n if ($resultados != '') {\n\n echo \"<br>- \"$resultados['priape'];\n echo \"<br>- \"$resultados['segape'];\n echo \"<br>- \"$resultados['nom'];\n return 1;\n\n // $_SESSION['identificacion'] = $dato['numeroid'];\n // $_SESSION['nombre'] = $dato['nombre1'];\n // $_SESSION['apellido'] = $dato['apellido1'];\n // header('location:acceso.php');\n\n } else {\n return 2;\n // echo \"Error, verifica tu usuario y contraseña\";\n // header('location:../index.php');\n }\n\n }", "public function findByUser() {\n try \n {\n $params = $this->app->request()->params();\n $fields = array_to_json($params);\n\n //get request url parmameters\n $offset = isset($fields->offset) ? $fields->offset : 0;\n $limit = isset($fields->limit) ? $fields->limit : 7; \n $receiver = isset($fields->receiver) ? $fields->receiver : 'none'; \n\n $messages = Message::findByUser($offset, $limit, $receiver);\n\n //return finded users\n response_json_data($messages);\n }\n catch(Exception $e) \n {\n response_json_error($this->app, 500, $e->getMessage());\n }\n }", "public function atualizar_outros(Usuario $dados)\n {\n \ttry {\n\t\t \t\n \t\t\t$con = FabricaDeConexao::conexao();\n \t\t\t\n\t\t \t$sqlquery = 'update usuario set nome=:nome,sobrenome=:sobrenome cpf=:cpf,data_nascimento=:data_nascimento,cep=:cep,endereco=:endereco,bairro=:bairro,cidade=:cidade,uf=:uf,telefone_fixo=:telefone_fixo,telefone_movel=:telefone_movel where id =:id;';\n\t\t \t$stmt->$con-> prepare($sqlquery);\n\t\t \t$stmt->bindValue(':nome',$dados->nome);\n\t\t $stmt->bindValue(':sobrenome',$dados->sobrenome);\n\t\t \t$stmt->bindValue(':cpf',$dados->cpf);\n\t\t \t$stmt->bindValue(':data_nascimento',$dados->data_nascimento);\n\t\t \t$stmt->bindValue(':cep',$dados->cep);\n\t\t \t$stmt->bindValue(':endereco',$dados->endereco);\n\t\t \t$stmt->bindValue(':bairro',$dados->bairro);\n\t\t \t$stmt->bindValue(':cidade',$dados->cidade);\n\t\t \t$stmt->bindValue(':uf',$dados->uf);\n\t\t \t$stmt->bindValue(':telefone_fixo',$dados->telefone_fixo);\n\t\t \t$stmt->bindValue(':telefone_movel',$dados->telefone_movel);\n\t\t \t$stmt->bindValue(':id',$dados->id);\n\t\t \t\n\t\t \t$stmt->execute();\n\t\t $rowaf = $stmt->rowCount();\n\t\t \treturn $rowaf;\t\n \t }\n \t catch (PDOException $ex)\n \t {\n \t \techo \"Erro: \".$ex->getMessage();\n \t }\t\n \t \n }", "function generar_report_pendientesxfecha($fechadesde,$fechahasta){\n\t$connect=@mysqli_connect(server,user,pass) or die('Database connect error');\n\t@mysqli_select_db($connect,database)or die('Database not found');\n\tmysqli_set_charset($connect, \"utf8mb4\");\t\n\t\n\t$fechadesde = $fechadesde.\" 00:00:00\";\n\t$fechahasta = $fechahasta.\" 23:59:59\";\n\t\n\t$fecha_desde = orderfecha($fechadesde);\n\t$fecha_hasta = orderfecha($fechahasta);\n\t\n\t$con = \"SELECT id_pend,u.dni_usu AS dni,concat(apellidos_usu,', ',nombres_usu) AS name,desc_pend,fecha_pend,priori_pend,realizado_pend,realizado_por_pend,fecha_realizado_por,fecha_ulti_modifi\n\t\t\tFROM usuario AS u INNER JOIN pendiente AS p\n\t\t\tON u.dni_usu=p.dni_usu WHERE fecha_pend >= '$fechadesde' AND fecha_pend <= '$fechahasta'\n\t\t\tORDER BY fecha_pend DESC\";\n\t$query2 = mysqli_query($connect,$con);\n\t$query = mysqli_query($connect,$con);\n\t\n\tif($fila= mysqli_fetch_array($query2)){\n\t\t$i = 1;\n\t\t$report = \"\n\t\t<br/><center><h4 class='text-info'>Pendientes del $fecha_desde al $fecha_hasta</h4></center><br/>\n\t\t<table class='table table-bordered table-striped'>\n\t\t\t<thead>\n\t\t\t\t<tr class='alert alert-primary'>\n\t\t\t\t\t<th><center>N°</center></th>\n\t\t\t\t\t<th><center>Descripción del pendiente</center></th>\n\t\t\t\t\t<th><center>Fecha Registrado</center></th>\n\t\t\t\t\t<th><center>Fecha Realizado</center></th>\n\t\t\t\t\t<th><center>Registrado por</center></th>\n\t\t\t\t\t<th><center>Realizado por</center></th>\t\t\t\t\t\n\t\t\t\t\t<th><center>Fecha Última Modificación</center></th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\";\n\t\t\n\t\twhile($row= mysqli_fetch_array($query)){\n\t\t\t$id_pend = $row['id_pend'];\n\t\t\t$names = $row['name'];\n\t\t\t$names = mb_convert_case($names, MB_CASE_UPPER, \"UTF-8\");\n\t\t\t$dni = $row['dni'];\n\t\t\t$desc_pend = $row['desc_pend'];\n\t\t\t//$desc_pend = mb_convert_case($desc_pend, MB_CASE_UPPER, \"UTF-8\");\n\t\t\t$fecha_pend = orderfecha($row['fecha_pend']);\n\t\t\t$hora_pend = orderhora($row['fecha_pend']);\t\t\t\n\t\t\t$fecha_realizado_por = orderfecha($row['fecha_realizado_por']);\n\t\t\t$hora_realizado_por = orderhora($row['fecha_realizado_por']);\n\t\t\t$fecha_ulti_modifi = orderfecha($row['fecha_ulti_modifi']);\t\t\t\n\t\t\t$hora_ulti_modifi = orderhora($row['fecha_ulti_modifi']);\t\t\t\n\t\t\t$realizado_por_pend = $row['realizado_por_pend'];\n\t\t\t$realizado_por_pend = get_realizado_pend_por($realizado_por_pend);\n\t\t\t$report = $report.\"\n\t\t\t\t<tr>\n\t\t\t\t\t<th><center>$i</center></th>\n\t\t\t\t\t<td style='text-transform:uppercase;'>$desc_pend</td>\n\t\t\t\t\t<td><center><small>$fecha_pend<br/>$hora_pend</small></center></td>\n\t\t\t\t\t<td><center><small>$fecha_realizado_por<br/>$hora_realizado_por</small></center></td>\n\t\t\t\t\t<td><center><small>$names</small></center></td>\n\t\t\t\t\t<td><center><small>$realizado_por_pend</small></center></td>\t\t\t\t\t\n\t\t\t\t\t<td><center><small>$fecha_ulti_modifi<br/>$hora_ulti_modifi</small></center></td>\n\t\t\t\t</tr>\n\t\t\t\";\n\t\t\t$i++;\n\t\t}\n\t\t$report = $report.\"</tbody></table>\";\t\t\t\t\t\t\t\n\t}else{\n\t\t$report = \"\n\t\t<tr>\n\t\t\t<td colspan='6'><h5 class='text-info'>No hay Registros.</h5><p class='text-info'>No se registraron pendientes en esta fecha.</p></td>\n\t\t</tr>\";\t\n\t}\n\treturn $report;\n}", "function evt__procesar(){\n $m = $this->dep('datos')->tabla('mesa')->get();\n $p = array_search('junta_electoral', $this->s__perfil);\n if($p !== false){//Ingreso con perfil junta_electoral\n $m['estado'] = 3;//Cambia el estado de la mesa a Confirmado\n }\n else{\n $p = array_search('secretaria', $this->s__perfil);\n if($p !== false){//Ingreso con perfil secretaria\n $m['estado'] = 4;//Cambia el estado de la mesa a Definitivo\n }\n else{\n $p = array_search('autoridad_mesa', $this->s__perfil); \n if($p !== false){//Ingreso con perfil autoridad de mesa\n $m['estado'] = 1;//Cambia el estado de la mesa a Cargado\n }\n }\n }\n $this->dep('datos')->tabla('mesa')->set($m);\n// print_r($m['id_mesa']);\n $this->dep('datos')->tabla('mesa')->sincronizar();\n $this->dep('datos')->tabla('mesa')->resetear();\n \n \n if(isset($this->s__retorno)){//debe retornar a confirmar\n if($this->s__retorno_estado=='')\n $dato = true;\n else\n $dato['f'] = $this->s__retorno_estado;\n toba::vinculador()->navegar_a(\"\",$this->s__retorno,$dato); \n $this->s__retorno = null; \n $this->s__id_mesa = null;\n $this->s__retorno_estado = null;\n }\n }", "public function exposConEntrada(){\n\t\t$query = sprintf(\"SELECT * FROM Eventos EV, Entradas EN WHERE EV.id=EN.id_evento AND EN.id_usuario=%d\", $this->id);\n\t\t$obras = self:: consulta($query);\n\t\treturn $obras;\n\t}", "public function ConsultarCuentaTabla(){\n $conn = new conexion();\n $cuenta = null;\n try {\n if($conn->conectar()){\n $str_sql = \"SELECT usuarios.nom_usu,usuarios.id_usu,usuarios.telefono,usuarios.usuario,usuarios.email,usuarios.foto,\"\n . \"tp_usuarios.nom_tp as tipo,usuarios.id_usu from usuarios INNER JOIN tp_usuarios \"\n . \"where usuarios.id_tp_usu = tp_usuarios.id_tp and usuarios.id_tp_usu <> 1 \"\n . \"and estado = 'Activo' and usuarios.id_tp_usu <> 7\";\n \n $sql = $conn->getConn()->prepare($str_sql);\n $sql->execute();\n $resultado = $sql->fetchAll();\n foreach ($resultado as $row){\n $user = new Usuario();\n $user->mapear1($row);\n $cuenta[] = array(\n \"Nom_usu\" => $user->getNom_usu(),\n \"Usuario\" => $user->getUsuario(),\n \"Email\" => $user->getEmail(),\n \"Telefono\" => $user->getTelefono(),\n \"Foto\" => $user->getFoto(),\n \"Cedula\" => $row['id_usu'],\n \"Tipo\" => $row['tipo'],\n \"Idusu\" => $row['id_usu'] \n );\n }\n }\n } catch (Exception $exc) {\n $cuenta = null;\n echo $exc->getMessage();\n }\n $conn->desconectar();\n return $cuenta;\n }", "public function listarPreg(){\n $consulta = $this->ejecutar(\"SELECT * FROM cappiutep.t_usuario_pregunta WHERE id_usuario = '$this->IdUser'\");\n while($data = $this->getArreglo($consulta))$datos[] = $data;\n return $datos;\n }" ]
[ "0.5754443", "0.5677742", "0.55700296", "0.55545425", "0.55489993", "0.55196035", "0.54139775", "0.5409251", "0.53799605", "0.5353195", "0.5329974", "0.53286475", "0.5309771", "0.52992225", "0.5289152", "0.525164", "0.52515817", "0.52502316", "0.5237465", "0.52350396", "0.5201782", "0.51949304", "0.51884097", "0.5182288", "0.5177012", "0.51762927", "0.51660585", "0.51615393", "0.51536995", "0.5152629", "0.5141373", "0.5132727", "0.51184976", "0.5108869", "0.50989777", "0.5092348", "0.5089925", "0.50877136", "0.5074849", "0.5065724", "0.5064662", "0.5059174", "0.5037847", "0.5037123", "0.50362206", "0.5025357", "0.50165033", "0.50118583", "0.5011024", "0.5007707", "0.5007609", "0.5006904", "0.4999949", "0.49970123", "0.49967608", "0.49854407", "0.49836487", "0.49808773", "0.4972037", "0.49665007", "0.4964079", "0.49603456", "0.49589258", "0.49586895", "0.49577364", "0.4957496", "0.49547294", "0.49536988", "0.49412778", "0.49324363", "0.4931131", "0.49307284", "0.4921284", "0.49192667", "0.49180537", "0.49131688", "0.49075776", "0.49054828", "0.49048278", "0.49015233", "0.4901102", "0.4899805", "0.48997644", "0.48930117", "0.4889854", "0.48851526", "0.48785332", "0.48778477", "0.48772463", "0.48688173", "0.48658827", "0.48658392", "0.48642594", "0.48587328", "0.48528302", "0.4849313", "0.48477", "0.48471624", "0.48469794", "0.48434326", "0.48415554" ]
0.0
-1
echo ''; print_r($_POST); echo '';
function check_coop_pay_some() { if($_POST['type_report'] == '1'){ $where_data = ''; if($_POST['department']!='' && $_POST['department']!=0){ $where_data .= " AND t3.department = '".$_POST['department']."'"; } if($_POST['faction']!='' && $_POST['faction'] != 0){ $where_data .= " AND t3.faction = '".$_POST['faction']."'"; } if($_POST['level']!='' && $_POST['level']!=0){ $where_data .= " AND t3.level = '".$_POST['level']."'"; } $month = $_POST['month']; $year = $_POST['year']; $date_start = ($year-543)."-".sprintf("%02d",@$month)."-01"; $this->db->select(array(' t1.member_id, t1.deduct_code, t1.pay_amount, t1.real_pay_amount, t1.loan_id, t1.loan_atm_id, IF ( t4.department_old IS NULL, t3.department, t4.department_old ) AS department, IF ( t4.faction_old IS NULL, t3.faction, t4.faction_old ) AS faction, IF ( t4.level_old IS NULL, t3.level, t4.level_old ) AS level ')); $this->db->from('coop_finance_month_detail AS t1'); $this->db->join('coop_finance_month_profile AS t2','t1.profile_id = t2.profile_id','left'); $this->db->join('coop_mem_apply as t3','t1.member_id = t3.member_id','inner'); $this->db->join("( SELECT member_id, department_old, faction_old, level_old, date_move FROM coop_mem_group_move WHERE date_move >= '".$date_start."' GROUP BY member_id ORDER BY date_move ASC ) AS t4","t3.member_id = t4.member_id","left"); $this->db->where("t2.profile_month = '".$month."' AND t2.profile_year = '".$year."' AND t1.pay_amount <> t1.real_pay_amount AND t1.real_pay_amount <> 0 {$where_data}"); $row_data = $this->db->get()->result_array(); //echo $where_data.'<hr>'; //echo $this->db->last_query(); exit; if(!empty($row_data)){ echo "success"; }else{ echo ""; } }else if($_POST['type_report'] == '2'){ $where_data = ''; if($_POST['department']!=''){ $where_data .= " AND t3.department = '".$_POST['department']."'"; } if($_POST['faction']!=''){ $where .= " AND t3.faction = '".$_POST['faction']."'"; } if($_POST['level']!=''){ $where .= " AND t3.level = '".$_POST['level']."'"; } $this->db->select(array( 't1.member_id', 'SUM(t1.non_pay_amount) as non_pay_amount', 't1.finance_month_profile_id', 't3.department', 't5.mem_group_name' )); $this->db->from('coop_non_pay_detail as t1'); $this->db->join('coop_non_pay as t2','t1.non_pay_id = t2.non_pay_id','inner'); $this->db->join('coop_mem_apply as t3','t2.member_id = t3.member_id','inner'); $this->db->join('coop_mem_group as t5','t3.level = t5.id','inner'); $this->db->where("t2.non_pay_month = '".$_POST['month']."' AND t2.non_pay_year = '".$_POST['year']."'"); $this->db->group_by('t1.member_id'); $row_data = $this->db->get()->result_array(); if(!empty($row_data)){ echo "success"; }else{ echo ""; } } else { echo "success"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prp() \r\n{\r\n\tprintarr($_POST, '$_POST:');\r\n}", "function debugPost(){\n foreach ($_POST as $key => $value) {\n echo \"<tr>\";\n echo \"<td>&nbsp\";\n echo $key;\n echo \"</td>\";\n echo \"<td>&nbsp\";\n echo $value;\n echo \"</td>\";\n echo \"</tr><br>\";\n }\n }", "function emptyPost() {\n\t\t$_POST = array();\n\t}", "public static function create()\n {\n print_r($_POST);\n }", "function getPost( $name ) #version 1\n{\n if ( isset($_POST[$name]) ) \n {\n return htmlspecialchars($_POST[$name]);\n }\n return \"\";\n}", "function handle_post($indata) {\n// showDebug('form_class POST:');\n// showArray($indata); \n return;\n }", "function process_post()\r\n{\r\n $myReturn = ''; //set to initial empty value\r\n\r\n foreach($_POST as $varName=> $value)\r\n {#loop POST vars to create JS array on the current page - include email\r\n $strippedVarName = str_replace(\"_\",\" \",$varName);#remove underscores\r\n if(is_array($_POST[$varName]))\r\n {#checkboxes are arrays, and we need to collapse the array to comma separated string!\r\n $myReturn .= $strippedVarName . \": \" . implode(\",\",$_POST[$varName]) . PHP_EOL;\r\n }else{//not an array, create line\r\n $myReturn .= $strippedVarName . \": \" . $value . PHP_EOL;\r\n }\r\n }\r\n return $myReturn;\r\n}", "public function getPostData() :array\n {\n return empty($_POST) ? [] : $_POST;\n }", "function _postn($v) {\r\n $r = isset($_POST[$v]) ? bwm_clean($_POST[$v]) : '';\r\n return $r == '' ? NULL : $r;\r\n}", "function process_post()\n{\n $myReturn = ''; //set to initial empty value\n\n foreach($_POST as $varName=> $value)\n {#loop POST vars to create JS array on the current page - include email\n $strippedVarName = str_replace(\"_\",\" \",$varName);#remove underscores\n if(is_array($_POST[$varName]))\n {#checkboxes are arrays, and we need to collapse the array to comma separated string!\n $myReturn .= $strippedVarName . \": \" . implode(\",\",$_POST[$varName]) . PHP_EOL;\n }else{//not an array, create line\n $myReturn .= $strippedVarName . \": \" . $value . PHP_EOL;\n }\n }\n return $myReturn;\n}", "function debugformdata ( $comment = True)\r\n{\r\n if ( isset ($_REQUEST['debug']) ) {\r\n $comment = empty( $_REQUEST['debug'] );\r\n if ( $comment ) {\r\n echo \"<!--\\n\";\r\n } else {\r\n echo \"<pre>\\n\";\r\n }\r\n\r\n echo \"Request Method: \" . $_SERVER['REQUEST_METHOD'] . \"\\n\";\r\n\r\n if ( $_SERVER['REQUEST_METHOD'] == \"GET\" ) {\r\n echo \"QUERY STRING: \" . $_SERVER['QUERY_STRING'] . \"\\n\";\r\n } else {\r\n echo \"CONTENT LENGTH: \" . $_SERVER['CONTENT_LENGTH'] . \"\\n\";\r\n }\r\n\r\n echo 'Dump of $_REQUEST: ' . \"\\n\";\r\n \r\n print_r ($_REQUEST);\r\n\r\n if ( $comment ) {\r\n echo \"-->\\n\";\r\n } else {\r\n echo \"</pre>\\n\";\r\n }\r\n }\r\n}", "function whatIsHappening() {\n echo '<h2>$_GET</h2>';\n var_dump($_GET);\n echo '<h2>$_POST</h2>';\n echo('<pre>');\n var_dump($_POST);\n echo('</pre>');\n echo '<h2>$_COOKIE</h2>';\n var_dump($_COOKIE);\n echo '<h2>$_SESSION</h2>';\n var_dump($_SESSION);\n echo '<br>';\n}", "function whatIsHappening() {\n echo '<h2>$_GET</h2>';\n var_dump($_GET);\n echo '<h2>$_POST</h2>';\n echo('<pre>');\n var_dump($_POST);\n echo('</pre>');\n echo '<h2>$_COOKIE</h2>';\n var_dump($_COOKIE);\n echo '<h2>$_SESSION</h2>';\n var_dump($_SESSION);\n}", "function prf() \r\n{\r\n\tprintarr($_FILES, '$_FILES:');\r\n}", "public static function allPost()\n {\n try {\n $form = [];\n foreach ($_POST as $name => $value) {\n $form[htmlspecialchars($name)] = htmlspecialchars($value);\n }\n return $form;\n } catch (Exception $e) {\n die($e);\n }\n }", "function dumpFormItems()\r\n {\r\n }", "function dumpFormItems()\r\n {\r\n }", "function WriteID()\r\n{\r\n if (isset($_POST))\r\n {\r\n if (!empty($_POST) && !empty($_POST['delivery']))\r\n {\r\n echo $_POST['delivery'];\r\n }\r\n\r\n }\r\n}", "public function userinfo() {\n\n return $_POST;\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 posted_value($name) {\n if(isset($_POST[$name])) {\n return htmlspecialchars($_POST[$name]);\n }\n}", "function getVars() {\r\n return !empty($_POST) ? $_POST : (!empty($_GET) ? $_GET : NULL);\r\n }", "function dumpFormItems()\r\n {\r\n if($this->_onclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n }", "function dumpFormItems()\r\n {\r\n if($this->_onclick != null)\r\n {\r\n $hiddenwrapperfield = $this->readJSWrapperHiddenFieldName();\r\n echo \"<input type=\\\"hidden\\\" id=\\\"$hiddenwrapperfield\\\" name=\\\"$hiddenwrapperfield\\\" value=\\\"\\\" />\";\r\n }\r\n }", "function is_post() {\n\treturn $_SERVER['REQUEST_METHOD'] == 'POST';\n}", "function is_post()\n {\n\t \n return $_SERVER['REQUEST_METHOD'] == 'POST';\n }", "function dumpFormItems()\r\n {\r\n // Overriden to avoid printing a hidden field to get the value of the component.\r\n }", "function print_input_fields()\n{\n\t$fields = func_get_args();\n\tforeach ($fields as $field)\n\t{\n\t\t$value = array_key_value($_POST,$field,'');\n\t\t$label = ucwords(str_replace('_',' ',$field));\n\t\tprint <<<EOQ\n <tr>\n <td valign=top align=right>\n <b>$label:</b>\n </td>\n <td valign=top align=left>\n <input type=\"text\" name=\"$field\" size=\"40\" value=\"$value\">\n </td>\n </tr>\nEOQ;\n\t}\n}", "private static function getPostParams()\n\t{\n\t\treturn (count($_POST) > 0) ? $_POST : json_decode(file_get_contents('php://input'), true);\n\t}", "function printForm() {\n $this->printDebugMessage('printForm', 'Begin', 1);\n $stypeStr = $this->paramDetailToStr('stype');\n $programStr = $this->paramDetailToStr('program');\n $databaseStr = $this->paramDetailToStr('database', TRUE);\n $scoresStr = $this->paramDetailToStr('scores');\n $alignmentsStr = $this->paramDetailToStr('alignments');\n $expStr = $this->paramDetailToStr('exp');\n \n print <<<EOF\n<form method=\"POST\">\n<p>E-mail: <input type=\"text\" name=\"email\" />&nbsp;\nJob title: <input type=\"text\" name=\"title\" /></p>\n\n<p>$stypeStr<br />\n<a href=\"?paramDetail=sequence\">Sequence</a>:<br />\n<textarea name=\"sequence\" rows=\"5\" cols=\"80\">\n</textarea></p>\n\n<p>$programStr $databaseStr</p>\n\n<p>$scoresStr $alignmentsStr $expStr</p>\n\n<p align=\"right\">\n<input type=\"submit\" value=\"Submit\" />\n<input type=\"reset\" value=\"Reset\" />\n</p>\n</form>\nEOF\n ;\n $this->printDebugMessage('printForm', 'End', 1);\n }", "public function isPostLeeg()\n {\n return empty($_POST);\n }", "function whatIsHappening()\n{\n echo '<h2>$_GET</h2>';\n var_dump($_GET);\n echo '<h2>$_POST</h2>';\n var_dump($_POST);\n echo '<h2>$_COOKIE</h2>';\n var_dump($_COOKIE);\n echo '<h2>$_SESSION</h2>';\n var_dump($_SESSION);\n}", "function whatIsHappening()\n{\n echo '<h2>$_GET</h2>';\n var_dump($_GET);\n echo '<h2>$_POST</h2>';\n var_dump($_POST);\n echo '<h2>$_COOKIE</h2>';\n var_dump($_COOKIE);\n echo '<h2>$_SESSION</h2>';\n var_dump($_SESSION);\n}", "function whatIsHappening()\n{\n echo '<h2>$_GET</h2>';\n var_dump($_GET);\n echo '<h2>$_POST</h2>';\n var_dump($_POST);\n echo '<h2>$_COOKIE</h2>';\n var_dump($_COOKIE);\n echo '<h2>$_SESSION</h2>';\n var_dump($_SESSION);\n}", "function alle_post( $post) {\n //\n $output = '' ;\n \n //\t$this->post->input\n foreach( $post as $k => $v ) \n {\t\n $output .= '$'.$k.' &nbsp; = &nbsp; $this->input->post(\\''.$k.'\\', TRUE) ;<br />'.\"\\n\";\t\n }\n //-----/$this->post->input\n\n $output .= '<br /><br />'.\"\\n\" ;\t \n \n \n //\t$this->post->input\n foreach( $post as $k => $v ) \n {\t\n $output .= '$'. $k .' &nbsp; = &nbsp; '. $v .'<br />'.\"\\n\";\t\n }\n //-----/$this->post->input \n \n \n \n $output .= '<br /><br />'.\"\\n\" ;\t\t\t\n \n //\tdatabase\n foreach ($_POST as $k => $v) \n {\t\n if( $k <> 'submit')\n {\n $output .= '$this->db->set(\\''.$k.'\\', $'.$k.' ) ; '.\"<br />\\n\";\n }\t\t\n }\n //-----/database\n\t\t\t\n\t\t// $output .= '<br />'.\"\\n\" ;\n\t\t// $output .= '<br />'.\"\\n\" ; \n \n \n return $output ;\n //-----/\n }", "public function getPostValues()\n {\n // Define the check for params\n $post_check_array = array(\n // submit action\n 'toevoegen' => array('filter' => FILTER_SANITIZE_STRING),\n 'bijwerken' => array('filter' => FILTER_SANITIZE_STRING),\n 'verwijderen' => array('filter' => FILTER_SANITIZE_STRING),\n // question\n 'vraag' => array('filter' => FILTER_SANITIZE_STRING),\n // question type (open or closed)\n 'vraagId' => array('filter' => FILTER_SANITIZE_INT),\n // question type (open or closed)\n 'vraagSoort' => array('filter' => FILTER_SANITIZE_STRING),\n // Education\n 'opleiding' => array('filter' => FILTER_SANITIZE_STRING),\n // question send time\n 'verstuurTijd' => array('filter' => FILTER_SANITIZE_STRING)\n );\n // Get filtered input:\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n // RTS\n return $inputs;\n }", "private function postData()\n {\n $post = array_filter($this->post);\n\n return http_build_query($post);\n }", "public function GetFormPostedValues() {\n\t\t$req_fields=array(\"description\",\"date_open\",\"date_closed\");\n\n\t\tfor ($i=0;$i<count($req_fields);$i++) {\n\n\t\t\t//echo $_POST['application_id'];\n\t\t\tif (ISSET($_POST[$req_fields[$i]]) && !EMPTY($_POST[$req_fields[$i]])) {\n\t\t\t\t$this->SetVariable($req_fields[$i],EscapeData($_POST[$req_fields[$i]]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//echo \"<br>\".$this->req_fields[$i].\"<br>\";\n\t\t\t\t$this->$req_fields[$i]=\"\";\n\t\t\t}\n\t\t}\n\t}", "private function print() {\n\t\tvar_dump($this->getParams());\n\t}", "protected abstract function printFormElements();", "function unpack_post() {\n // Globals\n global $min_words;\n global $add_num;\n global $add_char;\n global $case_opt;\n global $separator;\n\n if (array_key_exists('min-words', $_POST)) {\n $min_words = $_POST['min-words'];\n }\n\n if (array_key_exists('add-num', $_POST)) {\n $add_num = True;\n }\n\n if (array_key_exists('add-char', $_POST)) {\n $add_char = True;\n }\n\n if (array_key_exists('separator', $_POST)) {\n $separator = $_POST['separator'];\n }\n\n if (array_key_exists('case-opt', $_POST)) {\n $case_opt = $_POST['case-opt'];\n }\n\n // Mostly just for testing\n return [$min_words, (int)$add_num, (int)$add_char, $separator, $case_opt];\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 unsafeAllPost()\n {\n return $this->postvars;\n }", "function requestIsPost()\n{\n return $_SERVER['REQUEST_METHOD'] == 'POST';\n}", "function print_array(){\n echo \"<pre>\";\n print_r($_GET);\n echo \"</pre>\";\n}", "function convPOSTCharset()\t{\n\t\tif ($this->renderCharset != $this->metaCharset && is_array($_POST) && count($_POST))\t{\n\t\t\t$this->csConvObj->convArray($_POST,$this->metaCharset,$this->renderCharset);\n\t\t\t$GLOBALS['HTTP_POST_VARS'] = $_POST;\n\t\t}\n\t}", "public function getPostVariables();", "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 is_post_request()\n{\n return $_SERVER['REQUEST_METHOD'] == 'POST';\n}", "private static function postParams(): array\n {\n $postParams = [];\n\n if (!empty($_POST)) {\n $postParams = filter_input_array(INPUT_POST, FILTER_DEFAULT);\n }\n\n return $postParams;\n }", "function pre($data){\r\n echo \"<pre>\";\r\n print_r($data);\r\n echo \"</pre>\";\r\n return FALSE;\r\n}", "function dumpFormItems()\r\n {\r\n //Override\r\n }", "public function getFormData()\n {\n return $_POST;\n }", "function prg() \r\n{\r\n\tprintarr($_GET, '$_GET:');\r\n}", "function debug_capture_print_r($data)\r\r\n{\r\r\n\tob_start();\r\r\n\tprint_r($data);\r\r\n\t$result = ob_get_contents();\r\r\n\r\r\n\tob_end_clean();\r\r\n\treturn $result;\r\r\n}", "function Sanitizer($data) {\r\n $data = trim($data);\r\n // it'll strip the slashes in the field \r\n $data = stripcslashes($data);\r\n // for special characters in html like < / >\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n{}\r\n\r\nif($_SERVER['REQUEST_METHOD'] === 'POST') {\r\n $name = Sanitizer($_POST['name']);\r\n $email = Sanitizer($_POST['email']);\r\n $message = Sanitizer($_POST['message']);\r\n $subject = Sanitizer($_POST['subject']);\r\n \r\n}\r\n$wholeCheckedInputs = vsprintf(\"these are the inputs from the from\", array($name, $email, $subject, $message));\r\nprint_r($wholeCheckedInputs);\r\n/**\r\n * we can use Php filters like filter_var() / filter_input() <- for a single argument\r\n * or we can even check out multiple arguments using filter_input_array()\r\n */\r\n\r\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}", "public function getPostValues() {\n $post_check_array = array(\n// submit action\n 'add' => array('filter' => FILTER_SANITIZE_STRING),\n 'update' => array('filter' => FILTER_SANITIZE_STRING),\n // List all update form fields !!!\n// event type name.\n 'datum' => array('filter' => FILTER_SANITIZE_STRING),\n 'prioriteit' => array('filter' => FILTER_SANITIZE_STRING),\n 'username' => array('filter' => FILTER_SANITIZE_STRING),\n 'user' => array('filter' => FILTER_SANITIZE_STRING),\n 'password' => array('filter' => FILTER_SANITIZE_STRING),\n // Help text\n 'status' => array('filter' => FILTER_SANITIZE_STRING),\n // Id of current row\n 'alarm_id' => array('filter' => FILTER_VALIDATE_INT),\n 'alarm_noticed' => array('filter' => FILTER_VALIDATE_INT),\n\t\t\t'alarm_origin' => array('filter' => FILTER_SANITIZE_STRING)\n );\n// Get filtered input:\n $inputs = filter_input_array(INPUT_POST, $post_check_array);\n// RTS\n return $inputs;\n }", "function checkEmpty(){\n\t\tif(!empty($_POST)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function pr($data) {\n echo \"<pre>\" . print_r($data, true) . \"</pre>\";\n}", "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}", "public function posts()\n {\n $post = filter_input_array(INPUT_POST);\n array_walk_recursive($post, function(&$value) {\n $value = JORequest::setAntiInjection($value);\n });\n return $post;\n }", "function dumpContents()\r\n {\r\n $attributes = $this->_getCommonAttributes();\r\n\r\n $value = ($this->_text != \"\") ? \"value=\\\"\" . $this->_text . \"\\\"\" : \"\";\r\n\r\n echo \"<input type=\\\"$this->_type\\\" id=\\\"$this->_name\\\" name=\\\"$this->_name\\\" $value $attributes />\";\r\n }", "public function getPosts() {\n return isset($_POST) ? $_POST : array();\n }", "function isPostBack(){\n return ($_SERVER['REQUEST_METHOD'] == 'POST');\n}", "function re_post_form($var, $ignore=array('submit'))\r\n{\r\n $input_hiddens = '';\r\n\r\n foreach($var as $k=>$v)\r\n {\r\n $k = format_str($k);\r\n if(in_array($k, $ignore)!=false) continue;\r\n\r\n if(is_array($v))\r\n {\r\n foreach($v as $k2=>$v2){\r\n $input_hiddens .= \"<input type='hidden' name='{$k}[{$k2}]' value='{$v2}' />\\r\\n\";\r\n }\r\n }\r\n else{\r\n $input_hiddens .= \"<input type='hidden' name='{$k}' value='{$v}' />\\r\\n\";\r\n }\r\n }\r\n\r\n return $input_hiddens;\r\n}", "function pr( $data){\n\techo \"<pre>\";\n\tprint_r($data);\n\techo \"</pre>\";\n}", "function dump_request() {\n\t\t$data = array($_REQUEST, $_SERVER, $_COOKIE, $_POST, $_GET);\n\t\t$fp = fopen('vrecohack.log', 'a');\n\t\tfwrite($fp, \"===START===\\n\");\n\t\tforeach ($data as $item) {\n\t\t\t$line = serialize($item) . \"\\n\";\n\t\t\t// print_r($line);\n\t\t\tfwrite($fp, $line);\n\t\t}\n\t\tfwrite($fp, \"===END===\\n\");\n\t\tfclose($fp);\n\t}", "function _pog($v) {\r\n return isset($_POST[$v]) ? bwm_clean($_POST[$v]) : (isset($_GET[$v]) ? bwm_clean($_GET[$v]) : NULL);\r\n}", "function requirePOST(...$args) {\n foreach ($args as $field) {\n if (!isset($_POST[$field])) die(\"Missing data!\\n\");\n }\n}", "public function valuesFromPost()\n {\n return $this->setDefaultValues($_POST);\n }", "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 is_post_request() {\n return $_SERVER['REQUEST_METHOD'] === 'POST';\n}", "function renderForm()\n{\n ?>\n <form method=\"POST\">\n <label>Nome <input name=\"name\" value=\"<?php echo $_POST['name'] ?? '' ?>\"></label><br/>\n <label>Messaggio <input name=\"message\" value=\"<?php echo $_POST['message'] ?? '' ?>\"></label><br/>\n <input type=\"submit\" value=\"Invia\">\n </form>\n <?php\n}", "function dump($arg){\r\n echo \"<pre>\";\r\n print_r($arg);\r\n echo \"</pre>\";\r\n}", "public static function posted() {\n\t\treturn isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST';\n\t}", "function pr($data) {\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}", "function dump_fields() {\n // that are currently defined in the instance of the class using the\n // add_field() function.\n\n echo \"<h3>paypal_class->dump_fields() Output:</h3>\";\n echo \"<table width=\\\"95%\\\" border=\\\"1\\\" cellpadding=\\\"2\\\" cellspacing=\\\"0\\\">\n <tr>\n <td bgcolor=\\\"black\\\"><b><font color=\\\"white\\\">Field Name</font></b></td>\n <td bgcolor=\\\"black\\\"><b><font color=\\\"white\\\">Value</font></b></td>\n </tr>\";\n\n ksort($this->fields);\n foreach ($this->fields as $key => $value) {\n echo \"<tr><td>$key</td><td>\".urldecode($value).\"&nbsp;</td></tr>\";\n }\n\n echo \"</table><br>\";\n }", "function postToVar() {\n foreach ($this->fields() as $f) {\n if ($this->$f === false) $this->$f = $this->input->post($f);\n }\n }", "private function loadPostParams()\n {\n if(isset($_POST)) {\n $this->postParams = $_POST;\n }\n }", "function capture_fields (){\n if ($this->display_template_output) {\n\t $fields_arr= explode(';', $this->script->capture_fields ());\n\t}\n\treturn $fields_arr;\t\n }", "function post($input=''){\n $input = htmlspecialchars($_POST[$input]);\n $input = addslashes($input);\n return $input;\n }", "public static function isPost()\n {\n return !empty($_POST);\n }", "public static function form(){\n\t\treturn \"\";\n\t}", "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 dump_fields() \n {\n // that are currently defined in the instance of the class using the\n // add_field() function.\n \n echo \"<h3>paypal_class->dump_fields() Output:</h3>\";\n echo \"<table width=\\\"95%\\\" border=\\\"1\\\" cellpadding=\\\"2\\\" cellspacing=\\\"0\\\">\n <tr>\n <td bgcolor=\\\"black\\\"><b><font color=\\\"white\\\">Field Name</font></b></td>\n <td bgcolor=\\\"black\\\"><b><font color=\\\"white\\\">Value</font></b></td>\n </tr>\"; \n \n ksort($this->fields);\n foreach ($this->fields as $key => $value)\n\t {\n \t\techo \"<tr><td>$key</td><td>\".urldecode($value).\"&nbsp;</td></tr>\";\n }\n \n echo \"</table><br>\"; \n }", "function var_dump_pre ($input_variable)\n{\n print(\"<pre>\");\n var_dump($input_variable);\n print(\"</pre>\");\n}", "private function setPostParameters() {\n\t\tforeach (array_keys($_POST) as $currentKey) {\n\t\t\t$this->postArray[$currentKey] = $_POST[$currentKey];\n\t\t}\n\t}", "public function clearPostData()\n {\n $this->post_data = array();\n }", "protected function getPostValues() {}", "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 getPostData($str){\n $data = $_POST[$str] ?? '';\n return htmlentities($data);\n}", "public function getPostData() {\n \t\n \t// Return POST\n \treturn $this->oPostData;\n }", "function filled_out($form_vars)\r\n{\r\n foreach ($form_vars as $key => $value)\r\n {\r\n if (!isset($key) || ($value == \"\"))\r\n return true;\r\n }\r\n return true;\r\n}", "public function get_submitted_edit_form_data()\n\t{\n\t\t$this->credits = $_POST['credits'];\n\t\t$this->levelID = $_POST['level'];\t\n\t}", "protected function getPost(): array {\n\t\t$post = array_diff_key($this->request->getParams(), array_flip(array( '_METHOD', )));\n\n\t\treturn $post;\n\t}", "public function isPost() {\r\n return isset($_POST) && count($_POST) > 0;\r\n }", "public function paramsPost()\r\n {\r\n return $this->params_post;\r\n }", "function dump() {\n\t\t$vars = get_object_vars( $this );\n\t\techo '<pre style=\"text-align:left\">';\n\t\tforeach( $vars as $name => $value ) {\n\t\t\techo $name.': '.$value.\"\\n\";\n\t\t}\n\t\techo '</pre>';\n\t}", "function dump_die ($data){\n echo \"<pre>\";\n var_dump($data);\n echo \"</pre>\";\n die();\n}", "public function post($key = NULL) \n {\n if ($key === NULL)\n return $_POST;\n return array_key_exists($key, $_POST) ? $_POST[$key] : NULL;\n }" ]
[ "0.80360395", "0.7410001", "0.6997746", "0.62907904", "0.6274413", "0.6204813", "0.61996067", "0.61569506", "0.6155348", "0.61546224", "0.6142543", "0.61153567", "0.60722077", "0.60718256", "0.60415083", "0.60406166", "0.60406166", "0.6001632", "0.598369", "0.5975865", "0.5954667", "0.5831463", "0.57961637", "0.57961637", "0.57893175", "0.5783928", "0.5777535", "0.57722235", "0.5771513", "0.5761683", "0.5729735", "0.5647059", "0.5647059", "0.5647059", "0.5635831", "0.56232893", "0.5621464", "0.5610535", "0.55979604", "0.5582695", "0.55697376", "0.55633277", "0.55582464", "0.55576825", "0.55552536", "0.55494994", "0.55426943", "0.5539974", "0.55398834", "0.55296886", "0.5520241", "0.5510396", "0.55052525", "0.5500481", "0.5493968", "0.54850185", "0.54793584", "0.5473305", "0.5471049", "0.54694426", "0.5468479", "0.5464763", "0.54523104", "0.54416", "0.54310316", "0.54298156", "0.54210764", "0.5419147", "0.5418184", "0.5410596", "0.5398521", "0.53903294", "0.5387507", "0.5359361", "0.5358158", "0.5356104", "0.53501236", "0.53462255", "0.5336257", "0.5329362", "0.53165096", "0.53149235", "0.5310693", "0.5297156", "0.52934164", "0.5289145", "0.5272656", "0.5267667", "0.5267136", "0.5265529", "0.52651715", "0.5264721", "0.52640593", "0.5255067", "0.5249211", "0.5247283", "0.5246039", "0.5237903", "0.5235902", "0.5235858", "0.52275366" ]
0.0
-1
Write new values to the configuration file.
function config_writer(): bool { $arguments = func_get_args(); if (empty($arguments)) { return false; } if (is_array($arguments[0])) { return app('configwriter')->write($arguments[0]); } if (is_string($arguments[0])) { if (! isset($arguments[1]) || ! is_array($arguments[1])) { throw ConfigWriterException::requiredParamArray(); } return app('configwriter')->of($arguments[1])->configFile($arguments[0])->write(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n {\n $config_content = file_get_contents($this->config_path);\n\n foreach ($this->fields as $configuration => $value) {\n $config_content = str_replace(str_replace('\\\\', '\\\\\\\\', $value['default']), str_replace('\\\\', '\\\\\\\\', $this->configurations[$configuration]), $config_content);\n config([$value['config'] => str_replace('\\\\', '\\\\\\\\', $this->configurations[$configuration])]); //Reset the config value\n }\n\n file_put_contents($this->config_path, $config_content);\n }", "public function write(array $values)\n {\n foreach($values as $key => $value) {\n $this->set($key, $value);\n list($filename, $item) = $this->parseKey($key);\n $config[$filename][$item] = $value;\n }\n\n foreach($config as $filename => $items) {\n $path = config_path($filename . '.php');\n if (!is_writeable($path)) throw new \\Exception('Configuration file ' . $filename . '.php is not writeable.');\n if (!$this->rewrite->toFile($path, $items)) throw new \\Exception('Unable to update configuration file ' . $filename . '.php');\n }\n }", "public function writeConfig() {\n $mergedTemplate = $this->mergeTemplate();\n file_put_contents(\"{$this->settings['paths']['hostConfigDir']}/{$this->params['name']}.cfg\", $mergedTemplate);\n file_put_contents(\"{$this->settings['paths']['hostTrackDir']}/{$this->params['type']}.inf\", \"{$this->params['name']}:{$this->params['instanceId']}\" . PHP_EOL, FILE_APPEND);\n $this->logChange();\n }", "protected function writeConfig(array $nonDefaultValues)\n {\n $configValues = self::$configValues;\n foreach ($nonDefaultValues as $name => $value) {\n $configValues[$name] = $value;\n }\n file_put_contents(self::$configFile, json_encode($configValues));\n }", "public function Save()\n {\n $content = \"\";\n foreach ($this->vars as $key => $elem) {\n $content .= \"[\".$key.\"]\\n\";\n foreach ($elem as $key2 => $elem2) {\n $content .= $key2.\" = \\\"\".$elem2.\"\\\"\\n\";\n }\n $content .= \"\\n\";\n }\n if (!$handle = @fopen($this->fileName, 'w')) {\n error_log(\"Config::Save() - Could not open file('\".$this->fileName.\"') for writing, error.\");\n }\n if (!fwrite($handle, $content)) {\n error_log(\"Config::Save() - Could not write to open file('\" . $this->fileName .\"'), error.\");\n }\n fclose($handle);\n }", "public function save()\n\t{\n\t\t$json = json_encode($this->config, JSON_PRETTY_PRINT);\n\n\t\tif (!$h = fopen(self::$configPath, 'w'))\n\t\t{\n\t\t\tdie('Could not open file ' . self::$configPath);\n\t\t}\n\n\t\tif (!fwrite($h, $json))\n\t\t{\n\t\t\tdie('Could not write file ' . self::$configPath);\n\t\t}\n\n\t\tfclose($h);\n\t}", "public function ovpnWriteConfig($path)\n {\n //unset($path);\n $myfile = fopen($path, \"w\") or die(\"Unable to open file!\");\n fclose($myfile);\n $myfile = fopen($path, \"a\") or die(\"Unable to open file!\");\n foreach ($this as $key=>$value) {\n if ($key == \"keys\") {\n $key = \"key\";\n }\n if ($key == \"maxclients\") {\n $key = \"max-clients\";\n }\n if ($value == \"\" or $value === null) {\n continue;\n }\n if (strpos($key, '_') !== false) {\n $key = str_replace(\"_\", \"-\", $key);\n }\n if ($key == \"compression\" or $key == \"srvConfigPath\") {\n continue;\n }\n if ($key == \"client-to-client\") {\n fwrite($myfile, \"$value\\n\");\n continue;\n }\n if ($key == \"push-routes\" or $key == \"push-dns\") {\n $quo = '\"';\n $key = \"push\";\n $value = \"$quo$value$quo\\n\";\n }\n if ($key == \"push-gateway\") {\n fwrite($myfile, \"push $quo$value$quo\\n\");\n continue;\n }\n fwrite($myfile, \"$key $value\\n\");\n }\n fclose($myfile);\n //Done setting config, lets save the new object of items in a file for later processing\n $myfile = fopen(\"./vpn/urgent.conf\", \"w\") or die(\"Unable to open file!\");\n fwrite($myfile, serialize($this));\n fclose($myfile);\n }", "public function writeAll()\n {\n foreach( $this->values as $name => $value ){\n $this->_write( s($name), s($value) );\n }\n }", "public function write() {\n\t\t$database = Registry::get(\"database\");\n\t\t$v = \"value='\" . $this -> value . \"'\";\n\t\t$statement = Registry::get(\"database\") -> query(\"UPDATE server.configs SET \" . $v . \" WHERE key_='\" . $this -> key . \"'\");\n\t}", "public static function writeConfiguration(array $options): void\n {\n $configPath = App::getConfigRoot() . '/config.php';\n $configOld = file_get_contents($configPath);\n $configNew = '';\n\n foreach ($options as $key => $lineNewValue) {\n $matches = [];\n\n /**\n * Look for line in config which matches:\n * '$key' => 'foobar' (i. e.: 'username' => 'root')\n *\n * Look for $lineNewValue in found line and replace it:\n * '$key' => 'foobar' becomes '$key' => '$lineNewValue'\n */\n $regex = '/(\\'' . $key . '\\')[ ]*=>[ ]*(\\'.*\\')/';\n\n preg_match($regex, $configOld, $matches);\n\n switch (count($matches)) {\n case 3:\n $lineOld = $matches[0];\n $lineOldValue = $matches[2];\n $lineNewValue = '\\'' . $lineNewValue . '\\'';\n $lineNew = str_replace($lineOldValue, $lineNewValue, $lineOld);\n\n $configNew = str_replace($lineOld, $lineNew, $configOld);\n $configOld = $configNew;\n break;\n\n case 0:\n /**\n * To do: add option if it doesn't exist\n * instead of showing an error.\n */\n $configNew = $configOld;\n throw new \\RuntimeException('Cannot write option. Option \"' . $key . '\" does not not exist in ' . $configPath . '.');\n break;\n }\n }\n\n file_put_contents($configPath, $configNew);\n\n self::$configuration = [];\n }", "abstract protected function saveConfiguration($name, $value);", "function _write_config_file($values){\n $db_server = $values['db_server'] ?: \"\";\n $db_name = $values['db_name'] ?: \"\";\n $db_user = $values['db_user'] ?: \"\";\n $db_password = $values['db_password'] ?: \"\";\n $mynautique_enabled = (isset($values['mynautique_enabled']) && $values['mynautique_enabled'] == TRUE) ? \"TRUE\" : \"FALSE\";\n $mynautique_user = isset($values['mynautique_user']) && $mynautique_enabled == \"TRUE\" ? $values['mynautique_user'] : \"\";\n $mynautique_password = isset($values['mynautique_password']) && $mynautique_enabled == \"TRUE\" ? $values['mynautique_password'] : \"\";\n\n // write configuration file (only after schema is applied)// build the configuration for the configuration file\n $config_string = '<?php'.\"\\n\";\n $config_string .= '// Database Configuration'.\"\\n\";\n $config_string .= '//==================================================='.\"\\n\";\n $config_string .= '// database server'.\"\\n\";\n $config_string .= '$config[\\'db_server\\'] = \"'. $db_server .'\";'.\"\\n\";\n $config_string .= '// database'.\"\\n\";\n $config_string .= '$config[\\'db_name\\'] = \"'. $db_name .'\";'.\"\\n\";\n $config_string .= '// database user'.\"\\n\";\n $config_string .= '$config[\\'db_user\\'] = \"'. $db_user .'\";'.\"\\n\";\n $config_string .= '// database user password'.\"\\n\";\n $config_string .= '$config[\\'db_password\\'] = \"'. $db_password .'\";'.\"\\n\";\n $config_string .= \"\\n\";\n\n if ( isset($values['mynautique_enabled'])) {\n $config_string .= '// MyNautique Configuration'.\"\\n\";\n $config_string .= '//==================================================='.\"\\n\";\n $config_string .= '// myNautique enabled'.\"\\n\";\n $config_string .= '$config[\\'mynautique_enabled\\'] = '.$mynautique_enabled .';'.\"\\n\";\n $config_string .= '// myNautique user'.\"\\n\";\n $config_string .= '$config[\\'mynautique_user\\'] = \"'. $mynautique_user .'\";'.\"\\n\";\n $config_string .= '// myNautique password'.\"\\n\";\n $config_string .= '$config[\\'mynautique_password\\'] = \"'. $mynautique_password .'\";'.\"\\n\";\n }\n\n $config_string .= '?>'.\"\\n\";\n\n $bytes_written = file_put_contents (\"../config/config.php\", $config_string);\n\n if($bytes_written == FALSE) {\n return $bytes_written;\n }\n return TRUE;\n }", "private function writeConfigFile()\n {\n if (!$this->configFile) {\n $confDir = $this->scratchSpace . DIRECTORY_SEPARATOR . 'config';\n mkdir($confDir);\n $this->configFile = $confDir . DIRECTORY_SEPARATOR . 'config.yml';\n }\n file_put_contents($this->configFile, $this->configYaml);\n $this->container->setParameter('config.filename', $this->configFile);\n }", "public function save()\n\t{\n\t\t$h = fopen(WEBDEV_CONFIG_FILE, 'w');\n\t\tfwrite($h, \"<?php\\n return \" .var_export($this->config->all(), true) .';');\n\t\tfclose($h);\n\t}", "public function createNewConfig() { \n\n\t\t/** \n\t\t * Start by creating the top of the php file\n\t\t *\n\t\t */\n\t\t$this->newFileStr = \"<?php\\n\\n\";\n\n\t\t/** \n\t\t * We want to loop through the new config variables\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new variables.\n\t\t */\n\n\t\tforeach ($this->fileSettings as $name => $val) {\n\n\t\t/** \n\t\t * Output our config variables comment\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new config comment\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n\\n//\" . $val['1'] . \"\\n\";\n\t\t\n\n\t\t/** \n\t\t *\n\t\t * Using var_export() allows you to set complex values \n\t\t * such as arrays and also ensures types will be correct\n\t\t *\n\t\t * @var string stores new config setting\n\t\t */\n\t\t\n\t\t$this->newFileStr .= \"$\".$name.\" = \".var_export($val['0'], TRUE).\";\\n\";\n\n\n\t\t} // end of foreach\n\n\t\t/** \n\t\t *\n\t\t * End our php file\n\t\t *\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n?>\";\n\n\t\t/** \n\t\t *\n\t\t * Create out new config\n\t\t *\n\t\t */\n\t\tfile_put_contents($this->filePath, $this->newFileStr, LOCK_EX);\n\n\t}", "public function writeAndPush()\n {\n $this->gitConfig();\n $this->writeFullConfFile();\n $this->writeUsers();\n if($this->commitConfig()) $this->pushConfig();\n }", "public function saveConfig($data, $values);", "protected function saveConfiguration($name, $value)\n {\n // TODO: Implement saveConfiguration() method.\n }", "private function putConfig(): void\n {\n /** @var array<string, array<string, string>> $alertOutputsFromConfig */\n $alertOutputsFromConfig = config('alert.output', []);\n\n foreach ($alertOutputsFromConfig as $plugin => $map) {\n if ($this->desiredOutput !== null && $this->desiredOutput != $plugin) {\n $this->session->remove(\"alert.$plugin\");\n continue;\n }\n\n $output = [];\n foreach ($map as $from => $to) {\n $output[$from] = $this->fields[$to] ?? '';\n }\n\n $this->session->put(\"alert.$plugin\", json_encode($output));\n }\n }", "function _update_config($new_values = array(), $remove_values = array())\n\t{\n\t\tif ( ! is_array($new_values) && count($remove_values) == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Is the config file writable?\n\t\tif ( ! is_really_writable($this->config_path))\n\t\t{\n\t\t\tshow_error(lang('unwritable_config_file'), 503);\n\t\t}\n\n\t\t// Read the config file as PHP\n\t\trequire $this->config_path;\n\n\t\t// Read the config data as a string\n\t\t// Really no point in loading file_helper to do this one\n\t\t$config_file = file_get_contents($this->config_path);\n\n\t\t// Trim it\n\t\t$config_file = trim($config_file);\n\n\t\t// Remove values if needed\n\t\tif (count($remove_values) > 0)\n\t\t{\n\t\t\tforeach ($remove_values as $key => $val)\n\t\t\t{\n\t\t\t\t$config_file = preg_replace(\n\t\t\t\t\t'#\\$'.\"config\\[(\\042|\\047)\".$key.\"\\\\1\\].*?;\\n#is\",\n\t\t\t\t\t\"\",\n\t\t\t\t\t$config_file\n\t\t\t\t);\n\t\t\t\tunset($config[$key]);\n\t\t\t}\n\t\t}\n\n\t\t// Cycle through the newconfig array and swap out the data\n\t\t$to_be_added = array();\n\t\tif (is_array($new_values))\n\t\t{\n\t\t\tforeach ($new_values as $key => $val)\n\t\t\t{\n\t\t\t\tif (is_array($val))\n\t\t\t\t{\n\t\t\t\t\t$val = var_export($val, TRUE);\n\t\t\t\t}\n\t\t\t\telseif (is_bool($val))\n\t\t\t\t{\n\t\t\t\t\t$val = ($val == TRUE) ? 'TRUE' : 'FALSE';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$val = str_replace(\"\\\\\\\"\", \"\\\"\", $val);\n\t\t\t\t\t$val = str_replace(\"\\\\'\", \"'\", $val);\n\t\t\t\t\t$val = str_replace('\\\\\\\\', '\\\\', $val);\n\n\t\t\t\t\t$val = str_replace('\\\\', '\\\\\\\\', $val);\n\t\t\t\t\t$val = str_replace(\"'\", \"\\\\'\", $val);\n\t\t\t\t\t$val = str_replace(\"\\\"\", \"\\\\\\\"\", $val);\n\t\t\t\t}\n\n\t\t\t\t// Are we adding a brand new item to the config file?\n\t\t\t\tif ( ! isset($config[$key]))\n\t\t\t\t{\n\t\t\t\t\t$to_be_added[$key] = $val;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$base_regex = '#(\\$config\\[(\\042|\\047)'.$key.'\\\\2\\]\\s*=\\s*)';\n\n\t\t\t\t\t// Here we need to determine which regex to use for matching\n\t\t\t\t\t// the config varable's value; if we're replacing an array,\n\t\t\t\t\t// use regex that spans multiple lines until hitting a\n\t\t\t\t\t// semicolon\n\t\t\t\t\tif (is_array($new_values[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$config_file = preg_replace(\n\t\t\t\t\t\t\t$base_regex.'(.*?;)#s',\n\t\t\t\t\t\t\t\"\\${1}{$val};\",\n\t\t\t\t\t\t\t$config_file\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse // Otherwise, use the one-liner match\n\t\t\t\t\t{\n\t\t\t\t\t\t$config_file = preg_replace(\n\t\t\t\t\t\t\t$base_regex.'((\\042|\\047)[^\\\\4]*?\\\\4);#',\n\t\t\t\t\t\t\t\"\\${1}\\${4}{$val}\\${4};\",\n\t\t\t\t\t\t\t$config_file\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->config[$key] = $val;\n\t\t\t}\n\t\t}\n\n\t\t// Do we need to add totally new items to the config file?\n\t\tif (count($to_be_added) > 0)\n\t\t{\n\t\t\t// First we will determine the newline character used in the file\n\t\t\t// so we can use the same one\n\t\t\t$newline = (preg_match(\"#(\\r\\n|\\r|\\n)#\", $config_file, $match)) ? $match[1] : \"\\n\";\n\n\t\t\t$new_data = '';\n\t\t\tforeach ($to_be_added as $key => $val)\n\t\t\t{\n\t\t\t\tif (is_array($new_values[$key]))\n\t\t\t\t{\n\t\t\t\t\t$new_data .= \"\\$config['\".$key.\"'] = \".$val.\";\".$newline;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_data .= \"\\$config['\".$key.\"'] = '\".$val.\"';\".$newline;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// First we look for our comment marker in the config file. If found, we'll swap\n\t\t\t// it out with the new config data\n\t\t\tif (preg_match(\"#.*// END EE config items.*#i\", $config_file))\n\t\t\t{\n\t\t\t\t$new_data .= $newline.'// END EE config items'.$newline;\n\n\t\t\t\t$config_file = preg_replace(\"#\\n.*// END EE config items.*#i\", $new_data, $config_file);\n\t\t\t}\n\t\t\t// If we didn't find the marker we'll remove the opening PHP line and\n\t\t\t// add the new config data to the top of the file\n\t\t\telseif (preg_match(\"#<\\?php.*#i\", $config_file, $match))\n\t\t\t{\n\t\t\t\t// Remove the opening PHP line\n\t\t\t\t$config_file = str_replace($match[0], '', $config_file);\n\n\t\t\t\t// Trim it\n\t\t\t\t$config_file = trim($config_file);\n\n\t\t\t\t// Add the new data string along with the opening PHP we removed\n\t\t\t\t$config_file = $match[0].$newline.$newline.$new_data.$config_file;\n\t\t\t}\n\t\t\t// If that didn't work we'll add the new config data to the bottom of the file\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Remove the closing PHP tag\n\t\t\t\t$config_file = preg_replace(\"#\\?>$#\", \"\", $config_file);\n\n\t\t\t\t$config_file = trim($config_file);\n\n\t\t\t\t// Add the new data string\n\t\t\t\t$config_file .= $newline.$newline.$new_data.$newline;\n\n\t\t\t\t// Add the closing PHP tag back\n\t\t\t\t$config_file .= '?>';\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $fp = fopen($this->config_path, FOPEN_WRITE_CREATE_DESTRUCTIVE))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tflock($fp, LOCK_EX);\n\t\tfwrite($fp, $config_file, strlen($config_file));\n\t\tflock($fp, LOCK_UN);\n\t\tfclose($fp);\n\n\t\tif ( ! empty($this->_config_path_errors))\n\t\t{\n\t\t\treturn $this->_config_path_errors;\n\t\t}\n\n\t\t$this->clear_opcache($this->config_path);\n\t\treturn TRUE;\n\t}", "protected function addToConfig()\n {\n $path = $this->getConfigPath();\n $config = require($path);\n if (isset($config[$this->moduleId])) {\n if (\\Yii::$app->controller->confirm('Rewrite exist config?')) {\n $config[$this->moduleId] = $this->getConfigArray();\n echo 'Module config was rewrote' . PHP_EOL;\n }\n } else {\n $config[$this->moduleId] = $this->getConfigArray();\n }\n\n\n $this->writeArrayToFile($this->getConfigPath(), $config);\n }", "function write_array( &$array2store ){\n die('decided to go anohter route - not done');\n // add the settings back at the bottom of the file\n reset($array2store);\n foreach( $array2store as $key => $val ){\n for( $x = 0 ; $x < count($values) ; ++$x ){ //yes count in a loop - only doing it since this is a single user script -- ohh yeah, sue me!\n exec(\"echo '\".$config_value.'['.$x.\"]=\\\"\".$values[$x].\"\\\"' >> '$this->_settings_file'\");\n ++$upcnt;\n }\n }\n\n }", "public function save()\n\t{\n\t\t$this->componentConfig->save();\n\t}", "private function save() {\n global $config;\n\n //Save Config\n file_put_contents($config[\"usersFile\"],json_encode($this->users,JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT));\n }", "function configWriter($configs){\n\t\t\t\tglobal $scope_id;\n\t\t\t\t$appearanceSwitch = new Mage_Core_Model_Config();\n\t\t\t\tforeach($configs as $section => $value){\n\t\t\t\t\tif($scope_id){\n\t\t\t\t\t\t$appearanceSwitch->saveConfig($section, $value, 'stores', $scope_id);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$appearanceSwitch->saveConfig($section, $value, 'default', 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "function write_config()\n\t{\n\t\t$charmap \t= $this->paths['tempdir'].'/'.$this->paths['config'];\n\t\t$handle \t= @fopen( $charmap, 'w' );\n\t\t\n\t if ($handle)\n\t {\n\t fwrite( $handle, '<?php $chars = array();');\n\t \n\t foreach($this->svg_config[$this->font_name] as $unicode)\n\t {\n\t \tif(!empty($unicode))\n\t \t{\n\t \t\t$delimiter = \"'\";\n\t \t\tif(strpos($unicode, \"'\") !== false) $delimiter = '\"';\n\t \t\tfwrite( $handle, \"\\r\\n\".'$chars[\\''.$this->font_name.'\\']['.$delimiter.$unicode.$delimiter.'] = '.$delimiter.$unicode.$delimiter.';' );\n\t \t}\n\t } \t \n\t \n\t fclose( $handle );\n\t }\n\t else\n\t {\n\t \t$this->delete_folder($this->paths['tempdir']);\n\t\t\texit('Was not able to write a config file');\n\t }\n\t\t\n\t\t\n\t}", "private function writeConfig(string $key, array $config)\n {\n $this->initialize();\n $configuration = sprintf('<?php return %s;', var_export($config, true));\n file_put_contents(\n $this->directoryList->getPath(DirectoryList::GENERATED_METADATA) . '/' . $key . '.php',\n $configuration\n );\n }", "function config_save($cfg) {\n\t\t$h = fopen(CONFIG_PATH,\"w+\");\n\t\tforeach ($cfg as $cam) {\n\t\t\t$cam_info = $cam[\"name\"].\" : \".$cam[\"hw\"].\"\\t\".$cam[\"width\"].\"x\".$cam[\"height\"].\"\\n\";\n\t\t\tfwrite($h, $cam_info);\n\t\t\tforeach ($cam[\"gates\"] as $gate) {\n\t\t\t\t$gate_info = \"\\t\".$gate[\"name\"].\"\\t(\".$gate[\"x1\"].\",\".$gate[\"y1\"].\")\\t(\".$gate[\"x2\"].\",\".$gate[\"y2\"].\")\\n\";\n\t\t\t\tfwrite($h, $gate_info);\n\t\t\t}\n\t\t}\n\t\tfclose($h);\n\t}", "public function config_save() {\n }", "public function save() {\n\t\t$vars = $this->vars;\n\t\t$this->copyFromTemplateIfNeeded();\n\t\t$lines = file($this->filePath);\n\t\tforeach ($lines as $key => $line) {\n\t\t\tif (preg_match(\"/^(.+)vars\\[('|\\\")(.+)('|\\\")](.*)=(.*)\\\"(.*)\\\";(.*)$/si\", $line, $arr)) {\n\t\t\t\t$lines[$key] = \"$arr[1]vars['$arr[3]']$arr[5]=$arr[6]\\\"{$vars[$arr[3]]}\\\";$arr[8]\";\n\t\t\t\tunset($vars[$arr[3]]);\n\t\t\t} elseif (preg_match(\"/^(.+)vars\\[('|\\\")(.+)('|\\\")](.*)=([ \t]+)([0-9]+);(.*)$/si\", $line, $arr)) {\n\t\t\t\t$lines[$key] = \"$arr[1]vars['$arr[3]']$arr[5]=$arr[6]{$vars[$arr[3]]};$arr[8]\";\n\t\t\t\tunset($vars[$arr[3]]);\n\t\t\t}\n\t\t}\n\n\t\tunset($vars['module_load_paths']); // hacky\n\n\t\t// if there are additional vars which were not present in the config\n\t\t// file or in template file then add them at end of the config file\n\t\tif (!empty($vars)) {\n\t\t\t$lines []= \"<?php\\n\";\n\t\t\tforeach ($vars as $name => $value) {\n\t\t\t\tif (is_string($value)) {\n\t\t\t\t\t$lines []= \"\\$vars['$name'] = \\\"$value\\\";\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$lines []= \"\\$vars['$name'] = $value;\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$lines []= \"\\n\";\n\t\t}\n\n\t\tfile_put_contents($this->filePath, $lines);\n\t}", "function write_config($data) {\n\n\t\t// Config path\n\t\t$template_path \t= 'config-sample.php';\n\t\t$output_path \t= 'config.php';\n\n\t\t// Open the file\n\t\t$database_file = file_get_contents($template_path);\n\n\t\t$new = str_replace(\"%DB_HOST%\",$data['db_host'],$database_file);\n\t\t$new = str_replace(\"%DB_USERNAME%\",$data['db_username'],$new);\n\t\t$new = str_replace(\"%DB_PASSWORD%\",$data['db_password'],$new);\n\t\t$new = str_replace(\"%DB_NAME%\",$data['db_name'],$new);\n\t\t$new = str_replace(\"%SITE_URL%\",$data['site_url'],$new);\n\n\t\t// Write the new database.php file\n\t\t$handle = fopen($output_path,'w+');\n\n\t\t// Chmod the file, in case the user forgot\n\t\t@chmod($output_path,0777);\n\n\t\t// Verify file permissions\n\t\tif(is_writable($output_path)) {\n\n\t\t\t// Write the file\n\t\t\tif(fwrite($handle,$new)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private function writeFile($s_filePath,$values){\r\n // @fixme Cosa fare in caso di errore di apertura del file?\r\n $handle = fopen($s_filePath,'w+');\r\n if (fwrite($handle, $values) === FALSE) {\r\n // @fixme Cosa fare in caso di errore di scrittura del file?\r\n die('Impossibile scrivere sul file ('.$s_filePath.')');\r\n }\r\n fclose($handle);\r\n }", "public function writeConfig($config) {\n if(!is_array($config)) {\n trigger_error(\"writeConfig must be called with an array\");\n return FALSE;\n }\n \n if(!$this->_connected) {\n trigger_error(\"Can't write config when not connected\");\n return FALSE;\n }\n \n $toWrite = \"; Config written at \" . date('m-d-Y h:i:s') . \"\\n\";\n $toWrite .= \"; PDU writer version \" . VERSION . \"\\n\";\n $toWrite .= \"; 2011 Kevin O'Connor - [email protected]\\n\";\n \n foreach($config as $directive => $values) {\n $toWrite .= '[' . $directive . \"]\\n\";\n \n foreach($values as $configName => $configValue) {\n $toWrite .= $configName . \"=\" . $configValue . \"\\n\";\n }\n }\n \n if(!file_put_contents('configs/' . $this->_ip . '.ini_updated', $toWrite)) {\n trigger_error(\"Couldn't write temporary config\");\n return FALSE;\n }\n \n if(!ftp_put($this->_ftpConnection, 'config.ini', 'configs/' . $this->_ip . '.ini_updated', FTP_ASCII)) {\n trigger_error(\"Couldn't ftp_put\");\n return FALSE;\n }\n\t\n\tunlink('configs/' . $this->_ip . '.ini_updated');\n\tunlink('configs/' . $this->_ip . '.ini');\n \n return TRUE;\n }", "function confset($key, $value){\n\tglobal $FILEPATH;\n\t$lines = array();\n\t$found = False;\n\t$fp = fopen($FILEPATH.'config.php','r');\n\twhile($line = fgets($fp)){\n\t\tif (strpos($line,\"\\$$key \") === 0){\n\t\t\t$lines[] = \"\\$$key = $value;\\n\";\n\t\t\t$found = True;\n\t\t}\n\t\telseif (strpos($line,\"?>\") === 0 && $found == False){\n\t\t\t$lines[] = \"\\$$key = $value;\\n\";\n\t\t\t$lines[] = \"?>\\n\";\n\t\t}\n\t\telse\n\t\t\t$lines[] = $line;\n\t}\n\tfclose($fp);\n\n\t$fp = fopen($FILEPATH.'config.php','w');\n\tforeach($lines as $line)\n\t\tfwrite($fp,$line);\n\tfclose($fp);\n}", "function saveConfiguration() {\r\n foreach($_POST as $configuration_key=>$configuration_value){\r\n\t\t\t\tif(stripos($configuration_key, \"haendlerbund\")!==false) {\r\n\t\t\t\t\t$sql = xtc_db_query(\"SELECT * FROM configuration WHERE configuration_key='\".$configuration_key.\"' LIMIT 1\");\r\n\t\t\t\t\tif(xtc_db_num_rows($sql)) {\r\n\t\t\t\t\t\txtc_db_query(\"UPDATE configuration SET configuration_value='\".$configuration_value.\"' WHERE configuration_key='\".$configuration_key.\"' LIMIT 1\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}", "public function save()\n {\n $values = array('company_name', 'website_name', 'website_description');\n foreach ($values as $value) \n ConfigHelper::save($value, Input::get($value));\n ConfigHelper::save_file('favicon');\n ConfigHelper::save_file('logo');\n ConfigHelper::save_file('login-logo');\n\n return Redirect::route('view_config')->with('message_title', 'Successful!')->with('message', 'Successfully updated the config!');\n }", "abstract protected function _updateConfiguration();", "public static function write( $key, $newData ) {\r\n\t\t\t// split keys\r\n\t\t\t$keys = self::explode( $key );\r\n\t\t\t// write values\r\n\t\t\t$data = & self::$data;\r\n\t\t\tforeach ( $keys as $part ) {\r\n\t\t\t\tif ( !isset( $data[ $part ] ) ) {\r\n\t\t\t\t\t$data[ $part ] = array();\r\n\t\t\t\t}\r\n\t\t\t\t$data = & $data[ $part ];\r\n\t\t\t}\r\n\t\t\t$data = $newData;\r\n\t\t\tself::callEvent( 'Configure.write', $key, $newData );\r\n\t\t}", "public function writeFullConfFile()\n {\n return $this->writeFile(\n $this->getGitLocalRepositoryPath() . DIRECTORY_SEPARATOR .\n self::GITOLITE_CONF_DIR . self::GITOLITE_CONF_FILE,\n $this->renderFullConfFile()\n );\n }", "public function updateLog($value) {\r\n $handle = fopen(dirname(__file__) . '/log', 'a');\r\n fwrite($handle, $value);\r\n fclose($handle);\r\n }", "public function writeConfig(string $filename, $data, array $parent = array())\n\t{\n\t\t$out = $this->writeConfigRec((array)$data);\n\t\t\n\t\tif (substr($filename, 0, 1 ) != \"/\")\n\t\t\t$filename = BP.'/app/config/'.$filename;\n\t\t\n\t\tfile_put_contents($filename, trim($out));\n\t}", "private function saveConfig() {\n \tself::$_configInstance = (object)$this->_data; \n file_put_contents($this->_data['cache_config_file'],serialize(self::$_configInstance)); \n }", "public static function config_save($key, $value, $create = true) {\n\t\t//get original value\n $original_value = Kohana::config($key);\n if (is_numeric($value)) {\n $value = $value . '';\n }\n\t\t// Get the group name from the key\n\t\t$keys = explode('.', $key, 2); // $keys[0] is the config filename, $keys[1] is the parameter name\n $config_file = APPPATH . 'config/' . $keys[0] . '.php';\n\n if (!file_exists($config_file) && $create) {\n $config_files = Kohana::find_file('config', $keys[0]);\n self::$config_data[$keys[0]] = file_get_contents(array_pop($config_files));\n $handle = fopen($config_file, 'w+b');\n fclose($handle);\n }\n\n if (empty(self::$config_data[$keys[0]])) {\n self::$config_data[$keys[0]] = file_get_contents($config_file);\n }\n\n /*\n check if is array to array or string to string\n */\n $value = var_export($value, true);\n self::$config_data[$keys[0]] = preg_replace('#(\\$config\\[\\'' . $keys[1] . '\\'\\] = )(.*?)([\\)\\']{1})(;\\s+)#s', '$1' . $value . '$4', self::$config_data[$keys[0]]);\n\n file_put_contents($config_file, self::$config_data[$keys[0]]);\n return true;\n }", "public function save()\n\t{\n\t\t// -> means the file was never loaded because no setting was changed\n\t\t// -> means no need to save\n\t\tif ($this->settings === null) return;\n\t\t\n\t\t$yaml = Spyc::YAMLDump($this->settings);\n\t}", "public function Save() {\n\t\t\n\t\tglobal $sql;\n\t\tforeach( $this->settings as $option => $value ) {\n\t\t\t\n\t\t\t$this->update_option( $option, $value, $this->username );\n\t\t}\n\t}", "public function updateConfigApp() : void\n {\n $this->domainName = Str::title(Str::lower(Str::studly($this->domainName)));\n $configAppFilePath = config_path(\"app.php\");\n $oldValue = \"/*NewDomainsServiceProvider*/\";\n $newValue = \"App\\\\\".config(\"domain.path\").\"\\\\{$this->domainName}\\Providers\\DomainServiceProvider::Class,\";\n $newValue .= \"\\n\\t\\t/*NewDomainsServiceProvider*/\";\n $newContent = Str::replaceFirst($oldValue, $newValue, File::get($configAppFilePath));\n File::put($configAppFilePath, $newContent);\n $this->info(\"App Config File Updated and Added the new Service Provider of Domain\");\n }", "function write() {\n\t\t$this->readychk();\n\t\tif (!is_dir($this->dir_path)) { mkdir($this->dir_path); }\n\t\tif (!is_dir($this->asset_path)) { mkdir($this->asset_path); }\n\n\t\t$cstr = json_encode($this->export(TRUE, TRUE));\n\t\tif (\n\t\t\t$cstr === FALSE &&\n\t\t\tjson_last_error() !== JSON_ERROR_NONE\n\t\t) { throw new IntException(\"Slide config encoding failed.\"); }\n\t\tfile_lock_and_put($this->conf_path, $cstr);\n\t}", "private static function writeConfig($config)\n {\n self::init();\n\n return file_put_contents(self::$configFile, json_encode((object) $config, JSON_PRETTY_PRINT));\n }", "public function saveConfigOptions() {}", "public function save($name) \n {\n // Lowercase the $name\n $name = strtolower($name);\n \n // Check to see if we need to put this in an array\n $ckey = $this->files[$name]['config_key'];\n if($ckey != FALSE)\n {\n $Old_Data = $this->data[$name];\n $this->data[$name] = array(\"$ckey\" => $this->data[$name]);\n }\n\n // Create our new file content\n $cfg = \"<?php\\n\";\n\n // Loop through each var and write it\n foreach( $this->data[$name] as $key => $val )\n {\n switch( gettype($val) )\n {\n case \"boolean\":\n $val = ($val == true) ? 'true' : 'false';\n // donot break\n case \"integer\":\n case \"double\":\n case \"float\":\n $cfg .= \"\\$$key = \" . $val . \";\\n\";\n break;\n case \"array\":\n $val = var_export($val, TRUE);\n $cfg .= \"\\$$key = \" . $val . \";\\n\";\n break;\n case \"NULL\":\n $cfg .= \"\\$$key = null;\\n\";\n break;\n case \"string\":\n $cfg .= (is_numeric($val)) ? \"\\$$key = \" . $val . \";\\n\" : \"\\$$key = '\" . addslashes( $val ) . \"';\\n\";\n break;\n default: break;\n }\n }\n\n // Close the php tag\n $cfg .= \"?>\";\n \n // Add the back to non array if we did put it in one\n if($ckey != FALSE)\n {\n $this->data[$name] = $Old_Data;\n }\n \n // Copy the current config file for backup, \n // and write the new config values to the new config\n copy($this->files[$name]['file_path'], $this->files[$name]['file_path'].'.bak');\n if(file_put_contents( $this->files[$name]['file_path'], $cfg )) \n {\n return TRUE;\n } \n else \n {\n return FALSE;\n }\n }", "public function save($values)\n {\n $this->initDbIfNeeded();\n\n $table = $this->getTableName();\n\n $this->delete();\n\n foreach ($values as $name => $value) {\n\n if (!is_array($value)) {\n $value = array($value);\n }\n\n foreach ($value as $val) {\n if (!isset($val)) {\n continue;\n }\n\n if (is_bool($val)) {\n $val = (int) $val;\n }\n\n $sql = \"INSERT INTO $table (`plugin_name`, `user_login`, `setting_name`, `setting_value`) VALUES (?, ?, ?, ?)\";\n $bind = array($this->pluginName, $this->userLogin, $name, $val);\n\n $this->db->query($sql, $bind);\n }\n }\n }", "function guardaConf($dir, $param, $valueNew )\r\n{\r\n\t$source=$dir.\"/utemper.conf\";\r\n\t$temp =$dir.\"/utemper.conf.tmp\";\r\n\t$sendFile = $dir.\"/send/utemper.conf\";\r\n\t$update = false;\r\n\t\r\n\tif (!file_exists($source)) {\r\n\t\tmkdir ($dir.\"/send/\", 0777, True); \r\n\t\tfile_put_contents($source, \"estado_caldera:0\");\r\n\t}\r\n\t\r\n\t// copy operation\r\n\t$origen =fopen($source, 'r');\r\n\t$destino =fopen($temp, 'w');\r\n\r\n\tif (($origen) && ($destino)){\r\n\t \r\n\t\twhile (($line = fgets($origen, 4096)) !== false) {\r\n\t\t\t$line = trim($line);\r\n\t\t\tif(count(split (':', $line))== 3)\r\n\t\t\t{\r\n\t\t\t\t list($seg, $nombre, $valor) = split (':', $line);\r\n\t\t\t\t if($nombre == $param)\r\n\t\t\t\t {\r\n\t\t\t\t\t$line = (string)time().\":\".$param.\":\".$valueNew;\r\n\t\t\t\t\t$update = true;\r\n\t\t\t\t }\r\n\t\t\t}\r\n\t\t\tfwrite($destino, $line.\"\\n\");\r\n\t\t}\r\n\t\tif (!feof($origen)) {\r\n\t\t\techo \"guardaConf: Error: unexpected fgets() fail\\n\";\r\n\t\t\tfclose($origen);\r\n\t\t\tfclose($destino);\r\n\t\t\texit();\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\techo \"guardaConf error, imposible leer:\" .$dir.\"\\n\" ;\r\n\techo \"guardaConf error, imposible scribir:\" .$temp.\"\\n\" ;\r\n\tfclose($origen);\r\n\tfclose($destino);\r\n\texit();\r\n\t}\r\n\t\r\n\tif (!$update)\r\n\t{\r\n\t\t$line = (string)time().\":\".$param.\":\".$valueNew;\r\n\t\tfwrite($destino, $line.\"\\n\");\r\n\t}\r\n\t\r\n\tfclose($origen);\r\n\tfclose($destino);\r\n\r\n\t// delete old source file\r\n\tunlink($source);\r\n\t// rename target file to source file\r\n\trename($temp, $source);\r\n\tcopy($source, $sendFile);\r\n\tsleep(0.5);\r\n}", "public function migrate() : void {\r\n\t\t\t$currentSettings = new ConfigContainer();\r\n\r\n\t\t\tif (file_exists($this->settingsFile)) {\r\n\t\t\t\t$currentSettings = new ConfigContainer(file_get_contents($this->settingsFile));\r\n\t\t\t}\r\n\r\n\t\t\tif (!$currentSettings->has('configVersion')) {\r\n\t\t\t\t$currentSettings->set('configVersion', 0, FieldTypes::INTEGER);\r\n\t\t\t}\r\n\r\n\t\t\t$filesToApply = array();\r\n\t\t\t$currentVersion = $currentSettings->get('configVersion');\r\n\r\n\t\t\tforeach ($this->files as $file) {\r\n\t\t\t\tif ($file->origVersion >= $currentVersion) {\r\n\t\t\t\t\t$filesToApply[] = $file;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tforeach ($filesToApply as $file) {\r\n\t\t\t\tforeach ($file->actions as $action) {\r\n\t\t\t\t\tswitch ($action->operator->getValue()) {\r\n\t\t\t\t\t\tcase MigrationOperators::ADD:\r\n\t\t\t\t\t\t\tif (!$currentSettings->has($action->field)) {\r\n\t\t\t\t\t\t\t\t$currentSettings->set($action->field, $action->value, $action->type->getValue());\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase MigrationOperators::CHANGE:\r\n\t\t\t\t\t\t\t$currentSettings->set($action->field, $action->value);\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase MigrationOperators::REMOVE:\r\n\t\t\t\t\t\t\t$currentSettings->remove($action->field);\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase MigrationOperators::RENAME:\r\n\t\t\t\t\t\t\t$currentSettings->rename($action->field, $action->value);\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t// @codeCoverageIgnoreStart\r\n\t\t\t\t\t\tdefault:\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t// @codeCoverageIgnoreEnd\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$currentSettings->set('configVersion', intval($file->destVersion));\r\n\t\t\t}\r\n\r\n\t\t\tfile_put_contents($this->settingsFile, json_encode($currentSettings, JSON_PRETTY_PRINT));\r\n\r\n\t\t\treturn;\r\n\t\t}", "public function write(array $options, ConfigInterface $config);", "public static function write($name, $value)\n {\n $settingsObj = self::getInstance();\n $settingsObj->data = ArrayUtils::setValue($settingsObj->data, $name, $value);\n }", "function saveConfig(Config_Lite $inConfig) {\r\n\t\ttry {\r\n $inConfig->save();\r\n\t\t} catch (Config_Lite_Exception $e) {\r\n\t\t\techo \"\\n\" . 'Exception Message: ' . $e->getMessage();\r\n\t\t\twrite_log('Error saving configuration.','ERROR');\r\n\t\t}\r\n\t\t$configFile = dirname(__FILE__) . '/config.ini.php';\r\n\t\t$cache_new = \"'; <?php die('Access denied'); ?>\"; // Adds this to the top of the config so that PHP kills the execution if someone tries to request the config-file remotely.\r\n\t\t$cache_new .= file_get_contents($configFile);\r\n\t\tfile_put_contents($configFile,$cache_new);\r\n\t\t\r\n\t}", "protected function write()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path);\n }\n\n file_put_contents($this->file, json_encode([\n 'network' => $this->network,\n 'epoch' => static::$epoch,\n 'iteration' => static::$iteration,\n 'a' => $this->a,\n 'e' => $this->e\n ]));\n }", "function configurationRecord() {\n\t\t// open the global configuration file that contains the variables and their values\n\t\tif(!$file = @fopen($_SERVER['DOCUMENT_ROOT'].'/config/podserver_config.php', 'w')) {\n\t\t\t// if some error, tell it!\n\t\t\t$error = ERROR_CAN_NOT_OPEN_CONFIG_PODSERVER_PHP;\n\t\t\treturn $error;\n\t\t}\n\t\t// open the software configuration file that contains \"define\"s\n\t\tif(!$file_soft = @fopen($_SERVER['DOCUMENT_ROOT'].'/config.php', 'w')) {\n\t\t\t// if some error, tell it!\n\t\t\t$error = ERROR_CAN_NOT_OPEN_CONFIG_PODSERVER_PHP;\n\t\t\treturn $error;\n\t\t}\n\t\t// config file header\n\t\tfwrite($file, \"<?\\n// \".FILE_GENERATED_BY.\" PodServer Configuration\\n\");\n\t\tfwrite($file_soft, \"<?\\n// \".FILE_GENERATED_BY.\" PodServer Configuration\\n\");\n\t\t// write configuration variables into the \"config/config-podserver.php\" file\n\t\tforeach($_POST as $key=>$val) {\n\t\t\t// pass for some special entry (prefixed by 'f_')\n\t\t\tif(strstr($key,\"f_\")) continue;\n\t\t\t// consider DEF_ item as for this software installation configuration defines\n\t\t\telseif(strstr($key,\"DEF_\")) {\n\t\t\t\t$key = substr($key,4,strlen($key));\n\t\t\t\tfwrite($file_soft, \"define(\\\"$key\\\", \\\"$val\\\");\\n\");\n\t\t\t}\n\t\t\t// numeric or boolean values\n\t\t\telseif(is_numeric($val) || preg_match(\"/true|false/\",$val)) fwrite($file, \"\\$$key = $val;\\n\");\t\n\t\t\t// string values\n\t\t\telse fwrite($file, \"\\$$key = \\\"\".preg_replace(\"/[\\n|\\r|\\r\\n]+/\", \" \", trim($val)).\"\\\";\\n\");\n\n\t\t}\n\t\t\n\t\tfwrite($file_soft,\"define('PODSERVER_BAN','\".addslashes(\" ___ _ __ ____ ____ ___ _____ __ \\\\\\\\ || //\n| _ \\ (_) //\\\\\\\\ | ___|| _ \\| _ || _ \\ //\\\\\\\\ \\\\\\\\||//\n|| \\ \\| |// \\\\\\\\| |__ | (_)||| ||| (_) /// \\\\\\\\ ====()====\n|| | || |||__|||__ || ___/|| ||| / ||__|| //||\\\\\\\\\n||_/ /| ||| || __| || | ||_||| |\\ \\ || || // || \\\\\\\\\n|___/ |_||| |||____||_| |___||_| \\_\\|| || \").\"');\");\n\t\t\n\t\t// save uploaded files to the \"uploads\" directory\n\t\tforeach ($this->itemsConfiguration as $item){\n\t\t\tif ($item->type == 'file')\t{\n\t\t\t\tif ($_FILES[$item->name][\"error\"] > 0){\n\t\t\t\t\t$this->error = UPLOAD_FILE_ERROR;\t\n\t\t\t\t}else{\n\t\t\t\t\tmove_uploaded_file($_FILES[$item->name][\"tmp_name\"],$_SERVER['DOCUMENT_ROOT'].'/uploads/' . $item->name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// close tag PHP\n\t\tfwrite($file, \"?>\\n\");\n\t\tfwrite($file_soft, \"?>\\n\");\n\t\t// close the file\n\t\tfclose($file);\n\t\tfclose($file_soft);\n\t\treturn true;\n\t}", "public function saveSettingAction(){\n $configKey = array('api_key', 'api_secret','include_folders','resize_auto',\n 'resize_image','min_size','max_size','compression_type_pdf','compression_type_png','compression_type_jpg','compression_type_gif', 'saving_auto', 'compress_auto', 'cron_periodicity', 'reindex_init');\n $coreConfig = Mage::getConfig();\n $post = $this->getRequest()->getPost();\n foreach ($configKey as $key) { \n if (isset($post[$key])) { \n $coreConfig->saveConfig(\"mageio_\".$key, Mage::helper('core')->escapeHtml($post[$key]))->cleanCache();\n }\n }\n\t\t$installed_time = Mage::getStoreConfig('mageio_installed_time');\n if(empty($installed_time)) {\n $installed_time = time();\n $coreConfig = Mage::getConfig();\n $coreConfig->saveConfig('mageio_installed_time', Mage::helper('core')->escapeHtml($installed_time))->cleanCache();\n }\n\t\t//Remove error message if set\n\t\t$coreConfig->saveConfig(\"mageio_errormessage\", Mage::helper('core')->escapeHtml(null))->cleanCache();\n\t\t\n\t\t$this->_redirect('imagerecycle/index/index');\n\t}", "public function save()\n\t{\n\t\tFile::disk()->put($this->configPath, YAML::dump($this->configData));\n\n\t\tArtisan::call(sprintf('favicon:generate --site=%s', $this->handle));\n\t}", "function save_settings() {\n\t\t$this->update_option( static::SETTINGS_KEY, $this->settings );\n\t}", "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "public function saveConfVars()\n {\n if ($this->getEditObjectId() === 'findologic_module') {\n $this->_saveConfVars();\n } else {\n parent::saveConfVars();\n }\n }", "public function save()\n\t{\n\t\tglobal $tpl, $lng, $ilCtrl;\n\t\n\t\t$pl = $this->getPluginObject();\n\t\t\n\t\t$form = $this->initConfigurationForm();\n\t\tif ($form->checkInput())\n\t\t{\n\t\t\t$set1 = $form->getInput(\"setting_1\");\n\t\t\t$set2 = $form->getInput(\"setting_2\");\n\t\n\t\t\t// @todo: implement saving to db\n\t\t\t\n\t\t\tilUtil::sendSuccess($pl->txt(\"saving_invoked\"), true);\n\t\t\t$ilCtrl->redirect($this, \"configure\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form->setValuesByPost();\n\t\t\t$tpl->setContent($form->getHtml());\n\t\t}\n\t}", "public function persistConfig($key, $value)\n {\n $config = Config::getInstance();\n $config->persist($key, $value);\n $config->save();\n }", "public function writewebconfig()\n {\n //<add fileExtension=\"supersake\" allowed=\"false\"/>\n }", "public function save() {\n $configdata = $this->get('configdata');\n if (!array_key_exists('defaultvalue_editor', $configdata)) {\n $this->field->save();\n return;\n }\n\n if (!$this->get('id')) {\n $this->field->save();\n }\n\n // Store files.\n $textoptions = $this->value_editor_options();\n $tempvalue = (object) ['defaultvalue_editor' => $configdata['defaultvalue_editor']];\n $tempvalue = file_postupdate_standard_editor($tempvalue, 'defaultvalue', $textoptions, $textoptions['context'],\n 'customfield_textarea', 'defaultvalue', $this->get('id'));\n\n $configdata['defaultvalue'] = $tempvalue->defaultvalue;\n $configdata['defaultvalueformat'] = $tempvalue->defaultvalueformat;\n unset($configdata['defaultvalue_editor']);\n $this->field->set('configdata', json_encode($configdata));\n $this->field->save();\n }", "public function saveSettings()\n {\n if (empty($this->settings)) {\n $this->loadSettings();\n }\n \n $this->saveJSON($this->settings);\n }", "public static function set(string $name, $value, bool $save_to_file = true)\n {\n self::getInstance();\n $conf = $array = json_decode(json_encode(self::$config), true);\n\n $new = $value;\n $path = explode('.', $name);\n\n $length = strlen($name);\n for ($i=count($path) - 1; $i >= 0; $i--) {\n\n $length -= strlen($path[$i]);\n $tmp_name = substr($name, 0, $length);\n \n if (strlen(rtrim($tmp_name, '.')) == strlen($tmp_name) - 1) {\n \n $tmp_name = rtrim($tmp_name, '.');\n $length--;\n }\n\n $tmp_val = (array)self::get($tmp_name, []);\n $tmp_val[$path[$i]] = $new;\n $new = $tmp_val;\n }\n\n $conf = array_merge($conf, $new);\n $new_json = json_encode($conf, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n\n if ($save_to_file) {\n file_put_contents(self::$configPath, $new_json);\n self::reload();\n } else {\n self::$config = json_decode($new_json);\n }\n\n return true;\n }", "public function saveSettings()\n {\n return $this->config->saveFile();\n }", "protected function saveConfig() {\n return $this->updateConfigValues(array(\n 'PAYNETEASY_END_POINT',\n 'PAYNETEASY_LOGIN',\n 'PAYNETEASY_SIGNING_KEY',\n 'PAYNETEASY_SANDBOX_GATEWAY',\n 'PAYNETEASY_PRODUCTION_GATEWAY',\n 'PAYNETEASY_GATEWAY_MODE'\n ));\n }", "protected function writeConfig($force = false)\n {\n $setup = new Setup($this->config, $this->output, $this->php);\n $setup->config();\n\n if ($this->firstRun) {\n $setup->env(false, true);\n\n return;\n }\n\n if ($this->fileExists('.env') && $force === false) {\n return $this->write('-> Configuration already set up. Use --force to regenerate.', 'comment');\n }\n\n $setup->env();\n }", "protected function appendManifest($values) {\n // todo: should we open an exclusive lock here?\n $filename = $this->tempPath() . DIRECTORY_SEPARATOR . __CLASS__ . '-manifest.json';\n\n // merge with new values\n $this->manifest = array_merge($this->manifest, $values);\n\n // write updated manifest\n $this->writeLog('<p>Writing manifest...<br>');\n ob_start();\n if(false === file_put_contents($filename, json_encode($this->manifest))) {\n $this->writeLog('Failed to write manifest <code>' . $filename . '</code>: ' . ob_get_flush() . '</p>');\n } else {\n $this->writeLog(true, 'Generated <code>', $filename, '</code></p>') || $this->writeLog('Success!</p>');\n }\n ob_end_flush();\n }", "public static function writeFile($fileName, $configuration)\n {\n $content = '';\n\n foreach ($configuration as $key => $value) {\n $content .= $key . '=' . $value . \"\\n\";\n }\n\n file_put_contents($fileName, $content);\n }", "public function save()\n {\n update_option($this->optionKey, $this->fields);\n }", "function setConfigValues( $values )\n\t{\n\t\tif( !is_array( $values ) )\n\t\t\treturn\tfalse;\n\t\tforeach( $values as $path => $value )\n\t\t\t$this->setConfigValue( $path, $value );\n\t}", "public function canWriteConfiguration() {}", "function recurringdowntime_write_cfg($cfg)\n{\n if (is_array($cfg)) {\n $cfg_str = recurringdowntime_array_to_cfg($cfg);\n } else {\n $cfg_str = $cfg;\n }\n recurringdowntime_check_cfg();\n file_put_contents(RECURRINGDOWNTIME_CFG, $cfg_str);\n return true;\n}", "private function saveConfig(){\n\t\tif(!isset($_POST['services_ipsec_settings_enabled'])){\n\t\t\t$this->data['enable'] = 'false';\n\t\t}\n\t\telseif($_POST['services_ipsec_settings_enabled'] == 'true'){\n\t\t\t$this->data['enable'] = 'true';\n\t\t}\n\t\t\n\t\t$this->config->saveConfig();\n\t\t$this->returnConfig();\n\t}", "function persist_optionsFile()\n\t\t{\n\t\t\t$propFile = $this->thispluginpath.'hits-pngfix2.properties';\n\t\t\tif($this->is__writable($propFile))\n\t\t\t{\n\t\t\t\t$propFileHandle = @fopen($propFile, 'w') or die(\"can't open file\");\n\t\t\t\tfwrite($propFileHandle,$this->thisProtocolRelativeUrl.\"clear.gif\");\n\t\t\t\tfclose($propFileHandle);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->options['hits_ie6_debug']=='true')\n\t\t\t\t\techo \"<!-- DEBUG: Options file is not writeable -->\";\n\t\t\t}\n\t\t}", "function storeConfig( $pName, $pValue, $pPackage = NULL ) {\n\t\tglobal $gMultisites;\n\t\t//stop undefined offset error being thrown after packages are installed\n\t\tif( !empty( $this->mConfig )) {\n\t\t\t// store the pref if we have a value _AND_ it is different from the default\n\t\t\tif( ( empty( $this->mConfig[$pName] ) || ( $this->mConfig[$pName] != $pValue ))) {\n\t\t\t\t// make sure the value doesn't exceede database limitations\n\t\t\t\t$pValue = substr( $pValue, 0, 250 );\n\n\t\t\t\t// store the preference in multisites, if used\n\t\t\t\tif( $this->isPackageActive( 'multisites' ) && @BitBase::verifyId( $gMultisites->mMultisiteId ) && isset( $gMultisites->mConfig[$pName] )) {\n\t\t\t\t\t$query = \"UPDATE `\".BIT_DB_PREFIX.\"multisite_preferences` SET `config_value`=? WHERE `multisite_id`=? AND `config_name`=?\";\n\t\t\t\t\t$result = $this->mDb->query( $query, array( empty( $pValue ) ? '' : $pValue, $gMultisites->mMultisiteId, $pName ) );\n\t\t\t\t} else {\n\t\t\t\t\t$query = \"DELETE FROM `\".BIT_DB_PREFIX.\"kernel_config` WHERE `config_name`=?\";\n\t\t\t\t\t$result = $this->mDb->query( $query, array( $pName ) );\n\t\t\t\t\t// make sure only non-empty values get saved, including '0'\n\t\t\t\t\tif( isset( $pValue ) && ( !empty( $pValue ) || is_numeric( $pValue ))) {\n\t\t\t\t\t\t$query = \"INSERT INTO `\".BIT_DB_PREFIX.\"kernel_config`(`config_name`,`config_value`,`package`) VALUES (?,?,?)\";\n\t\t\t\t\t\t$result = $this->mDb->query( $query, array( $pName, $pValue, strtolower( $pPackage )));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Force the ADODB cache to flush\n\t\t\t\t$isCaching = $this->mDb->isCachingActive();\n\t\t\t\t$this->mDb->setCaching( FALSE );\n\t\t\t\t$this->loadConfig();\n\t\t\t\t$this->mDb->setCaching( $isCaching );\n\t\t\t}\n\t\t}\n\t\t$this->setConfig( $pName, $pValue );\n\t\treturn TRUE;\n\t}", "private function flush(): void {\n file_put_contents(APP_ROOT . '/public/config/lang/dictionary.json',\n json_encode([\\Config::Dictionary => $this->dictionary]));\n }", "public function save_settings() {\n\n\t\twoocommerce_update_options( $this->get_settings() );\n\t}", "static function WriteINI()\n {\n $content = \"\";\n\n foreach(self::$settings as $key => $data)\n {\n if(is_array($data))\n {\n $is_section = true;\n\n foreach($data as $dataKey => $dataValues)\n {\n if(is_long($dataKey))\n {\n $is_section = false;\n break;\n }\n }\n\n $content .= \"\\n\";\n\n //Write global array value\n if(!$is_section)\n {\n foreach($data as $dataKey => $dataValue)\n {\n $content .= $key . '[] = \"' . $dataValue . '\"' . \"\\n\";\n }\n }\n\n //Write section\n else\n {\n $content .= \"[\" . $key . \"]\\n\";\n\n foreach($data as $dataKey => $dataValue)\n {\n if(is_array($dataValue))\n {\n foreach($dataValue as $dataInnerValue)\n {\n $content .= $dataKey . '[] = \"' . $dataInnerValue . '\"' . \"\\n\";\n }\n }\n else\n {\n $content .= $dataKey . ' = \"' . $dataValue . '\"' . \"\\n\";\n }\n }\n }\n\n $content .= \"\\n\";\n }\n\n //Write global value\n else\n {\n $content .= $key . ' = \"' . $data . '\"' . \"\\n\";\n }\n }\n\n file_put_contents(self::$file, $content);\n }", "public function set():void\n {\n try {\n if (!\\file_exists(ABSPATH . '/wp-content/log.json')) {\n \\file_put_contents(ABSPATH . '/wp-content/log.json', '[]');\n }\n } catch (Exception $ex) {\n error_log(get_class($this) . ' function ' . __FUNCTION__ . '() line ' . $ex->line . ': ' . $ex->message);\n }\n }", "function saveSettings()\n\t\t{\n\t\t\t$this->Init();\n\n\t\t\t$this->saveExternalSettings();\n\t\t\t\n\t\t\t$settings = serialize(array(\"settings\"=>$this->settings));\n\t\n\t\n\t\t\t$stream = mapi_openpropertytostream($this->store, PR_EC_WEBACCESS_SETTINGS, MAPI_CREATE | MAPI_MODIFY);\n\t\t\tmapi_stream_setsize($stream, strlen($settings));\n\t\t\tmapi_stream_seek($stream, 0, STREAM_SEEK_SET);\n\t\t\tmapi_stream_write($stream, $settings);\n\t\t\tmapi_stream_commit($stream);\n\t\n\t\t\tmapi_savechanges($this->store);\n\t\n\t\t\t// reload settings from store...\n\t\t\t$this->retrieveSettings();\n\t\t}", "private function save_config()\n\t{\n\t\tif (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate())\n\t\t{\n\t\t\t$this->model_setting_setting->editSetting('payment_compropago', $this->request->post);\n\t\t\t$this->model_setting_setting->editSetting('payment_compropago_spei', $this->request->post);\n\t\t\t$this->session->data['success'] = $this->language->get('text_success');\n\n\t\t\t$this->register_webhook(\n\t\t\t\t$this->request->post['payment_compropago_publickey'],\n\t\t\t\t$this->request->post['payment_compropago_privatekey'],\n\t\t\t\t$this->request->post['payment_compropago_mode'] === '1'\n\t\t\t);\n\n\t\t\t$linkParams = 'user_token=' . $this->session->data['user_token'] . '&type=payment';\n\t\t\t$this->response->redirect($this->url->link('marketplace/extension', $linkParams, true));\n\t\t}\n\t}", "function Save()\n\t{\n\n\t\trequire_once(SENDSTUDIO_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR . 'interspire_addons.php');\n\n\t\tif (!is_writable($this->ConfigFile)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$tmpfname = tempnam(TEMP_DIRECTORY, 'SS_');\n\t\tif (!$handle = fopen($tmpfname, 'w')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$copy = true;\n\t\tif (is_file(TEMP_DIRECTORY . '/config.prev.php')) {\n\t\t\tif (!@unlink(TEMP_DIRECTORY . '/config.prev.php')) {\n\t\t\t\t$copy = false;\n\t\t\t}\n\t\t}\n\n\t\tif ($copy) {\n\t\t\t@copy($this->ConfigFile, TEMP_DIRECTORY . '/config.prev.php');\n\t\t}\n\n\t\t// the old config backups were in the includes folder so try to clean them up as part of this process.\n\t\t$config_prev = SENDSTUDIO_INCLUDES_DIRECTORY . '/config.prev.php';\n\t\tif (is_file($config_prev)) {\n\t\t\t@unlink($config_prev);\n\t\t}\n\n\t\t$contents = \"<?php\\n\\n\";\n\n\t\tgmt($this);\n\n\t\t$areas = $this->Areas;\n\n\n\t\tforeach ($areas['config'] as $area) {\n\t\t\t// See self::LoadSettings() on UTF8PATCH settings\n\t\t\tif ($area == 'DATABASE_UTF8PATCH') {\n\t\t\t\tif (!defined('SENDSTUDIO_DATABASE_UTF8PATCH')) {\n\t\t\t\t\tdefine('SENDSTUDIO_DATABASE_UTF8PATCH', 1);\n\t\t\t\t}\n\t\t\t\t$contents .= \"define('SENDSTUDIO_DATABASE_UTF8PATCH', '\" . SENDSTUDIO_DATABASE_UTF8PATCH . \"');\\n\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$string = 'define(\\'SENDSTUDIO_' . $area . '\\', \\'' . addslashes($this->Settings[$area]) . '\\');' . \"\\n\";\n\t\t\t$contents .= $string;\n\t\t}\n\n\t\t$contents .= 'define(\\'SENDSTUDIO_IS_SETUP\\', 1);' . \"\\n\";\n\n\t\t$contents .= \"\\n\\n\";\n\n\t\tfputs($handle, $contents, strlen($contents));\n\t\tfclose($handle);\n\t\tchmod($tmpfname, 0644);\n\n\t\tif (!copy($tmpfname, $this->ConfigFile)) {\n\t\t\treturn false;\n\t\t}\n\t\tunlink($tmpfname);\n\n\t\t$copy = true;\n\t\tif (is_file(TEMP_DIRECTORY . '/config.bkp.php')) {\n\t\t\tif (!@unlink(TEMP_DIRECTORY . '/config.bkp.php')) {\n\t\t\t\t$copy = false;\n\t\t\t}\n\t\t}\n\n\t\tif ($copy) {\n\t\t\t@copy($this->ConfigFile, TEMP_DIRECTORY . '/config.bkp.php');\n\t\t}\n\n\t\t// the old config backups were in the includes folder so try to clean them up as part of this process.\n\t\t$config_bkp = SENDSTUDIO_INCLUDES_DIRECTORY . '/config.bkp.php';\n\t\tif (is_file($config_bkp)) {\n\t\t\t@unlink($config_bkp);\n\t\t}\n\n\t\tunset($areas['config']);\n\n\t\tif (defined('APPLICATION_SHOW_WHITELABEL_MENU') && constant('APPLICATION_SHOW_WHITELABEL_MENU')) {\n\t\t\t$query = \"DELETE FROM \" . SENDSTUDIO_TABLEPREFIX . \"whitelabel_settings\";\n\t\t\t$result = $this->Db->Query($query);\n\t\t\tforeach ($areas['whitelabel'] as $area) {\n\t\t\t\t// If settings are not set, do not continue\n\t\t\t\tif (!isset($this->Settings[$area])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$value = $this->Settings[$area];\n\n\t\t\t\tif (strtolower($area) == 'update_check_enabled') {\n\t\t\t\t\t$subAction = 'uninstall';\n\t\t\t\t\tif ($value == '1') {\n\t\t\t\t\t\t$subAction = 'install';\n\t\t\t\t\t}\n\t\t\t\t\t$result = Interspire_Addons::Process('updatecheck', $subAction, array());\n\t\t\t\t\tcontinue;\n\t\t\t\t} elseif (strtolower($area) == 'lng_accountupgrademessage') {\n\t\t\t\t\t$agencyId = get_agency_license_variables();\n\t\t\t\t\tif(empty($agencyId['agencyid'])) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (is_bool($value)) {\n\t\t\t\t\t$value = (int)$value;\n\t\t\t\t}\n\n\t\t\t\t$query = \"INSERT INTO \" . SENDSTUDIO_TABLEPREFIX . \"whitelabel_settings(name, value) VALUES ('\" . $this->Db->Quote($area) . \"', '\" . $this->Db->Quote($value) . \"')\";\n\t\t\t\t$result = $this->Db->Query($query);\n\t\t\t}\n\t\t\tif ($this->WhiteLabelCache->exists('IEM_SETTINGS_WHITELABEL')) {\n\t\t\t\t$this->WhiteLabelCache->remove('IEM_SETTINGS_WHITELABEL');\n\t\t\t}\n\t\t}\n\n\t\tif (isset($areas['whitelabel'])) {\n\t\t\tunset($areas['whitelabel']);\n\t\t}\n\n\t\t$stash = IEM_InterspireStash::getInstance();\n\t\tif ($stash->exists('IEM_SYSTEM_SETTINGS')) {\n\t\t\t$stash->remove('IEM_SYSTEM_SETTINGS');\n\t\t}\n\n\t\t$query = \"DELETE FROM \" . SENDSTUDIO_TABLEPREFIX . \"config_settings\";\n\t\t$result = $this->Db->Query($query);\n\n\n\t\tforeach ($areas as $area) {\n\t\t\t$value = isset($this->Settings[$area]) ? $this->Settings[$area] : '';\n\n\n\n\t\t\tif ($area == 'SYSTEM_DATABASE_VERSION') {\n\t\t\t\t$value = $this->Db->FetchOne(\"SELECT version() AS version\");\n\t\t\t}\n\t\t\tif (is_bool($value)) {\n\t\t\t\t$value = (int)$value;\n\t\t\t}\n\n\t\t\t$query = \"INSERT INTO \" . SENDSTUDIO_TABLEPREFIX . \"config_settings(area, areavalue) VALUES ('\" . $this->Db->Quote($area) . \"', '\" . $this->Db->Quote($value) . \"')\";\n\t\t\t$result = $this->Db->Query($query);\n\t\t}\n\n\n\t\treturn true;\n\t}", "public function sync()\n {\n $result = '';\n foreach ($this->hosts() as $host) {\n $result .= $host;\n $result .= \"\\n\";\n }\n file_put_contents($this->configFilePath(), $result);\n }", "public function save_settings()\n\t{\n\t\t// Create settings array.\n\t\t$settings = array();\n\n\t\t// Loop through default settings and check for saved values.\n\t\tforeach (ee()->simple_cloner_settings->_default_settings as $key => $value)\n\t\t{\n\t\t\tif(($settings[$key] = ee()->input->post($key)) == FALSE)\n\t\t\t{\n\t\t\t\t$settings[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\t// Serialize settings array and update the extensions table.\n\t\tee()->db->where('class', $this->class_name.'_ext');\n\t\tee()->db->update('extensions', array('settings' => serialize($settings)));\n\n\t\t// Create alert when settings are saved and redirect back to settings page.\n\t\tee('CP/Alert')->makeInline('simple-cloner-save')\n\t\t\t->asSuccess()\n\t\t\t->withTitle(lang('message_success'))\n\t\t\t->addToBody(lang('preferences_updated'))\n\t\t\t->defer();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make('addons/settings/simple_cloner'));\n\t}", "function iniwrite() {\n\t global $setini;\n\t\n\t $ini = $this->gtk_path . \"webos.ini\"; \t//echo $ini; \n\t \n if ($fp = fopen ($ini , \"wb\")) {\n\t\t\n\t\t\t\t $tow = serialize($setini) . \"<@>\";\t \n\t\t\t\t\t \n fwrite ($fp, $tow);\n fclose ($fp);\n\t\t\t\t \n\t\t $this->set_console_message(\"Writing ini settings successfully.\");\t\t\t\t \n\t\t\t\t return (true);\n\t }\n\t else {\n\t\t $this->set_console_message(\"Ini setting NOT saved !!!\");\t\t\n\t\t\t\t return (false);\n\t\t}\t\t\n\t}", "public function write($config, $namespace = null, $writeFile = true) {\n\t\t$config[$this->alias] = $this->arrayToKeys($config[$this->alias]);\n\t\t$conditions = array($this->alias . '.key' => array_keys($config[$this->alias]));\n\t\t$current = $this->find('all', compact('conditions'));\n\t\t$this->deleteAll($conditions, false);\n\n\t\tforeach ($config[$this->alias] as $key => $value) {\n\t\t\t$data = array(\n\t\t\t\t$this->alias => array(\n\t\t\t\t\t'key' => $key,\n\t\t\t\t\t'namespace' => $namespace,\n\t\t\t\t\t'value' => serialize($value)));\n\t\t\t$this->create();\n\t\t\t$this->save($data, false);\n\t\t}\n\n\t\t$result = $writeFile ? $this->writeFile() && $this->loadFile() : true;\n\n\t\t$compare = isset($current[$this->alias]) ? $current[$this->alias] : array();\n\t\tif ($new = array_diff_assoc($config[$this->alias], $compare)) {\n\t\t\t$old = array();\n\t\t\tforeach ($new as $key => $value) {\n\t\t\t\t$old[$key] = isset($current[$this->alias][$key]) ? $current[$this->alias][$key] : null;\n\t\t\t}\n\t\t\t$this->getEventManager()->dispatch(new CakeEvent('Config.Config.change', $this, compact('old', 'new')));\n\t\t}\n\n\t\treturn $result;\n\t}", "public function change()\n {\n $config = $this->table('config');\n $config\n ->addColumn('name', 'string', ['limit' => 255])\n ->addColumn('value', 'string', ['limit' => 255])\n ->addIndex(['name'], ['unique' => true])\n ->create();\n\n $configRows = [\n ['id' => 1, 'name' => 'active_theme_id', 'value' => '1'],\n ['id' => 2, 'name' => 'active_menu_id', 'value' => '0'],\n ['id' => 3, 'name' => 'active_footer_menu_id', 'value' => '0'],\n ['id' => 4, 'name' => 'siteurl', 'value' => ''],\n ['id' => 5, 'name' => 'sitetitle', 'value' => ''],\n ['id' => 6, 'name' => 'sitedescription', 'value' => ''],\n ['id' => 7, 'name' => 'sitesubtitle', 'value' => ''],\n ['id' => 8, 'name' => 'home_page_id', 'value' => '1']\n ];\n\n $this->insert('config', $configRows);\n }", "function config_save($data) {\n $module = 'project/lpr';\n\n foreach ($data as $name => $value) {\n set_config($name, $value, $module);\n }\n\n return true;\n }", "private function _writeValue($value)\n\t{\n\t\tfwrite($this->_stream, $value);\n\t}", "public function saveParamInFile() {\r\n foreach ($this->_param_names as $param_name)\r\n\t{\r\n\t\t$funcname = 'get'.$param_name;\r\n\t\tif (_PS_VERSION_ < '1.5')\r\n\t\t\tConfiguration::updateValue('KWIXO_'.strtoupper($param_name), $this->$funcname());\r\n\t\telse\r\n\t\t\tConfiguration::updateValue('KWIXO_'.strtoupper($param_name), $this->$funcname(), false, null, $this->getIdshop());\r\n\t}\r\n }", "protected function setConfigValue($data){\t\n\t\tMage::getModel('core/config_data')->load($data['path'],'path')->setData($data)->save();\n\t}", "public function update(){\n $file = fopen(\"update.txt\",\"w\") or die (\"Cannot open file!\");\n foreach($this->accounts as $account){\n $line = $account->id.\" \".$account->balance.\"\\n\";\n fwrite($file,$line);\n }\n fclose($file);\n }", "private function save() \n {\n $content = \"<?php\\n\\nreturn\\n[\\n\";\n\n foreach ($this->arrayLang as $this->key => $this->value) \n {\n $content .= \"\\t'\".$this->key.\"' => '\".$this->value.\"',\\n\";\n }\n\n $content .= \"];\";\n\n file_put_contents($this->path, $content);\n\n }", "public function writeClassConfig($class)\n {\n $text = array();\n $list = $this->api[$class]['config_keys'];\n if ($list) {\n foreach ($list as $name => $info) {\n $text[] = $this->_title2(\"`$name` {#class.$class.Config.$name}\");\n $text[] = \"* (*{$info['type']}*) {$info['summ']}\";\n $text[] = \"* Default: `{$info['value']}`\";\n $text[] = \"\";\n }\n } else {\n $text[] = 'None.';\n $text[] = '';\n }\n \n $this->_write(\"class\", \"$class/Config\", $text);\n }", "public function set($config){\n\t\t$this->configValues = $config;\n\t}" ]
[ "0.72835493", "0.71582097", "0.6793914", "0.67463636", "0.6713061", "0.6544273", "0.6535609", "0.65168625", "0.6459546", "0.6427874", "0.641407", "0.6407399", "0.63286376", "0.62837553", "0.6274568", "0.6243364", "0.6208958", "0.60104984", "0.59945565", "0.5939518", "0.5864656", "0.5835526", "0.58027345", "0.58009905", "0.5778777", "0.57358223", "0.57017225", "0.5636913", "0.56002533", "0.55987453", "0.5594523", "0.55789554", "0.55705714", "0.55543417", "0.5524934", "0.5517774", "0.551571", "0.5490074", "0.54866177", "0.547611", "0.546286", "0.5458489", "0.54510915", "0.54390204", "0.543792", "0.54302275", "0.5419992", "0.5395977", "0.53952026", "0.5392822", "0.53819853", "0.53766334", "0.5371428", "0.53613144", "0.5359211", "0.5347335", "0.5346025", "0.53405946", "0.5322381", "0.5293434", "0.52885807", "0.5279201", "0.5273694", "0.52319616", "0.52138567", "0.5211896", "0.5211532", "0.52093005", "0.5205603", "0.5185054", "0.5183958", "0.5171986", "0.51656336", "0.5165352", "0.51523066", "0.5147796", "0.5141901", "0.51385355", "0.5132288", "0.51315", "0.5123636", "0.51215684", "0.5120308", "0.51196367", "0.5107465", "0.5106029", "0.5105767", "0.50966364", "0.5082432", "0.5074807", "0.5071017", "0.5069285", "0.50684357", "0.50681674", "0.5067924", "0.50663877", "0.50642943", "0.50475276", "0.50320286", "0.50289774", "0.5028579" ]
0.0
-1
Data provider for color values.
public function providerColor(): \Generator { // color, exception, type error yield [128, false, false]; yield [0, false, false]; yield [255, false, false]; yield [0x80, false, false]; yield [0x00, false, false]; yield [0xFF, false, false]; yield [-1, true, false]; yield [256, true, false]; yield [0x100, true, false]; yield [128.5, false, true]; yield ['128', false, true]; yield ['notanumber', false, true]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getDataColorArray() {\n\t\treturn $this->dataColorArray;\n\t}", "public function getColor();", "public function getColor();", "public function getColor();", "public function getColor();", "public function getColor() {}", "public function getColor() {}", "public function getColor() {\n\t}", "public function getColor()\n {\n }", "function getColor() { return $this->_color; }", "function getColor() { return $this->_color; }", "function getColor() {return $this->readColor();}", "function getColor() { return $this->readColor(); }", "public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "function getColor() { return $this->_color; }", "public function color()\n {\n $color = $this->customer->color;\n\n $r = substr($color, 1, 2);\n $g = substr($color, 3, 2);\n $b = substr($color, 5, 2);\n $luma = (float)0.2126 * hexdec($r)\n + 0.7152 * hexdec($g)\n + 0.0722 * hexdec($b);\n\n return ['color' => $this->customer->color, 'luma' => $luma];\n }", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorComponents() {}", "public function getColorInfo()\n {\n return $this->color_info;\n }", "public function getColor()\n{\nreturn $this->color;\n}", "public function getColor ()\r\n {\r\n return $this->color;\r\n }", "public function getColor()\n {\n return $this->color;\n }", "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function backgroundColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function getColor()\n {\n // Busca en esta clase la propiedad X\n return $this->color;\n }", "public function getColor() {\n //Busca en esta clase la propiedad x\n return $this->color;\n }", "public function color(array $color);", "function FCallback($aVal) {\n // This callback will adjust the fill color and size of\n // the datapoint according to the data value according to\n if( $aVal < 30 ) $c = \"blue\";\n elseif( $aVal < 70 ) $c = \"green\";\n else $c=\"red\";\n return array(floor($aVal/3),\"\",$c);\n}", "function getColor(){\n\t\t# Like this: Array ( [red] => 255 [green] => 255 [blue] => 255 )\n\t\t# You could then use it with the setRGB function (See class.rgbcontrol.php for that.)\n\t\t# Simple usage is $led->setRBG($dbh->getColor());\n\n\t\t$pdo = $this->db->prepare(\"SELECT red,green,blue FROM colors ORDER BY cID DESC LIMIT 1\");\n\t\t$pdo->execute();\n\n\t\treturn $pdo->fetch();\n\t}", "function getColor() {\n\t\treturn $this->color;\n\t}", "public function getColor()\n {\n $La_Color = null;\n\n switch($this->i_Colormode)\n {\n case self::SVNHUE_COLORMODE_HUE:\n $La_Color['hue'] = $this->a_State['hue'];\n $La_Color['sat'] = $this->a_State['sat'];\n break;\n\n case self::SVNHUE_COLORMODE_CT:\n $La_Color['ct'] = $this->a_State['ct'];\n break;\n\n case self::SVNHUE_COLORMODE_XY:\n $La_Color['xy'] = $this->a_State['xy'];\n break;\n } /* switch */\n\n return($La_Color);\n\n }", "public function getColor()\n {\n return $this->color;\n }", "public function getColor()\n {\n return $this->color;\n }", "public function getColor()\n {\n return $this->color;\n }", "public function colour();", "public function color_data($red, $green, $blue, $data_id) {\n if (!array_key_exists($data_id, $this->data_collections)) {\n throw new ItemNotFoundException();\n }\n if (!is_integer($red) || $red < 0 || $red > 255) {\n throw new \\InvalidArgumentException(\"red - integer between 0 and 255 expected\");\n }\n if (!is_integer($green) || $green < 0 || $green > 255) {\n throw new \\InvalidArgumentException(\"green - integer between 0 and 255 expected\");\n }\n if (!is_integer($blue) || $blue < 0 || $blue > 255) {\n throw new \\InvalidArgumentException(\"blue - integer between 0 and 255 expected\");\n }\n $this->colors[$data_id] = [\n \"r\" => $red,\n \"g\" => $green,\n \"b\" => $blue\n ];\n }", "public function getColor() {\n\n\t\t//return $query->rows;\n\t}", "private function _getColorTable() {}", "public function processColor()\n {\n $colorCalculator = new Color(self::$_query);\n $data = $colorCalculator->processQuery();\n\n return $data;\n }", "public function colorList() {}", "public function getColor(): string;", "public function getColor()\n {\n return $this->color;\n }", "function getColor(){\n\t\treturn $this->color_ficha;\n\t}", "public function canStoreColor();", "public function getColor()\n\t{\n\t\treturn $this->color;\n\t}", "function callback_color($args)\n {\n }", "public function getColor() {\n\t\treturn $this->color;\n\t}", "public function getColor2()\n {\n $sql = \"SELECT color_hex\n FROM site_color where site_color_id = 2\";\n\n $statement = $this->_dbh->prepare($sql);\n\n// $statement->bindParam(':color2', $color2);\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getColorListAttribute()\n {\n $colors = $this->colors()->lists('name')->all();\n // retorno as tags separadas por uma virgula e um espaço.\n return $colors;\n }", "public function getColor(): ?string {\n $val = $this->getBackingStore()->get('color');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'color'\");\n }", "public function setColor()\n {\n // Set color based on provided name\n if (isset($this->compParams['color']) && !empty($this->compParams['color'])) {\n $this->data['classList'][] = $this->getBaseClass() . \"--color-\" . strtolower($this->compParams['color']);\n }\n\n return $this->data;\n }", "public function get_color()\n\t{\n\t\treturn $this->color;\n\t}", "function costum_setting_colors_infoColor_callback() {\n\t$infoColor = esc_attr( get_option( 'infoColor' ) ); ?>\n\n\t<div class=\"input-color-container\">\n\t\t<input name=\"infoColor\" id=\"input-infoColor\" value=\"<?php echo $infoColor; ?>\" class=\"input-color\" type=\"color\">\n\t</div>\n\n\t<?php\n}", "public function getColor()\n {\n $colorAttribute = $this->helper->getColorConfig();\n\n return $this->getAttribute($colorAttribute);\n }", "public function getColor()\n {\n if (array_key_exists(\"color\", $this->_propDict)) {\n return $this->_propDict[\"color\"];\n } else {\n return null;\n }\n }", "public function color_index()\n {\n $attribute_values = Attribute_value::getAllColorValues();\n $categories = Category::getAllCategoriesSecondLevel();\n return view('backend.attribute_value.color.index')->with(['attribute_values' => $attribute_values, 'categories' => $categories]);\n }", "public function getColor()\n {\n return\"Yellow\";\n }", "public function getColor3()\n {\n $sql = \"SELECT color_hex\n FROM site_color where site_color_id = 3\";\n\n $statement = $this->_dbh->prepare($sql);\n\n// $statement->bindParam(':color3', $color3);\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "public function get_color() {\n $query = $this->db->get('color');\n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return false;\n }\n }", "public function getColor()\n {\n return self::QUALITY_MAP[$this->qualityID]['color'];\n }", "public function color()\n {\n }", "public function getColors()\n {\n return $this->colors;\n }", "public static function colorPicker($data= array())\n\t{\n\t\tob_start();\n\t\t//add defaults as we need them for modules.\n\t\t$name = 'color';\n\t\t$id = rand();\n\t\t$format = '';\n\t\t$defaultColor = '#000000';\n\t\t$disabled = 0;\n\n\t\textract($data);\n\n\t\t?>\n\t\t<div id=\"colorpicker_<?php echo $id; ?>\" class=\"input-group colorpicker-component\">\n\t\t\t<input type=\"text\" name=\"<?php echo $name; ?>\" value=\"<?php echo $defaultColor; ?>\" class=\"form-control\" />\n\t\t\t<span class=\"input-group-addon\"><i></i></span>\n\t\t</div>\n\t\t<script>\n\t\t\t$(function() {\n\t\t\t\t$('#colorpicker_<?php echo $id; ?>').colorpicker({\n\t\t\t\t\tcustomClass: 'colorpicker-2x',\n\t\t\t\t\tsliders: {\n\t\t\t\t\t\tsaturation: {\n\t\t\t\t\t\t\tmaxLeft: 200,\n\t\t\t\t\t\t\tmaxTop: 200\n\t\t\t\t\t\t},\n\t\t\t\t\t\thue: {\n\t\t\t\t\t\t\tmaxTop: 200\n\t\t\t\t\t\t},\n\t\t\t\t\t\talpha: {\n\t\t\t\t\t\t\tmaxTop: 200\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t<?php if($format != ''){ ?>\n\t\t\t\t\tformat: '<?php echo $format; ?>',\n\t\t\t\t\t<?php }?>\n\t\t\t\t});\n\t\t\t});\n\t\t</script>\n\t\t<?php return ob_get_clean();\n\t}", "public function colorImage() {}", "public function getColorList()\n {\n return $this->colorList;\n }", "function FCallback($aVal) {\n // the datapoint according to the data value according to\n if( $aVal < 30 ) $c = \"blue\";\n elseif( $aVal < 70 ) $c = \"green\";\n else $c=\"red\";\n return array(floor($aVal/3),\"\",$c);\n}", "public static function GetInfo($color)\n {\n if(!self::isReady())\n throw new Exception('colors are not ready to use. please run ColorName::Prepare() first; : ' . $color); \n\n /* if(is_array($color)) \n $color = self::hex_me($color); */\n\n $color = self::fix_code($color);\n\n $hsl = self::GetHsl($color);\n $rgb = self::GetRgb($color);\n\n $df = -1;\n $cl = -1;\n\n $percent = 0; \n\n\n\n foreach (self::$colors as $i => $colorInfo)\n {\n if($color == $colorInfo->code)\n {\n $percent = 100;\n return $colorInfo;\n }\n\n $ndf1 = pow($rgb['r'] - $colorInfo->r, 2) + pow($rgb['g'] - $colorInfo->g, 2) + pow($rgb['b'] - $colorInfo->b, 2);\n $ndf2 = pow($hsl['h'] - $colorInfo->h, 2) + pow($hsl['s'] -$colorInfo->s, 2) + pow($hsl['l'] - $colorInfo->l, 2);\n $ndf = $ndf1 + $ndf2 * 2;\n if($df < 0 || $df > $ndf)\n {\n $df = $ndf;\n $cl = $i;\n if($df < 100)\n $percent = 100 - $df;\n else\n $percent = abs($df) % 100;\n } \n }\n\n if($cl < 0)\n throw new Exception('invalid color> : ' . $color,E_USER_WARNING);\n else\n {\n $colorInfo = self::$colors[$cl];\n $colorInfo->similarity = $percent;\n return $colorInfo;\n } \n\n #ide Hack.\n return new ColorInfo(); \n }", "public function getColor() {\n\t\t\treturn $this->_color;\n\t\t}", "public function loadColor($name, array $color);", "public function getColor()\n {\n return $this->color ?? $this->defaultColor;\n }", "public function getColor(): string\n {\n }", "public function post_rating_colors()\n\t{\n\t\t\n\t\t$query = $this->db->query(\"SELECT `average`, `color` FROM `post_rating_colors`\");\n\t\t\n\t\t// echo $this->db->last_query();\n\t\t// print_r($query->result_array()\t);\n\t\t// die();\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\t$all_colors = array();\n\t\t\tforeach ($query->result_array() as $value) {\n\t\t\t\t$all_colors[$value['average']] = $value['color'];\n\t\t\t}\n\t\t\treturn $all_colors;\n\t\t}\n\t}", "public function getColor1()\n {\n $sql = \"SELECT color_hex\n FROM site_color where site_color_id = 1\";\n\n $statement = $this->_dbh->prepare($sql);\n\n //$statement->bindParam(':color1', $color1);\n $statement->execute();\n //echo $statement;\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getColor():Color\n {\n return $this->color;\n }", "public function getColor(): Color\n {\n return $this->color;\n }", "public function color($value) {\n return $this->setProperty('color', $value);\n }", "public function color($value) {\n return $this->setProperty('color', $value);\n }", "public function color($value) {\n return $this->setProperty('color', $value);\n }", "public function color($value) {\n return $this->setProperty('color', $value);\n }", "public function color($value) {\n return $this->setProperty('color', $value);\n }", "public function color($value) {\n return $this->setProperty('color', $value);\n }", "public function color($value) {\n return $this->setProperty('color', $value);\n }", "public function color($value) {\n return $this->setProperty('color', $value);\n }", "function addData($name, $value, $colour)\n {\n $value *= 1.0; // Make sure it's a number\n\n if ($value < 0) {\n return;\n }\n\n $this->data[] = array\n (\n 'name' => $name,\n 'value' => $value,\n 'colour' => $this->hexcol($colour),\n );\n\n $this->total += $value;\n }", "function colorList() {\n $colorArr = (new \\yii\\db\\Query())\n ->select(['color'])\n ->from('product_variation')\n ->where(['!=', 'color', ''])\n ->groupBy(['color'])\n ->all();\n return $colorArr;\n }", "public function callback_color( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n\n $html = sprintf( '<input type=\"text\" class=\"%1$s-text wp-color-picker-field\" id=\"%2$s\" name=\"%2$s\" value=\"%3$s\" data-default-color=\"%4$s\" />', $size, $name_id, $value, $args['std'] );\n $html .= $this->get_field_description( $args );\n\n echo $html;\n }", "public function colorMatrix() {}", "function getColors($which = null){\n\t// Process to get real data, for this example\n\t// it is just a static array\n\t$colors = array(\n\t\t'responseMsg' \t=> setResponse(), \n\t\t'allColors' \t=> array('blue', 'green', 'black', 'white', 'yellow', 'red', 'beige')\n\t); \n\t\n\treturn $colors; \n}", "function color( \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_COLOR,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t null,\n\t Form::DATA_STRING\n );\n\t}", "public static function summaryChartColouring()\n {\n return [ '#f1592c', '#f3724c', '#f58b6c', '#f7a48c' ];\n }", "function ffw_port_color_callback( $args ) {\n global $ffw_port_settings;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $default = isset( $args['std'] ) ? $args['std'] : '';\n\n $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';\n $html = '<input type=\"text\" class=\"ffw_port-color-picker\" id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" value=\"' . esc_attr( $value ) . '\" data-default-color=\"' . esc_attr( $default ) . '\" />';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "public static function color($value)\n {\n self::$color = Color::toRGBA($value);\n }", "public function __construct($value)\n {\n do {\n if ($hex = $this->getHexFromColorName($value)) {\n $rgba = $this->parseHex($hex);\n $alpha = 1;\n break;\n }\n\n if (preg_match(self::SHORT_RGB, $value)) {\n $rgba = $this->parseHex($value.$value);\n $alpha = 1;\n break;\n }\n\n if (preg_match(self::SHORT_ARGB, $value)) {\n $rgba = $this->parseHex(substr($value, 1).substr($value, 1));\n $alpha = (float) substr($value, 0, 1) / 10;\n break;\n }\n\n if (preg_match(self::LONG_RGB, $value)) {\n $rgba = $this->parseHex($value);\n $alpha = 1;\n break;\n }\n\n if (preg_match(self::LONG_ARGB, $value)) {\n $rgba = $this->parseHex(substr($value, 2));\n $alpha = (float) substr($value, 0, 2) / 100;\n break;\n }\n\n $rgba = [255, 255, 255];\n $alpha = 0;\n } while (false);\n\n $this->red = $rgba[0];\n $this->green = $rgba[1];\n $this->blue = $rgba[2];\n $this->alpha = $alpha;\n }", "public function setDataColorArray($dataColorArray = array()) {\n\t\t$this->dataColorArray = $dataColorArray;\n\t}" ]
[ "0.6653067", "0.6645436", "0.6645436", "0.6645436", "0.6645436", "0.6574012", "0.6574012", "0.6214364", "0.620886", "0.61759347", "0.61759347", "0.6163316", "0.615673", "0.61450326", "0.61450326", "0.6122106", "0.60961205", "0.6043087", "0.6043087", "0.6043087", "0.6043087", "0.6043087", "0.6043087", "0.60430735", "0.6008377", "0.60079163", "0.5980276", "0.5962768", "0.5954106", "0.5954106", "0.5940352", "0.59184504", "0.58819765", "0.5848239", "0.5831585", "0.5828035", "0.5821254", "0.5817343", "0.5817343", "0.5817343", "0.5803655", "0.58019215", "0.57915366", "0.57853395", "0.57808024", "0.5780394", "0.57707953", "0.57657236", "0.5763286", "0.57439166", "0.57167715", "0.5711953", "0.5708626", "0.5699712", "0.5684638", "0.567984", "0.56793123", "0.5659686", "0.5651527", "0.56456757", "0.5641446", "0.5633545", "0.5628182", "0.5615253", "0.5607658", "0.5604679", "0.5600005", "0.55952615", "0.55894935", "0.55781245", "0.5575383", "0.5571329", "0.553518", "0.5533869", "0.55281556", "0.55215055", "0.55162346", "0.549665", "0.5463753", "0.54502416", "0.5428187", "0.5424677", "0.5424677", "0.5424677", "0.5424677", "0.5424677", "0.5424677", "0.5424677", "0.5424677", "0.5408626", "0.53868306", "0.5375061", "0.53353804", "0.5332151", "0.5317666", "0.5312122", "0.5301335", "0.52984464", "0.5277828", "0.52770156" ]
0.6583167
5
Data provider for alpha values.
public function providerAlpha(): \Generator { // alpha, exception yield [64, false, false]; yield [0, false, false]; yield [127, false, false]; yield [-1, true, false]; yield [128, true, false]; yield [64.0, false, true]; yield ['64', false, true]; yield ['notanumber', false, true]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getAlpha() {\n\t\treturn $this->alpha;\n\t}", "public function getAlpha(): int\n {\n return $this->alpha;\n }", "public function setAlpha($alpha = 40) {\n\t\t$this->alpha = $alpha;\n\t}", "protected function parseAlpha()\n {\n if (!$this->matchString('(opacity=')) {\n return;\n }\n\n $value = $this->matchReg('/\\\\G[0-9]+/');\n if ($value === null) {\n $value = $this->parseEntitiesVariable();\n }\n\n if ($value !== null) {\n $this->expect(')');\n\n return new ILess_Node_Alpha($value);\n }\n }", "public function getAlpha()\n {\n $alpha = 100;\n if (strlen($this->argb) >= 6) {\n $dec = hexdec(substr($this->argb, 0, 2));\n $alpha = number_format(($dec / 255) * 100, 2);\n }\n\n return $alpha;\n }", "public function extensionKeyDataProvider() {}", "public function testIsAlpha() {\n $this->assertTrue(Hash::isAlpha(array('foo', 'bar')));\n $this->assertTrue(Hash::isAlpha(array('foo' => 'bar', 'number' => '123'), false));\n $this->assertTrue(Hash::isAlpha(array('bar', '123'), false));\n\n $this->assertFalse(Hash::isAlpha(array('foo' => 'bar', 'number' => '123')));\n $this->assertFalse(Hash::isAlpha(array('bar', '123')));\n $this->assertFalse(Hash::isAlpha(array('foo' => 123)));\n $this->assertFalse(Hash::isAlpha(array(null)));\n $this->assertFalse(Hash::isAlpha(array(true)));\n $this->assertFalse(Hash::isAlpha(array(false)));\n $this->assertFalse(Hash::isAlpha(array(array())));\n $this->assertFalse(Hash::isAlpha(array(new stdClass())));\n }", "public function IsAlpha () {\n\t\tif ($this->name === NULL) $this->GetName();\n\t\treturn $this->values[\\MvcCore\\IEnvironment::ALPHA];\n\t}", "private final function getLowerAlpha() {\n\t\t\treturn $this->lowerAlpha;\n\t\t}", "function _wp_tinycolor_bound_alpha($n)\n {\n }", "private function alpha($field, $value) {\n if (!preg_match(self::REGEX_ALPHA, $value)) {\n $this->errors[$field][] = self::ERROR_ALPHA;\n }\n }", "function SetAlpha($alpha, $bm='Normal')\n {\n // set alpha for stroking (CA) and non-stroking (ca) operations\n $gs = $this->AddExtGState(array('ca'=>$alpha, 'CA'=>$alpha, 'BM'=>'/'.$bm));\n $this->SetExtGState($gs);\n }", "function get_alpha_link($p_alpha) {\n\t\tglobal $db, $g_alpha;\n\t\t$p_alpha = strtoupper($p_alpha);\n\t\treturn ($p_alpha == $g_alpha) ? $p_alpha : '<a href=\"'.$_SERVER['PHP_SELF'].'?m=surnames&amp;alpha='.$p_alpha.'\">'.gtc($p_alpha).'</a>';\n\t}", "public function getValueReturnsCorrectValuesDataProvider() {}", "public function setAlpha($alpha = 100)\n {\n if ($alpha < 0) {\n $alpha = 0;\n }\n if ($alpha > 100) {\n $alpha = 100;\n }\n $alpha = round(($alpha / 100) * 255);\n $alpha = dechex((int) $alpha);\n $alpha = str_pad($alpha, 2, '0', STR_PAD_LEFT);\n $this->argb = $alpha . substr($this->argb, 2);\n\n return $this;\n }", "public function valuesProvider()\n {\n return array(\n // MilliMeter Cube\n array(VolumeConverter::class, 1000, \"-9\", 0.000001, \"-6\"),\n array(VolumeConverter::class, 123, \"-9\", 0.000000123, \"-9\"),\n array(VolumeConverter::class, 12.3456, \"-9\", 0.0000000123456, \"-9\"),\n // Centimenter Cube\n array(VolumeConverter::class, 1, \"-6\", 0.000001, \"-6\"),\n array(VolumeConverter::class, 12.3456, \"-6\", 0.0000123456, \"-6\"),\n array(VolumeConverter::class, 123.456, \"-6\", 0.000123456, \"-6\"),\n array(VolumeConverter::class, 1234.56, \"-6\", 0.00123456, \"-3\"),\n array(VolumeConverter::class, 0.1234, \"-6\", 0.0000001234, \"-9\"),\n array(VolumeConverter::class, 0.0123, \"-6\", 0.0000000123, \"-9\"),\n // Decimenter Cube\n array(VolumeConverter::class, 1, \"-3\", 0.001, \"-3\"),\n array(VolumeConverter::class, 12.3456, \"-3\", 0.0123456, \"-3\"),\n array(VolumeConverter::class, 123.456, \"-3\", 0.123456, \"-3\"),\n array(VolumeConverter::class, 0.12345, \"-3\", 0.00012345, \"-6\"),\n array(VolumeConverter::class, 0.01234, \"-3\", 0.00001234, \"-6\"),\n // Meters Cube\n array(VolumeConverter::class, 1, \"0\", 1, \"0\"),\n array(VolumeConverter::class, 1234.56, \"0\", 1234.56, \"0\"),\n array(VolumeConverter::class, 123.456, \"0\", 123.456, \"0\"),\n array(VolumeConverter::class, 0.123456, \"0\", 0.123456, \"-3\"),\n array(VolumeConverter::class, 0.012345, \"0\", 0.012345, \"-3\"),\n array(VolumeConverter::class, 0.001234, \"0\", 0.001234, \"-3\"),\n array(VolumeConverter::class, 0.000123, \"0\", 0.000123, \"-6\"),\n // Foot Cube\n array(VolumeConverter::class, 1, \"88\", 0.028317, \"-3\"),\n array(VolumeConverter::class, 123456, \"88\", 3495.884613, \"0\"),\n // Inch Cube\n array(VolumeConverter::class, 1, \"89\", 0.000016, \"-6\"),\n array(VolumeConverter::class, 123456, \"89\", 2.023081, \"0\"),\n // Ounce Cube\n array(VolumeConverter::class, 1, \"97\", 0.000029574, \"-6\"),\n array(VolumeConverter::class, 123456, \"97\", 3.651028, \"0\"),\n // Liter\n array(VolumeConverter::class, 1, \"98\", 0.001, \"-3\"),\n array(VolumeConverter::class, 123456, \"98\", 123.456, \"0\"),\n // Galon\n array(VolumeConverter::class, 1, \"99\", 0.00378541, \"-3\"),\n array(VolumeConverter::class, 123456, \"99\", 467.331577, \"0\"),\n );\n }", "public function provider()\n {\n return array(\n array('£3.99', '3.99'),\n array('$2.99 USD', '2.99'),\n array('€4,999,999.01', '4999999.01'),\n array('€4999999,01', '4999999.01'),\n );\n }", "public static function alphaChars()\n {\n return self::oneOf(\n self::choose(65, 90),\n self::choose(97, 122)\n )->fmap('chr');\n }", "public function valuesDataProvider()\n {\n return [\n 'new value' => [\n 'mynew_value',\n 'new value',\n 2,\n ],\n 'existing value' => [\n 'myvalue_id',\n 567,\n 1,\n ],\n 'exsiting value with attribute' => [\n 'myvalue_id',\n 'new value',\n 1,\n ],\n 'check name of attribute' => [\n '1',\n 123,\n 2,\n ],\n ];\n }", "private function createAlphaNumber() {\n $alphaNumberChars = \"0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM\";\n \n $alphaNumber = \"\";\n for($i = 0; $i < 60; $i++) {\n $randomIndex = rand(0, 61);\n $alphaNumber .= substr($alphaNumberChars, $randomIndex, 1);\n }\n \n $this->alphaNumValidation = $alphaNumber;\n }", "public function alpha(): static\r\n {\r\n if (!ctype_alpha($this->field)) $this->message(\"should be only alphabet\");\r\n return $this;\r\n }", "static function alphaNum( $st_data )\r\n {\r\n $st_data = preg_replace(\"([[:punct:]]| )\",'',$st_data);\r\n return $st_data;\r\n }", "public function hasAlphaChannel() {\n return $this->hasChannel(Constants::CHANNEL_ALPHA);\n }", "public function createDataProvider()\n {\n return [\n [1, 1, 0],\n [null, 0, 1]\n ];\n }", "public function stdWrap_stdWrapValueDataProvider() {}", "protected static function _alphaNumeric(){\n if (self::$_ruleValue) {\n $str = trim(self::$_elementValue);\n if (!preg_match('/[a-zA-z0-9]/', $str)) {\n self:: setErrorMessage(\"Alphanumeric only\");\n self::setInvalidFlag(true);\n } else {\n self::setInvalidFlag(false);\n }\n }\n }", "public function setAlphaValue( kaforkl_Position $position, $value )\n {\n $this->valueArray[$position->getX()][$position->getY()][self::ALPHA] = $value;\n }", "public function getAlphabet() {\n\t\t\treturn $this->alpha;\n\t\t}", "protected function _extractAlphaChannel($decodeParameters) {}", "public function defaultDataProvider()\n {\n return [\n [''],\n ['a'],\n [-1]\n ];\n }", "public function numberFormatDataProvider() {}", "public function dataProvider()\n {\n return [\n [\n new Money(10, 'EUR'),\n 'EUR',\n new Money(10, 'EUR'),\n ],\n [\n new Money(15, 'EUR'),\n 'SEK',\n new Money(15, 'EUR'),\n ],\n [\n new Money(1497, 'USD'),\n 'EUR',\n new Money(1000, 'EUR'),\n ],\n ];\n }", "function alaya_color_hex2rgba($color, $opacity = false) {\n\n\t$default = 'rgb(0,0,0)';\n\n\t//Return default if no color provided\n\tif(empty($color))\n return $default; \n\n\t//Sanitize $color if \"#\" is provided \n if ($color[0] == '#' ) {\n \t$color = substr( $color, 1 );\n }\n\n //Check if color has 6 or 3 characters and get values\n if (strlen($color) == 6) {\n $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );\n } elseif ( strlen( $color ) == 3 ) {\n $hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] );\n } else {\n return $default;\n }\n\n //Convert hexadec to rgb\n $rgb = array_map('hexdec', $hex);\n\n //Check if opacity is set(rgba or rgb)\n if($opacity){\n \tif(abs($opacity) > 1)\n \t\t$opacity = 1.0;\n \t$output = 'rgba('.implode(\",\",$rgb).','.$opacity.')';\n } else {\n \t$output = 'rgb('.implode(\",\",$rgb).')';\n }\n\n //Return rgb(a) color string\n\t\t$output = apply_filters('alaya_color_hex2rgba', $output);\n return $output;\n}", "function vAlpha( $name ) \r\n\t\t{\t \r\n\t\t\t\treturn ctype_alpha( $name );\r\n\t\t\t\t\t\t \r\n\t\t}", "public function gpDataProvider() {}", "public function dataProvider(): array\n {\n return [\n [ FruitType::NUT(), FruitType::NUT(), true ],\n [ FruitType::NUT(), FruitType::BERRY(), false ],\n [ FruitType::NUT(), FruitType::LEGUME(), false ],\n [ FruitType::NUT(), FruitType::ACCESSORY_FRUIT(), false ],\n [ FruitType::ACCESSORY_FRUIT(), FruitType::NUT(), true ],\n [ FruitType::ACCESSORY_FRUIT(), FruitType::BERRY(), true ],\n [ FruitType::ACCESSORY_FRUIT(), FruitType::LEGUME(), true ],\n [ FruitType::ACCESSORY_FRUIT(), FruitType::ACCESSORY_FRUIT(), true ],\n ];\n }", "public static function get_entries_by_letter_parameters() {\n return new external_function_parameters(array(\n 'id' => new external_value(PARAM_INT, 'Glossary entry ID'),\n 'letter' => new external_value(PARAM_ALPHA, 'A letter, or either keywords: \\'ALL\\' or \\'SPECIAL\\'.'),\n 'from' => new external_value(PARAM_INT, 'Start returning records from here', VALUE_DEFAULT, 0),\n 'limit' => new external_value(PARAM_INT, 'Number of records to return', VALUE_DEFAULT, 20),\n 'options' => new external_single_structure(array(\n 'includenotapproved' => new external_value(PARAM_BOOL, 'When false, includes the non-approved entries created by' .\n ' the user. When true, also includes the ones that the user has the permission to approve.', VALUE_DEFAULT, 0)\n ), 'An array of options', VALUE_DEFAULT, array())\n ));\n }", "public function alpha(string|int|float $message): self\n {\n return $this->addMessage(new Alpha($message));\n }", "public function getDataProvider();", "public function getDataProvider();", "public static function alphaNumChars()\n {\n return self::oneOf(\n self::choose(48, 57),\n self::choose(65, 90),\n self::choose(97, 122)\n )->fmap('chr');\n }", "public function TransparencyColor($red, $green, $blue,$alpha){\r\n $this->transparency_color=[$red,$green,$blue,$alpha];\r\n }", "public function alpha($content) {\r\n $content = preg_replace ( '/\\s+/', '', $content );\r\n \r\n if (! ctype_alpha ( $content ) && strlen ( $content ) > 0) {\r\n throw new ValidationException ( self::ERROR_NOT_ALPHA );\r\n }\r\n }", "public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function textColorProvider()\n {\n return [[\"#fff\"], [\"#000\"]];\n }", "public function dataProviderCreateInstance()\n {\n yield [\n [\n 'seed' => 0,\n 'min' => 0,\n 'max' => 10,\n 'format' => [\n [-1, -1],\n [-1, -1],\n ],\n ],\n ];\n }", "public function dataProvider(): array\n {\n return [\n [\n FruitType::NUT(),\n [\n Str::upper(FruitType::NUT) => FruitType::NUT(),\n ],\n ],\n [\n FruitType::BERRY(),\n [\n Str::upper(FruitType::NUT) => FruitType::NUT(),\n Str::upper(FruitType::BERRY) => FruitType::BERRY(),\n ],\n ],\n [\n FruitType::LEGUME(),\n [\n Str::upper(FruitType::NUT) => FruitType::NUT(),\n Str::upper(FruitType::BERRY) => FruitType::BERRY(),\n Str::upper(FruitType::LEGUME) => FruitType::LEGUME(),\n ],\n ],\n [\n FruitType::ACCESSORY_FRUIT(),\n [\n Str::upper(FruitType::NUT) => FruitType::NUT(),\n Str::upper(FruitType::BERRY) => FruitType::BERRY(),\n Str::upper(FruitType::LEGUME) => FruitType::LEGUME(),\n Str::upper(FruitType::ACCESSORY_FRUIT) => FruitType::ACCESSORY_FRUIT(),\n ],\n ],\n ];\n }", "public function dataProviderForNormalKde(): array\n {\n return [\n [-3.939, 8.60829883e-05],\n [-2.222, 0.04138222],\n [-0.505, 0.36562621],\n [0, 0.43200043],\n [1.212, 0.19113825],\n [2.929, 9.09492454e-05],\n ];\n }", "public static function alphaStrings()\n {\n return self::alphaChars()->intoArrays()->fmap('QCheck\\FP::str');\n }", "public function prepareDataProvider()\n\t{\n\t\treturn [\"abc\" => 'tao đạt nè'];\n\t}", "public function providerAjout()\n {\n return array(\n array(1,9),\n array(2,10),\n array(5,13),\n array(9,16)\n );\n }", "public function get_alpha2_code(): string { return $this->alpha2_code; }", "public function getAlpha2Code()\n {\n return $this->alpha2Code;\n }", "public function attributesDataProvider()\n {\n return [\n [\n [\n 'value1' => 123,\n 'value2' => 'string',\n ],\n ['value1'],\n ['value1'],\n [\n 'value1' => 123,\n ],\n ],\n [\n [\n 'value1' => 456,\n 'value2' => 'text',\n 'value3' => true,\n ],\n ['value1', 'value3'],\n ['value1', 'value3'],\n [\n 'value1' => 456,\n 'value3' => true,\n ],\n ],\n [\n [\n 'value1' => 'text',\n 'value2' => 789,\n 'value3' => false,\n ],\n ['value1', 'value2', 'value3'],\n ['value1', 'value2', 'value3'],\n [\n 'value1' => 'text',\n 'value2' => 789,\n 'value3' => false,\n ],\n ],\n ];\n }", "abstract protected function getDataProvider();", "public function replacementDataProvider() {}", "protected function validateAlpha($value){\n\t\treturn preg_match('/^[\\pL\\pM]+$/u', $value);\n\t}", "public function setAlpha(int $alpha): Color\n {\n self::validateAlpha($alpha);\n\n $this->alpha = $alpha;\n\n return $this;\n }", "public function validBooleanValuesDataProvider()\n {\n return array(\n array('VALID_EXPLICIT_LOWERCASE_TRUE'),\n array('VALID_EXPLICIT_LOWERCASE_FALSE'),\n array('VALID_EXPLICIT_UPPERCASE_TRUE'),\n array('VALID_EXPLICIT_UPPERCASE_FALSE'),\n array('VALID_EXPLICIT_MIXEDCASE_TRUE'),\n array('VALID_EXPLICIT_MIXEDCASE_FALSE'),\n\n array('VALID_NUMBER_TRUE'),\n array('VALID_NUMBER_FALSE'),\n\n array('VALID_ONOFF_LOWERCASE_TRUE'),\n array('VALID_ONOFF_LOWERCASE_FALSE'),\n array('VALID_ONOFF_UPPERCASE_TRUE'),\n array('VALID_ONOFF_UPPERCASE_FALSE'),\n array('VALID_ONOFF_MIXEDCASE_TRUE'),\n array('VALID_ONOFF_MIXEDCASE_FALSE'),\n\n array('VALID_YESNO_LOWERCASE_TRUE'),\n array('VALID_YESNO_LOWERCASE_FALSE'),\n array('VALID_YESNO_UPPERCASE_TRUE'),\n array('VALID_YESNO_UPPERCASE_FALSE'),\n array('VALID_YESNO_MIXEDCASE_TRUE'),\n array('VALID_YESNO_MIXEDCASE_FALSE'),\n );\n }", "public function getAttributes_price_letters() {\n\t\treturn $this->attributes_price_letters;\n\t}", "protected function validateAlpha($attribute, $value)\n {\n // オリジナルのバリデーションから多バイト文字を除外\n return is_string($value) && preg_match('/^[\\pL\\pM]+$/', $value);\n }", "private final function getUpperAlpha() {\n\t\t\treturn $this->upperAlpha;\n\t\t}", "public function providerColor(): \\Generator\n {\n // color, exception, type error\n yield [128, false, false];\n\n yield [0, false, false];\n\n yield [255, false, false];\n\n yield [0x80, false, false];\n\n yield [0x00, false, false];\n\n yield [0xFF, false, false];\n\n yield [-1, true, false];\n\n yield [256, true, false];\n\n yield [0x100, true, false];\n\n yield [128.5, false, true];\n\n yield ['128', false, true];\n\n yield ['notanumber', false, true];\n }", "public function hydrateValuesDataProvider()\n {\n return [\n [\n [\n 'val1' => 1,\n 'val2' => 'text',\n 'val3' => false,\n 'val4' => 2,\n 'val5' => 3.5,\n ],\n [],\n ],\n ];\n }", "public function inputValuesStringsDataProvider() {}", "function random_color($alpha = 1) {\n $red = rand(0, 255);\n $green = rand(0, 255);\n $blue = rand(0, 255);\n return \"rgba($red,$blue,$green,$alpha)\";\n}", "public function isAlpha()\n {\n return $this->matchesPattern('^[[:alpha:]]*$');\n }", "public function provider()\n {\n return array(\n array('¬`!\"£$%^&*()+=', '%C2%AC%60%21%22%C2%A3%24%25%5E%26%2A%28%29%2B%3D'),\n array('{}[]:;<>,@~#', '%7B%7D%5B%5D%3A%3B%3C%3E%2C%40%7E%23'),\n array('-_. ', '-_.+'),\n );\n }", "private function _retrieveFormattedDataAttributes()\n {\n $dataAttribs = '';\n $filter = new Zend_Filter_Word_CamelCaseToDash();\n foreach ($this->_dataAttribs as $key => $value) {\n $key = strtolower($filter->filter($key));\n if ($value === true) {\n $value = 'true';\n } else if($value === false) {\n $value = 'false';\n }\n $dataAttribs .= \"data-$key=\\\"$value\\\" \";\n }\n return $dataAttribs;\n }", "function FCallback($aVal) {\n // the datapoint according to the data value according to\n if( $aVal < 30 ) $c = \"blue\";\n elseif( $aVal < 70 ) $c = \"green\";\n else $c=\"red\";\n return array(floor($aVal/3),\"\",$c);\n}", "public function alpha(string|array $value, bool $space = false) : string|array\n\t{\n\t\treturn $this->handlers->map($value, function ($value) use ($space) {\n\t\t\treturn $this->handlers->get('alpha')->filter($value, $space);\n\t\t});\n\t}", "public static function GetAlphaNumericCharacters()\n {\n $ascii = self::GetCharacters();\n\n return preg_replace('/[^A-Z0-9]*/i', '', $ascii);\n }", "public static function dataProvider()\n\t{\n\t\treturn array(\n\t\t\tarray(1600, 'MONTHLY', 1600),\n\t\t\tarray(2800, 'FOUR_WEEKLY', 2800),\n\t\t\tarray(280, 'TWICE_MONTHLY', 140),\n\t\t\tarray(1400, 'BI_WEEKLY', 700),\n\t\t\tarray(500, 'WEEKLY', 125),\n\t\t\tarray(505, 'WEEKLY', 126),\n\t\t\tarray(503, 'WEEKLY', 125),\n\t\t\tarray(1600, 'WHATEVER', 0),\n\t\t);\t\t\n\t}", "public function valueProvider()\n {\n return [[\"a string\"]];\n }", "private function alpha_num($field, $value) {\n if (!preg_match(self::REGEX_ALPHA_NUM, $value)) {\n $this->errors[$field][] = self::ERROR_ALPHA_NUM;\n }\n }", "public function setDataProvider()\n {\n return [\n [['a'], 0, 'x', ['x']],\n\n [['a', 'b'], 0, 'x', ['x', 'b']],\n [['a', 'b'], 1, 'y', ['a', 'y']],\n\n [['a', 'b', 'c'], 0, 'x', ['x', 'b', 'c']],\n [['a', 'b', 'c'], 1, 'y', ['a', 'y', 'c']],\n [['a', 'b', 'c'], 2, 'z', ['a', 'b', 'z']],\n ];\n }", "public function calcAgeDataProvider() {}", "protected function alpha($i) {\n\t\t$letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\treturn $letters[$i];\n\t}", "public function toArrayDataProvider()\n {\n return array(\n array(),\n array(true)\n );\n }", "public function strtouppperDataProvider() {}", "public function stdWrap_caseDataProvider() {}", "public function setAlphabet($arr) {\n\t\t\t$this->alpha = $arr;\n\t\t}", "public static function random(float $alpha = null)\n {\n return new static(random_int(0, 255), random_int(0, 255), random_int(0, 255), $alpha ?? (random_int(0, 100) / 100));\n }", "public static function random(float $alpha = null)\n {\n return new static(random_int(0, 255), random_int(0, 255), random_int(0, 255), $alpha ?? (random_int(0, 100) / 100));\n }", "public function getAttributes_price_letters_free() {\n\t\treturn $this->attributes_price_letters_free;\n\t}", "function FCallback($aVal) {\n // This callback will adjust the fill color and size of\n // the datapoint according to the data value according to\n if( $aVal < 30 ) $c = \"blue\";\n elseif( $aVal < 70 ) $c = \"green\";\n else $c=\"red\";\n return array(floor($aVal/3),\"\",$c);\n}", "public function testUnsupportedDataAlphaToNumber()\n {\n // Input text parameters\n $input_alphabet = \"A2\";\n $expected_result = -20;\n\n // Execute test target\n $Response = Utility::alpha2num($input_alphabet);\n\n // Check result\n $this->assertEquals($expected_result, $Response);\n }", "function validate_alphanumeric() {\n # Check Value is Alphanumeric\n if (ctype_alnum($this->cur_val)) {\n # Remove any existing error message\n $this->error_message = \"\";\n\n # Return Value\n return $this->cur_val;\n }\n else {\n # Set Error Message\n $this->set_error(\"Validation for alphanumeric ({$this->cur_val}) failed. This is type \" . gettype($this->cur_val));\n\n # Return AlphaNumeric version of value.\n return preg_replace(\"#[^a-zA-Z0-9_]#i\", \"\", $this->cur_val);\n }\n }", "public function getAceite();", "function alpha($psdata, $src_img, &$size_x, &$size_y, &$image, &$mask) {\n $id = $this->generate_id();\n\n // Generate the unique temporary file name for this image; \n // we'll use it for imagemagick temporary files\n $tempfile = $psdata->mk_filename();\n\n // Save image as PNG for further processing\n imagepng($src_img, $tempfile.'.png');\n\n // Call image magick - convert to raw RGB samples (binary)\n safe_exec('\"'.IMAGE_MAGICK_CONVERT_EXECUTABLE.'\"'.\" ${tempfile}.png ${tempfile}.rgba\", $output);\n\n // read raw rgba samples\n $samples = file_get_contents($tempfile.'.rgba');\n\n // Determine image size\n $size_x = imagesx($src_img); \n $size_y = imagesy($src_img);\n \n // write stread header to the postscript file\n $psdata->write(\"/image-{$id}-init { image-{$id}-data 0 setfileposition } def\\n\");\n $psdata->write(\"/image-{$id}-data currentfile << /Filter /ASCIIHexDecode >> /ReusableStreamDecode filter\\n\");\n\n // initialize line length counter\n $ctr = 0;\n\n // Save visible background color\n $handler =& get_css_handler('background-color');\n $bg = $handler->get_visible_background_color();\n\n for ($i = 0; $i < strlen($samples); $i += 4) {\n // Save image pixel to the stream data\n $r = ord($samples{$i});\n $g = ord($samples{$i+1});\n $b = ord($samples{$i+2});\n $a = 255-ord($samples{$i+3});\n\n // Calculate approximate color \n $r = (int)($r + ($bg[0] - $r)*$a/255);\n $g = (int)($g + ($bg[1] - $g)*$a/255);\n $b = (int)($b + ($bg[2] - $b)*$a/255);\n\n // Save image pixel to the stream data\n $psdata->write(sprintf(\"%02X%02X%02X\",\n min(max($r,0),255),\n min(max($g,0),255),\n min(max($b,0),255)));\n\n // Increate the line length counter; check if stream line needs to be terminated\n $ctr += 6;\n if ($ctr > MAX_LINE_LENGTH) { \n $psdata->write(\"\\n\");\n $ctr = 0;\n }\n };\n\n // terminate the stream data\n $psdata->write(\">\\ndef\\n\");\n\n // return image and mask data references\n $image = \"image-{$id}-data\";\n $mask = \"\";\n\n // Delete temporary files \n unlink($tempfile.'.png');\n unlink($tempfile.'.rgba');\n\n return $id;\n }", "public function getAlpha3TCode()\n {\n return $this->alpha3TCode;\n }", "function shortcode__data( $atts ) {\n\t\t// Get the data for the specified key\n\t\t$val = Node_Red_WP::init()->data->get( $atts['key'] );\n\n\t\t// Default the data value when it's not set\n\t\t$val = null !== $val ? $val : '[undefined]';\n\n\t\t// Create the shortcode markup\n\t\treturn sprintf( '<h2 class=\"entry-title\">%s</h2><span class=\"nrwp-data nrwp-data-%s\" data-key=\"%s\">%s</span>',\n\t\t\tesc_attr( $atts['title'] ),\n\t\t\tesc_attr( $atts['key'] ),\n\t\t\tesc_attr( $atts['key'] ),\n\t\t\tesc_html( $val )\n\t\t);\n\t}", "public function lcfirstDataProvider() {}", "public function getExcelColumnNameDataProvider(): array\n {\n return [\n [1, 'A'],\n [26, 'Z'],\n [27, 'AA'],\n [32, 'AF'],\n [52, 'AZ'],\n [676, 'YZ'],\n [702, 'ZZ'],\n [703, 'AAA'],\n [0, \"0\"],\n [-20, \"-20\"],\n ];\n }", "public function formatted()\n {\n return 'rgba('.$this->red.', '.$this->green.', '.$this->blue.', '.$this->alpha.')';\n }", "public function getOpacity() {}", "public function evaluateDataProvider()\n {\n return [\n 'no value' => [[], ''],\n 'with value' => [['value' => 'some value'], 'some value'],\n 'translation required' => [\n ['value' => 'some value', 'translate' => 'true'],\n 'some value',\n ],\n 'translation not required' => [['value' => 'some value', 'translate' => 'false'], 'some value'],\n ];\n }", "function Attribute_Provider($public_key_certificate,$private_key,$notBefore,$notOnOrAfter,$rsadsa,$acsURI,\n $assertionTemplate)\n {\n $this->public_key_certificate=$public_key_certificate;\n $this->private_key=$private_key;\n $this->notBefore=$notBefore;\n $this->notOnOrAfter=$notOnOrAfter;\n $this->rsadsa=$rsadsa;\n $this->acsURI=$acsURI;\n $this->assertionTemplate=$assertionTemplate;\n }", "public function invalidBooleanValuesDataProvider()\n {\n return array(\n array('INVALID_SOMETHING'),\n array('INVALID_EMPTY'),\n array('INVALID_EMPTY_STRING'),\n array('INVALID_NULL'),\n array('INVALID_NUMBER_POSITIVE'),\n array('INVALID_NUMBER_NEGATIVE'),\n array('INVALID_MINUS'),\n array('INVALID_TILDA'),\n array('INVALID_EXCLAMATION'),\n );\n }", "function isAlpha($field, $msg, $inner=FALSE){\n\t\t$value = $this->_getValue($field);\n\t\t$pattern = \"/^[a-zA-Z]+$/\";\n\t\tif(preg_match($pattern, $value)){\n\t\treturn true;\n\t\t}else{\n\t\tif($inner==FALSE){\n $this->_errorList[] = array(\"field\" => $field,\n\t\t\"value\" => $value, \"msg\" => $msg);\n\t\treturn false;\n }else{\n return false;\n }\n\t\t}\n\t}" ]
[ "0.68276244", "0.6300852", "0.613455", "0.5861539", "0.556578", "0.54387826", "0.5427365", "0.5409376", "0.54020447", "0.5388614", "0.5257902", "0.52430624", "0.5201882", "0.5140231", "0.5114709", "0.5105672", "0.50661224", "0.5065393", "0.50644565", "0.50623447", "0.5061345", "0.50569314", "0.5053627", "0.504508", "0.5043236", "0.5029815", "0.50226116", "0.501017", "0.5008194", "0.5001871", "0.5001842", "0.5000911", "0.50003", "0.49613717", "0.49594158", "0.49527702", "0.49367523", "0.4936082", "0.49294242", "0.49294242", "0.49261582", "0.49184722", "0.48779032", "0.48708072", "0.48708072", "0.48651636", "0.48644775", "0.48450974", "0.48437172", "0.4835207", "0.48339155", "0.48323122", "0.48207518", "0.48193026", "0.48114535", "0.47866327", "0.4781787", "0.478054", "0.4772621", "0.47650456", "0.4761615", "0.47588646", "0.47423747", "0.47388583", "0.47298366", "0.47298288", "0.47240865", "0.47086984", "0.47049955", "0.46861073", "0.468363", "0.46793038", "0.46790332", "0.46758556", "0.4666089", "0.4662525", "0.46612903", "0.4639838", "0.46291068", "0.46256295", "0.46245468", "0.4620969", "0.4618297", "0.4618297", "0.46125478", "0.4593533", "0.45932463", "0.45791528", "0.4577162", "0.4575665", "0.4572452", "0.45717025", "0.4569341", "0.45658937", "0.45613906", "0.45609045", "0.4557002", "0.45479614", "0.45424673", "0.45350876" ]
0.7023818
0
Add a field to search for record by to ensure that data is unique.
public function addLookupField($field) { if (in_array($field, $this->properties)) { $this->lookupFields[] = $field; return $this; } throw new \Exception("Invalid Lookup field \"{$field}\". Property does not exist in class {$this->entity}."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uniqueField($fieldName,$msg=\"Already taken.\"){\n\n\t\t$this->unique[$fieldName]['msg'] = $msg;\n\n\t}", "function _unique($field)\r\n\t{\r\n\t\tif ( ! empty($this->{$field}))\r\n\t\t{\r\n\t\t\t$query = $this->db->get_where($this->table, array($field => $this->{$field}), 1, 0);\r\n\r\n\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t{\r\n\t\t\t\t$row = $query->row();\r\n\r\n\t\t\t\t// If unique value does not belong to this object\r\n\t\t\t\tif ($this->id != $row->id)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Then it is not unique\r\n\t\t\t\t\treturn FALSE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// No matches found so is unique\r\n\t\treturn TRUE;\r\n\t}", "function isUnique($field, $value, $id){ \n $fields[$this->name.'.'.$field] = $value; \n \n\t\tif (empty($id)){ \n // add \n \t$conditions = $this->name.\".\".$field.\" = '\".$value.\"'\";\n\t\t\n\t\t}else{ \n // edit \n $fields[$this->name.'.id'] = \"<> $id\"; \n\t\t\t$conditions = '('.$this->name.\".\".$field.\" = '\".$value.\"') AND (\".$this->name.\".id <> $id)\";\n } \n $this->recursive = -1; \n\t\tif ($this->hasAny($conditions)) \n { \n $this->invalidate('unique_'.$field); \n return false; \n } \n else \n return true; \n\t}", "function validate_user_unique(string $field_input, array &$field): bool\n{\n if (App::$db->getRowWhere('users', ['email' => $field_input])) {\n $field['error'] = 'User already exists';\n\n return false;\n }\n\n return true;\n}", "function checkForDuplicateUnique(){\n $_ufields_arr = explode(\",\", $this->listSettings->GetItem(\"MAIN\", \"UNIQUE_FIELDS\"));\n $check_fields = true;\n for ($i = 0; $i < sizeof($_ufields_arr); $i ++) {\n list ($_field[$i], $_value[$i]) = explode(\"=\", $_ufields_arr[$i]);\n if (strlen($_value[$i])) {\n $check_fields = false;\n $_query_arr[$_field[$i]] = $_value[$i];\n if ($this->_data[$_field[$i]] == $_value[$i]) {\n $check_fields = true;\n }\n }\n else {\n $_query_arr[$_field[$i]] = $this->_data[$_field[$i]];\n }\n }\n if ($check_fields) {\n $_data = $this->Storage->GetByFields($_query_arr, null);\n }\n else {\n $_data = array();\n }\n if (! empty($_data)) {\n if (($this->item_id != $_data[$this->key_field])) {\n if ($this->Kernel->Errors->HasItem($this->library_ID, \"RECORD_EXISTS\")) {\n $_error_section = $this->library_ID;\n }\n else {\n $_error_section = \"GlobalErrors\";\n }\n $this->validator->SetCustomError($_ufields_arr, \"RECORD_EXISTS\", $_error_section);\n }\n }\n }", "public function addUniqueField(\\Closure $c) {\n $unique_field = $c($this);\n $this['unique_fields'][$unique_field->field_name] = $unique_field;\n }", "function validate_email_unique($field_input, array &$field): bool\n{\n if (App\\App::$db->getRowsWhere('users', ['email' => $field_input])) {\n $field['error'] = 'Such email already exists';\n\n return false;\n }\n\n return true;\n}", "function _queryUnique($fieldName){\n\n\t\t$SQLquery = \"SELECT `\".$fieldName.\"` FROM \".$this->table.\" WHERE `\".$fieldName.\"` ='\".$_POST[$fieldName].\"'\";\n\t\t//if updating make sure it doesn't select self\n\t\tif( isset($_POST['pkey']) ) $SQLquery .= \" AND \".$this->pkey.\" != '\".$_POST['pkey'].\"'\";\n\t\tif( count($this->db->execute($SQLquery)) ) $this->errMsg[$fieldName] = $this->unique[$fieldName]['msg'];\n\n\t}", "function duplicate_field($field)\n {\n }", "protected function uniqueField($field, $value = '')\n {\n return $value;\n }", "function _isUnique($check, $field) {\n\t\t$conditions = array();\n\t\tforeach($check as $c) {\n\t\t\t$conditions[] = \"$this->name.$field=\\\"\" . addslashes($c) . \"\\\"\";\n\t\t}\n\t\t/**\n\t\t * If they are updating, make sure not to get to get the current by excluding its id\n\t\t *\n\t\t * @author Johnathan Pulos\n\t\t */\n\t\tif(isset($this->data[$this->name]['id'])) {\n\t\t\t$conditions[] = \"$this->name.id<>\\\"\".addslashes($this->data[$this->name]['id']).\"\\\"\";\n\t\t}\n\t\t$results = $this->find($conditions);\n\t\treturn (!empty($results)) ? false : true;\n\t}", "public function setUnique($val){ $this->field_map['is_unique'] = (bool)$val; }", "public function is_unique_update($str, $field){\n $explode = explode('.', $field);\n\n $table = $explode[0];\n $field = $explode[1];\n $field_excluded = $explode[2];\n\n $query = $this->CI->db->limit(1)->get_where($table, array($field => $str));\n\n $result = $query->row_array();\n\n if( ($query->num_rows() === 0) or ( ($query->num_rows() > 0) and ($_POST[$field_excluded] == $result[$field_excluded])))\n return true;\n\n return false;\n }", "function checkUniquenessOfString1($tableName,$fieldName,$fieldValue,$fieldName1,$fieldValue1)\n{\n\n $query = $this->db->query(\"Select $fieldName from $tableName where $fieldName='$fieldValue' and $fieldName1!='$fieldValue1'\");\n $totalRowsUnique =$query->num_rows();\n if($totalRowsUnique!=0)\n { \n return true;\n }\n else\n { \n return false;\n }\n}", "function _unique_pair($field, $other_field = '')\r\n\t{\r\n\t\tif ( ! empty($this->{$field}) && ! empty($this->{$other_field}))\r\n\t\t{\r\n\t\t\t$query = $this->db->get_where($this->table, array($field => $this->{$field}, $other_field => $this->{$other_field}), 1, 0);\r\n\r\n\t\t\tif ($query->num_rows() > 0)\r\n\t\t\t{\r\n\t\t\t\t$row = $query->row();\r\n\t\t\t\t\r\n\t\t\t\t// If unique pair value does not belong to this object\r\n\t\t\t\tif ($this->id != $row->id)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Then it is not a unique pair\r\n\t\t\t\t\treturn FALSE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// No matches found so is unique\r\n\t\treturn TRUE;\r\n\t}", "public function unique($field_name, $value, $params)\n {\n try {\n $query = 'SELECT * FROM '.$params[0].' WHERE '.$params[1].' = \"'.$value.'\"';\n \n //for update these value will be set to exclude current users email\n if (!empty($params[2])) {\n $query .= ' AND ID != \"'.$params[2].'\"';\n }\n $query .= ';';\n\n $result = Connection::getInstance()->query($query);\n if ($result->rowCount() == 0) {\n return true;\n }\n } catch (Exception $e) {\n echo \"Error Details: \".$e->getMessage();\n }\n return ucfirst($field_name).' already exists in our data.';\n }", "function db_add_unique_key(&$ret, $table, $name, $fields) {\n $ret[] = update_sql('ALTER TABLE {'. $table .'} ADD UNIQUE KEY '.\n $name .' ('. _db_create_key_sql($fields) .')');\n}", "protected function validateUniqueField($request)\n {\n $field = Fields::where(\"type\", \"=\", $request->input(\"type\"))\n ->where(\"title\", \"=\", $request->input(\"title\"))\n ->where(\"subscriber_id\", \"=\", $request->input(\"subscriber_id\"))\n ->get();\n\n if(count($field) > 0){\n $this->throwValidationError(['description' => ['This field already exists']]);\n }\n }", "function checkUniquenessOfString($tableName,$fieldName,$fieldValue)\n{\n $query = $this->db->query(\"Select $fieldName from $tableName where $fieldName='\".$fieldValue.\"'\");\n $totalRowsUnique = $query->num_rows();\n if($totalRowsUnique!=0)\n {\n\n return true;\n }\n else\n {\n\n return false; \n }\n}", "private function unique ($param)\n {\n list($Class, $Method) = explode(',', $param);\n $Count = $Class::$Method($this->value, self::$ExceptID);\n if ($Count)\n {\n $this->SetError('unique', 'The '.$this->SpacedKey.' field value is already in use and must be unique');\n return false;\n }\n return true;\n }", "#[@arg(position= 0)]\n public function setField($field= 'bz_id') {\n $this->criteria= create(new Criteria())\n ->setProjection(Projections::projectionList(array(\n Projections::property(Person::column($field)), \n Projections::count()\n )))\n ->addGroupBy($field)\n ;\n }", "function isUniqueField($value, &$params = array())\n\t{\n\t\tif(!$params['field']) trigger_error(\"No field specified for AppModel::isUniqueField() call\", E_USER_WARNING);\n\t\t$field = $params['field'];\n\t\tif(is_array($value)) $value = array_pop($value);\n\t\t\n\t\tif(isset($this->data[$this->name]))\n\t\t\t$data = $this->data[$this->name];\n\t\telse\t\n\t\t\t$data = $this->data;\n\n\t\t// If the record is already in the DB and the value is the same as the DB one, don't complain\n\t\tif(isset($data['id']))\n\t\t{\n\t\t\t$result = $this->find($data['id'], array($field));\n\t\t\tif($result[$this->name][$field] == $value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$results = $this->findAll(array($params['field'] => $value), array('id'), null, null, null, -1);\n\t\t\n\t\tif(!$results) return true;\n\t\t\n\t\t$ids = Set::extract($results, '{n}.'.$this->name.'.id');\n\t\treturn $ids && count($ids) == 1 && $ids[0] == $this->id;\n\t}", "public function field($field) {\n\t array_push($this->parameters['field'], $field);\n\t $this->parameters['field'] = array_unique($this->parameters['field']);\n\t\treturn $this;\n\t}", "function checkDuplicates($pdo, $sql, $field)\n {\n $stmt = $pdo->prepare($sql);\n $stmt->bindValue(1, $field);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n return $row;\n }", "public function chartpg_unique_check($str , $field){\n\n\t\t$this->db->where(array(\n\t m_chart_page::COLUMN_MAJOR_ID => $this->input->post('major_id') ,\n\t m_chart_page::COLUMN_TERMDATE_ID => $this->input->post('term_date_id') ,\n\t ));\n\n\t\t$chart = $this->m_chart_page->get() ;\n\t\tif(sizeof($chart) > 0 && $uni[0]->{m_chart_page::COLUMN_ID} != $field ) {\n\t\t\t$this->form_validation->set_message('chartpg_unique_check' , __l('my_error_fv_chartpage_unique')) ;\n\t\t\treturn FALSE ;\n\t\t}\n\t\treturn TRUE ;\n\t\t\n\t}", "public function isUnique();", "function cjpopups_create_unique_record($string, $db_table, $column){\n\tglobal $wpdb;\n\t$check_existing = $wpdb->get_row(\"SELECT * FROM $db_table WHERE $column = '{$string}'\");\n\tif(is_null($check_existing)){\n\t\treturn $string;\n\t}else{\n\t\tpreg_match('/(.+)([0-9]+)$/', $string, $match);\n $string = isset($match[2]) ? $match[1].($match[2] + 1) : $string.rand(10000,99999);\n $check_existing = $wpdb->get_row(\"SELECT * FROM $db_table WHERE $column = '{$string}'\");\n if(is_null($check_existing)){\n \treturn $string;\n }else{\n \treturn cjpopups_create_unique_record($string, $db_table, $column);\n }\n\t}\n}", "public static function unique($data, $field, $table, $id=null){\n\t\t\t$db = new Database;\n\t\t\tif($id === null){\n\t\t\t\t$query = \"SELECT * FROM \".$table.\" WHERE \".$field.\"='\".$data.\"';\";\n\t\t\t\t$result = $db->select($query);\t\t\t\t\n\t\t\t}else{\t\t\t\n\t\t\t\t$query = \"SELECT * FROM \".$table.\" WHERE \".$field.\"='\".$data.\"' AND id!='\".$id.\"';\";\n\t\t\t\t$result = $db->select($query);\n\t\t\t}\n\n\t\t\t//set session message\n\t\t\t$field = strtolower($field);\n\t\t\t$error = \"error-\".$field;\n\t\t\t$field = ucfirst($field);\n\t\t\t$message = $field.\" must be unique.\";\n\n\t\t\tif ($result) {\n\t\t\t\tSession::set($error, $message); \n\t\t\t\treturn true;\t\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "protected function generateUniqe($field,$value)\r\n\t{\r\n\r\n\t\t// set field value uniqe \r\n\t\t$table = $this->getTable();\r\n\r\n\t\twhile ($table->load(array($field => $value)))\r\n\t\t{\r\n\t\t\t$value = JString::increment($value);\r\n\t\t}\r\n\r\n\t\treturn $value;\r\n\t}", "public function delegateAddUniqueKey(DbalSchema $dbal_schema, $table_full_name, $index_full_name, $drupal_table_name, $drupal_index_name, array $drupal_field_specs);", "function validate_user_exists(string $field_input, array &$field): bool\n{\n if (!App::$db->getRowWhere('users', ['email' => $field_input])) {\n $field['error'] = 'User with this email does not exist';\n\n return false;\n }\n\n return true;\n}", "function unique_check($field, $value)\n{\n $select_query = 'SELECT user_id FROM '.TBL_USERS;\n switch($field)\n {\n case 'username':\n $select_query .= ' WHERE username=\"'.addslashes($value).'\"';\n break;\n case 'email':\n $select_query .= ' WHERE email=\"'.addslashes($value).'\"';\n break;\n }\n\n if($result = mysql_query($select_query))\n {\n if(mysql_num_rows($result) > 0)\n {\n return FALSE;\n }\n\n return TRUE;\n }\n\n return TRUE;\n}", "public function unique(): self\n {\n $this->query = \" UNIQUE KEY \";\n return $this;\n }", "public function setUnique($value = TRUE);", "public function addField(string $field)\n {\n // verify if it exists\n if (!in_array($field, $this->fields, true)) {\n $this->fields[] = $field;\n }\n }", "public function check_duplicate()\n {\n // set table\n $this->record->table = $this->table;\n // set where\n $this->record->where['classification'] = trim($this->input->post('classification'));\n // execute retrieve\n $this->record->retrieve();\n \n if (!empty($this->record->field))\n echo \"1\"; // duplicate\n else \n echo \"0\";\n }", "abstract protected function filterField(): string;", "public function checkunique(){\n\t\n\t\t$count =$this->countByAttributes(array(\n 'no'=>$this->no,\n\t\t\t'TanggalTest'=>$this->TanggalTest\n ));\n\t}", "public function has($_field);", "public static function getUniqueRule($field = 'email', $id = null)\n\t{\n\t\t$user = new static;\n\n\t\treturn \"unique:\".$user->table.\",\".$field.($id ? ','.$id : ',NULL').\",id,deleted_at,NULL\";\n\t}", "public function setUserField($field,$value) {\n $value = preg_replace(\"/[^A-Za-z0-9]/\", '', $value);\n if(array_key_exists($field,$this->_dbFields)) {\n $this->_dbFields[$field]=$value;\n return true;\n } else {\n return false;\n }\n }", "public function getUnique($title, $table, $field, $i = 0)\n {\n $check = ($i > 0) ? $title . '-' . $i : $title;\n\n if (DB::table($table)->where($field, $check)->exists()) {\n\n $check = $this->getUnique($title, $table, $field, $i + 1);\n\n }\n\n return $check;\n }", "public function checkForUniqueValue($table,$column,$value,$editId) \n{\n \n $value=trim($value);\n $editId=trim($editId);\n $returnVal='';\n \n \n if ($value !== '') {\n $sql=\"select id, $column from $table where $column = '\".$value.\"'\";\n if ($editId != '') {\n $sql=$sql.\" and id <> $editId\"; \n } \n \n $retArray=$this->getTableData($sql,false,true); \n \n if (count($retArray)) {\n $returnVal='This value is not unique. Please update with a unique value.';\n }\n }\n \n return $returnVal; \n}", "function addToField(\\Foundation\\Form\\Field $field);", "private function getUniqueExists($uniques, $table, $column)\n {\n\n }", "function publish_form_field_unique( $row, $field_data )\n\t{\n\t\tglobal $DSP, $EXT, $SESS;\n\n\t\t// Check if we're not the only one using this hook\n\t\t$r = ($EXT->last_call !== FALSE) ? $EXT->last_call : \"\";\n\n\t\t// if this is a LG Image Manager field\n\t\tif($row[\"field_type\"] == $this->type)\n\t\t{\n\t\t\t// create the input field\n\t\t\t$r .= $DSP->input_hidden('field_ft_'.$row['field_id'], 'none');\n\t\t\t$r .= $DSP->input_text(\"field_id_\" . $row['field_id'], $field_data, '200', '600', 'input', '500px', '', TRUE);\n\t\t\t// add the javascript to launch the file manager\n\t\t\t$r .= \"\\n<a href='javascript:mcImageManager.open(\\\"entryform\\\",\\\"field_id_\" . $row['field_id'] . \"\\\",\\\"\\\",\\\"\\\", { remove_script_host:true, insert_filter : filterFunc });'>\";\n\t\t\t// add the image button\n\t\t\t$r .= \"\\n\\t<img src='\" . $this->settings['script_folder_path'] . \"../pages/im/img/insertimage.gif' border='0' style='margin-left:4px; position:relative; top:5px;' />\";\n\t\t\t// close the link\n\t\t\t$r .= \"\\n</a>\";\n\t\t\t// make sure we add the initialisation scripts in show_full_control_panel_end\n\t\t\t$SESS->cache['Lg_image_manager']['require_scripts'] = TRUE;\n\t\t}\n\t\treturn $r;\n\t}", "public function checkRecordIsExist ($field,$table,$idrecord,$opt=\"integer\");", "abstract public function unique($sortFlags = null);", "function dbplus_getunique($relation, $uniqueid)\n{\n}", "public function isValueMustBeUnique(): bool;", "function test_field_specific_search_on_user_id_field() {\n\n\t\t// Username. Three matching entries should be found.\n\t\t$search_string = 'admin';\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string, 'user_id' );\n\t\t$msg = 'A search for ' . $search_string . ' in UserID field';\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'jamie_entry_key', 'jamie_entry_key_2' ) );\n\n\t\t// UserID number. Three matching entries should be found.\n\t\t$search_string = '1';\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string, 'user_id' );\n\t\t$msg = 'A search for ' . $search_string . ' in UserID field';\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'jamie_entry_key', 'jamie_entry_key_2' ) );\n\n\t\t// UserID number. No matching entries should be found.\n\t\t$search_string = '7';\n\t\t$items = self::generate_and_run_search_query( 'all_field_types', $search_string, 'user_id' );\n\t\t$msg = 'A search for ' . $search_string . ' in UserID field';\n\t\tself::run_entries_not_found_tests( $msg, $items );\n\t}", "public function fieldExists($fieldName) {}", "public function unique_key_exists($value, $field = NULL)\n\t{\n\t\tif ($field === NULL)\n\t\t{\n\t\t\t// Automatically determine field by looking at the value\n\t\t\t$field = $this->unique_key($value);\n\t\t}\n\n\t\treturn (bool) DB::select(array('COUNT(\"*\")', 'total_count'))\n\t\t\t->from($this->_table_name)\n\t\t\t->where($field, '=', $value)\n\t\t\t->where($this->_primary_key, '!=', $this->pk())\n\t\t\t->execute($this->_db)\n\t\t\t->get('total_count');\n\t}", "public function uniqueQueryName($attribute,$params)\n\t{\n\n\t $user_id = Yii::app()->user->getId();\n\n\t $result = Query::model()->findByAttributes(array(\n\t \t'user_id' => $user_id,\n\t \t'name'=>$this->name\n\t ));\n\n\t //check name is unqie\n\t if ($result) {\n\n\t \t$this->addError($attribute, 'You already have a query with that name.');\n\n\t }\n\n\t}", "public function addField(Field $field);", "public function addField(Field $field);", "function userAccountField(&$Model, $field = 'username', $data) {\r\n\t\t$field = $this->settings[$Model->alias]['fields'][$field];\r\n\t\t$alias = $Model->alias;\r\n\t\tif (strpos('.', $field)) {\r\n\t\t\tlist($alias, $field) = explode($field, '.');\r\n\t\t}\r\n\t\tif (!$data[$alias][$field]) {\r\n\t\t\t$missing = true;\r\n\t\t\tif ($alias == $Model->alias) {\r\n\t\t\t\t$Model->invalidate($field, 'missing');\r\n\t\t\t} else {\r\n\t\t\t\t$Model->$alias->invalidate($field, 'missing');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $Model->field($field);\r\n\t}", "public function getLookupField() {}", "public function addFieldToModel($field)\n {\n\t$sql= $this->sql('insert into [fields] values( null, %s, %s, %s, %s)',\n\t $field->getName(),\n\t $field->getModel()->getTableName(),\n\t $field->getHash(),\n\t get_class($field));\n\n\t$this->queue(\n\t PerfORMStorage::FIELD_ADD,\n\t $field->getName().'|'.$field->getModel()->getTableName(),\n\t $sql,\n\t array(\n\t\t'field' => $field,\n\t\t)\n\t);\n\n\t$key= $field->getHash().'|'.$field->getModel()->getTableName();\n\tif ( key_exists($key, $this->renamedFields))\n\t{\n\t $array= $this->renamedFields[$key];\n\t $array->counter++;\n\t $array->to= $field->getName();\n\t}\n\telse\n\t{\n\t $this->renamedFields[$key]= (object) array(\n\t 'counter' => 1,\n\t 'to' => $field->getName(),\n\t 'modelName' => $field->getModel()->getTableName(),\n\t );\n\t}\n }", "public function checkUniqueFields($content)\n\t{\n\t\tforeach($this -> elements as $name => $object)\n\t\t\tif($object -> getProperty(\"unique\") && isset($content[$name]) && $content[$name])\n\t\t\t\tif($this -> db -> getCount($this -> table, \"`\".$name.\"`='\".$content[$name].\"'\"))\n\t\t\t\t\treturn $object -> getCaption();\n\t}", "public function findUnique(string $field, string $value)\n {\n $this->db->from('users');\n $this->db->where($field, $value);\n return $this->db->get()->row();\n }", "public function addNotIndexedField($field, array $copyTo = array());", "function MySqlUniqueColValues($table,$col,$where=\"\",$groupby=\"\",$orderby=\"\")\n {\n return $this->Sql_Select_Unique_Col_Values($col,$where,$orderby,$table);\n }", "public function unique_key($id)\t{\n\t\tif (!empty($id) && is_string($id) && ! ctype_digit($id)) {\n\t\t\treturn valid::email($id) ? 'email' : 'username';\n\t\t}\n\n\t\treturn parent::unique_key($id);\n\t}", "public function addField();", "public function unique(string $table, string $column, string|int $key_value = \"\", string $primaryKey = \"id\"): static\r\n {\r\n if (empty($key_value)) {\r\n $stmt = Database::connection()->prepare(\"SELECT * FROM $table WHERE $column= :column\");\r\n } else {\r\n $stmt = Database::connection()->prepare(\"SELECT * FROM $table WHERE $primaryKey <> :key_value AND $column=:column\");\r\n $stmt->bindParam(\":key_value\", $key_value);\r\n }\r\n $stmt->bindParam(\":column\", $this->field);\r\n $stmt->execute();\r\n if ($stmt->rowCount() > 0) $this->message(\"already taken\");\r\n return $this;\r\n }", "public function testUrlFieldAddsUniqueIndexWhenRequested()\n {\n $type = (new Type('writers'))->addField((new UrlField('homepage_url', null, true))->unique());\n\n $this->assertArrayHasKey('homepage_url', $type->getIndexes());\n\n $url_index = $type->getIndexes()['homepage_url'];\n\n $this->assertInstanceOf(IndexInterface::class, $url_index);\n $this->assertEquals(IndexInterface::UNIQUE, $url_index->getIndexType());\n }", "public function checkMultiKeyUniqueness($data, $fields){\n\n // check if the param contains multiple columns or a single one\n if (!is_array($fields))\n $fields = array($fields);\n\n // go through all columns and get their values from the parameters\n foreach($fields as $key)\n $unique[$key] = $this->data[$this->name][$key];\n\n // primary key value must be different from the posted value\n if (isset($this->data[$this->name][$this->primaryKey]))\n $unique[$this->primaryKey] = \"<>\" . $this->data[$this->name][$this->primaryKey];\n\n // use the model's isUnique function to check the unique rule\n return $this->isUnique($unique, false);\n }", "public function unique()\n {\n $this->statement['unique'] = true;\n return $this;\n }", "public function add(string $fieldName): static;", "public function add_meta( $key, $value, $unique = false );", "public function changeNameIfNotUnique($data_same_name,$id)\n\t{\n\t\t$app = Factory::getApplication();\n\t\t$db = Factory::getDbo();\n\t\t$query\t= $db->getQuery(true);\n\t\t$query->update('#__tjfields_fields');\n\t\t$query->set('name=\"' . $data_same_name . '-' . $id . '\"');\n\n\t\t$query->where('id=' . $id);\n\t\t$db->setQuery($query);\n\n\t\tif (!$db->execute())\n\t\t{\n\t\t\t$stderr = $db->stderr();\n\t\t\techo $app->enqueueMessage($stderr, 'error');\n\t\t}\n\n\t\treturn true;\n\t}", "public function whereExists($field) {\n\t$this->parseQuery->whereExists($field);\n }", "public function delegateFieldExists(&$result, $drupal_table_name, $field_name);", "public function disableAutoSearch($field) {\r\n $this->_disableAutoSearch[$field]=true;\r\n }", "public function testUniqueContextAddsFieldsToTheIndex()\n {\n $type = (new Type('applications'))->addField((new UrlField('homepage_url', null, true))->unique('application_id', 'shard_id'));\n\n $this->assertArrayHasKey('homepage_url', $type->getIndexes());\n\n $name_index = $type->getIndexes()['homepage_url'];\n\n $this->assertInstanceOf(IndexInterface::class, $name_index);\n\n $this->assertEquals('homepage_url', $name_index->getName());\n $this->assertEquals(['homepage_url', 'application_id', 'shard_id'], $name_index->getFields());\n }", "public function enableUsernameUniqueRecord()\n {\n // Get mapper\n $userMapper = $this->getUserMapper();\n \n // Throw exception, iff user mapper is empty\n if (empty($userMapper)) {\n throw new \\RuntimeException(\"User mapper is required, none given.\");\n }\n \n // Add validator\n return $this->attachUsernameValidator('User\\Validator\\UniqueRecord', array(\n 'field' => 'username',\n 'mapper' => $userMapper,\n ));\n }", "public function unique();", "public function unique();", "public function _unique_email(Validate $array, $field) {\n $email_exists = (bool) ORM::factory('user')\n ->where('email','=',$array[$field])\n ->where('id','!=',$this->id)\n ->count_all();\n\n if ($email_exists) {\n // add error to validation object\n $array->error($field, 'email_exists', array($array[$field]));\n }\n }", "public function addNotAnalyzedField($field, array $copyTo = array());", "public function addMissing($field) {\n $this->missing[] = $field;\n }", "function add_user_meta($user_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "final public function addUserByField($field, $search_in_object = false) {\n global $DB;\n\n $id = [];\n if (!$search_in_object) {\n $id[] = $this->obj->getField($field);\n\n } else if (!empty($this->target_object)) {\n foreach ($this->target_object as $val) {\n $id[] = $val->fields[$field];\n }\n }\n\n if (!empty($id)) {\n //Look for the user by his id\n $criteria = $this->getDistinctUserCriteria() + $this->getProfileJoinCriteria();\n $criteria['FROM'] = User::getTable();\n $criteria['WHERE'][User::getTable() . '.id'] = $id;\n $iterator = $DB->request($criteria);\n\n while ($data = $iterator->next()) {\n //Add the user email and language in the notified users list\n $this->addToRecipientsList($data);\n }\n }\n }", "public function testUniqueFields() {\n $account = $this->drupalCreateUser();\n\n $edit = ['mail' => '[email protected]', 'name' => $account->getAccountName()];\n $this->drupalGet('user/register');\n $this->submitForm($edit, 'Create new account');\n $this->assertSession()->pageTextContains(\"The username {$account->getAccountName()} is already taken.\");\n\n $edit = ['mail' => $account->getEmail(), 'name' => $this->randomString()];\n $this->drupalGet('user/register');\n $this->submitForm($edit, 'Create new account');\n $this->assertSession()->pageTextContains(\"The email address {$account->getEmail()} is already taken.\");\n }", "function get_user_by($field, $value)\n {\n }", "function unique ( $str, $val )\n\t{\n\t\tlist($table, $column, $type) = explode(\".\", $val, 3);\n\t\tif ($type == 'string') $str = \"'\" . $str . \"'\";\n\t\t$sSql = \"SELECT COUNT(0) AS numrow FROM \" . $table . \" WHERE \" . $column . \" = \" . $str . \"\";\n\t\t$query = $this->ci->db->query($sSql);\n\t\t$row = $query->row();\n\t\treturn ($row->numrow > 0) ? FALSE : TRUE;\n\t}", "public function ajax_duplicate_field() {\n\t\tglobal $wpdb;\n\n\t\t$form_id = absint( $_REQUEST['form'] );\n\t\t$field_id = absint( $_REQUEST['field'] );\n\n\t\tcheck_ajax_referer( 'duplicate-field-' . $form_id, 'nonce' );\n\n\t\t// Get fields info\n\t\t$this_field = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->field_table_name WHERE field_id = %d\", $field_id ) );\n\t\t$all_fields = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->field_table_name WHERE form_id = %d ORDER BY field_sequence ASC\", $form_id ) );\n\t\t$field_sequence = 0;\n\n\t\t// We only want the fields that FOLLOW our field\n\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\tif ( $field->field_id == $field_id ) {\n\t\t\t\t$field_sequence = $field->field_sequence + 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t\tunset( $all_fields[ $field_index ] );\n\t\t}\n\t\tarray_shift( $all_fields );\n\n\t\tforeach ( $this_field as $field ) {\n\t\t\t$field_key = $field->field_key;\n\t\t\t$field_type = $field->field_type;\n\t\t\t$field_options = $field->field_options;\n\t\t\t$field_options_other = $field->field_options_other;\n\t\t\t$field_description\t\t= $field->field_description;\n\t\t\t$field_name\t\t\t\t= $field->field_name;\n\t\t\t$field_parent\t\t\t= $field->field_parent;\n\t\t\t$field_validation\t\t= $field->field_validation;\n\t\t\t$field_required\t\t\t= $field->field_required;\n\t\t\t$field_size\t\t\t\t= $field->field_size;\n\t\t\t$field_css\t\t\t\t= $field->field_css;\n\t\t\t$field_layout\t\t\t= $field->field_layout;\n\t\t\t$field_default\t\t\t= $field->field_default;\n\t\t}\n\n\t\t// Create the new field's data\n\t\t$newdata = array(\n\t\t\t'form_id' => $form_id,\n\t\t\t'field_key' => $field_key,\n\t\t\t'field_type' => $field_type,\n\t\t\t'field_options' => $field_options,\n\t\t\t'field_options_other' => $field_options_other,\n\t\t\t'field_description' => $field_description,\n\t\t\t'field_name' => $field_name,\n\t\t\t'field_sequence' => $field_sequence,\n\t\t\t'field_parent' => $field_parent,\n\t\t\t'field_validation' => $field_validation,\n\t\t\t'field_required' => $field_required,\n\t\t\t'field_size' => $field_size,\n\t\t\t'field_css' => $field_css,\n\t\t\t'field_layout' => $field_layout,\n\t\t\t'field_default' => $field_default,\n\t\t);\n\n\t\t// Create the field\n\t\t$wpdb->insert( $this->field_table_name, $newdata );\n\t\t$insert_id = $wpdb->insert_id;\n\n\t\t// VIP fields\n\t\t$vip_fields = array( 'verification', 'secret', 'submit' );\n\n\t\t// Rearrange the fields that follow our new data\n\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\tif ( !in_array( $field->field_type, $vip_fields ) ) {\n\t\t\t\t$field_sequence++;\n\t\t\t\t// Update each field with it's new sequence and parent ID\n\t\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), array( 'field_id' => $field->field_id ) );\n\t\t\t}\n\t\t}\n\n\t\t// Move the VIPs\n\t\tforeach ( $vip_fields as $update ) {\n\t\t\t$field_sequence++;\n\t\t\t$where = array(\n\t\t\t\t'form_id' \t\t=> $form_id,\n\t\t\t\t'field_type' \t=> $update\n\t\t\t);\n\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), $where );\n\n\t\t}\n\n\t\techo $this->field_output( $form_id, $insert_id );\n\n\t\tdie(1);\n\t}", "public static function key_field($str) {\n\t\treturn 'field_' . self::key($str);\n\t}", "public function unique_key($id)\n\t{\n\t\tif ( ! empty($id) AND is_string($id) AND ! ctype_digit($id))\n\t\t{\n\t\t\treturn 'name';\n\t\t}\n\n\t\treturn parent::unique_key($id);\n\t}", "function fixtures_check_entry( string $table ,\n string $field ,\n mixed $value ) : bool\n{\n // Check for the entry in the database\n $qrand = query(\" SELECT $table.$field AS 'u_value'\n FROM $table\n WHERE $table.$field LIKE '$value' \");\n\n // Return whether the entry already exists\n return mysqli_num_rows($qrand);\n}", "protected function _unique($unique, $data, $id = -1, $id_name = 'id') {\r\n if (empty($unique)) {\r\n return true;\r\n }\r\n// Verificar primero si en los ifs compuestos de $unique hay columnas que no vengan en data (para updates)\r\n $columnas_faltantes = array();\r\n if ($id > 0) {\r\n foreach ($unique as $field) {\r\n if (is_array($field)) {\r\n $faltantes = array_diff_key(array_flip($field), $data);\r\n// Si hay columnas faltantes del unique en el update y no son todas las columnas del unique, agregarlas\r\n if (count($faltantes) > 0 && count($faltantes) != count($field)) {\r\n $columnas_faltantes = array_merge($columnas_faltantes, $faltantes);\r\n }\r\n }\r\n }\r\n if (!empty($columnas_faltantes)) {\r\n $data_faltante = $this->db->select(array_flip($columnas_faltantes))\r\n ->from($this->table_name)\r\n ->where($this->id_name, $id)\r\n ->get()->row_array();\r\n $data = array_merge($data, $data_faltante);\r\n }\r\n }\r\n $where_uq = array();\r\n foreach ($unique as $field) {\r\n if (!is_array($field)) { //unique simple -> 1 columna\r\n if (!empty($data[$field])) {\r\n $where_uq[] = array($field => $data[$field]);\r\n }\r\n } else { //unique compuesto -> +1 columna\r\n if (empty(array_diff_key(array_flip($field), $data))) {\r\n $wheres_uq_arr = array();\r\n foreach ($field as $field_2) {\r\n $wheres_uq_arr[$field_2] = $data[$field_2];\r\n }\r\n $where_uq[] = $wheres_uq_arr;\r\n }\r\n }\r\n }\r\n if (empty($where_uq)) {\r\n return true;\r\n }\r\n $this->db->group_start();\r\n foreach ($where_uq as $where) {\r\n if (!is_array($where)) {\r\n $this->db->or_where(array($where));\r\n } else {\r\n $this->db->or_group_start();\r\n $this->db->where($where);\r\n $this->db->group_end();\r\n }\r\n }\r\n $this->db->group_end();\r\n $this->db->where($id_name . ' !=', $id);\r\n if ($this->db->count_all_results($this->table_name) > 0) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "function _acf_apply_unique_field_slug($slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug)\n{\n}", "function Trigger_CheckUnique(&$tNG) {\r\n $tblFldObj = new tNG_CheckUnique($tNG);\r\n $tblFldObj->setTable(\"submenu\");\r\n $tblFldObj->addFieldName(\"submenu_name\");\r\n $tblFldObj->addFieldName(\"submenu_name_EN\");\r\n $tblFldObj->setErrorMsg(\"Submenu name already exists\");\r\n return $tblFldObj->Execute();\r\n}", "function not_unique($data=null)\n\t{\n\t\tif (!is_array($data))\n\t\t{\n\t\t\t$data = $this->data;\n\t\t}\n\t\t$n = 1;\n\t\t$uni_keys = $this->db_uni_cols;\n\t\t// add the primary key, only if it's NOT an auto id\n\t\tif (!$this->autoinc_id)\n\t\t{\n\t\t\t$uni_keys[] = $this->db_key_cols;\n\t\t}\n\t\tforeach($uni_keys as $db_col => $col)\n\t\t{\n\t\t\tif (is_array($col))\n\t\t\t{\n\t\t\t\t$query = array();\n\t\t\t\tforeach($col as $db_c => $c)\n\t\t\t\t{\n\t\t\t\t\t$query[$db_c] = $data[$c];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$query = array($db_col => $data[$col]);\n\t\t\t}\n\t\t\tforeach($this->db->select($this->table_name,$this->db_key_cols,$query,__LINE__,__FILE__,false,'',$this->app) as $other)\n\t\t\t{\n\t\t\t\tforeach($this->db_key_cols as $key_col)\n\t\t\t\t{\n\t\t\t\t\tif ($data[$key_col] != $other[$key_col])\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((int) $this->debug >= 4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"<p>not_unique in \".array2string($col).\" as for '$key_col': '${data[$key_col]}' != '${other[$key_col]}'</p>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $n;\t// different entry => $n not unique\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t++$n;\n\t\t}\n\t\treturn 0;\n\t}", "public function unique(): FluidColumnOptions\n {\n $this->column->setCustomSchemaOption('unique', true);\n return $this;\n }", "public function validateUniqueSpaceCheck(){\n Validator::extend('unique_space_check',function($attribute,$value,$parameters){\n $attribute =(isset($paramters[1]))? $parameters[1]: $attribute;\n $value=trim(preg_replace('/\\s\\s+/', '', $value));\n $check= DB::table($parameters[0])->where($attribute,$value)->count();\n //$this->Fnlog('parameters:'.$parameters[0].' attribute:'.$attribute.' value:'.$value.' check:'.$check);\n return ($check>0)?false:true;\n }, 'The :attribute has already been taken.'\n );\n }", "public function is_unique($id, $feild, $value)\r\n {\r\n $results = parent::get_by($feild, $value);\r\n if ($results == null) {\r\n return true;\r\n } else {\r\n if ($results->id == $id) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }", "public function findEquals($field, $value);", "protected function duplicateField($field, $n = 2) {\n if (!isset($this->form[$field])) {\n return FALSE;\n }\n $item = $this->form[$field];\n for ($i = 1; $i <= $n; $i++) {\n $this->form[\"{$field}_$i\"] = $item;\n }\n return TRUE;\n }", "public static function unique($fields = null) {\n $table_name = self::table_name();\n\n if ($record = ApplicationSql::read($table_name, null, static::field_to_where($fields))) {\n\n $object = $table_name::load();\n foreach ($record as $fieldname => $value)\n $object->$fieldname = $value;\n\n $object->_new_record_state = false;\n return $object;\n }\n return null;\n }" ]
[ "0.6726622", "0.6588721", "0.6331544", "0.6310936", "0.62916553", "0.6290878", "0.6237531", "0.59636873", "0.5908874", "0.5874089", "0.58558136", "0.5823479", "0.58166695", "0.5762499", "0.57411826", "0.57258725", "0.56985027", "0.5649487", "0.5598129", "0.5511385", "0.55055827", "0.5479815", "0.54271436", "0.5408941", "0.54048145", "0.53914165", "0.5383962", "0.53830713", "0.53407365", "0.5321548", "0.5303904", "0.52929974", "0.5232344", "0.5216253", "0.52132565", "0.51775426", "0.515478", "0.5153669", "0.51266277", "0.5126042", "0.51153034", "0.5106158", "0.50581074", "0.5038426", "0.50380963", "0.5034814", "0.5032347", "0.50312734", "0.5019852", "0.5009463", "0.50093", "0.49915773", "0.49778903", "0.4976983", "0.4965435", "0.4965435", "0.4958808", "0.4957322", "0.4953843", "0.49466735", "0.4941038", "0.49355388", "0.49336845", "0.4925419", "0.49078855", "0.49060792", "0.49044716", "0.49010354", "0.4893222", "0.48816255", "0.48717284", "0.48687702", "0.48675984", "0.48652577", "0.4863504", "0.48622203", "0.486056", "0.48589212", "0.48589212", "0.48520476", "0.4851519", "0.48427895", "0.48361388", "0.48357567", "0.4835392", "0.4833655", "0.48299858", "0.48271018", "0.48270065", "0.48195758", "0.48058963", "0.48054323", "0.47952387", "0.47928232", "0.47872716", "0.47816953", "0.47749287", "0.47727567", "0.47704145", "0.4768231", "0.47590533" ]
0.0
-1
If you're using a server on Windows, this is faster
function getisp($ip='') { if ($ip=='') $ip = $_SERVER['REMOTE_ADDR']; $longisp = @gethostbyaddr($ip); $isp = explode('.', $longisp); $isp = array_reverse($isp); $tmp = $isp[1]; if (preg_match("/\<(org?|com?|net)\>/i", $tmp)) { $myisp = $isp[2].'.'.$isp[1].'.'.$isp[0]; } else { $myisp = $isp[1].'.'.$isp[0]; } if (preg_match("/[0-9]{1,3}\.[0-9]{1,3}/", $myisp)) return 'ISP lookup failed.'; return $myisp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adodb_microtime()\n{\n\treturn microtime(true);\n}", "private function Benchmark()\r\n\t{\t\t\r\n\t}", "function phpTrafficA_getmicrotime() {\nlist($usec, $sec) = explode(\" \", microtime());\nreturn ((float)$usec + (float)$sec);\n}", "public function servertime() {\n\t\tif(is_null($this->sync))\n\t\t\t$this->synchronize();\n\t\treturn (int) (microtime(true) * 1000) + $this->sync;\n\t}", "private static function test_cpu() {\n\t\t$arr = array();\n\t\t$len = 1024;\n\t\t$delta = 3.14159;\n\t\tfor ( $i = 0; $i < $len; $i++ ) {\n\t\t\t$arr[] = $i * $delta;\n\t\t}\n\t\t$str = '';\n\t\tif ( function_exists( 'json_encode' ) ) {\n $str .= json_encode( $arr );\n } else {\n\t\t\t$str .= serialize( $arr );\n\t\t}\n\t\tunset( $arr );\n\t\tunset( $str );\n\t}", "function performanceCheck($url) {\n\n\t//Getting HTML from URL\n\t$ch = curl_init($url);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, false);\n\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, true);\n\tcurl_setopt($ch, CURLOPT_COOKIESESSION, true);\n\t\n\t$content = curl_exec($ch);\n\t\t\n\treturn array(\n\t\tURL => $url, \n\t\tTOTAL_TIME => curl_getinfo($ch, CURLINFO_TOTAL_TIME), // Total transaction time in seconds for last transfer\n\t\t//NAMELOOKUP_TIME => curl_getinfo($ch, CURLINFO_NAMELOOKUP_TIME), //Time in seconds until name resolving was complete\n\t\t//PRETRANSFER_TIME => curl_getinfo($ch, CURLINFO_PRETRANSFER_TIME), //Time in seconds from start until just before file transfer begins\n\t\tHTTP_CODE => curl_getinfo($ch, CURLINFO_HTTP_CODE) );\n\n\tcurl_close($ch);\n\n}", "public function performanceTest() \n {\n $time_start = microtime(true);\n $resizedImage = $this->resizeImage('IMG_20200224_195430.jpg', FULL_SIZE_IMAGE_MAX_WIDTH, FULL_SIZE_IMAGE_MAX_HEIGHT);\n\n $lapTime = microtime(true);\n $rstime = ($lapTime - $time_start);\n echo 'Image to full-size resize time: '.$rstime.' seconds<br>';\n\n $time_start2 = microtime(true);\n $resizedImageQr = $this->resizeImage($resizedImage);\n $lapTime = microtime(true);\n $rstime = ($lapTime - $time_start2);\n echo 'Image to medium resize time: '.$rstime.' seconds<br>';\n \n $time_start2 = microtime(true);\n $tnImage = $this->resizeImage($resizedImageQr, THUMBNAIL_MAX_WIDTH, THUMBNAIL_MAX_HEIGHT);\n $lapTime = microtime(true);\n $rstime = ($lapTime - $time_start2);\n echo 'Image to thumbnail resize time: '.$rstime.' seconds<br>';\n \n $readStartTime = microtime(true);\n $this->qrText = $this->readQrCodeFromImage($resizedImageQr);\n $lapTime = microtime(true);\n $rstime = ($lapTime - $readStartTime);\n echo 'QR-code read time: '.$rstime.' seconds<br>';\n \n $time_end = microtime(true);\n $execution_time = ($time_end - $time_start);\n echo 'Total Execution Time: '.$execution_time.' seconds<br>';\n }", "function _CPULoad()\n\t{\n/*\n\ncpu 524152 2662 2515228 336057010\ncpu0 264339 1408 1257951 168025827\ncpu1 259813 1254 1257277 168031181\npage 622307 25475680\nswap 24 1891\nintr 890153570 868093576 6 0 4 4 0 6 1 2 0 0 0 124 0 8098760 2 13961053 0 0 0 0 0 0 0 0 0 0 0 0 0 16 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\ndisk_io: (3,0):(3144904,54369,610378,3090535,50936192) (3,1):(3630212,54097,633016,3576115,50951320)\nctxt 66155838\nbtime 1062315585\nprocesses 69293\n\n*/\n\t\t// Algorithm is taken from\n\t\t// http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/414b0e1b-499c-411e-8a02-6a12e339c0f1/\n\t\tif (strncmp(PHP_OS,'WIN',3)==0) {\n\t\t\tif (PHP_VERSION == '5.0.0') return false;\n\t\t\tif (PHP_VERSION == '5.0.1') return false;\n\t\t\tif (PHP_VERSION == '5.0.2') return false;\n\t\t\tif (PHP_VERSION == '5.0.3') return false;\n\t\t\tif (PHP_VERSION == '4.3.10') return false; # see http://bugs.php.net/bug.php?id=31737\n\n\t\t\tstatic $FAIL = false;\n\t\t\tif ($FAIL) return false;\n\n\t\t\t$objName = \"winmgmts:{impersonationLevel=impersonate}!\\\\\\\\.\\\\root\\\\CIMV2\";\n\t\t\t$myQuery = \"SELECT * FROM Win32_PerfFormattedData_PerfOS_Processor WHERE Name = '_Total'\";\n\n\t\t\ttry {\n\t\t\t\t@$objWMIService = new COM($objName);\n\t\t\t\tif (!$objWMIService) {\n\t\t\t\t\t$FAIL = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$info[0] = -1;\n\t\t\t\t$info[1] = 0;\n\t\t\t\t$info[2] = 0;\n\t\t\t\t$info[3] = 0;\n\t\t\t\tforeach($objWMIService->ExecQuery($myQuery) as $objItem) {\n\t\t\t\t\t\t$info[0] = $objItem->PercentProcessorTime();\n\t\t\t\t}\n\n\t\t\t} catch(Exception $e) {\n\t\t\t\t$FAIL = true;\n\t\t\t\techo $e->getMessage();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $info;\n\t\t}\n\n\t\t// Algorithm - Steve Blinch (BlitzAffe Online, http://www.blitzaffe.com)\n\t\t$statfile = '/proc/stat';\n\t\tif (!file_exists($statfile)) return false;\n\n\t\t$fd = fopen($statfile,\"r\");\n\t\tif (!$fd) return false;\n\n\t\t$statinfo = explode(\"\\n\",fgets($fd, 1024));\n\t\tfclose($fd);\n\t\tforeach($statinfo as $line) {\n\t\t\t$info = explode(\" \",$line);\n\t\t\tif($info[0]==\"cpu\") {\n\t\t\t\tarray_shift($info); // pop off \"cpu\"\n\t\t\t\tif(!$info[0]) array_shift($info); // pop off blank space (if any)\n\t\t\t\treturn $info;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\n\t}", "public function runTenIdenticalSearch()\n\t{\t\t\n\t\t$this->client->isLazy(); \t\t\n\t\t$time = time();\n\t\t$request = $this->client->getMessageFactory()->createRequest($this->url, 'GET');\n\t\t$request->addHeader('cookie',$this->strCookie);\n\t\t$request->setTimeout(300000000);\n\t\t$response = $this->client->getMessageFactory()->createResponse();\n\t\t$this->client->send($request, $response);\n\t\tif($response->getStatus() === 200) {\t\t\t\n\t\t\t$responseTime = time();\n\t\t\t$pageLoadTime = $responseTime-$time;\n\t\t\treturn $this->convertToSeconds($pageLoadTime);\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "function now() {\n return microtime(true)*1000;\n}", "function pageLoadTime() {\n $time = microtime();\n $time = explode(' ', $time);\n $time = $time[1] + $time[0];\n $start = time; // start\n}", "public function finPerformance(){\n $memoria = memory_get_usage() - $this->memoria;\n $tiempo = microtime(true) - $this->tiempo;\n\n echo \"<pre>\";\n print_r(array(\"memoria\" => $memoria.\" bytes \", \"tiempo\" => $tiempo.\" segundos\" ));\n die;\n }", "function _get_time()\n{\n $_mtime = microtime();\n $_mtime = explode(\" \", $_mtime);\n\n return (double) ($_mtime[1]) + (double) ($_mtime[0]);\n}", "function gethwinfo () {\n\t\t$ret[cpu] = server::cpu_info();\n\t\t$ret[mem] = round(server::mem_total() / 1024);\n\t\treturn $ret;\n\t\t\n\t}", "function getSystemTime()\n{\n $time = @gettimeofday();\n $resultTime = $time['sec'] * 1000;\n $resultTime += floor($time['usec'] / 1000);\n return $resultTime;\n}", "function get_microtime() {\n\t$microtime = microtime();\n\t$microtime = explode(' ', $microtime);\n\t$microtime = $microtime[1] + $microtime[0];\n\treturn $microtime;\n}", "function process_time(){\n $time = number_format( microtime(true) - LIM_START_MICROTIME, 6);\n return($time);\n}", "public function largeDataIsStored() {}", "public function largeDataIsStored() {}", "public function largeDataIsStored() {}", "public function largeDataIsStored() {}", "public function serverMemoryUsage()\n {\n $free = shell_exec('free -btl');\n $free = (string)trim($free);\n $free = str_replace(\" \", \" \", $free);\n $free = str_replace(\" \", \" \", $free);\n $free = str_replace(\" \", \" \", $free);\n $free = str_replace(\" \", \" \", $free);\n $free_arr = explode(\"\\n\", $free);\n $mem = explode(\" \", $free_arr[1]);\n $mem = array_filter($mem);\n $mem = array_merge($mem);\n $swap = explode(\" \", $free_arr[4]);\n //$swap = array_filter($swap);\n //$swap = array_merge($swap);\n $this->totalservermemory = $this->formatBytes($mem[1], 0);\n $this->freeservermemory = $this->formatBytes($mem[3], 0);\n $this->totalswap = $this->formatBytes($mem[1], 0);\n $swap_usage = $swap[2] / $swap[1] * 100;\n $this->swapusage = $swap_usage;\n $memory_usage = $mem[2] / $mem[1] * 100;\n $this->memoryusage = $memory_usage;\n return $memory_usage;\n }", "function good_microtime()\n{ \n list($usec, $sec) = explode(\" \",microtime()); \n return ((float)$usec + (float)$sec); \n}", "public function native();", "function fastResult($script)\n{\n\tdisconnectDB();\n\tshowResult($script);\n}", "private function _getMicroTime (){\n\t\treturn microtime(true);\n\t}", "private static function test_disk() {\n\t\t$len = 1024 * 1024;\n\t\t$temp = tmpfile();\n\t\tfwrite( $temp, str_repeat('Z', $len ) );\n\t\tfseek( $temp, 1024 );\n\t\t$s = fread( $temp, 1024 );\n\t\tfclose( $temp );\n\t}", "static function getTimeInMs() {\n\t\treturn round(microtime(true) * 1000);\n\t}", "function randomise() {\n\n list($usec, $sec) = explode(' ', microtime());\n\n return (float) $sec + ((float) $usec * 100000);\n\n}", "function randomise() {\n list($usec, $sec) = explode(' ', microtime());\n return (float) $sec + ((float) $usec * 100000);\n}", "function L_PageLoadTime() {\n\t\n\t/*\n\t\t$time = microtime();\n\t\t$time = explode(' ', $time);\n\t\t$time = $time[1] + $time[0];\n\t\t$finish = $time;\n\t\t$total_time = round(($finish - $start), 4);\n\t\t\n\t*/\n\t\n\t/*\n\t\t$end_time = microtime(TRUE);\n\t\t$time_taken = $end_time - $start_time;\n\t\t$time_taken = round($time_taken,5);\n\t\t\n\t*/\n\t\n\t\t// Start of code\n\t\t$time = microtime(true); // Gets microseconds\n\n\t\t// End of code\n\t\t$time_taken = (microtime(true) - $time);\n\t\t\n\t\treturn _e('Page generated in ' . $time_taken . ' seconds.','leonite');\n\n\t}", "public function memCached() { return true; }", "static function microtime ()\n\t{\n\t\tlist ($usec, $sec) = explode(' ', microtime());\n\t\t$result = ((float) $usec + (float) $sec) * 1000;\n\t\t\n\t\tstatic $microtime_start;\n\t\tif (empty($microtime_start)) {\n\t\t\t$microtime_start = $result;\n\t\t}\n\t\treturn $result - $microtime_start;\n\t}", "function timestamp()\n {\n return microtime(true);\n }", "function getmicrotime(){\r\n\tlist($usec, $sec) = explode(\" \",microtime());\r\n\treturn ((float)$usec + (float)$sec);\r\n}", "function mstime ()\r\n{\r\n\t$t = explode (' ', microtime ());\r\n\treturn (int) (($t[0] + $t[1]) * 1000);\r\n}", "function optimize_database()\n\n\t{//12022007 - method added\n\n\t\t$qry = \"show table status from \" . $GLOBALS['db_con_obj']->dbname;\n\n\t\t$res = $this->execute_sql($qry);\n\n\n\n\t\twhile($data = mysql_fetch_array($res[0]))\n\n\t\t{\n\n\t\t\t$q = \"optimize table \" . $data[0];\n\n\t\t\t$this->execute_sql($q);\n\n\t\t}\n\n\t}", "function insecure_compare($a, $b) {\n\tfor($i = 0; $i < strlen($a) && $i < strlen($b); $i++) {\n\t\tif($a[$i] != $b[$i]) {\n\t\t\treturn false;\n\t\t}\n\t\tusleep(1000); // 1 ms\n\t}\n\t if(strlen($a) != strlen($b)) {\n\t\t return false;\n\t }\n\treturn true;\n}", "function getmicrotime(){\r\r\n list($usec, $sec) = explode(\" \",microtime());\r\r\n return ((float)$usec + (float)$sec);\r\r\n}", "function adodb_getmem()\n{\n\tif (function_exists('memory_get_usage'))\n\t\treturn (integer) ((memory_get_usage()+512)/1024);\n\n\t$pid = getmypid();\n\n\tif ( strncmp(strtoupper(PHP_OS),'WIN',3)==0) {\n\t\t$output = array();\n\n\t\texec('tasklist /FI \"PID eq ' . $pid. '\" /FO LIST', $output);\n\t\treturn substr($output[5], strpos($output[5], ':') + 1);\n\t}\n\n\t/* Hopefully UNIX */\n\texec(\"ps --pid $pid --no-headers -o%mem,size\", $output);\n\tif (sizeof($output) == 0) return 0;\n\n\t$memarr = explode(' ',$output[0]);\n\tif (sizeof($memarr)>=2) return (integer) $memarr[1];\n\n\treturn 0;\n}", "public static function create_server_info_array() {\n\t $result = array();\n\t $result[ 'php'][ 'os' ] = PHP_OS;\n\t $result[ 'php'][ 'uname' ] = array(\n\t\t'r' => php_uname( 'r' ),\n\t\t'v' => php_uname( 'v' ),\n\t\t'm' => php_uname( 'm' )\n\t );\n\n\t if ( ! stristr( PHP_OS, 'win' ) ) {\n\n\t\tif ( is_readable( self::PROC_MEMINFO ) ) {\n//MemTotal: 7852640 kB\n \t $stats = @file_get_contents( self::PROC_MEMINFO );\n \t if ( $stats !== false ) {\n\n \t$stats = explode( PHP_EOL, $stats );\n \tforeach ( $stats as $stat_line ) {\n \t $stat_array = explode( ':', trim( $stat_line) );\n \t if ( count( $stat_array ) == 2 ) {\n\t\t\t\t$tag = strtolower( trim( $stat_array[ 0 ] ) );\n\t\t\t\tswitch ( $tag ) {\n\t\t\t\t case 'memtotal' :\n\t\t\t\t\t$result[ 'mem' ][ 'total' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n \t }\n\t\t\t if ( isset( $result[ 'mem' ][ 'total' ] ) ) {\n\t\t\t\tbreak;\n\t\t\t }\n \t}\n\t\t\tunset( $stats, $stat_array, $stat_line );\n \t }\n \t\t}\n\n\t\tif ( is_readable( self::PROC_CPUINFO ) ) {\n//vendor_id : GenuineIntel\n//cpu family : 6\n//model : 58\n//model name : Intel(R) Core(TM) i5-3550S CPU @ 3.00GHz\n//cpu cores : 4\n//bogomips : 5986.62\n \t $stats = @file_get_contents( self::PROC_CPUINFO );\n \t if ( $stats !== false ) {\n\n \t$stats = explode( PHP_EOL, $stats );\n \tforeach ( $stats as $stat_line ) {\n \t $stat_array = explode( ':', trim( $stat_line) );\n \t if ( count( $stat_array ) == 2 ) {\n\t\t\t\t$tag = strtolower( trim( $stat_array[ 0 ] ) );\n\t\t\t\tswitch ( $tag ) {\n\t\t\t\t case 'vendor_id' :\n\t\t\t\t\t$result[ 'cpu' ][ 'vendor_id' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'cpu family' :\n\t\t\t\t\t$result[ 'cpu' ][ 'family' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'model' :\n\t\t\t\t\t$result[ 'cpu' ][ 'model' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'model name' :\n\t\t\t\t\t$result[ 'cpu' ][ 'model_name' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'cpu cores' :\n\t\t\t\t\t$result[ 'cpu' ][ 'cores' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'bogomips' :\n\t\t\t\t\t$result[ 'cpu' ][ 'bogomips' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n \t }\n\t\t\t if ( isset( $result[ 'cpu' ][ 'vendor_id' ] ) && isset( $result[ 'cpu' ][ 'family' ] ) && isset( $result[ 'cpu' ][ 'model' ] ) && isset( $result[ 'cpu' ][ 'model_name' ] ) && isset( $result[ 'cpu' ][ 'cores' ] ) && isset( $result[ 'cpu' ][ 'bogomips' ] ) ) {\n\t\t\t\tbreak;\n\t\t\t }\n \t}\n\t\t\tunset( $stats, $stat_array, $stat_line );\n \t }\n \t\t}\n\t }\n\t return( $result );\n\t}", "static private function getmicrotime()\n\t{\n\t\t\tlist($usec, $sec) = explode(\" \",microtime());\n\t\t\treturn ((float)$usec + (float)$sec); \n\t}", "function GetExecutionTime($start) \r\n{\r\n\t//return sprintf('%1.6f', (microtime(true) - $start)) . ' sec';\r\n\treturn (microtime(true) - $start) . ' sec';\r\n}", "public function benchConnectAndDisconnect(){\n $conn = SqlsrvUtil::connect();\n SqlsrvUtil::disconnect( $conn );\n }", "function fn_get_server_data($val, array $allowed_paths = array())\n{\n if (defined('IS_WINDOWS')) {\n $val = str_replace('\\\\', '/', $val);\n }\n\n $allowed_paths = $allowed_paths ?: array(\n fn_get_files_dir_path(),\n fn_get_public_files_path(),\n );\n\n $val = fn_normalize_path($val);\n\n if (Registry::get('runtime.allow_upload_external_paths') && strpos($val, Registry::get('config.dir.root')) === 0) {\n $allowed_paths = array($val);\n }\n\n setlocale(LC_ALL, 'en_US.UTF8');\n\n foreach ($allowed_paths as $root_path) {\n\n if (strpos($val, $root_path) === 0) {\n $path = $val;\n } else {\n $path = fn_normalize_path($root_path . $val);\n }\n\n if (strpos($path, $root_path) === 0 && file_exists($path)) {\n\n $result = array(\n 'name' => fn_basename($path),\n 'path' => $path\n );\n\n $tempfile = fn_create_temp_file();\n fn_copy($result['path'], $tempfile);\n $result['path'] = $tempfile;\n $result['size'] = filesize($result['path']);\n $result['type'] = fn_get_mime_content_type($path);\n\n $cache = Registry::get('temp_fs_data');\n\n if (!isset($cache[$result['path']])) { // cache file to allow multiple usage\n $cache[$result['path']] = $tempfile;\n Registry::set('temp_fs_data', $cache);\n }\n\n return $result;\n }\n }\n\n return false;\n}", "function betterEval($code) {\n $result = [];\n $tmp = tmpfile ();//file resource\n //we'll need to uri to include the file:\n $tmpMeta = stream_get_meta_data ( $tmp );\n $uri = $tmpMeta ['uri'];\n fwrite ( $tmp, $code );\n \n ob_start();\n $start = microtime(true);\n //anonymously, so our scope will not be polluted (very optimistic here, ofc)\n call_user_func(function() use ($uri) {\n include ($uri);\n }); \n \n $result['time'] = microtime(true) - $start;\n $result['output'] = ob_get_clean(); \n $result['length'] = strlen($result['output']);\n $result['lengthCharacters'] = mb_strlen($result['output']);\n $result['dbg'] = [\n 'fileUri' => $uri\n ];\n fclose ( $tmp );\n return $result;\n}", "private function _optimize() {}", "public function execTime() {\n return microtime(true)-$this->conn_start;\n }", "static function ms(){\r\n $dm = memory_get_usage() - self::$startmem;\r\n return self::memformat($dm);\r\n }", "public function microtime();", "function slow_equals($a, $b)\n{\n $diff = strlen($a) ^ strlen($b);\n for($i = 0; $i < strlen($a) && $i < strlen($b); $i++)\n {\n $diff |= ord($a[$i]) ^ ord($b[$i]);\n }\n return $diff === 0; \n}", "function calc_gen_time()\r\n{\r\n static $a = NULL;\r\n\r\n if ($a == NULL)\r\n {\r\n $a = microtime(true);\r\n }\r\n else\r\n {\r\n $b = (microtime(true) - $a);\r\n $a = NULL;\r\n\r\n log_debug('Page generated in '. number_format($b, 3) .' sec');\r\n\r\n return $b;\r\n }\r\n}", "public static function getBestCost()\n {\n $timeTarget = 0.05;\n\n $cost = 8;\n do {\n $cost++;\n $start = microtime(true);\n password_hash(\"test\", PASSWORD_BCRYPT, [\"cost\" => $cost]);\n $end = microtime(true);\n } while (($end - $start) < $timeTarget);\n\n echo \"Best cost for this server is : \" . $cost . \"\\n\";\n }", "public function findOnline() {}", "public function iniPerformance(){\n $this->tiempo = microtime(true);\n $this->memoria = memory_get_usage();\n }", "public function getOptimizedSize(): int;", "public function test_performance()\n {\n $db = new Database();\n $db->Type = Database::TYPE_SQLite;\n $db->HostOrPath = \":memory:\";\n $db->Connect();\n for ($i = 0; $i < 25; $i++) {\n\n // Create table and fill it\n $db->Query(\n \"CREATE TABLE IF NOT EXISTS table_{$i} (id INTEGER PRIMARY KEY, content TEXT)\"\n );\n $k = 1;\n $step = 500;\n $stop = 100000;\n while ($k < $stop) {\n $keys = [];\n $values = [];\n for ($j = 0; $j < $step; $j++) {\n $keys[] = \"(:d{$j})\";\n $values[\"d{$j}\"] = \"d{$j}\";\n }\n $db->Query(\n \"INSERT INTO table_{$i} (content) VALUES \" . join(\", \", $keys),\n $keys\n );\n $k += $step;\n $this->assertEquals($k - 1, $db->LastInsertId);\n }\n\n // Select many IDs, remove records by IDs and roll back changes\n $db->BeginTransaction();\n $rs = $db->Query(\"SELECT id FROM table_{$i} WHERE (id > 50 AND id < 101) OR (id > 250 AND id < 451)\");\n $ids = [];\n while ($r = $db->FetchArray($rs)) {\n $ids[] = $r[\"id\"];\n }\n $db->IWillBeCareful();\n $db->Query(\n \"DELETE FROM table_{$i} WHERE id IN (:ids)\",\n array(\n \"ids\" => join(\", \", $ids)\n )\n );\n $db->RollBack();\n\n // Update records by content and commit changes\n $db->BeginTransaction();\n $db->Query(\n \"UPDATE table_{$i} SET content = 'd1 or d3' WHERE content LIKE :d1 OR content LIKE :d3\",\n array(\n \"d1\" => \"d%1\",\n \"d3\" => \"d%3\"\n )\n );\n $db->Commit();\n\n }\n $db->Close();\n }", "private function getWindowsNT()\n\t{\n\t\treturn 'Windows NT ' . mt_rand(5, 10) . '.' . mt_rand(0, 1);\n\t}", "protected static function getMicrotime() {\n\t\treturn microtime(true);\n\t}", "function performance( $visible = false ) {\n\n $stat = sprintf( '%d queries in %.3f seconds, using %.2fMB memory',\n get_num_queries(),\n timer_stop( 0, 3 ),\n memory_get_peak_usage() / 1024 / 1024\n );\n\n echo $visible ? $stat : \"<!-- {$stat} -->\" ;\n}", "function c_filesize($filename) {\r\n\r\n $serach_name=e_file_exists($filename);\r\n return filesize($serach_name);\r\n}", "protected function startTime()\n {\n return microtime(true);\n }", "public static function start()\n {\n $start = round(microtime(true) * 1000);\n echo $start . \"\\n\";\n return $start;\n }", "function performance( $visible = false ) {\n\n $stat = sprintf( '%d queries in %.3f seconds, using %.2fMB memory',\n get_num_queries(),\n timer_stop( 0, 3 ),\n memory_get_peak_usage() / 1024 / 1024\n );\n\n echo $visible ? $stat : \"<!-- {$stat} -->\" ;\n}", "function getmicrotime()\n{\n\tlist($usec, $sec) = explode(' ',microtime());\n\treturn ((float)$usec + (float)$sec);\n}", "function updatebases()\n {\n\n $tot_data = 0;\n $tot_idx = 0;\n $tot_all = 0;\n $total_gain = 0;\n $local_query = \"SHOW TABLE STATUS\";\n $result = db_query($local_query);\n if (db_num_rows($result[\"resource\"])) {\n while ($row = db_fetch_row($result)) {\n $local_query = 'OPTIMIZE TABLE '.$row[0];\n $resultat = db_query($local_query);\n }\n return true;\n }\n }", "function getTime() {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n}", "function getTime(){\n\t\t$mtime = microtime();//print(\"\\n time : \" . $mtime);\n\t\t$mtime = explode(' ', $mtime);\n\t\t$mtime = $mtime[1] + $mtime[0];\n\t\treturn $mtime;\n\t}", "public function timeTransfer($verbose = false)\n {\n try\n {\n $ch = curl_init($this->getUrl());\n curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n curl_setopt($ch, CURLOPT_TIMEOUT, 15);\n \n $start = microtime(true);\n $doc = curl_exec($ch);\n $stop = microtime(true);\n curl_close($ch);\n\n if($verbose){ echo \"Bytes: \" . strlen($doc) . \"\\n\"; }\n if(strlen($doc) < 1){ return null; }\n\n return $stop - $start;\n }\n catch(Exception $ex)\n {\n echo $ex->getMessage() . \"\\n\";\n return null;\n }\n }", "function src_tarpit() {\n\t$h = fopen('/dev/random', 'rb');\n\n\t$len = 8192;\n\t$sleep = 5;\n\t$max_time = 60 * 5;\n\n\t$wait = 0;\n\n\twhile ($wait < $max_time) {\n\t\t$contents = fread($h, $len);\n\t\techo $contents;\n\t\tflush();\n\t\tsleep($sleep);\n\t\t$wait += $sleep;\n\t}\n}", "function getRemoteFile($url)\r\n{\r\n // get the host name and url path\r\n $parsedUrl = parse_url($url);\r\n $host = $parsedUrl['host'];\r\n if (isset($parsedUrl['path'])) {\r\n $path = $parsedUrl['path'];\r\n } else {\r\n // the url is pointing to the host like http://www.mysite.com\r\n $path = '/';\r\n }\r\n\r\n if (isset($parsedUrl['query'])) {\r\n $path .= '?' . $parsedUrl['query'];\r\n }\r\n\r\n if (isset($parsedUrl['port'])) {\r\n $port = $parsedUrl['port'];\r\n } else {\r\n // most sites use port 80\r\n $port = '80';\r\n }\r\n\r\n $timeout = 10;\r\n $response = '';\r\n\r\n // connect to the remote server\r\n $fp = @fsockopen($host, $port, $errno, $errstr, $timeout );\r\n\r\n if( !$fp ) {\r\n appendErrorMessage( sprintf(__(\"Cannot retrieve %s\"),$url));\r\n } else {\r\n // send the necessary headers to get the file\r\n @fputs($fp, \"GET $path HTTP/1.0\\r\\n\" .\r\n \"Host: $host\\r\\n\" .\r\n \"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3\\r\\n\" .\r\n \"Accept: */*\\r\\n\" .\r\n \"Accept-Language: en-us,en;q=0.5\\r\\n\" .\r\n \"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\\r\\n\" .\r\n \"Keep-Alive: 300\\r\\n\" .\r\n \"Connection: keep-alive\\r\\n\" .\r\n \"Referer: http://$host\\r\\n\\r\\n\");\r\n//$count = 0;\r\n while (!@feof($fp)) {\r\n $response .= @fread( $fp, 8192);\r\n// $count++;\r\n \r\n }\r\n fclose( $fp );\r\n//$response .= $count;\r\n//why is the above taking so long? how many packets do we get?\r\n\r\n // strip the headers\r\n $pos = strpos($response, \"\\r\\n\\r\\n\");\r\n $response = substr($response, $pos + 4);\r\n }\r\n\r\n // return the file content\r\n return $response;\r\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}", "function windows($input)\n\t{\n\t\t$teras = $input;\n\t\tif (($teras >= 0) && ($teras < 1025)) \n\t\t{\n\t\t \t$Windows = 9; //Windows Installed on HDD\n\t\t\t$Office = 3; //Office Installed\n\t\t\t$Framework = 0.03; // .Net Framework 3.5\n\t\t\t$Updates_Reservation = 5; // Windows Updates Reservation \n\t\t\t$WindowsTotal = $Windows + $Office + $Framework + $Updates_Reservation; // Windows Total All.\n\t\t\t\n\t\t\t$RecoveryTool = 0.3;// Recovery Tools 300mb\n\t\t\t$EfiPartition = 0.26;// 260mb Microsoft Recommended for 4k drives\n\t\t\t$MSRPartition = 0.128; // MSR Partition\n\t\t\t$TotalPartitions = $RecoveryTool + $EfiPartition + $MSRPartition; // Total Partitions\n\t\t\t\n\t\t\t$TotalSetup = $WindowsTotal + $TotalPartitions; // Total Windows Setup Plus Partitions Creation\n\t\t\t$Total = $TotalSetup + $GLOBALS['loss']; // Total Setup Space Consumption plus Base 10 miscalculation.\n\t\t\t$free = $GLOBALS['base10'] - $TotalSetup; // Free Space for Base 10 Disks\n\t\t\t$freeSSD = $GLOBALS['base2'] - $TotalSetup; // Free Space for SSD Disks\n\t\t\t\n\t\t\techo '<br>';\n\t\t\techo 'Windows 10 Setup = ' . $Windows . ' GB';\n\t\t\techo '<br>';\n\t\t\techo 'Office 2013 Setup = ' . $Office . ' GB';\n\t\t\techo '<br>';\n\t\t\techo '.Net Framework 3.5 = ' . $Framework . ' GB';\n\t\t\techo '<br>';\n\t\t\techo 'Windows Updates Reservation = ' . $Updates_Reservation . ' GB';\n\t\t\techo '<br>';\n\t\t\techo 'Windows Total Space = ' . $WindowsTotal . ' GB';\n\t\t\techo '<br>';\n\t\t\techo '<br>';\n\t\t\t\n\t\t\techo 'Recovery Tool = ' . $RecoveryTool . ' GB';\n\t\t\techo '<br>';\n\t\t\techo 'Efi Partition = ' . $EfiPartition . ' GB';\n\t\t\techo '<br>';\n\t\t\techo 'MSR Partition = ' . $MSRPartition . ' GB';\n\t\t\techo '<br>';\n\t\t\techo 'Total Partitions Space = ' . $TotalPartitions . ' GB';\n\t\t\techo '<br>';\n\t\t\t\n\t\t\techo '<br>';\n\t\t\techo 'Total Windows Setup = ' . $TotalSetup . ' GB';\n\t\t\techo '<br>';\n\t\t\techo 'Total Windows Setup and HDD Space Lost Base 10 = ' . number_format($Total, 2, '.', ',') . ' GB';\n\t\t\techo '<br>';\n\t\t\techo 'Free Space for HDD After Complete Setup = ' . number_format($free, 2, '.', ',') . ' GB';\n\t\t\techo '<br>';\n\t\t\techo 'Free Space for SSD After Complete Setup = ' . number_format($freeSSD, 2, '.', ',') . ' GB';\n\t\t}\n\t\telse \n\t\t{\n\t\t\tdie(\"Invalid Data\");\n\t\t}\t\t\n\t}", "private function calculateTime()\n {\n $slowest = 1000000;\n for($i=1; $i<=12; $i++){\n if($_GET['Tr'.$i] > 0 && $slowest > $this->troopCostsProperties['Tr'.$i][5] ){\n $slowest = $this->troopCostsProperties['Tr'.$i][5];\n }\n }\n $time = $this->distance/($slowest*SERVER_SPEED_RATE);\n return $time;\n }", "function \nget_php_net ()\n{\n $st = @stat (CACHEFILE);\n if ($st === false) { // fallthrough and download it\n\treturn download_url ();\n }\n\n if (CACHETIME < (time() - $st['mtime'])) {\n\treturn get_cached_data ();\n }\n\n\n return download_url ();\n}", "function MemoryUsage()\n{\n\t$mem = memory_get_usage();\n\treturn number_format(($mem / 1024), 4);\n}", "final public function fetch_time()\r\n\t{\r\n\t\t$r = '';\r\n\t\t$t = self::ms();\r\n\t\tforeach ($this->users('list') as $user) {\r\n\t\t\tif (is_dir($this->dir . $user)) {\r\n\t\t\t\t$p = \"{$this->dir}$user/\";\r\n\t\t\t\t$dbs = self::_scandir($p);\r\n\t\t\t\tforeach ($dbs as $db) {\r\n\t\t\t\t\t$tbs = self::_scandir($db);\r\n\t\t\t\t\tforeach ($tbs as $file) {\r\n\t\t\t\t\t\tif (file_exists($file)) {\r\n\t\t\t\t\t\t\t$data = self::data($file);\r\n\t\t\t\t\t\t\t$rows = $data['row'];\r\n\t\t\t\t\t\t\tforeach ($rows as $pk => $row) {\r\n\t\t\t\t\t\t\t\t$r .= self::ra2str($row);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$t = self::ms() - $t;\r\n\t\treturn ($t / 1000) . ' sec';\r\n\t}", "function optimizeDatabase() {}", "function getKb($link) {\r\n if (file_exists($link))\r\n {\r\n $wsize = round (filesize($link)/1024);\r\n }\r\n else\r\n {\r\n $wsize=0;\r\n }\r\n return $wsize;\r\n}", "function get_execution_time() {\n\treturn microtime(true) - __CHV_TIME_EXECUTION_STARTS__;\n}", "function milliseconds()\n{\n $mt = explode(' ', microtime());\n return ((int)$mt[1]) * 1000 + ((int)round($mt[0] * 1000));\n}", "function get_real_size($size=0) {\r\n/// Converts numbers like 10M into bytes\r\n if (!$size) {\r\n return 0;\r\n }\r\n $scan['MB'] = 1048576;\r\n $scan['Mb'] = 1048576;\r\n $scan['M'] = 1048576;\r\n $scan['m'] = 1048576;\r\n $scan['KB'] = 1024;\r\n $scan['Kb'] = 1024;\r\n $scan['K'] = 1024;\r\n $scan['k'] = 1024;\r\n\r\n while (list($key) = each($scan)) {\r\n if ((strlen($size)>strlen($key))&&(substr($size, strlen($size) - strlen($key))==$key)) {\r\n $size = substr($size, 0, strlen($size) - strlen($key)) * $scan[$key];\r\n break;\r\n }\r\n }\r\n return $size;\r\n}", "function virustotalscan_check_server_load($level)\r\n{\r\n $load = 0;\r\n // daca functia exista atunci se intorc timpii de incarcare a severului\r\n if (function_exists('get_server_load')) {\r\n $load = get_server_load();\r\n }\r\n if (floatval($load) > floatval($level)) {\r\n // timpul de incarcare e mai mare si deci scanarea nu se va efectua\r\n return false;\r\n }\r\n else {\r\n // timpul de incarcare e mai mic decat cel trimis ca parametru, iar ca rezultat scanarea va incepe\r\n return true;\r\n }\r\n}", "function get_real_size($size=0) {\n if (!$size) {\n return 0;\n }\n $scan['MB'] = 1048576;\n $scan['Mb'] = 1048576;\n $scan['M'] = 1048576;\n $scan['m'] = 1048576;\n $scan['KB'] = 1024;\n $scan['Kb'] = 1024;\n $scan['K'] = 1024;\n $scan['k'] = 1024;\n\n while (list($key) = each($scan)) {\n if ((strlen($size)>strlen($key))&&(substr($size, strlen($size) - strlen($key))==$key)) {\n $size = substr($size, 0, strlen($size) - strlen($key)) * $scan[$key];\n break;\n }\n }\n return $size;\n}", "private static function time()\n {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n }", "function wgetfromlocalorfrominternet(){\n\t\t$local=1;\n\t\treturn $local;\n\t}", "function rtime ()\n{\n $time = explode (\" \", microtime ());\n return (double) ((double) $time[0] + (double) $time[1]);\n}", "function timequery() {\n static $querytime_begin;\n list($usec, $sec) = explode(' ', microtime());\n\n if (!isset($querytime_begin)) {\n $querytime_begin = ((float) $usec + (float) $sec);\n } else {\n $querytime = (((float) $usec + (float) $sec)) - $querytime_begin;\n echo sprintf('<br />La consulta tardó %01.5f segundos.- <br />', $querytime);\n }\n}", "public function LargeScriptNotMinified()\n {\n\t\t//the savings in filesize can be shared..etc. there's some work to-do.\n\t\tglobal $ft_dom;\n\t\t$code = array('');\n\t\t$elements = $ft_dom->getElementsByTagName('script');\n\t\t$code[1] = 0;\n\t\t$code[2] = '';\n\t\t\n\t\t//INCLUDES OPTIMIZELY HACK BECAUSE THE LINKED SCRIPT IS NOT MINIFIED\n foreach ($elements as $element) { \n\t\t\tif ($element->hasAttribute('src') && strpos($element->getAttribute('src'),'.min.') === false && strpos($element->getAttribute('src'),'optimizely.com') === false) {\n\t\t\t\t//if \".min.\" is in the name, don't bother :)\t\t\t\t\n\n\t\t\t\tif(strpos($element->getAttribute('href'),'googleapis') !==false) { continue; }\n\n\t\t\t\t$link = Helper::getAbsoluteResourceLink($element->getAttribute('src'));\t\n\t\t\t\t\n\t\t\t\t$bytes_size = floatval(Helper::getResourceSizeBytes($link));\n\n\t\t\t\tif($bytes_size > (5 * 1024))\n\t\t\t\t{\t\n\t\t\t\t\t//see if the script is not minified.\n\t\t\t\t\tif(!Helper::isMinified($link))\n\t\t\t\t\t{\n\t\t\t\t\t\t$code[1]++;\n\t\t\t\t\t\t//$code[0] .= '`'.Helper::printCodeWithLineNumber($element,false) . ' ' . round($bytes_size/1024,1, PHP_ROUND_HALF_UP) .'K`';\n\t\t\t\t\t\t$code[0] .= Helper::printCodeWithLineNumber($element);\n\t\t\t\t\t\t//return $code;\n\t\t\t\t\t} \n\t\t\t\t}\t\n\t\t\t}\t\n\t\t}\n\t\tif($code[0] != '') {\n\t\t\tif($code[1] > 1) { $code[2] = 's'; }\n\t\t\treturn $code;\n\t\t}\t\t\t\n\t return false;\n }", "public function run()\n {\n for ($i=0; $i <= 1000000 ; $i++) { \n DB::table('companies')->insert(\n ['company_name' => 'hieutm',\n 'company_web' => 'aaa.com',\n 'company_address' => 'TDC',\n 'company_code' =>'281',\n 'company_phone' => '12345']\n );\n }\n }", "function microtime_float()\n{\n list($usec, $sec) = explode(\" \", microtime());\n\t return ((float)$usec + (float)$sec);\n}", "function s_m_put_txt_data_get_rows_fast($rows, $columnames){\r\n $result = array();\r\n $n_r = 0;\r\n for($r = 1; $r < count($rows); $r++){\r\n // last row can be empty, so break\r\n if(trim($rows[$r]) == ''){\r\n break;\r\n }\r\n $fields = explode(\";\", $rows[$r]);\r\n for($k = 0; $k < count($columnames); $k++){\r\n $result[$n_r][$columnames[$k]] = trim($fields[$k]);\r\n }\r\n $n_r++;\r\n }\r\n return $result;\r\n}", "protected function _generateId()\n {\n return str_replace('.', '', microtime(true));\n }", "public function highspeed()\n\t{\n\t\t//Old Dad uppt In ihrem Haus DVD Ripp AC3 German Xvid [01/31] - \"In ihrem Haus.par2\" yEnc\n\t\t//Old Dad uppt Eine offene Rechnung XviD German DVd Rip[02/41] - \"Eine offene Rechnung.part01.rar\" yEnc\n\t\t//Old Dad uppMiss Marple: Der Wachsblumenstrauß , Wunschpost Xvid German10/29] - \"Miss Marple Der Wachsblumenstrauß.part09.rar\" yEnc\n\t\tif (preg_match('/^Old\\s+Dad\\s+uppt? ?(.+?)( mp4| )?\\[?\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[03/61] - \"www.realmom.info - xvid - xf-fatalmovecd1.r00\" - 773,34 MB - yEnc\n\t\t//[40/54] - \"Mankind.Die.Geschichte.der.Menschheit.S01E12.Das.Ende.der.Reise.GERMAN.DUBBED.DL.DOKU.1080p.BluRay.x264-TVP.part39.rar\" - 4,79 GB yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB]( -)? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[02/10] - \"Fast.And.Furious.6 (2013).German.720p.CAM.MD-MW upp.by soV1-soko.rar\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] - \"(.+?) upp.by.+?' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //>ghost-of-usenet.org>The A-Team S01-S05(Folgen einzelnd ladbar)<Sponsored by Astinews< (1930/3217) \"isd-ateamxvid-s04e21.r19\" yEnc\n\t\tif (preg_match('/^>ghost-of-usenet\\.org>(.+?)\\(.+?\\).+? \\(\\d+\\/\\d+\\) \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //www.usenet-town.com [Sponsored by Astinews] (103/103) \"Intimate.Enemies.German.2007.AC3.[passwort protect].vol60+21.PAR2\" yEnc\n\t\tif (preg_match('/^www\\..+? \\[Sponsored.+?\\] \\(\\d+\\/\\d+\\) \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Das.Schwergewicht.German.DL.720p.BluRay.x264-ETM - \"etm-schwergewicht-720p.part20.rar\" yEnc\n\t\tif (preg_match('/^([A-Za-z0-9][a-zA-Z0-9.-]{6,})\\s+- \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[ TiMnZb ] [ www.binnfo.in ] [REPOST] [01/46] - \"Columbo - S07 E05 - Des sourires et des armes.nfo\" yEnc\n\t\tif (preg_match('/^\\[ .+? \\] \\[ www\\..+? \\]( \\[.+?\\])? \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //< \"Burn.Notice.S04E17.Out.of.the.Fire.GERMAN.DUBBED.DL.720p.WebHD.x264-TVP.par2\" >< 01/17 (1.54 GB) >< 11.62 kB > yEnc\n\t\tif (preg_match('/^< \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' >< \\d+\\/\\d+ \\(.+?\\) >< .+? > yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Batman postet 30 Nights of Paranormal Activity with the Devil Inside AC3 XviD German [01/24] - \"30 Nights of Paranormal Activity with the Devil Inside.par2\" yEnc\n\t\tif (preg_match('/^[A-Za-z0-9]+ postet (.+?) \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[04/20 Geroellheimer - S03E19 - Freudige ?berraschung Geroellheimer - S03E19 - Freudige ?berraschung.mp4.004\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+ (.+?)(\\.(part\\d*|rar|avi|iso|mp4|mkv|mpg))?(\\d{1,3}\\.rev\"|\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\"|\") yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn implode(' ',\n\t\t\t\t\t\t array_intersect_key(explode(' ', $match[1]),\n\t\t\t\t\t\t\t\t\t\t\t array_unique(array_map('strtolower',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t explode(' ', $match[1])))));\n\t\t} //\"Homeland.S01.Complete.German.WS.DVDRiP.XViD-ETM.part001.rar\" yEnc\n\t\tif (preg_match('/^\"(.+?)(\\.(part\\d*|rar|avi|mp4|mkv|mpg))?(\\d{1,3}\\.rev\"|\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\"|\") yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\tif (strlen($match[1]) > 7 && !preg_match('/\\.vol.+/', $match[1])) {\n\t\t\t\treturn $match[1];\n\t\t\t} else {\n\t\t\t\treturn array(\n\t\t\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject),\n\t\t\t\t\t\"properlynamed\" => false\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "private static function lowPass()\n {\n }", "public function getLastUsed();", "function megastokas($num){\r\n\t\treturn $num*1024;\r\n\t}", "function getTableSize(){\r\n\tglobal $db;\r\n\t$size = 0;\r\n\t$unit = 'B';\r\n\t$query = $db->query('SHOW TABLE STATUS');\r\n\twhile ($rt = $db->fetch_array($query)) {\r\n\t\t$size += $rt['Index_length'];\r\n\t\t$size += $rt['Data_length'];\r\n\t}\r\n\treturn $size;\r\n}", "function dirsizeof($dir) {\r\n global $taille_disque, $ch_texte, $base_dir; \r\n $cluster = 6144;\r\n\t$taille_dir = 512;\r\n\t$myDir = opendir($dir);\r\n\t$entryName = readdir($myDir);\r\n\twhile( \"-\".$entryName != \"-\" ) {\r\n\t\tif (!is_dir(\"$dir/$entryName\")) {\r\n\t\t\t$size += max(filesize(\"$dir/$entryName\"), $cluster);\r\n\t\t}\r\n\t\telse if (is_dir(\"$dir/$entryName\") AND !(ereg(\"^(\\.\\.?|CVS)$\",$entryName))) {\r\n\t\t\t$size += dirsizeof(\"$dir/$entryName\") + $taille_dir;\r\n\t\t}\r\n\t\t$entryName = @readdir($myDir);\r\n\t}\r\n\t$nom_dir = substr($dir, strlen($base_dir)+1);\r\n\tif ($dir == $base_dir) {\r\n\t $taille_disque = taille_en_octets($size);\r\n\t $ch_texte .= ligne_texte_valeur(_T('tabbord:total'), taille_en_octets($size), \"entete\");\r\n\t}\r\n\telse if (!ereg(\"\\/\",$nom_dir)) \r\n\t $ch_texte .= ligne_texte_valeur($nom_dir, taille_en_octets($size), \"stotal\") . ligne_vide();\r\n\telse $ch_texte .= ligne_texte_valeur($nom_dir, taille_en_octets($size), \"liste\");\r\n\t@closedir($myDir);\r\n\treturn ($size);\r\n}", "function read10k($dir)\r\n{\r\n $listTemp = array();\r\n\r\n $file = fopen($dir, \"r\");\r\n\r\n $arr = array();\r\n while (!feof($file)) {\r\n\r\n $arr[] = fgets($file);\r\n\r\n if (count($arr) == 10000) {\r\n // write to temp file\r\n $temp = tempnam(\"/tmp/\", \"tmpfile\");\r\n $listTemp[] = $temp;\r\n\r\n $handle = fopen($temp, \"w\");\r\n fwrite($handle, join(\"\", soryArray($arr)));\r\n fclose($handle);\r\n \r\n $arr = array();\r\n }\r\n }\r\n fclose($file);\r\n\r\n return $listTemp;\r\n}", "function getmicrotime() {\n list($usec, $sec) = explode(\" \",microtime());\n return ((float)$usec + (float)$sec);\n }" ]
[ "0.5789527", "0.5275558", "0.51730686", "0.51067656", "0.5074766", "0.5060549", "0.50000477", "0.49884436", "0.49673808", "0.49588144", "0.4954754", "0.49481192", "0.49160108", "0.48706788", "0.4844895", "0.48272255", "0.48242247", "0.48111913", "0.48111913", "0.4810797", "0.4810797", "0.480919", "0.47978234", "0.47634256", "0.47470185", "0.47436032", "0.47432524", "0.47157285", "0.4713339", "0.4663932", "0.4656761", "0.4655841", "0.46539742", "0.46536395", "0.46372604", "0.46298257", "0.46231818", "0.46179184", "0.46136647", "0.46031553", "0.45997906", "0.45994326", "0.4582243", "0.45802614", "0.45750177", "0.45709303", "0.45707604", "0.45697284", "0.45666382", "0.45636338", "0.45573848", "0.454503", "0.45403296", "0.4535198", "0.45330226", "0.4531066", "0.4528017", "0.45183396", "0.45056343", "0.45011133", "0.45007637", "0.4500575", "0.44936776", "0.44931245", "0.44902012", "0.44846144", "0.44798282", "0.44766998", "0.44731453", "0.44684997", "0.44666854", "0.44581488", "0.44519585", "0.44492754", "0.4445898", "0.44372448", "0.4435564", "0.44348058", "0.44330958", "0.44328898", "0.4431294", "0.44288275", "0.4428627", "0.44150692", "0.44138885", "0.44133466", "0.44092882", "0.44064367", "0.44055432", "0.44054303", "0.43996447", "0.43981263", "0.4389711", "0.4385725", "0.4383487", "0.43828186", "0.43787462", "0.43690544", "0.43676072", "0.436751", "0.43660536" ]
0.0
-1
If your server is on a nix system, this is faster
function gethost ($ip) { $host = `host $ip`; return (($host ? end ( explode (' ', $host)) : $ip)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adodb_microtime()\n{\n\treturn microtime(true);\n}", "private static function test_cpu() {\n\t\t$arr = array();\n\t\t$len = 1024;\n\t\t$delta = 3.14159;\n\t\tfor ( $i = 0; $i < $len; $i++ ) {\n\t\t\t$arr[] = $i * $delta;\n\t\t}\n\t\t$str = '';\n\t\tif ( function_exists( 'json_encode' ) ) {\n $str .= json_encode( $arr );\n } else {\n\t\t\t$str .= serialize( $arr );\n\t\t}\n\t\tunset( $arr );\n\t\tunset( $str );\n\t}", "private function Benchmark()\r\n\t{\t\t\r\n\t}", "function _CPULoad()\n\t{\n/*\n\ncpu 524152 2662 2515228 336057010\ncpu0 264339 1408 1257951 168025827\ncpu1 259813 1254 1257277 168031181\npage 622307 25475680\nswap 24 1891\nintr 890153570 868093576 6 0 4 4 0 6 1 2 0 0 0 124 0 8098760 2 13961053 0 0 0 0 0 0 0 0 0 0 0 0 0 16 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\ndisk_io: (3,0):(3144904,54369,610378,3090535,50936192) (3,1):(3630212,54097,633016,3576115,50951320)\nctxt 66155838\nbtime 1062315585\nprocesses 69293\n\n*/\n\t\t// Algorithm is taken from\n\t\t// http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/414b0e1b-499c-411e-8a02-6a12e339c0f1/\n\t\tif (strncmp(PHP_OS,'WIN',3)==0) {\n\t\t\tif (PHP_VERSION == '5.0.0') return false;\n\t\t\tif (PHP_VERSION == '5.0.1') return false;\n\t\t\tif (PHP_VERSION == '5.0.2') return false;\n\t\t\tif (PHP_VERSION == '5.0.3') return false;\n\t\t\tif (PHP_VERSION == '4.3.10') return false; # see http://bugs.php.net/bug.php?id=31737\n\n\t\t\tstatic $FAIL = false;\n\t\t\tif ($FAIL) return false;\n\n\t\t\t$objName = \"winmgmts:{impersonationLevel=impersonate}!\\\\\\\\.\\\\root\\\\CIMV2\";\n\t\t\t$myQuery = \"SELECT * FROM Win32_PerfFormattedData_PerfOS_Processor WHERE Name = '_Total'\";\n\n\t\t\ttry {\n\t\t\t\t@$objWMIService = new COM($objName);\n\t\t\t\tif (!$objWMIService) {\n\t\t\t\t\t$FAIL = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$info[0] = -1;\n\t\t\t\t$info[1] = 0;\n\t\t\t\t$info[2] = 0;\n\t\t\t\t$info[3] = 0;\n\t\t\t\tforeach($objWMIService->ExecQuery($myQuery) as $objItem) {\n\t\t\t\t\t\t$info[0] = $objItem->PercentProcessorTime();\n\t\t\t\t}\n\n\t\t\t} catch(Exception $e) {\n\t\t\t\t$FAIL = true;\n\t\t\t\techo $e->getMessage();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $info;\n\t\t}\n\n\t\t// Algorithm - Steve Blinch (BlitzAffe Online, http://www.blitzaffe.com)\n\t\t$statfile = '/proc/stat';\n\t\tif (!file_exists($statfile)) return false;\n\n\t\t$fd = fopen($statfile,\"r\");\n\t\tif (!$fd) return false;\n\n\t\t$statinfo = explode(\"\\n\",fgets($fd, 1024));\n\t\tfclose($fd);\n\t\tforeach($statinfo as $line) {\n\t\t\t$info = explode(\" \",$line);\n\t\t\tif($info[0]==\"cpu\") {\n\t\t\t\tarray_shift($info); // pop off \"cpu\"\n\t\t\t\tif(!$info[0]) array_shift($info); // pop off blank space (if any)\n\t\t\t\treturn $info;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\n\t}", "function updatebases()\n {\n\n $tot_data = 0;\n $tot_idx = 0;\n $tot_all = 0;\n $total_gain = 0;\n $local_query = \"SHOW TABLE STATUS\";\n $result = db_query($local_query);\n if (db_num_rows($result[\"resource\"])) {\n while ($row = db_fetch_row($result)) {\n $local_query = 'OPTIMIZE TABLE '.$row[0];\n $resultat = db_query($local_query);\n }\n return true;\n }\n }", "public function performanceTest() \n {\n $time_start = microtime(true);\n $resizedImage = $this->resizeImage('IMG_20200224_195430.jpg', FULL_SIZE_IMAGE_MAX_WIDTH, FULL_SIZE_IMAGE_MAX_HEIGHT);\n\n $lapTime = microtime(true);\n $rstime = ($lapTime - $time_start);\n echo 'Image to full-size resize time: '.$rstime.' seconds<br>';\n\n $time_start2 = microtime(true);\n $resizedImageQr = $this->resizeImage($resizedImage);\n $lapTime = microtime(true);\n $rstime = ($lapTime - $time_start2);\n echo 'Image to medium resize time: '.$rstime.' seconds<br>';\n \n $time_start2 = microtime(true);\n $tnImage = $this->resizeImage($resizedImageQr, THUMBNAIL_MAX_WIDTH, THUMBNAIL_MAX_HEIGHT);\n $lapTime = microtime(true);\n $rstime = ($lapTime - $time_start2);\n echo 'Image to thumbnail resize time: '.$rstime.' seconds<br>';\n \n $readStartTime = microtime(true);\n $this->qrText = $this->readQrCodeFromImage($resizedImageQr);\n $lapTime = microtime(true);\n $rstime = ($lapTime - $readStartTime);\n echo 'QR-code read time: '.$rstime.' seconds<br>';\n \n $time_end = microtime(true);\n $execution_time = ($time_end - $time_start);\n echo 'Total Execution Time: '.$execution_time.' seconds<br>';\n }", "function phpTrafficA_getmicrotime() {\nlist($usec, $sec) = explode(\" \", microtime());\nreturn ((float)$usec + (float)$sec);\n}", "public function runTenIdenticalSearch()\n\t{\t\t\n\t\t$this->client->isLazy(); \t\t\n\t\t$time = time();\n\t\t$request = $this->client->getMessageFactory()->createRequest($this->url, 'GET');\n\t\t$request->addHeader('cookie',$this->strCookie);\n\t\t$request->setTimeout(300000000);\n\t\t$response = $this->client->getMessageFactory()->createResponse();\n\t\t$this->client->send($request, $response);\n\t\tif($response->getStatus() === 200) {\t\t\t\n\t\t\t$responseTime = time();\n\t\t\t$pageLoadTime = $responseTime-$time;\n\t\t\treturn $this->convertToSeconds($pageLoadTime);\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public function native();", "public function serverMemoryUsage()\n {\n $free = shell_exec('free -btl');\n $free = (string)trim($free);\n $free = str_replace(\" \", \" \", $free);\n $free = str_replace(\" \", \" \", $free);\n $free = str_replace(\" \", \" \", $free);\n $free = str_replace(\" \", \" \", $free);\n $free_arr = explode(\"\\n\", $free);\n $mem = explode(\" \", $free_arr[1]);\n $mem = array_filter($mem);\n $mem = array_merge($mem);\n $swap = explode(\" \", $free_arr[4]);\n //$swap = array_filter($swap);\n //$swap = array_merge($swap);\n $this->totalservermemory = $this->formatBytes($mem[1], 0);\n $this->freeservermemory = $this->formatBytes($mem[3], 0);\n $this->totalswap = $this->formatBytes($mem[1], 0);\n $swap_usage = $swap[2] / $swap[1] * 100;\n $this->swapusage = $swap_usage;\n $memory_usage = $mem[2] / $mem[1] * 100;\n $this->memoryusage = $memory_usage;\n return $memory_usage;\n }", "function performanceCheck($url) {\n\n\t//Getting HTML from URL\n\t$ch = curl_init($url);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, false);\n\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, true);\n\tcurl_setopt($ch, CURLOPT_COOKIESESSION, true);\n\t\n\t$content = curl_exec($ch);\n\t\t\n\treturn array(\n\t\tURL => $url, \n\t\tTOTAL_TIME => curl_getinfo($ch, CURLINFO_TOTAL_TIME), // Total transaction time in seconds for last transfer\n\t\t//NAMELOOKUP_TIME => curl_getinfo($ch, CURLINFO_NAMELOOKUP_TIME), //Time in seconds until name resolving was complete\n\t\t//PRETRANSFER_TIME => curl_getinfo($ch, CURLINFO_PRETRANSFER_TIME), //Time in seconds from start until just before file transfer begins\n\t\tHTTP_CODE => curl_getinfo($ch, CURLINFO_HTTP_CODE) );\n\n\tcurl_close($ch);\n\n}", "public function memCached() { return true; }", "public function servertime() {\n\t\tif(is_null($this->sync))\n\t\t\t$this->synchronize();\n\t\treturn (int) (microtime(true) * 1000) + $this->sync;\n\t}", "function now() {\n return microtime(true)*1000;\n}", "function process_time(){\n $time = number_format( microtime(true) - LIM_START_MICROTIME, 6);\n return($time);\n}", "public function finPerformance(){\n $memoria = memory_get_usage() - $this->memoria;\n $tiempo = microtime(true) - $this->tiempo;\n\n echo \"<pre>\";\n print_r(array(\"memoria\" => $memoria.\" bytes \", \"tiempo\" => $tiempo.\" segundos\" ));\n die;\n }", "public function getOptimizedSize(): int;", "function gethwinfo () {\n\t\t$ret[cpu] = server::cpu_info();\n\t\t$ret[mem] = round(server::mem_total() / 1024);\n\t\treturn $ret;\n\t\t\n\t}", "function optimize_database()\n\n\t{//12022007 - method added\n\n\t\t$qry = \"show table status from \" . $GLOBALS['db_con_obj']->dbname;\n\n\t\t$res = $this->execute_sql($qry);\n\n\n\n\t\twhile($data = mysql_fetch_array($res[0]))\n\n\t\t{\n\n\t\t\t$q = \"optimize table \" . $data[0];\n\n\t\t\t$this->execute_sql($q);\n\n\t\t}\n\n\t}", "public static function create_server_info_array() {\n\t $result = array();\n\t $result[ 'php'][ 'os' ] = PHP_OS;\n\t $result[ 'php'][ 'uname' ] = array(\n\t\t'r' => php_uname( 'r' ),\n\t\t'v' => php_uname( 'v' ),\n\t\t'm' => php_uname( 'm' )\n\t );\n\n\t if ( ! stristr( PHP_OS, 'win' ) ) {\n\n\t\tif ( is_readable( self::PROC_MEMINFO ) ) {\n//MemTotal: 7852640 kB\n \t $stats = @file_get_contents( self::PROC_MEMINFO );\n \t if ( $stats !== false ) {\n\n \t$stats = explode( PHP_EOL, $stats );\n \tforeach ( $stats as $stat_line ) {\n \t $stat_array = explode( ':', trim( $stat_line) );\n \t if ( count( $stat_array ) == 2 ) {\n\t\t\t\t$tag = strtolower( trim( $stat_array[ 0 ] ) );\n\t\t\t\tswitch ( $tag ) {\n\t\t\t\t case 'memtotal' :\n\t\t\t\t\t$result[ 'mem' ][ 'total' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n \t }\n\t\t\t if ( isset( $result[ 'mem' ][ 'total' ] ) ) {\n\t\t\t\tbreak;\n\t\t\t }\n \t}\n\t\t\tunset( $stats, $stat_array, $stat_line );\n \t }\n \t\t}\n\n\t\tif ( is_readable( self::PROC_CPUINFO ) ) {\n//vendor_id : GenuineIntel\n//cpu family : 6\n//model : 58\n//model name : Intel(R) Core(TM) i5-3550S CPU @ 3.00GHz\n//cpu cores : 4\n//bogomips : 5986.62\n \t $stats = @file_get_contents( self::PROC_CPUINFO );\n \t if ( $stats !== false ) {\n\n \t$stats = explode( PHP_EOL, $stats );\n \tforeach ( $stats as $stat_line ) {\n \t $stat_array = explode( ':', trim( $stat_line) );\n \t if ( count( $stat_array ) == 2 ) {\n\t\t\t\t$tag = strtolower( trim( $stat_array[ 0 ] ) );\n\t\t\t\tswitch ( $tag ) {\n\t\t\t\t case 'vendor_id' :\n\t\t\t\t\t$result[ 'cpu' ][ 'vendor_id' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'cpu family' :\n\t\t\t\t\t$result[ 'cpu' ][ 'family' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'model' :\n\t\t\t\t\t$result[ 'cpu' ][ 'model' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'model name' :\n\t\t\t\t\t$result[ 'cpu' ][ 'model_name' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'cpu cores' :\n\t\t\t\t\t$result[ 'cpu' ][ 'cores' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t case 'bogomips' :\n\t\t\t\t\t$result[ 'cpu' ][ 'bogomips' ] = trim( $stat_array[ 1 ] );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n \t }\n\t\t\t if ( isset( $result[ 'cpu' ][ 'vendor_id' ] ) && isset( $result[ 'cpu' ][ 'family' ] ) && isset( $result[ 'cpu' ][ 'model' ] ) && isset( $result[ 'cpu' ][ 'model_name' ] ) && isset( $result[ 'cpu' ][ 'cores' ] ) && isset( $result[ 'cpu' ][ 'bogomips' ] ) ) {\n\t\t\t\tbreak;\n\t\t\t }\n \t}\n\t\t\tunset( $stats, $stat_array, $stat_line );\n \t }\n \t\t}\n\t }\n\t return( $result );\n\t}", "private function _cpuinfo()\n {\n $dev = new CpuDevice();\n CommonFunctions::executeProgram('cat', '/tmp/webprtconf.txt |grep Type', $cpudev);\n $dev->setModel($cpudev);\n CommonFunctions::executeProgram('cat', '/tmp/webprtconf.txt | grep Speed | awk \\'{print $4}\\'', $cpuspeed);\n $dev->setCpuSpeed($cpuspeed);\n //$dev->setCache('512000'); //-don't know howto guess cache size\n $this->sys->setCpus($dev);\n }", "function pageLoadTime() {\n $time = microtime();\n $time = explode(' ', $time);\n $time = $time[1] + $time[0];\n $start = time; // start\n}", "function fastResult($script)\n{\n\tdisconnectDB();\n\tshowResult($script);\n}", "public function largeDataIsStored() {}", "public function largeDataIsStored() {}", "public function largeDataIsStored() {}", "public function largeDataIsStored() {}", "private function _optimize() {}", "function good_microtime()\n{ \n list($usec, $sec) = explode(\" \",microtime()); \n return ((float)$usec + (float)$sec); \n}", "function getSystemTime()\n{\n $time = @gettimeofday();\n $resultTime = $time['sec'] * 1000;\n $resultTime += floor($time['usec'] / 1000);\n return $resultTime;\n}", "public function iniPerformance(){\n $this->tiempo = microtime(true);\n $this->memoria = memory_get_usage();\n }", "function p8_ex1() {\n $userAgent = $_SERVER['HTTP_USER_AGENT']; // Or get_browser(null, true)\n\n function get_client_ip_env() {\n $ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n }\n\n function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n }\n\n $servName = $_SERVER['SERVER_NAME']; // No canonical use $_SERVER['HTTP_HOST']\n\n return '\n User Agent : '.$userAgent.'<br />\n Adresse ip : '.get_client_ip_env().'<br />\n Nom du serveur : '.$servName;\n}", "function _prime_network_caches($network_ids)\n {\n }", "function getTableSize(){\r\n\tglobal $db;\r\n\t$size = 0;\r\n\t$unit = 'B';\r\n\t$query = $db->query('SHOW TABLE STATUS');\r\n\twhile ($rt = $db->fetch_array($query)) {\r\n\t\t$size += $rt['Index_length'];\r\n\t\t$size += $rt['Data_length'];\r\n\t}\r\n\treturn $size;\r\n}", "protected function isMemcachedUsed() {}", "protected function isMemcachedUsed() {}", "function CountCachedExecs($db, $secs2cache, $sql, $inputarray) {\r\n\tglobal $CACHED; $CACHED++; /** @see variables.php */\r\n}", "private function _getMicroTime (){\n\t\treturn microtime(true);\n\t}", "function database_get_server_info()\n {\n\t return ( function_exists('mysql_get_server_info') ? mysql_get_server_info($this->database_connection) : FALSE );\n\t}", "public function test_performance()\n {\n $db = new Database();\n $db->Type = Database::TYPE_SQLite;\n $db->HostOrPath = \":memory:\";\n $db->Connect();\n for ($i = 0; $i < 25; $i++) {\n\n // Create table and fill it\n $db->Query(\n \"CREATE TABLE IF NOT EXISTS table_{$i} (id INTEGER PRIMARY KEY, content TEXT)\"\n );\n $k = 1;\n $step = 500;\n $stop = 100000;\n while ($k < $stop) {\n $keys = [];\n $values = [];\n for ($j = 0; $j < $step; $j++) {\n $keys[] = \"(:d{$j})\";\n $values[\"d{$j}\"] = \"d{$j}\";\n }\n $db->Query(\n \"INSERT INTO table_{$i} (content) VALUES \" . join(\", \", $keys),\n $keys\n );\n $k += $step;\n $this->assertEquals($k - 1, $db->LastInsertId);\n }\n\n // Select many IDs, remove records by IDs and roll back changes\n $db->BeginTransaction();\n $rs = $db->Query(\"SELECT id FROM table_{$i} WHERE (id > 50 AND id < 101) OR (id > 250 AND id < 451)\");\n $ids = [];\n while ($r = $db->FetchArray($rs)) {\n $ids[] = $r[\"id\"];\n }\n $db->IWillBeCareful();\n $db->Query(\n \"DELETE FROM table_{$i} WHERE id IN (:ids)\",\n array(\n \"ids\" => join(\", \", $ids)\n )\n );\n $db->RollBack();\n\n // Update records by content and commit changes\n $db->BeginTransaction();\n $db->Query(\n \"UPDATE table_{$i} SET content = 'd1 or d3' WHERE content LIKE :d1 OR content LIKE :d3\",\n array(\n \"d1\" => \"d%1\",\n \"d3\" => \"d%3\"\n )\n );\n $db->Commit();\n\n }\n $db->Close();\n }", "function minify(){\n return $_SERVER['REMOTE_ADDR']=='127.0.0.1' || $_SERVER['REMOTE_ADDR']=='192.168.1.111' ? '' : \"\";\n}", "function my_deconstructor()\n\t{\n\t\t//-----------------------------------------\n\t\t// Update Server Load\n\t\t//-----------------------------------------\n\t\t\t\t\n if ($this->vars['load_limit'] > 0)\n {\n\t $server_load_found = 0;\n\t \n\t //-----------------------------------------\n\t // Check cache first...\n\t //-----------------------------------------\n\t \n\t if ( $this->cache['systemvars']['loadlimit'] )\n\t {\n\t\t $loadinfo = explode( \"-\", $this->cache['systemvars']['loadlimit'] );\n\t\t \n\t\t if ( intval($loadinfo[1]) > (time() - 10) )\n\t\t {\n\t\t\t //-----------------------------------------\n\t\t\t // Cache is less than 1 minute old\n\t\t\t //-----------------------------------------\n\t\t\t \n\t\t\t $server_load_found = 1;\n \t\t\t}\n\t\t\t}\n\t\t\t\n\t //-----------------------------------------\n\t // No cache or it's old, check real time\n\t //-----------------------------------------\n\t\t\t\n\t\t\tif ( ! $server_load_found )\n\t\t\t{\n\t\t # @ supressor fixes warning in >4.3.2 with open_basedir restrictions\n\t\t \n\t \tif ( @file_exists('/proc/loadavg') )\n\t \t{\n\t \t\tif ( $fh = @fopen( '/proc/loadavg', 'r' ) )\n\t \t\t{\n\t \t\t\t$data = @fread( $fh, 6 );\n\t \t\t\t@fclose( $fh );\n\t \t\t\t\n\t \t\t\t$load_avg = explode( \" \", $data );\n\t \t\t\t\n\t \t\t\t$this->server_load = trim($load_avg[0]);\n\t \t\t}\n\t \t}\n\t \telse if( strstr( strtolower(PHP_OS), 'win' ) )\n\t \t{\n\t\t\t /*---------------------------------------------------------------\n\t\t\t | typeperf is an exe program that is included with Win NT,\n\t\t\t |\tXP Pro, and 2K3 Server. It can be installed on 2K from the\n\t\t\t |\t2K Resource kit. It will return the real time processor\n\t\t\t |\tPercentage, but will take 1 second processing time to do so.\n\t\t\t |\tThis is why we shall cache it, and check every 10 secs.\n\t\t\t |\n\t\t\t |\tCan also be obtained from COM, but it's extremely slow...\n\t\t\t ---------------------------------------------------------------*/\n\t\t \t\n\t\t \t$serverstats = @shell_exec(\"typeperf \\\"Processor(_Total)\\% Processor Time\\\" -sc 1\");\n\t\t \t\n\t\t \tif( $serverstats )\n\t\t \t{\n\t\t\t\t\t\t$server_reply = explode( \"\\n\", str_replace( \"\\r\", \"\", $serverstats ) );\n\t\t\t\t\t\t$serverstats = array_slice( $server_reply, 2, 1 );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$statline = explode( \",\", str_replace( '\"', '', $serverstats[0] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->server_load = round( $statline[1], 2 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t \telse\n\t \t{\n\t\t\t\t\tif ( $serverstats = @exec(\"uptime\") )\n\t\t\t\t\t{\n\t\t\t\t\t\tpreg_match( \"/(?:averages)?\\: ([0-9\\.]+)[^0-9\\.]+([0-9\\.]+)[^0-9\\.]+([0-9\\.]+)\\s*/\", $serverstats, $load );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->server_load = $load[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $this->server_load )\n\t\t\t\t{\n\t\t\t\t\t$this->cache['systemvars']['loadlimit'] = $this->server_load.\"-\".time();\n\t\t\t\t\t\n\t\t\t\t\t$this->update_cache( array( 'array' => 1, 'name' => 'systemvars', 'donow' => 1, 'deletefirst' => 0 ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Process mail queue\n\t\t//-----------------------------------------\n\t\t\t\n\t\t$this->process_mail_queue();\t\t\n\t\t\n\t\t//-----------------------------------------\n\t\t// Any shutdown queries\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->DB->return_die = 0;\n\t\t\n\t\tif ( count( $this->DB->obj['shutdown_queries'] ) )\n\t\t{\n\t\t\tforeach( $this->DB->obj['shutdown_queries'] as $q )\n\t\t\t{\n\t\t\t\t$this->DB->query( $q );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->DB->return_die = 1;\n\t\t\n\t\t$this->DB->obj['shutdown_queries'] = array();\n\t\t\n\t\t$this->DB->close_db();\n\t\t\n\t\tif( is_object($this->cachelib) )\n\t\t{\n\t\t\t// memcache, primarily, though disconnect will\n\t\t\t// happen automatically just like DB anyways\n\t\t\t\n\t\t\t$this->cachelib->disconnect();\n\t\t}\t\t\n\t}", "function optimizeDatabase() {}", "function virustotalscan_check_server_load($level)\r\n{\r\n $load = 0;\r\n // daca functia exista atunci se intorc timpii de incarcare a severului\r\n if (function_exists('get_server_load')) {\r\n $load = get_server_load();\r\n }\r\n if (floatval($load) > floatval($level)) {\r\n // timpul de incarcare e mai mare si deci scanarea nu se va efectua\r\n return false;\r\n }\r\n else {\r\n // timpul de incarcare e mai mic decat cel trimis ca parametru, iar ca rezultat scanarea va incepe\r\n return true;\r\n }\r\n}", "public function BasicInfo(){\n\t\t$this->pointlist = new CachedArrayList();\n\t\t$this->clusterlist = new CachedArrayList(ListNames::CLUSTERLISTNAME);\n\t\t$this->masterlist = new CachedArrayList(ListNames::MASTERPOINTLISTNAME);\n\t\t$this->outlierlist = new CachedArrayList(ListNames::OUTLYINGPOINTLISTNAME);\n\t\t$this->sse = new SSE();\n\t\t$this->cache = new Cache();\n\t\t\n\t\t$info = $this->cache->getCacheInfo();\n\t\t\n\t\t$this->sse->start();\n\t\t\n\t\t$oldpointsize = -1;\n\t\t$oldmemory = -1;\n\t\t$oldclustersize = -1;\n\t\t$oldoutliersize = -1;\n\t\t$oldmastersize = -1;\n\t\twhile (true){\n\t\t\t$size = $this->pointlist->size();\n\t\t\tif($oldpointsize != $size){\n\t\t\t\t$oldpointsize = $size;\n\t\t\t\t$this->sse->sendData(\"pointsize\", $size);\n\t\t\t}\n\t\t\t\n\t\t\t$size = $this->clusterlist->size();\n\t\t\tif($oldclustersize != $size){\n\t\t\t\t$oldclustersize = $size;\n\t\t\t\t$this->sse->sendData(\"clustersize\", $size);\n\t\t\t}\n\t\t\t\n\t\t\t$size = $this->masterlist->size();\n\t\t\tif($oldmastersize != $size){\n\t\t\t\t$oldmastersize = $size;\n\t\t\t\t$this->sse->sendData(\"mastersize\", $size);\n\t\t\t}\n\t\t\t\n\t\t\t$size = $this->outlierlist->size();\n\t\t\tif($oldoutliersize != $size){\n\t\t\t\t$oldoutliersize = $size;\n\t\t\t\t$this->sse->sendData(\"outliersize\", $size);\n\t\t\t}\n\t\t\t\n\t\t\t$info = $this->cache->getCacheInfo();\n\t\t\t$memory = round($info[\"mem_size\"]/1000, 2);\n\t\t\t\n\t\t\tif($memory != $oldmemory){\n\t\t\t\t$oldmemory = $memory;\n\t\t\t\t$this->sse->sendData(\"usedmemory\", $memory);\n\t\t\t}\n\t\t\t\n\t\t\t// sover i 1 sec\n\t\t\tsleep(1);\n\t\t}\n\t}", "function get_microtime() {\n\t$microtime = microtime();\n\t$microtime = explode(' ', $microtime);\n\t$microtime = $microtime[1] + $microtime[0];\n\treturn $microtime;\n}", "function mysql_get_server_info($link_identifier = NULL)\n{\n}", "public function microtime();", "function ciniki_web_getScaledImageURL($ciniki, $image_id, $version, $maxwidth, $maxheight, $quality='60') {\n\n if( $maxwidth == 0 && $maxheight == 0 ) {\n $size = 'o';\n } elseif( $maxwidth == 0 ) {\n $size = 'h' . $maxheight;\n } else {\n $size = 'w' . $maxwidth;\n }\n\n //\n // NOTE: The cache.db was an attempt to speed up EFS(nfs) on Amazon AWS. It did not appear\n // help performance at all and should not be enabled. The code remains in here incase\n // it can be useful in the future.\n //\n\n //\n // Load last_updated date to check against the cache\n //\n $reload_image = 'no';\n/* if( isset($ciniki['config']['ciniki.web']['cache.db']) && $ciniki['config']['ciniki.web']['cache.db'] == 'on' ) {\n $strsql = \"SELECT ciniki_images.id, \"\n . \"ciniki_images.type, \"\n . \"UNIX_TIMESTAMP(ciniki_images.last_updated) AS last_updated, \"\n . \"UNIX_TIMESTAMP(ciniki_web_image_cache.last_updated) AS cache_last_updated \"\n . \"FROM ciniki_images \"\n . \"LEFT JOIN ciniki_web_image_cache ON (\"\n . \"ciniki_images.id = ciniki_web_image_cache.image_id \"\n . \"AND ciniki_web_image_cache.tnid = '\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['tnid']) . \"' \"\n . \"AND ciniki_web_image_cache.size = '\" . ciniki_core_dbQuote($ciniki, $size) . \"' \"\n . \") \"\n . \"WHERE ciniki_images.id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \"\n . \"AND ciniki_images.tnid = '\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['tnid']) . \"' \"\n . \"\";\n $reload_image = 'yes';\n } else { */\n $strsql = \"SELECT id, type, UNIX_TIMESTAMP(ciniki_images.last_updated) AS last_updated \"\n . \"FROM ciniki_images \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['tnid']) . \"' \"\n . \"\";\n/* } */\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.images', 'image');\n if( $rc['stat'] != 'ok' ) { \n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.web.103', 'msg'=>'Unable to load image', 'err'=>$rc['err']));\n }\n if( !isset($rc['image']) ) {\n return array('stat'=>'404', 'err'=>array('code'=>'ciniki.web.104', 'msg'=>'The image you requested does not exist.'));\n }\n $img = $rc['image'];\n\n //\n // Build working path, and final url\n //\n if( $img['type'] == 2 ) {\n $extension = 'png';\n } else {\n $extension = 'jpg';\n }\n if( $maxwidth == 0 && $maxheight == 0 ) {\n// $filename = '/' . sprintf('%02d', ($ciniki['request']['tnid']%100)) . '/'\n// . sprintf('%07d', $ciniki['request']['tnid'])\n// . '/o/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $filename = '/o/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $size = 'o';\n } elseif( $maxwidth == 0 ) {\n// $filename = '/' . sprintf('%02d', ($ciniki['request']['tnid']%100)) . '/'\n// . sprintf('%07d', $ciniki['request']['tnid'])\n// . '/h' . $maxheight . '/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $filename = '/h' . $maxheight . '/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $size = 'h' . $maxheight;\n } else {\n// $filename = '/' . sprintf('%02d', ($ciniki['request']['tnid']%100)) . '/'\n// . sprintf('%07d', $ciniki['request']['tnid'])\n// . '/w' . $maxwidth . '/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $filename = '/w' . $maxwidth . '/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $size = 'w' . $maxwidth;\n }\n $img_filename = $ciniki['tenant']['web_cache_dir'] . $filename;\n $img_url = $ciniki['tenant']['web_cache_url'] . $filename;\n $img_domain_url = 'http://' . $ciniki['request']['domain'] . $ciniki['tenant']['web_cache_url'] . $filename;\n\n //\n // Check db for cache details\n //\n if( isset($ciniki['config']['ciniki.web']['cache.db']) && $ciniki['config']['ciniki.web']['cache.db'] == 'on'\n && isset($img['cache_last_updated']) && $img['cache_last_updated'] >= $img['last_updated']\n ) {\n return array('stat'=>'ok', 'url'=>$img_url, 'domain_url'=>$img_domain_url);\n }\n\n //\n // Check last_updated against the file timestamp, if the file exists\n //\n if( $reload_image == 'yes' || !file_exists($img_filename) || filemtime($img_filename) < $img['last_updated'] ) {\n\n //\n // Load the image from the database\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'images', 'private', 'loadImage');\n $rc = ciniki_images_loadImage($ciniki, $ciniki['request']['tnid'], $img['id'], $version);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $image = $rc['image'];\n\n //\n // Scale image\n //\n if( $maxwidth > 0 || $maxheight > 0 ) {\n $image->scaleImage($maxwidth, $maxheight);\n }\n\n //\n // Apply a border\n //\n // $image->borderImage(\"rgb(255,255,255)\", 10, 10);\n\n //\n // Check if directory exists\n //\n if( !file_exists(dirname($img_filename)) ) {\n mkdir(dirname($img_filename), 0755, true);\n }\n\n //\n // Write the file\n //\n $h = fopen($img_filename, 'w');\n if( $h ) {\n if( $img['type'] == 2 ) {\n $image->setImageFormat('png');\n } else {\n $image->setImageCompressionQuality($quality);\n }\n fwrite($h, $image->getImageBlob());\n fclose($h);\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.web.105', 'msg'=>'Unable to load image'));\n }\n\n //\n // Update database\n //\n/* if( isset($ciniki['config']['ciniki.web']['cache.db']) && $ciniki['config']['ciniki.web']['cache.db'] == 'on' ) {\n $strsql = \"INSERT INTO ciniki_web_image_cache (tnid, image_id, size, last_updated) \" \n . \"VALUES('\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['tnid']) . \"'\"\n . \", '\" . ciniki_core_dbQuote($ciniki, $img['id']) . \"'\"\n . \", '\" . ciniki_core_dbQuote($ciniki, $size) . \"'\"\n . \", UTC_TIMESTAMP()) \"\n . \"ON DUPLICATE KEY UPDATE last_updated = UTC_TIMESTAMP() \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbInsert');\n $rc = ciniki_core_dbInsert($ciniki, $strsql, 'ciniki.tenants');\n if( $rc['stat'] != 'ok' ) {\n error_log('CACHE: Unable to save ' . $img_filename . ' to ciniki_web_cache');\n return $rc;\n }\n } */\n }\n\n return array('stat'=>'ok', 'url'=>$img_url, 'domain_url'=>$img_domain_url, 'filename'=>$img_filename);\n}", "function tep_get_system_information() {\n $OSCOM_Db = Registry::get('Db');\n\n $Qdate = $OSCOM_Db->query('select now() as datetime');\n\n @list($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5);\n\n $data = array();\n\n $data['oscommerce'] = array('version' => OSCOM::getVersion());\n\n $data['system'] = array('date' => date('Y-m-d H:i:s O T'),\n 'os' => PHP_OS,\n 'kernel' => $kernel,\n 'uptime' => @exec('uptime'),\n 'http_server' => $_SERVER['SERVER_SOFTWARE']);\n\n $data['mysql'] = array('version' => $OSCOM_Db->getAttribute(\\PDO::ATTR_SERVER_VERSION),\n 'date' => $Qdate->value('datetime'));\n\n $data['php'] = array('version' => PHP_VERSION,\n 'zend' => zend_version(),\n 'sapi' => PHP_SAPI,\n 'int_size'\t=> defined('PHP_INT_SIZE') ? PHP_INT_SIZE : '',\n 'safe_mode'\t=> (int) @ini_get('safe_mode'),\n 'open_basedir' => (int) @ini_get('open_basedir'),\n 'memory_limit' => @ini_get('memory_limit'),\n 'error_reporting' => error_reporting(),\n 'display_errors' => (int)@ini_get('display_errors'),\n 'allow_url_fopen' => (int) @ini_get('allow_url_fopen'),\n 'allow_url_include' => (int) @ini_get('allow_url_include'),\n 'file_uploads' => (int) @ini_get('file_uploads'),\n 'upload_max_filesize' => @ini_get('upload_max_filesize'),\n 'post_max_size' => @ini_get('post_max_size'),\n 'disable_functions' => @ini_get('disable_functions'),\n 'disable_classes' => @ini_get('disable_classes'),\n 'enable_dl'\t=> (int) @ini_get('enable_dl'),\n 'filter.default' => @ini_get('filter.default'),\n 'default_charset' => @ini_get('default_charset'),\n 'mbstring.func_overload' => @ini_get('mbstring.func_overload'),\n 'mbstring.internal_encoding' => @ini_get('mbstring.internal_encoding'),\n 'unicode.semantics' => (int) @ini_get('unicode.semantics'),\n 'zend_thread_safty'\t=> (int) function_exists('zend_thread_id'),\n 'opcache.enable' => @ini_get('opcache.enable'),\n 'extensions' => get_loaded_extensions());\n\n return $data;\n }", "protected function analyzeCachingTables() {}", "private function testMirrors(){\n \n while(list($idx,$val)= each($this->t_mirrors)){\n\t\tif(!$this->ping(str_replace(\"http://\", \"\", $this->t_mirrors[$idx]), 80, 10)){\n unset($this->t_mirrors[$idx]);\n }else{\n $mirInUse=array();\n $mirInUse[]=$this->t_mirrors[$idx];\n $this->t_mirrors=$mirInUse;\n //var_dump($this->t_mirrors);\n return;\n }\n }\n }", "function randomise() {\n\n list($usec, $sec) = explode(' ', microtime());\n\n return (float) $sec + ((float) $usec * 100000);\n\n}", "function timestamp()\n {\n return microtime(true);\n }", "function adodb_getmem()\n{\n\tif (function_exists('memory_get_usage'))\n\t\treturn (integer) ((memory_get_usage()+512)/1024);\n\n\t$pid = getmypid();\n\n\tif ( strncmp(strtoupper(PHP_OS),'WIN',3)==0) {\n\t\t$output = array();\n\n\t\texec('tasklist /FI \"PID eq ' . $pid. '\" /FO LIST', $output);\n\t\treturn substr($output[5], strpos($output[5], ':') + 1);\n\t}\n\n\t/* Hopefully UNIX */\n\texec(\"ps --pid $pid --no-headers -o%mem,size\", $output);\n\tif (sizeof($output) == 0) return 0;\n\n\t$memarr = explode(' ',$output[0]);\n\tif (sizeof($memarr)>=2) return (integer) $memarr[1];\n\n\treturn 0;\n}", "function get_table_indexes($db, $table, $cnx='', $reload=false, $mode='mysql'){\n\tif($mode!=='mysql') exit('only mysql index mode developed');\n\tglobal $get_table_indexes, $dbTypeArray;\n\tif(!$cnx)$cnx=C_MASTER;\n\tif($get_table_indexes[$db][$table] && !$reload){\n\t\treturn $get_table_indexes[$db][$table];\n\t}else{\n\t\t$fl=__FILE__;\n\t\t$ln=__LINE__+1;\n\t\tob_start();\n\t\t$result=q(\"SHOW INDEXES FROM `$db`.`$table`\", $cnx, ERR_ECHO, O_DO_NOT_REMEDIATE);\n\t\t$err=ob_get_contents();\n\t\tob_end_clean();\n\t\tif($err)return false;\n\t\t\n\t\t$typeFlip = array_flip($dbTypeArray);\n\t\t$inCompound=false;\n\t\twhile($v=mysqli_fetch_array($result,MYSQLI_ASSOC)){\n\t\t\t$w++;\n\t\t\t@extract($v);\n\t\t\tif($buffer==$Key_name){\n\t\t\t\t//duplicate part of a key\n\t\t\t\tif(!$inCompound){\n\t\t\t\t\t$multiIdx[$Key_name][]=$singleIdx[count($singleIdx)-1];\n\t\t\t\t\tunset($singleIdx[count($singleIdx)-1]);\n\t\t\t\t\t//next two lines overcome \"bug\" in php: just cause I unset the highest element, this will not reset the next index assigned when I say $singleIdx[]=.. later on.\n\t\t\t\t\t$clr=$singleIdx;\n\t\t\t\t\t$singleIdx=$clr;\n\t\t\t\t}\n\t\t\t\t$multiIdx[$Key_name][]=$v;\n\t\t\t\t$inCompound=true;\n\t\t\t}else{\n\t\t\t\t$singleIdx[]=$v;\n\t\t\t\t$buffer=$Key_name;\n\t\t\t\t$inCompound=false;\n\t\t\t}\n\t\t}\n\t\t//set $singleIdx as assoc for reference\n\t\tif(count($singleIdx)){\n\t\t\tforeach($singleIdx as $v) $a[strtolower($v['Column_name'])]=$v;\n\t\t\t$singleIdx=$a;\n\t\t}\n\t\t//store compound keys as XML\n\t\tif($multiIdx){\n\t\t\t$compoundKey='';\n\t\t\tforeach($multiIdx as $n=>$v){\n\t\t\t\t$ci.='<compoundKey Key_name=\"'.$n.'\" Column_count=\"'.count($v).'\"';\n\t\t\t\t$i=0;\n\t\t\t\tforeach($v as $w){\n\t\t\t\t\t$i++;\n\t\t\t\t\tif($i==1)$ci.=' Non_unique=\"'.$w['Non_unique'].'\">'.\"\\n\";\n\t\t\t\t\t$ci.='<keyColumn Seq_in_index=\"'.$w['Seq_in_index'].'\" Column_name=\"'.$w['Column_name'].'\" Sub_part=\"'.$w['Sub_part'].'\" Comment=\"'.htmlentities($w['Comment']).'\">'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$ci.='</compoundKey>';\n\t\t\t}\n\t\t}\n\t\t$get_table_indexes[$db][$table]=array('singleIdx'=>$singleIdx, 'multiIdx'=>$multiIdx, 'compoundXML'=>$ci);\n\t\treturn $get_table_indexes[$db][$table];\n\t}\n}", "function server($element){\r\n if(@isset($_SERVER[$element])) return $_SERVER[$element];\r\n else return FALSE;\r\n}", "function randomise() {\n list($usec, $sec) = explode(' ', microtime());\n return (float) $sec + ((float) $usec * 100000);\n}", "function isAvailable() ;", "function isAvailable() ;", "function _get_time()\n{\n $_mtime = microtime();\n $_mtime = explode(\" \", $_mtime);\n\n return (double) ($_mtime[1]) + (double) ($_mtime[0]);\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}", "function vitero_scale_used($viteroid, $scaleid) {\n return false;\n}", "public static function getBestCost()\n {\n $timeTarget = 0.05;\n\n $cost = 8;\n do {\n $cost++;\n $start = microtime(true);\n password_hash(\"test\", PASSWORD_BCRYPT, [\"cost\" => $cost]);\n $end = microtime(true);\n } while (($end - $start) < $timeTarget);\n\n echo \"Best cost for this server is : \" . $cost . \"\\n\";\n }", "function _ExpensiveSQL($numsql = 10)\n\t{\n\t\tglobal $ADODB_FETCH_MODE;\n\n $perf_table = adodb_perf::table();\n\t\t\t$saveE = $this->conn->fnExecute;\n\t\t\t$this->conn->fnExecute = false;\n\n\t\t\tif (isset($_GET['expe']) && isset($_GET['sql'])) {\n\t\t\t\t$partial = !empty($_GET['part']);\n\t\t\t\techo \"<a name=explain></a>\".$this->Explain($_GET['sql'],$partial).\"\\n\";\n\t\t\t}\n\n\t\t\tif (isset($_GET['sql'])) return;\n\n\t\t\t$sql1 = $this->sql1;\n\t\t\t$save = $ADODB_FETCH_MODE;\n\t\t\t$ADODB_FETCH_MODE = ADODB_FETCH_NUM;\n\t\t\tif ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);\n\n\t\t\t$rs = $this->conn->SelectLimit(\n\t\t\t\"select sum(timer) as total,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer\n\t\t\t\tfrom $perf_table\n\t\t\t\twhere {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT')\n\t\t\t\tand (tracer is null or tracer not like 'ERROR:%')\n\t\t\t\tgroup by sql1\n\t\t\t\thaving count(*)>1\n\t\t\t\torder by 1 desc\",$numsql);\n\t\t\tif (isset($savem)) $this->conn->SetFetchMode($savem);\n\t\t\t$this->conn->fnExecute = $saveE;\n\t\t\t$ADODB_FETCH_MODE = $save;\n\t\t\tif (!$rs) return \"<p>$this->helpurl. \".$this->conn->ErrorMsg().\"</p>\";\n\t\t\t$s = \"<h3>Expensive SQL</h3>\n<font size=1>Tuning the following SQL could reduce the server load substantially</font><br>\n<table border=1 bgcolor=white><tr><td><b>Load</b><td><b>Count</b><td><b>SQL</b><td><b>Max</b><td><b>Min</b></tr>\\n\";\n\t\t\t$max = $this->maxLength;\n\t\t\twhile (!$rs->EOF) {\n\t\t\t\t$sql = $rs->fields[1];\n\t\t\t\t$raw = urlencode($sql);\n\t\t\t\tif (strlen($raw)>$max-100) {\n\t\t\t\t\t$sql2 = substr($sql,0,$max-500);\n\t\t\t\t\t$raw = urlencode($sql2).'&part='.crc32($sql);\n\t\t\t\t}\n\t\t\t\t$prefix = \"<a target=sqle\".rand().\" href=\\\"?hidem=1&expe=1&sql=\".$raw.\"&x#explain\\\">\";\n\t\t\t\t$suffix = \"</a>\";\n\t\t\t\tif($this->explain == false || strlen($prefix>$max)) {\n\t\t\t\t\t$prefix = '';\n\t\t\t\t\t$suffix = '';\n\t\t\t\t}\n\t\t\t\t$s .= \"<tr><td>\".adodb_round($rs->fields[0],6).\"<td align=right>\".$rs->fields[2].\"<td><font size=-1>\".$prefix.htmlspecialchars($sql).$suffix.\"</font>\".\n\t\t\t\t\t\"<td>\".$rs->fields[3].\"<td>\".$rs->fields[4].\"</tr>\";\n\t\t\t\t$rs->MoveNext();\n\t\t\t}\n\t\t\treturn $s.\"</table>\";\n\t}", "function performance( $visible = false ) {\n\n $stat = sprintf( '%d queries in %.3f seconds, using %.2fMB memory',\n get_num_queries(),\n timer_stop( 0, 3 ),\n memory_get_peak_usage() / 1024 / 1024\n );\n\n echo $visible ? $stat : \"<!-- {$stat} -->\" ;\n}", "function L_PageLoadTime() {\n\t\n\t/*\n\t\t$time = microtime();\n\t\t$time = explode(' ', $time);\n\t\t$time = $time[1] + $time[0];\n\t\t$finish = $time;\n\t\t$total_time = round(($finish - $start), 4);\n\t\t\n\t*/\n\t\n\t/*\n\t\t$end_time = microtime(TRUE);\n\t\t$time_taken = $end_time - $start_time;\n\t\t$time_taken = round($time_taken,5);\n\t\t\n\t*/\n\t\n\t\t// Start of code\n\t\t$time = microtime(true); // Gets microseconds\n\n\t\t// End of code\n\t\t$time_taken = (microtime(true) - $time);\n\t\t\n\t\treturn _e('Page generated in ' . $time_taken . ' seconds.','leonite');\n\n\t}", "function loadServerInfo() {\n\t\t\n\t\t/* define variables */\n\t\t$connections = array(); // to store the active connections\n\t\t$numConnections = 0; // number of connections (number of elements in $connections)\n\t\t$curServer = 0; // next position in the server array to handle\n\t\t\n\t\t/* loop as long as there are master servers to wait for */\n\t\twhile ($numConnections > 0 || isset($this->servers[$curServer])) {\n\t\t\t\n\t\t\t/* build up connections until limit is reached */\n\t\t\tfor (; isset($this->servers[$curServer]) && $numConnections < self::MAX_CONNECTIONS_SERVER; $curServer++) {\n\t\t\t\t\n\t\t\t\tswitch ($this->servers[$curServer][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffgief\"; break;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffgie3\\x05\"; break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$authority = $this->servers[$curServer][0].':'.$this->servers[$curServer][1];\n\t\t\t\t$connection = self::establishConnection($authority, $data);\n\t\t\t\t\n\t\t\t\t/* add to connection if not failed */\n\t\t\t\tif ($connection) {\n\t\t\t\t\t$connections[$curServer] = array($connection, &$this->servers[$curServer], self::getTimeInMs());\n\t\t\t\t\t$numConnections++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* save memory */\n\t\t\t\tunset($authority, $connection);\n\t\t\t}\n\t\t\t\n\t\t\t/* check for responses */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\t\n\t\t\t\t/* read data */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = fread($connection[0], 2048); // TODO: find out how great it really can be\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = fread($connection[0], 2048); // by my calc the max size is 850, but trying to read more doesn't harm\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* packet length */\n\t\t\t\t$datalen = strlen($data);\n\t\t\t\t// var_dump($datalen);\n\t\t\t\t\n\t\t\t\t/* check if data is usable, otherwise skip */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\tif ($data === false || $datalen < 14 || substr($data, 0, 14) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffinfo\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\tif ($data === false || $datalen < 15 || substr($data, 0, 15) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffinf35\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* analyse data */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = explode(\"\\x00\", $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['version'] = substr((string)$data[0], 14);\n\t\t\t\t\t\t$connection[1]['name'] = (string)$data[1];\n\t\t\t\t\t\t$connection[1]['map'] = (string)$data[2];\n\t\t\t\t\t\t$connection[1]['gametype'] = (string)$data[3];\n\t\t\t\t\t\t$flags = (int)$data[4];\n\t\t\t\t\t\t$connection[1]['password'] = (($flags & self::SERVER_FLAG_PASSWORD) === self::SERVER_FLAG_PASSWORD);\n\t\t\t\t\t\t$connection[1]['progression'] = (int)$data[5];\n\t\t\t\t\t\t$connection[1]['num_players'] = (int)$data[6];\n\t\t\t\t\t\t$connection[1]['max_players'] = (int)$data[7];\n\t\t\t\t\t\t$connection[1]['ping'] = (int)(self::getTimeInMs() - $connection[2]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['players'] = array();\n\t\t\t\t\t\tfor ($i = 8; isset($data[$i+2]); $i += 2) {\n\t\t\t\t\t\t\t$player = array();\n\t\t\t\t\t\t\t$player['name'] = (string)$data[$i];\n\t\t\t\t\t\t\t$player['score'] = (int)$data[$i+1];\n\t\t\t\t\t\t\t$connection[1]['players'][] = $player;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = explode(\"\\x00\", $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['version'] = (string)$data[1];\n\t\t\t\t\t\t$connection[1]['name'] = (string)$data[2];\n\t\t\t\t\t\t$connection[1]['map'] = (string)$data[3];\n\t\t\t\t\t\t$connection[1]['gametype'] = (string)$data[4];\n\t\t\t\t\t\t$flags = (int)$data[5];\n\t\t\t\t\t\t$connection[1]['password'] = (($flags & self::SERVER_FLAG_PASSWORD) === self::SERVER_FLAG_PASSWORD);\n\t\t\t\t\t\t$connection[1]['num_players'] = (int)$data[8];\n\t\t\t\t\t\t$connection[1]['max_players'] = (int)$data[9];\n\t\t\t\t\t\t$connection[1]['num_players_ingame'] = (int)$data[6];\n\t\t\t\t\t\t$connection[1]['max_players_ingame'] = (int)$data[7];\n\t\t\t\t\t\t$connection[1]['ping'] = (int)(self::getTimeInMs() - $connection[2]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['players'] = array();\n\t\t\t\t\t\tfor ($i = 10; isset($data[$i+4]); $i += 5) {\n\t\t\t\t\t\t\t$player = array();\n\t\t\t\t\t\t\t$player['name'] = (string)$data[$i];\n\t\t\t\t\t\t\t$player['clan'] = (string)$data[$i+1];\n\t\t\t\t\t\t\t$player['country'] = (int)$data[$i+2];\n\t\t\t\t\t\t\t// $player['countrydata'] = self::getCountry($player['country']);\n\t\t\t\t\t\t\t$player['score'] = (int)$data[$i+3];\n\t\t\t\t\t\t\t$player['ingame'] = (bool)$data[$i+4];\n\t\t\t\t\t\t\t$connection[1]['players'][] = $player;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* drop it, because there comes only one packet to analyse */\n\t\t\t\tunset($connections[$n]);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* drop connections that have timed out */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\tif ((self::getTimeInMs() - $connection[2]) >= self::TIMEOUT_SERVER) {\n\t\t\t\t\tunset($connections[$n]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* renew connection counter */\n\t\t\t$numConnections = count($connections);\n\t\t\t\n\t\t\t/* sleep a bit */\n\t\t\tusleep(self::REQUEST_SLEEP * 1000);\n\t\t}\n\t\t\n\t}", "private function calculateTime()\n {\n $slowest = 1000000;\n for($i=1; $i<=12; $i++){\n if($_GET['Tr'.$i] > 0 && $slowest > $this->troopCostsProperties['Tr'.$i][5] ){\n $slowest = $this->troopCostsProperties['Tr'.$i][5];\n }\n }\n $time = $this->distance/($slowest*SERVER_SPEED_RATE);\n return $time;\n }", "function getmicrotime(){\r\n\tlist($usec, $sec) = explode(\" \",microtime());\r\n\treturn ((float)$usec + (float)$sec);\r\n}", "function performance( $visible = false ) {\n\n $stat = sprintf( '%d queries in %.3f seconds, using %.2fMB memory',\n get_num_queries(),\n timer_stop( 0, 3 ),\n memory_get_peak_usage() / 1024 / 1024\n );\n\n echo $visible ? $stat : \"<!-- {$stat} -->\" ;\n}", "function getDeviceImeiNo($imeiNo,$status,$DbConnection)\n{\n\t$query=\"SELECT device_imei_no FROM device_manufacturing_info USE INDEX(dmi_device_imei_status) WHERE \".\n\t\t \"device_imei_no='$imeiNo' AND status=$status\";\n\t$result=mysql_query($query,$DbConnection);\n\t$numrow=mysql_num_rows($result);\n\tif($numrow>0)\n\t{\n\t\t$deviceImeiNo=mysql_fetch_row($result);\n\t\t$row=mysql_fetch_row($result);\n\t\t$deviceImeiNo=$row[0];\t\n\t}\n\telse\n\t{\n\t\t$deviceImeiNo=\"\";\n\t}\n}", "public function optimize() {}", "function fetch_from_cache($key){\n\tglobal $SYSTEM_SHOW_CACHE_METRICS, $TAG;\n\n\t$key = \"$TAG:$key\";\n\n\t$timer_bgn = microtime(true);\n\n\t$val = null;\n\tif ( function_exists('apc_fetch') ) {\n\t\t$val = apc_fetch($key);\n\t\tif ( $val ) {\n\t\t\t$timer_end = microtime(true);\n\n\t\t\tif ($SYSTEM_SHOW_CACHE_METRICS)\n\t\t\t\telog(\"time took fetching from APC-cache for key: $key: \" . ($timer_end - $timer_bgn));\n\t\t}\n\t} else {\n\t\t$redis = conn_redis();\n\t\t$val = $redis->get($key);\n\n\t\tif ( $val ) {\n\t\t\t$timer_end = microtime(true);\n\n\t\t\tif ($SYSTEM_SHOW_CACHE_METRICS)\n\t\t\t\telog(\"time took fetching from REDIS-cache for key: $key: \" . ($timer_end - $timer_bgn));\n\t\t\t$val = @json_decode($val, true);\n\t\t}\n\t}\n\n\treturn $val;\n}", "static private function getmicrotime()\n\t{\n\t\t\tlist($usec, $sec) = explode(\" \",microtime());\n\t\t\treturn ((float)$usec + (float)$sec); \n\t}", "protected function checkSomePhpOpcodeCacheIsLoaded() {}", "function cacheing_environment()\n\t{\n\t\t$info=array();\n\t\t$info['cache_on']='array(((array_key_exists(\\'root\\',$map)) && ($map[\\'root\\']!=\\'\\'))?intval($map[\\'root\\']):get_param_integer(\\'root\\',NULL),array_key_exists(\\'search\\',$map)?$map[\\'search\\']:\\'\\',array_key_exists(\\'sort\\',$map)?$map[\\'sort\\']:\\'\\',array_key_exists(\\'display_type\\',$map)?$map[\\'display_type\\']:NULL,array_key_exists(\\'template_set\\',$map)?$map[\\'template_set\\']:\\'\\',array_key_exists(\\'select\\',$map)?$map[\\'select\\']:\\'\\',array_key_exists(\\'param\\',$map)?$map[\\'param\\']:db_get_first_id(),get_param_integer(\\'max\\',array_key_exists(\\'max\\',$map)?intval($map[\\'max\\']):30),get_param_integer(\\'start\\',0))';\n\t\t$info['ttl']=60*2;\n\t\treturn $info;\n\t}", "function fvls_db_connect(){\n\t\t// function will open the database connection\n\t\tif( !defined('FVLS_MYSQL_HOST') || !defined('FVLS_MYSQL_USER') || !defined('FVLS_MYSQL_PASS') || !defined('FVLS_MYSQL_DATABASE') )\n\t\t\treturn false;\n\n\t\t$startarray = explode( ' ', microtime() );\n\t\t$FLVS_db_Timer = (double) $startarray[1] + (double) $startarray[0];\n\n\t\t//\n\t\t// Connect to the database\n\t\tglobal $FLVS_db_link;\n\t\tif( $FLVS_db_link instanceof MySQLi )\n\t\t\treturn true;\t// Already have a connction established - and a valid link resource\n\n\t\t$FLVS_db_link = new mysqli( FVLS_MYSQL_HOST, FVLS_MYSQL_USER, FVLS_MYSQL_PASS, FVLS_MYSQL_DATABASE);\t// Lets get connection\n\t\tif ($FLVS_db_link->connect_errno) {\t// Checking for an error\n\t\t\tif( defined('FVLS_DEVELOPER_MODE') && FVLS_DEVELOPER_MODE )\n\t\t\t echo \"FV Link Shortener Error: Failed to connect to MySQL - (\" . $FLVS_db_link->connect_errno . \") \" . $FLVS_db_link->connect_error;\n\t\t\treturn false;\n\t\t}\n\n\n\t\t//\n\t\t// Set the timezone\n\t\tif( defined( 'FVLS_TIMEZONE' ) && trim( FVLS_TIMEZONE ) != '' ){\n\t\t\t$FLVS_db_link->query(\"SET SESSION time_zone = '\" . FVLS_TIMEZONE . \"';\");\n\t\t\tif( strtolower( FVLS_TIMEZONE ) != 'system' )\n\t\t\t\tdate_default_timezone_set(FVLS_TIMEZONE);\n\t\t}\n\n\t\treturn true;\n\t}", "public static function size()\n {\n return <<<'LUA'\nreturn redis.call('zcard', KEYS[1]) + redis.call('zcard', KEYS[2]) + redis.call('zcard', KEYS[3])\nLUA;\n }", "function vitero_scale_used_anywhere($scaleid) {\n return false;\n}", "function getmicrotime(){\r\r\n list($usec, $sec) = explode(\" \",microtime());\r\r\n return ((float)$usec + (float)$sec);\r\r\n}", "public function run()\n {\n for ($i=0; $i <= 1000000 ; $i++) { \n DB::table('companies')->insert(\n ['company_name' => 'hieutm',\n 'company_web' => 'aaa.com',\n 'company_address' => 'TDC',\n 'company_code' =>'281',\n 'company_phone' => '12345']\n );\n }\n }", "protected static function getMicrotime() {\n\t\treturn microtime(true);\n\t}", "private function _getServer(){\n\t\textract($this->configs);\n\t\t$orderServer = array();\n\t\tif(is_string($servers))\t{\n\t\t\t$servers = array($servers);\n\t\t}\n\t\t\n\t\tif ( $masterServer !== false && is_string($masterServer)){\n\t\t\t$orderServer[] = $servers[$masterServer];\n\t\t\tunset($servers[$masterServer]);\n\t\t}\n\t\t$orderServer = array_merge($orderServer,$servers); \n\t\t\n\t\tforeach($orderServer as $url ) {\n\t\t\tif($this->_checkServerIsOnline($url)){\n\t\t\t\treturn $url;\n\t\t\t}\n\t\t}\n\t\n\t\t\t\t\n\t\treturn false ;\n\t}", "function IsBigData($itemsperpage)\n\t{\n\t\t$hasil = false;\n\t\tif($itemsperpage > 1000)\n\t\t{\n\t\t\t$hasil = true;\n\t\t}\n\t\treturn $hasil;\n\t}", "function getXenserverDetails($xshosturl, $login, $password, $warning = 90, $critical = 95)\n{\n $details = array();\n\n\t\t$xenserver = new XenApi($xshosturl, $login = 'root', $password);\n \n //get all hosts from the conneted pool. Unfortunately we can only connect to the poolmaster..\n $hosts = $xenserver->host__get_all();\n\n // lets also check all guests or we won't get the not running guests..\n $poolguests = $xenserver->VM__get_all();\n\n\t\tforeach ($hosts as $host)\n\t\t{\n\t\t $record = $xenserver->host__get_record($host);\n\n //Hostname or IP identical?\n if (('https://' . $record['name_label']) == $xshosturl || ('https://' . $record['address']) == $xshosturl)\n {\n $details['host']['name'] = $record['hostname'];\n $details['host']['vendor'] = $record['bios_strings']['system-manufacturer'];\n $details['host']['model'] = $record['bios_strings']['system-product-name'];\n $details['host']['sn'] = $record['bios_strings']['system-serial-number'];\n $details['host']['version'] = $record['software_version']['product_brand'] . ' ' . $record['software_version']['product_version'];\n $details['host']['cpu'] = $record['cpu_info']['modelname'] . \"(\" . $record['cpu_info']['socket_count'] . \" Sockets - \". $record['cpu_info']['cpu_count']. \" CPU)\";\n \n // get the PBDs & SR details\n foreach ($record['PBDs'] as $pbd)\n\t\t\t {\n $pbd_list = $xenserver->PBD__get_record($pbd);\n $sr = $xenserver->SR__get_record($pbd_list['SR']);\n\n // ignore udev devices such as dvd rom or usb drives..\n if ($sr['type'] != 'udev')\n {\n $total = round($sr['physical_size'] / 1024 / 1024 / 1024,2);\n // size < 1 is probably the xs tools file, we can safely ignore\n if ($total < 1)\n continue;\n\n $used = round($sr['physical_utilisation'] / 1024 / 1024 / 1024,2);\n $usage = round($used * 100 / $total, 2);\n\n\n $details['storage'][] = array(\n 'label' => $sr['name_label'],\n 'type' => $sr['type'],\n 'total' => $total,\n 'used' => $used,\n 'free' => $total - $used,\n 'usage' => $usage,\n 'exit_code' => $usage > $critical ? 2 :($usage > $warning ? 1 : 0),\n );\n \n }\n }\n \n //metrics -> Memory usage\n $metric = $xenserver->host_metrics__get_record($record['metrics']);\n \n $memtotal = ceil(round($metric['memory_total'] / 1024 / 1024 / 1024,2, PHP_ROUND_HALF_UP));\n $memfree = round($metric['memory_free'] / 1024 / 1024 / 1024,2);\n $memused = $memtotal - $memfree;\n $usage = round($memused * 100 / $memtotal, 2);\n\n $details['memory'] = array(\n 'total' => $memtotal,\n 'used' => $memused,\n 'free' => $memtotal - $memused,\n 'usage' => $usage,\n 'exit_code' => $usage > $critical ? 2 : ($usage > $warning ? 1 : 0)\n );\n\n // get the resident VMs from our hypervisor\n foreach ($record['resident_VMs'] as $guests)\n\t\t\t {\n\t\t\t\t $rec = $xenserver->VM__get_record($guests);\n\t\t\t\t if ( !$rec['is_control_domain'])\n\t\t\t\t {\n \t\t\t $details['guests'][] = array(\n\t\t\t\t\t 'name' => $rec['name_label'],\n\t\t\t\t\t 'powerstate' => $rec['power_state'],\n\t\t\t\t\t );\n }\n }\n }\n }\n \n // get all guests from the pool\n foreach ($poolguests as $pool_guests)\n {\n $rec = $xenserver->VM__get_record($pool_guests);\n if ($rec['is_a_template'] == '1' || $rec['is_a_snapshot'] == '1' || $rec['power_state'] == 'Running')\n continue;\n \n $details['guests'][] = array(\n 'name' => $rec['name_label'],\n 'powerstate' => $rec['power_state'],\n );\n }\n \n\t\n\treturn $details;\n}", "public function highspeed()\n\t{\n\t\t//Old Dad uppt In ihrem Haus DVD Ripp AC3 German Xvid [01/31] - \"In ihrem Haus.par2\" yEnc\n\t\t//Old Dad uppt Eine offene Rechnung XviD German DVd Rip[02/41] - \"Eine offene Rechnung.part01.rar\" yEnc\n\t\t//Old Dad uppMiss Marple: Der Wachsblumenstrauß , Wunschpost Xvid German10/29] - \"Miss Marple Der Wachsblumenstrauß.part09.rar\" yEnc\n\t\tif (preg_match('/^Old\\s+Dad\\s+uppt? ?(.+?)( mp4| )?\\[?\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//[03/61] - \"www.realmom.info - xvid - xf-fatalmovecd1.r00\" - 773,34 MB - yEnc\n\t\t//[40/54] - \"Mankind.Die.Geschichte.der.Menschheit.S01E12.Das.Ende.der.Reise.GERMAN.DUBBED.DL.DOKU.1080p.BluRay.x264-TVP.part39.rar\" - 4,79 GB yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' - \\d+[,.]\\d+ [mMkKgG][bB]( -)? yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[02/10] - \"Fast.And.Furious.6 (2013).German.720p.CAM.MD-MW upp.by soV1-soko.rar\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] - \"(.+?) upp.by.+?' . $this->e1, $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //>ghost-of-usenet.org>The A-Team S01-S05(Folgen einzelnd ladbar)<Sponsored by Astinews< (1930/3217) \"isd-ateamxvid-s04e21.r19\" yEnc\n\t\tif (preg_match('/^>ghost-of-usenet\\.org>(.+?)\\(.+?\\).+? \\(\\d+\\/\\d+\\) \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //www.usenet-town.com [Sponsored by Astinews] (103/103) \"Intimate.Enemies.German.2007.AC3.[passwort protect].vol60+21.PAR2\" yEnc\n\t\tif (preg_match('/^www\\..+? \\[Sponsored.+?\\] \\(\\d+\\/\\d+\\) \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Das.Schwergewicht.German.DL.720p.BluRay.x264-ETM - \"etm-schwergewicht-720p.part20.rar\" yEnc\n\t\tif (preg_match('/^([A-Za-z0-9][a-zA-Z0-9.-]{6,})\\s+- \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[ TiMnZb ] [ www.binnfo.in ] [REPOST] [01/46] - \"Columbo - S07 E05 - Des sourires et des armes.nfo\" yEnc\n\t\tif (preg_match('/^\\[ .+? \\] \\[ www\\..+? \\]( \\[.+?\\])? \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //< \"Burn.Notice.S04E17.Out.of.the.Fire.GERMAN.DUBBED.DL.720p.WebHD.x264-TVP.par2\" >< 01/17 (1.54 GB) >< 11.62 kB > yEnc\n\t\tif (preg_match('/^< \"([\\w\\säöüÄÖÜß+¤ƒ¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' . $this->e0 .\n\t\t\t\t\t ' >< \\d+\\/\\d+ \\(.+?\\) >< .+? > yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Batman postet 30 Nights of Paranormal Activity with the Devil Inside AC3 XviD German [01/24] - \"30 Nights of Paranormal Activity with the Devil Inside.par2\" yEnc\n\t\tif (preg_match('/^[A-Za-z0-9]+ postet (.+?) \\[\\d+\\/\\d+\\] - \".+?\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[04/20 Geroellheimer - S03E19 - Freudige ?berraschung Geroellheimer - S03E19 - Freudige ?berraschung.mp4.004\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+ (.+?)(\\.(part\\d*|rar|avi|iso|mp4|mkv|mpg))?(\\d{1,3}\\.rev\"|\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\"|\") yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn implode(' ',\n\t\t\t\t\t\t array_intersect_key(explode(' ', $match[1]),\n\t\t\t\t\t\t\t\t\t\t\t array_unique(array_map('strtolower',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t explode(' ', $match[1])))));\n\t\t} //\"Homeland.S01.Complete.German.WS.DVDRiP.XViD-ETM.part001.rar\" yEnc\n\t\tif (preg_match('/^\"(.+?)(\\.(part\\d*|rar|avi|mp4|mkv|mpg))?(\\d{1,3}\\.rev\"|\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\"|\") yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\tif (strlen($match[1]) > 7 && !preg_match('/\\.vol.+/', $match[1])) {\n\t\t\t\treturn $match[1];\n\t\t\t} else {\n\t\t\t\treturn array(\n\t\t\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject),\n\t\t\t\t\t\"properlynamed\" => false\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}", "protected function getSysDomainCache() {}", "public function findOnline() {}", "static function isFastRebuild(){\n\t\treturn defined('_developer_run_');\n\t}", "private static function test_disk() {\n\t\t$len = 1024 * 1024;\n\t\t$temp = tmpfile();\n\t\tfwrite( $temp, str_repeat('Z', $len ) );\n\t\tfseek( $temp, 1024 );\n\t\t$s = fread( $temp, 1024 );\n\t\tfclose( $temp );\n\t}", "function sql_server_info($raw = false, $use_cache = true)\n\t{\n\t\tglobal $cache;\n\n\t\tif (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('mysqli_version')) === false)\n\t\t{\n\t\t\t$result = @mysqli_query($this->dbh, 'SELECT VERSION() AS version');\n\t\t\t$row = @mysqli_fetch_assoc($result);\n\t\t\t@mysqli_free_result($result);\n\n\t\t\t$this->sql_server_version = $row['version'];\n\n\t\t\tif (!empty($cache) && $use_cache)\n\t\t\t{\n\t\t\t\t$cache->put('mysqli_version', $this->sql_server_version);\n\t\t\t}\n\t\t}\n\n\t\treturn ($raw) ? $this->sql_server_version : 'MySQL(i) ' . $this->sql_server_version;\n\t}", "function getServerVersion();", "public function execTime() {\n return microtime(true)-$this->conn_start;\n }", "function apc_cache_key_increment($key) {\n\t$n = 1;\n\twhile(!$result = apc_inc($key)) {\n\t\tusleep(500);\n\t\t$n++;\n\t}\n\tif($n > 1) apc_cache_debug(\"key_increment: took $n tries on key $key\");\n\treturn $result;\n}", "function betterEval($code) {\n $result = [];\n $tmp = tmpfile ();//file resource\n //we'll need to uri to include the file:\n $tmpMeta = stream_get_meta_data ( $tmp );\n $uri = $tmpMeta ['uri'];\n fwrite ( $tmp, $code );\n \n ob_start();\n $start = microtime(true);\n //anonymously, so our scope will not be polluted (very optimistic here, ofc)\n call_user_func(function() use ($uri) {\n include ($uri);\n }); \n \n $result['time'] = microtime(true) - $start;\n $result['output'] = ob_get_clean(); \n $result['length'] = strlen($result['output']);\n $result['lengthCharacters'] = mb_strlen($result['output']);\n $result['dbg'] = [\n 'fileUri' => $uri\n ];\n fclose ( $tmp );\n return $result;\n}", "function get_execution_time() {\n\treturn microtime(true) - __CHV_TIME_EXECUTION_STARTS__;\n}", "function optimize($tables)\n\t{\n\t\t$result = $this->db->query( 'VACUUM ' . $tables );\n\n\t\treturn $result;\n\t}", "function tep_get_system_information() {\n global $_SERVER;\n\n $db_query = tep_db_query(\"select now() as datetime\");\n $db = tep_db_fetch_array($db_query);\n\n list($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5);\n\n return array('date' => tep_datetime_short(date('Y-m-d H:i:s')),\n 'system' => $system,\n 'kernel' => $kernel,\n 'host' => $host,\n 'ip' => gethostbyname($host),\n 'uptime' => @exec('uptime'),\n 'http_server' => $_SERVER['SERVER_SOFTWARE'],\n 'php' => PHP_VERSION,\n 'zend' => (function_exists('zend_version') ? zend_version() : ''),\n 'db_server' => DB_SERVER,\n 'db_ip' => gethostbyname(DB_SERVER),\n 'db_version' => 'MySQL ' . (function_exists('mysql_get_server_info') ? mysql_get_server_info() : ''),\n 'db_date' => tep_datetime_short($db['datetime']));\n}", "function calc_gen_time()\r\n{\r\n static $a = NULL;\r\n\r\n if ($a == NULL)\r\n {\r\n $a = microtime(true);\r\n }\r\n else\r\n {\r\n $b = (microtime(true) - $a);\r\n $a = NULL;\r\n\r\n log_debug('Page generated in '. number_format($b, 3) .' sec');\r\n\r\n return $b;\r\n }\r\n}", "function GetServerCapabilities()\n{\n if( getenv('PHP_REPEAT') ) return;\n putenv('PHP_REPEAT=TRUE');\n\n $GLOBALS['LAST_ERROR'] = null;\n\n $server = array('safe_mode' => TRUE,\n 'shell_exec' => FALSE,\n 'have_gd' => extension_loaded('gd'),\n 'have_magick' => FALSE,\n 'magick6' => FALSE,\n 'have_imager' => FALSE,\n 'php_cli' => null,\n 'mysql' => null,\n 'mysqldump' => null,\n 'convert' => null,\n 'composite' => null,\n 'dig' => null,\n 'tar' => null,\n 'gzip' => null,\n 'message' => array(),\n 'php_cli_safe_mode' => FALSE,\n 'php_cli_zend_optimizer' => TRUE);\n\n set_error_handler('GetServerCapabilitiesError');\n error_reporting(E_ALL);\n\n $server['safe_mode'] = @ini_get('safe_mode');\n\n if( $server['safe_mode'] === null || isset($GLOBALS['LAST_ERROR']) )\n {\n $server['safe_mode'] = TRUE;\n $server['message'][] = \"The ini_get() PHP function appears to be disabled on your server\\nPHP says: \" . $GLOBALS['LAST_ERROR'];\n }\n else if( $server['safe_mode'] )\n {\n $server['message'][] = \"Your server is running PHP with safe_mode enabled\";\n\n // Do tests on safe_mode_exec_dir\n }\n else\n {\n $server['safe_mode'] = FALSE;\n\n $GLOBALS['LAST_ERROR'] = null;\n\n $open_basedir = ini_get('open_basedir');\n\n // See if shell_exec is available on the server\n @shell_exec('ls -l');\n if( isset($GLOBALS['LAST_ERROR']) )\n {\n $server['shell_exec'] = FALSE;\n $server['message'][] = \"The shell_exec() PHP function appears to be disabled on your server\\nPHP says: \" . $GLOBALS['LAST_ERROR'];\n }\n else\n {\n $server['shell_exec'] = TRUE;\n }\n\n if( $server['shell_exec'] )\n {\n // Check for cli version of PHP\n $server['php_cli'] = LocateExecutable('php', '-v', '(cli)', $open_basedir, 'SCRIPT_FILENAME=/dev/null');\n\n if( !$server['php_cli'] )\n {\n $server['php_cli'] = LocateExecutable('php-cli', '-v', '(cli)', $open_basedir, 'SCRIPT_FILENAME=/dev/null');\n }\n\n // Check for Zend Optimizer and safe_mode\n if( $server['php_cli'] )\n {\n if (!isset($env)) {\n $env = '';\n }\n $cli_settings = shell_exec(\"$env {$server['php_cli']} -r \\\"echo serialize(array('safe_mode' => ini_get('safe_mode'), 'zend_optimizer' => extension_loaded('Zend Optimizer')));\\\" 2>/dev/null\");\n $cli_settings = unserialize($cli_settings);\n\n if( $cli_settings !== FALSE )\n {\n if( $cli_settings['safe_mode'] )\n {\n $server['php_cli_safe_mode'] = TRUE;\n }\n\n if( !$cli_settings['zend_optimizer'] )\n {\n $server['php_cli_zend_optimizer'] = FALSE;\n }\n }\n }\n\n // Check for mysql executables\n $server['mysql'] = LocateExecutable('mysql', null, null, $open_basedir);\n $server['mysqldump'] = LocateExecutable('mysqldump', null, null, $open_basedir);\n\n // Check for imagemagick executables\n $server['convert'] = LocateExecutable('convert', null, null, $open_basedir);\n $server['composite'] = LocateExecutable('composite', null, null, $open_basedir);\n\n // Check for dig\n $server['dig'] = LocateExecutable('dig', null, null, $open_basedir);\n\n // Check for archiving executables\n $server['tar'] = LocateExecutable('tar', null, null, $open_basedir);\n $server['gzip'] = LocateExecutable('gzip', null, null, $open_basedir);\n\n if( $server['convert'] && $server['composite'] )\n {\n $server['have_magick'] = TRUE;\n $server['magick6'] = FALSE;\n\n // Get version\n $output = shell_exec(\"{$server['convert']} -version\");\n\n if( preg_match('~ImageMagick 6\\.~i', $output) )\n {\n $server['magick6'] = TRUE;\n }\n }\n }\n }\n\n $server['have_imager'] = $server['have_magick'] || $server['have_gd'];\n\n error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);\n restore_error_handler();\n\n return $server;\n}" ]
[ "0.56944466", "0.5278158", "0.5144209", "0.5082198", "0.502398", "0.50123596", "0.50058156", "0.499316", "0.49920094", "0.49420488", "0.49323452", "0.49251422", "0.49215", "0.48886395", "0.48797932", "0.48596978", "0.48561978", "0.48536405", "0.48321605", "0.47431856", "0.47364128", "0.47254533", "0.47110364", "0.47098848", "0.47098848", "0.4709053", "0.4709053", "0.47072846", "0.4706408", "0.46739084", "0.46613517", "0.4646801", "0.46451405", "0.4629518", "0.46274385", "0.46274385", "0.46120757", "0.4601369", "0.4585149", "0.45849842", "0.45829305", "0.45812464", "0.45788038", "0.457202", "0.4564081", "0.45593375", "0.4551339", "0.45488164", "0.45367837", "0.4529903", "0.45173886", "0.451211", "0.45021573", "0.44921038", "0.4484859", "0.44776264", "0.44757897", "0.4461804", "0.44599968", "0.44599968", "0.44597897", "0.44438154", "0.4426044", "0.44231626", "0.4418688", "0.44184902", "0.44172692", "0.4414817", "0.44126153", "0.4409894", "0.44084054", "0.43966076", "0.4396355", "0.4394871", "0.4392815", "0.43925685", "0.43869507", "0.43796068", "0.4379252", "0.43661365", "0.43630177", "0.4361754", "0.43593135", "0.43589386", "0.43575728", "0.43558267", "0.4354028", "0.4353969", "0.4352092", "0.4351889", "0.43494326", "0.43481335", "0.43430477", "0.43430302", "0.43420836", "0.43419307", "0.433568", "0.43354475", "0.43340135", "0.43327674", "0.4332172" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('guest'); $this->middleware('guest:admin'); $this->middleware('guest:partner'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Get a validator for an incoming registration request.
protected function validator(array $data) { return Validator::make($data, [ 'name' => ['required', 'string', 'max:30'], 'email' => ['required', 'email' => 'email:rfc,dns', 'unique:users'], 'password' => ['required', 'string', 'min:8', 'confirmed'], 'phone' => ['required','string', 'min:8','max:15'], 'address' => ['required','string', 'max:100'], 'nationality' => ['required'], 'image' => 'required|image|mimes:jpeg,png,jpg|max:1024', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidator() {}", "public function getValidator();", "public function getValidator();", "public function getValidator()\n {\n return $this->validator;\n }", "public function getValidator()\n {\n return $this->validator;\n }", "public function getValidator()\n {\n return $this->validator;\n }", "protected function getValidatorInstance()\n {\n return app(ValidationFactory::class);\n }", "protected function createValidator() {\n return $this->validator;\n }", "public static function getValidatorInstance()\n {\n if (static::$validator === null)\n {\n static::$validator = new Validator();\n }\n\n return static::$validator;\n }", "private function getValidator()\n {\n return Validation::createValidatorBuilder()->enableAnnotationMapping()->getValidator();\n }", "public function getValidator()\n\t{\n\t\treturn $this->validation->validator->validator;\n\t}", "protected function get9c2345652e8ae3f87ba009d0f8fedee27bb751398014908e9ab2fb6d5bf1300f(): \\Viserio\\Component\\Validation\\Validator\n {\n return $this->services[\\Viserio\\Contract\\Validation\\Validator::class] = new \\Viserio\\Component\\Validation\\Validator();\n }", "public function getValidator()\n\t{\n\t\tif (!is_object($this->_validator)) {\n\t\t\t$validatorClass = $this->xpdo->loadClass('validation.xPDOValidator', XPDO_CORE_PATH, true, true);\n\t\t\tif ($derivedClass = $this->getOption(xPDO::OPT_VALIDATOR_CLASS, null, '')) {\n\t\t\t\tif ($derivedClass = $this->xpdo->loadClass($derivedClass, '', false, true)) {\n\t\t\t\t\t$validatorClass = $derivedClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($profitClass = $this->getOption('mlmsystem_handler_class_profit_validator', null, '')) {\n\t\t\t\tif ($profitClass = $this->xpdo->loadClass($profitClass, $this->getOption('mlmsystem_core_path', null, MODX_CORE_PATH . 'components/mlmsystem/') . 'handlers/validations/', false, true)) {\n\t\t\t\t\t$validatorClass = $profitClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($validatorClass) {\n\t\t\t\t$this->_validator = new $validatorClass($this);\n\t\t\t}\n\t\t}\n\t\treturn $this->_validator;\n\t}", "public function getValidator() {\n return $this->__validator;\n }", "public function getValidator() \n {//--------------->> getValidator()\n return $this->_validator;\n }", "protected function getValidatorInstance()\n {\n $factory = $this->container->make('Illuminate\\Validation\\Factory');\n if (method_exists($this, 'validator')) {\n return $this->container->call([$this, 'validator'], compact('factory'));\n }\n\n $rules = $this->container->call([$this, 'rules']);\n $attributes = $this->attributes();\n $messages = [];\n\n $translationsAttributesKey = $this->getTranslationsAttributesKey();\n\n foreach ($this->requiredLocales() as $localeKey => $locale) {\n $this->localeKey = $localeKey;\n foreach ($this->container->call([$this, 'translationRules']) as $attribute => $rule) {\n $key = $localeKey . '.' . $attribute;\n $rules[$key] = $rule;\n $attributes[$key] = trans($translationsAttributesKey . $attribute);\n }\n\n foreach ($this->container->call([$this, 'translationMessages']) as $attributeAndRule => $message) {\n $messages[$localeKey . '.' . $attributeAndRule] = $message;\n }\n }\n\n return $factory->make(\n $this->all(),\n $rules,\n array_merge($this->messages(), $messages),\n $attributes\n );\n }", "public function validator()\n {\n return $this->validator;\n }", "protected function getValidatorInstance()\n {\n // cause comes json, we need to change it to array to validate it\n $this->request->set('postHashtag', json_decode($this->input()['postHashtag'], true));\n $this->request->set('activeLocales', json_decode($this->input()['activeLocales'], true));\n // clean alias from unnecessary symbols\n $this->request->set('postAlias', Helpers::cleanToOnlyLettersNumbers($this->input()['postAlias']));\n\n\n return parent::getValidatorInstance();\n }", "public function getValidatorService();", "private function getValidator()\n {\n $v = new Validator();\n $v->addRules([\n ['label', 'Label', 'required'],\n ['num_value', 'Number', 'exists type=number'],\n ['comment', 'Comment', 'exists'],\n ]);\n return $v;\n }", "protected function getValidationFactory()\n {\n return app('validator');\n }", "public function getValidator($name = 'default') {\n\t\t\t//\n\t\t\tif ($name == 'default') { return new Validator();}\n\t\t\trequire (VALIDATORS . $name . '_validator.php');\n\t\t\t$name = $name . '_Validator';\n\t\t\treturn new $name();\n\t\t}", "protected function getValidator($request)\n {\n $rules = [\n 'page_title' => 'required',\n 'status' => 'required|integer|between:0,1'\n ];\n \n $customMessages = [\n 'page_title.required' => __('admin.pages.field_validation.title_field_required_msg'),\n 'status.required' => __('admin.pages.field_validation.status_field_required_msg')\n ];\n\n return Validator::make($request->all(), $rules, $customMessages);\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Cubos')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Cubos);\n }\n }\n\n return $this->_validator;\n }", "protected function getValidatorService()\n {\n return $this->services['validator'] = $this->get('validator.builder')->getValidator();\n }", "public function createValidator()\n {\n $validator = Validation::createValidatorBuilder()\n ->setMetadataFactory(new ClassMetadataFactory(new StaticMethodLoader()))\n ->setConstraintValidatorFactory(new ConstraintValidatorFactory($this->app))\n ->setTranslator($this->getTranslator())\n ->setApiVersion(Validation::API_VERSION_2_5)\n ->getValidator();\n\n return $validator;\n }", "public function getValidatorService()\n {\n return $this->validatorService;\n }", "public function getCreateTaskValidator()\n : Validators\\ValidatorInterface\n {\n return $this->app->make(\n Validators\\CreateTaskValidator::class\n );\n }", "protected function getValidator()\n {\n if ($form = $this->owner->getForm()) {\n \n if (($validator = $form->getValidator()) && $validator instanceof Validator) {\n return $validator;\n }\n \n }\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Klikasi\\\\Validator\\Newsletter')) {\n\n $this->setValidator(new \\Klikasi\\Validator\\Newsletter);\n }\n }\n\n return $this->_validator;\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Klikasi\\\\Validator\\Kanpaina')) {\n\n $this->setValidator(new \\Klikasi\\Validator\\Kanpaina);\n }\n }\n\n return $this->_validator;\n }", "function getCMSValidator()\n {\n return $this->getValidator();\n }", "function validator() {\n if ($this->validator) return $this->validator;\n $options = array();\n foreach ($this->fields_options as $field => $field_options) {\n if (!@$field_options['validation']) continue;\n $options[$field] = $field_options['validation'];\n }\n return $this->validator = new xValidatorStore($options, $_REQUEST);\n }", "function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}", "function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}", "function getValidator() {\n\t\tif ( !$this->_Validator instanceof utilityValidator ) {\n\t\t\t$this->_Validator = new utilityValidator();\n\t\t}\n\t\treturn $this->_Validator;\n\t}", "protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n\n $validator->sometimes('family_member_id.*', 'distinct', function($input)\n {\n return $input->family_member == 1;\n });\n\n $validator->sometimes('family_member_id.*', 'not_in:'. $this->request->get('patriarch'), function($input)\n {\n return $input->family_member == 1;\n });\n\n return $validator;\n }", "public function getDelegatedValidator()\n {\n return $this->validator;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n\n return UserValidator::class;\n }", "public function validator()\n {\n return UserValidator::class;\n }", "public function createValidator();", "protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n $validator->setAttributeNames(trans('mconsole::personal.form'));\n\n return $validator;\n }", "public function getValidator($validator)\n {\n $instance = null;\n\n if (strpos($validator, 'iPhorm_Validator_') === false) {\n $validator = 'iPhorm_Validator_' . ucfirst($validator);\n }\n\n $validators = $this->getValidators();\n if (array_key_exists($validator, $validators)) {\n $instance = $validators[$validator];\n }\n\n return $instance;\n }", "public function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n\n\n $validator->after(\n function () use ($validator) {\n $input = $this->all();\n }\n );\n\n return $validator;\n }", "public function get($codename) {\n\t\treturn $this->validators[$codename];\n\t}", "protected function getValidatorInstance()\n {\n // cause comes json, we need to change it to array to validate it\n $this->request->set('categories_names', json_decode($this->input()['categories_names'], true));\n // clean alias from unnecessary symbols\n $this->request->set('category_alias', Helpers::cleanToOnlyLettersNumbers($this->input()['category_alias']));\n\n return parent::getValidatorInstance();\n }", "public static function getValidator($name, array $options = []);", "protected function validator($request)\n {\n $data = $request->all();\n $vcode = $request->session()->get('p'.$data['phone']);\n return Validator::make($data, [\n 'name' => 'required|max:255|unique:users,name',\n 'phone' => 'required|phone|max:255|unique:users,phone',\n 'email' => 'required|email|max:255|unique:users,email',\n 'phonecode' => 'required|regex:/' . $vcode['verifycode'] . '/',\n 'password' => 'required|confirmed|min:6|max:20',\n ]);\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Mensajes')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Mensajes);\n }\n }\n\n return $this->_validator;\n }", "public function getValidator()\n {\n if (!isset($this->customValidator)) {\n throw new CertaintyException('Custom class not defined');\n }\n return $this->customValidator;\n }", "public function createFooResponseValidator(): ResponseValidatorInterface\n {\n return new AcmeFooResponseValidator();\n }", "private function createValidator()\n {\n // add custom validation rules\n \\Validator::extend('contains_caps',\n function($field, $value, $params)\n {\n return preg_match('#[A-Z]#', $value);\n }\n );\n\n \\Validator::extend('contains_digit',\n function($field, $value, $params)\n {\n return preg_match('#[0-9]#', $value);\n }\n );\n\n // set array of messages for custom rules\n $messages = array(\n 'contains_caps' => ':attribute must contain at least one capital letter.',\n 'contains_digit' => ':attribute must contain at least one numeric digit.'\n );\n\n // set array of rules to use for validation (many are Laravel's built-ins)\n $rules = array(\n 'email' => 'required|email|max:255',\n 'password' => 'required|between:8,50|contains_caps|contains_digit', // password has some \"strength\" requirements\n 'first_name' => 'required|max:50',\n 'last_name' => 'required|max:50',\n 'city' => 'required|max:100',\n 'state' => 'required|max:2',\n 'zip' => 'required|max:20',\n 'biography' => 'required',\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules, $messages);\n\n return $validator;\n }", "protected function getAjaxValidationFactory()\n {\n return app()->make('validator');\n }", "public function withContext(mixed $context): ValidatorInterface;", "public function getValidatorInstance() {\n $validator = parent::getValidatorInstance();\n\n $validator->after(function() use ($validator) {\n\n // Does the event exist?\n if( !$this->checkEventExists()){\n $validator->errors()->add('event.Exists', 'This event does not longer exist.');\n } else {\n\n // Does the booker is not the creator?\n if( !$this->checkEventNotBookedByCreator()){\n $validator->errors()->add('event.BookedCreator', 'You can\\'t unbook this event because since you are the owner.'); \n }\n\n // Does the event is not already finished/has begun?\n if( !$this->checkEventDateNotDue()){\n $validator->errors()->add('event.DateDue', 'You can\\'t unbook this event because it\\'s already begun or is terminated.'); \n }\n }\n\n });\n\n return $validator;\n }", "protected function getValidator(): void\n {\n // TODO: Implement getValidator() method.\n }", "protected function getValidationFactory()\n {\n return app('Illuminate\\Contracts\\Validation\\Factory');\n }", "protected function makeValidator()\n {\n $rules = $this->expandUniqueRules($this->rules);\n\n $validator = static::$validator->make($this->getAttributes(), $rules);\n\n event(new ModelValidator($this, $validator));\n\n return $validator;\n }", "public function validator()\n {\n\n return ConfigValidator::class;\n }", "public function validator()\n {\n\n return FormInfoValidator::class;\n }", "public function getValidator(): ?ValidatorInterface\n {\n return new CompoundValidator(\n new CzechIbanValidator($this->accountNumber, $this->bankCode),\n new GenericIbanValidator($this)\n );\n }", "public function validator()\n {\n\n return ProvidersValidator::class;\n }", "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "protected function getForm_TypeGuesser_ValidatorService()\n {\n return $this->services['form.type_guesser.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser($this->get('validator'));\n }", "protected function validator(array $data)\n {\n return self::getValidator($data);\n }", "protected static function validator() {\n\t\tif (empty(self::$validate)) {\n\t\t\tself::$validate = new MpoValidator();\n\t\t}\n\t\treturn self::$validate;\n\t}", "public function makeValidator()\r\n {\r\n if (10 == $this->countDigits($this->string)) {\r\n return new Validator10($this->string);\r\n }\r\n\r\n if (13 == $this->countDigits($this->string)) {\r\n return new Validator13($this->string);\r\n } \r\n }", "public function initValidator()\n {\n if (!is_null($this->_validator)) {\n return $this->_validator;\n }\n $this->_validator = new SurveyManager_Entity_Validator_Survey($this);\n \n return $this->_validator;\n }", "public function make($validator)\n\t{\n\t\tif ($validator instanceof Closure)\n\t\t{\n\t\t\t$validator = new ClosureValidator($validator, $this->request, $this->validatorFactory, $this->router);\n\n\t\t\treturn array($validator->getInput(), $validator->getRules(), $validator->getFailedMessages());\n\t\t}\n\n\t\tif (is_string($validator) AND ! isset($this->validators[$validator]))\n\t\t{\n\t\t\t$this->validators[$validator] = $validator;\n\t\t}\n\n\t\tif (isset($this->validators[$validator]))\n\t\t{\n\t\t\tif ($this->validators[$validator] instanceof Closure)\n\t\t\t{\n\t\t\t\treturn new ClosureValidator($this->validators[$validator], $this->request, $this->validatorFactory);\n\t\t\t}\n\n\t\t\treturn new $this->validators[$validator]($this->request, $this->validatorFactory);\n\t\t}\n\n\t\tthrow new \\InvalidArgumentException('Invalid input validator.');\n\t}", "protected function validator(Request $request)\n\t{\n\t\treturn Validator::make($request->all(), [\n\t\t\t'title' => 'required',\n\t\t\t]);\n\t}", "protected function validator(Request $request)\n {\n return Validator::make($request, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:8', 'confirmed'],\n ]);\n }", "public function getContractValidator(): ?ContractValidator {\n\n return $this->contractValidator;\n\n }", "public function validator()\n {\n\n return DistribuidorValidator::class;\n }", "protected function getValidatorInstance()\n {\n $validator = parent::getValidatorInstance();\n // $validator->sometimes();\n\n $validator->after(function ($validator) {\n $this->request->remove('is_post');\n $this->request->remove('is_update');\n $this->request->remove('is_editing');\n $this->request->remove('is_delete');\n });\n return $validator;\n }", "public function getValidator()\n {\n if ($this->_validator === null) {\n\n if (class_exists('\\Atezate\\\\Validator\\Tipos')) {\n\n $this->setValidator(new \\Atezate\\Validator\\Tipos);\n }\n }\n\n return $this->_validator;\n }", "public function validator()\n {\n\n return BabyInfoValidator::class;\n }", "protected function getValidator(array $options = [])\n {\n $type = '\\\\marvin255\\\\serviform\\\\validators\\\\Regexp';\n\n return FactoryValidators::initElement($type, $options);\n }", "public function validator()\n {\n return ZhuanTiValidator::class;\n }", "public function validator()\n {\n\n return EmpreValidator::class;\n }", "public function validator()\n {\n\n return OccupationValidator::class;\n }", "public function validator()\n {\n\n return GrupoServicosValidator::class;\n }", "public function validator()\n {\n\n return ScheduleValidator::class;\n }", "protected function validator(Request $request)\n {\n return Validator::make($request, [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'suburb' => 'required',\n 'zipcode' => 'required',\n\t\t\t\n ]);\n }", "public function validator()\n {\n return NotificationValidator::class;\n }", "public function validator()\n {\n $validator = $this->baseValidator([\n 'stripe_token' => 'required',\n 'vat_id' => 'nullable|max:50|vat_id',\n ]);\n\n if (Spark::collectsBillingAddress()) {\n $this->validateBillingAddress($validator);\n }\n\n return $validator;\n }", "public function validator()\n {\n\n return ProducerValidator::class;\n }", "protected function validator(Request $request)\n {\n return Validator::make($request->all(), [\n 'userid' => 'required|max:11',\n 'password' => 'required'\n ]);\n }", "protected function validation($request)\n {\n\n $validator = Validator::make($request->all(), [\n 'firstname' => 'required',\n 'lastname' => 'required',\n 'email' => 'required',\n 'pocketmoney' => 'required',\n 'password' => 'required',\n 'age' => 'required',\n 'city' => 'required',\n 'state' => 'required',\n 'zip' => 'required',\n 'country' => 'required',\n ]);\n\n return $validator;\n }", "public function getValidator(?string $code) : ?Validator {\n if ($code === null || strlen($code) < 2) { // ensure we can extract the code\n return null;\n }\n\n $key = substr($code, 0, 2);\n\n return $this->validators[$key] ?? null;\n }", "public function validator()\n {\n $validator = validator($this->all(), [\n 'name' => 'required|max:255',\n 'server_provider_id' => ['required', Rule::exists('server_providers', 'id')->where(function ($query) {\n $query->where('user_id', $this->user()->id);\n })],\n 'region' => 'required|string',\n 'source_provider_id' => ['required', Rule::exists('source_providers', 'id')->where(function ($query) {\n $query->where('user_id', $this->user()->id);\n })],\n 'repository' => [\n 'required',\n 'string',\n new ValidRepository(SourceProvider::find($this->source_provider_id))\n ],\n 'database' => 'string|alpha_dash|max:255',\n 'database_size' => 'string',\n ]);\n\n return $this->validateRegionAndSize($validator);\n }", "public function validator()\n {\n return LeaveRequestValidator::class;\n }", "private function validator(Request $request)\n {\n //validate the form...\n }", "protected function createUserValidator($request) {\n \treturn Validator::make($request,[\n 'first_name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'last_name' => 'required',\n 'password' => 'required|min:6',\n 'status' => 'required'\n ]);\n \t}", "public function validator()\n {\n\n return PescariaValidator::class;\n }", "protected function parseRulesFromValidator()\n {\n // First we call needed method with needed container\n $factory = app()->make(ValidationFactory::class);\n $validator = app()->call([$this->getFormRequestInstance(), 'validator'], [$factory]);\n\n // After that we get initialRules property (since plain `rules` prop doesn't contain array rules)\n // and make it public so that later we can get it's value\n $property = (new ReflectionClass($validator))->getProperty('initialRules');\n $property->setAccessible(true);\n\n return $property->getValue($validator);\n }", "protected function validator(Request $request)\n {\n return Validator::make($request->all(), [\n 'userid' => 'required|max:11',\n 'page' => ''\n ]);\n }" ]
[ "0.7217253", "0.71017957", "0.71017957", "0.7048845", "0.7048845", "0.7048845", "0.6924129", "0.69168675", "0.6899657", "0.68542325", "0.684801", "0.68128955", "0.68007755", "0.6797457", "0.67463154", "0.66977936", "0.6687648", "0.6645321", "0.6593937", "0.6564549", "0.6506735", "0.6500423", "0.64936745", "0.6428733", "0.640632", "0.64031655", "0.6393014", "0.6366359", "0.6347438", "0.63437617", "0.6282892", "0.6252371", "0.62332886", "0.62275493", "0.62275493", "0.62275493", "0.6213424", "0.6203102", "0.61237746", "0.61237746", "0.61237746", "0.61237746", "0.61237746", "0.610553", "0.60834324", "0.6066394", "0.60355836", "0.59944713", "0.59814906", "0.59801394", "0.59744567", "0.5939118", "0.59275067", "0.59039265", "0.58902186", "0.5890007", "0.58719885", "0.586906", "0.5865833", "0.5862728", "0.58234406", "0.58158123", "0.5815437", "0.5784297", "0.5780951", "0.5768072", "0.5748842", "0.5748842", "0.5748371", "0.57390654", "0.5723674", "0.5717639", "0.57142323", "0.5711796", "0.5675113", "0.56740963", "0.5673833", "0.56687135", "0.5667633", "0.56432956", "0.5637126", "0.5622988", "0.5614382", "0.56140053", "0.5581888", "0.55700976", "0.55691636", "0.55622005", "0.55596167", "0.555281", "0.55358255", "0.55254596", "0.55246574", "0.5520975", "0.5513461", "0.5510867", "0.5508561", "0.5503873", "0.55037427", "0.54932034", "0.54874235" ]
0.0
-1
Create a new user instance after a valid registration.
protected function create(array $data) { $request = request(); $this->validator($request->all())->validate(); if ($request->hasFile('image')) { $avatar = $request->file('image'); $dir_img = true; if( ! File::exists('images/user_avatar/')) { $dir_img = File::makeDirectory('images/user_avatar/', 0777, true); } $filename = rand(1111,9999).time().'.'.$avatar->getClientOriginalExtension(); $image_path = 'images/user_avatar/'.$filename; Image::make($avatar) ->fit(640,640,function($constraint){ $constraint->upsize(); }) ->save($image_path); } return User::create([ 'name' => $data['name'], 'email' => $data['email'], 'password' => Hash::make($data['password']), 'phone' => $data['phone'], 'address' => $data['address'], 'nationality' => $data['nationality'], 'image' => $image_path, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 createUser()\n {\n $this->user = factory(Easel\\Models\\User::class)->create();\n }", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function createUser()\n {\n\n $userCurrent = $this->userValidator->validate();\n $userCurrent['password'] = Hash::make($userCurrent['password']);\n $userCurrent = $this->user::create($userCurrent);\n $userCurrent->roles()->attach(Role::where('name', 'user')->first());\n return $this->successResponse('user', $userCurrent, 201);\n }", "public function createUser()\n {\n return User::factory()->create();\n }", "public function create() {\n $username = Input::get('reg_username');\n $email = Input::get('email');\n $password = Input::get('reg_password');\n $confirm_password = Input::get('confirm_password');\n\n // Make sure that both passwords are identical\n if (strcmp($password, $confirm_password) == 0) {\n $hashed_password = Hash::make($password);\n try {\n $user = new User;\n $user -> username = $username;\n $user -> email = $email;\n $user -> password = $hashed_password;\n $user -> save();\n } catch (\\Illuminate\\Database\\QueryException $e) {\n return Redirect::route('register') -> with(array(\n 'alert-message' => 'Error: Failed to register user in database.',\n 'alert-class' => 'alert-danger'\n ));\n }\n\n // Login the new user automatically\n $user = User::where('username', '=', $username) -> first();\n Auth::login($user);\n\n return Redirect::route('home') -> with(array(\n 'alert-message' => 'Welcome! You have successfully created an account, and have been logged in.',\n 'alert-class' => 'alert-success'\n ));\n }\n\n return Redirect::route('register') -> with(array(\n 'alert-message' => 'The attempt to create an account was unsuccessful!',\n 'alert-class' => 'alert-danger'\n ));\n }", "private function newUser()\n {\n return factory(User::class)->create([\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'email_verified_at' => '2019-06-01 16:45:00',\n 'password' => Hash::make('test1234'),\n 'photo' => 'https://lorempixel.com/640/480/?65533',\n 'created_at' => '2019-06-01 16:45:00',\n 'updated_at' => '2019-06-01 16:45:00',\n 'deleted_at' => '2019-06-01 16:45:00',\n 'logged_in_at' => '2019-06-01 16:45:00',\n ]);\n }", "public function createAction()\r\n {\r\n $user = new User($_POST);\r\n\r\n if ($user->save()) {\r\n\t\t\t\r\n\t\t\tsession_regenerate_id(true);\r\n\r\n\t\t\t$_SESSION['user_id'] = User::getIdSavedUser($_POST['email']);\r\n\t\t\t\r\n\t\t\tIncome::saveDefaultIncomes($_SESSION['user_id']);\r\n\t\t\tExpense::saveDefaultExpenses($_SESSION['user_id']);\r\n\t\t\tPaymentMethod::saveDefaultPaymentMethods($_SESSION['user_id']);\r\n\t\t\t\r\n\t\t\t$user->sendActivationEmail();\r\n\r\n $this->redirect('/signup/success');\r\n\r\n } else {\r\n\r\n View::renderTemplate('Signup/new.html', [\r\n 'user' => $user\r\n ]);\r\n\r\n }\r\n }", "public function create() {\n\n //Create validator for User registration form with all data sended. Load from model\n $validator = Validator::make(Input::all(), User::$rules_validator);\n \n //Only if request is send by form (post) procces to create user\n if (Request::isMethod('post')) {\n \n //Check fields data sended\n if ($validator->fails()) {\n //Redirecto to form with error\n $messages = $validator->messages()->all(\"<li>:message</li>\");\n $error = \"<ul>\". implode(\"\", $messages).\"</ul>\";\n return Redirect::to('/user/register')->with('error', $error)->withInput(Input::all());\n }\n \n //Pass validator, proccess to create User\n if( $user = User::_save( Input::all() ) ){\n //Auto login user created, is same that attemd method\n Auth::login($user);\n //Redirecto to profile\n return Redirect::intended(action('UserController@profile', array('username' => Auth::user()->username )))->with('notice', trans(\"app.welcome_message\", array(\"user\"=>Auth::user()->username) ));\n }else{\n //Error to try create User, redirecto to Registration form\n return Redirect::to('/user/register')->with('error', trans(\"app.error_creating\"))->withInput(Input::all());\n }\n }\n \n //Return to view\n return View::make('user.register');\n }", "public function create()\n\t{\n\t\tif (!isset($_POST) || empty($_POST))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// TODO need to validate data\n\t\t$data = array('username' => $_POST['username'], 'password' => $_POST['password'], 'cpassword' => $_POST['cpassword'], 'email' => $_POST['email']);\n\t\t// validate the input data\n\t\t$errorArray = User::validates($data);\n\t\tif (count($errorArray))\n\t\t{\n\t\t\t// store errors in session and redirect\n\t\t\t$_SESSION['user'] = $data;\n\t\t\t$_SESSION['user']['errors'] = $errorArray;\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// create a new user, assume all new users are not staff\n\t\t$values = array('username'=>$_POST['username'],'password'=>$_POST['password'],'email'=>$_POST['email'],'user_type'=>'1');\n\t\t$id = User::createUser($values);\n\t\t// log the user in\n\t\t$_SESSION['user']['id'] = $id;\n\t\t$_SESSION['user']['name'] = $_POST['username'];\n\t\t$_SESSION['user']['type'] = '1';\n\t\techo \"id = \" . $id;\n\t\theader(\"Location: /myrecipe/users/\" . $id);\n\t\texit;\n\t}", "public function registerNewUser()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('register', Input::all());\n\n\t\t# if we successfully register a new user\n\t\tif(isset($response['success']))\n\t\t{\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# grab the data array from the response\n\t\t\tSession::flash('success', $response['success']['data']);\n\n\t\t\t# show the user profile screen\n\t\t\treturn Redirect::route('profile');\n\t\t}\n\t\t# there was a problem registering the user\n\t\telse \n\t\t{\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('registration-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the sign up form again\n\t\t\treturn Redirect::back();\n\t\t}\n\t}", "public function create(array $data)\n {\n $user = User::isCurrentUser($data);\n\n // If user doesn't exist, attempt to create.\n if (!$user) {\n $user = new User($data);\n\n $validator = $this->validation->make($user->toArray(), [\n 'phone' => 'unique:users',\n 'email' => 'unique:users',\n ]);\n\n if($validator->fails()) {\n throw new ValidationException($validator);\n }\n\n $user->country_code = get_country_code();\n $user->northstar_id = $this->northstar->register($user);\n\n $user->save();\n\n event(new UserRegistered($user));\n }\n\n return $user;\n }", "private function createUser()\n {\n $sl = $this->getServiceManager();\n $userService = $sl->get(\"zfcuser_user_service\");\n $randomness = \"mockuser_\".mt_rand();\n $data = array(\n \"username\" => \"{$randomness}\",\n \"password\" => \"password\",\n \"passwordVerify\" => \"password\",\n \"display_name\" => \"MOCKUSER\",\n \"email\" => \"{$randomness}@google.com\"\n );\n $user = $userService->register($data);\n\n return $user;\n }", "public function create()\n {\n return $this->userService->create();\n }", "public function postCreate() {\n \t$validator = Validator::make(Input::all(), User::$rules);\n\n \t// i made a user with [email protected], goodbye\n \tif ($validator->passes()) {\n \t\t// validation has passed, save user in DB\n \t\t$user = new User;\n \t\t$user->first_name = Input::get('first_name');\n \t\t$user->last_name = Input::get('last_name');\n \t\t$user->email = Input::get('email');\n \t\t$user->password = Hash::make(Input::get('password'));\n \t\t$user->save();\n\n \t\treturn Redirect::to('users/login')->with('message', '<div class=\"alert alert-success\" role=\"alert\">Thanks for registering!</div>');\n \t}\n \telse {\n \t\t// validation has failed, display error messages\n \t\treturn Redirect::to('users/register')->with('message', '<div class=\"alert alert-warning\" role=\"alert\">The following errors occurred</div>')->withErrors($validator)->withInput();\n \t}\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "public function newRegistration() {\n $this->registerModel->getUserRegistrationInput();\n $this->registerView->setUsernameValue($this->registerView->getUsername());\n $this->registerModel->validateRegisterInputIfSubmitted();\n if ($this->registerModel->isValidationOk()) {\n $this->registerModel->hashPassword();\n $this->registerModel->saveUserToDatabase();\n $this->loginView->setUsernameValue($this->registerView->getUsername());\n $this->loginView->setLoginMessage(\"Registered new user.\");\n $this->layoutView->render(false, $this->loginView);\n } else {\n $this->layoutView->render(false, $this->registerView);\n }\n \n }", "function register_new_user()\n{\n // alidate the data submited by our user\n $result = _validation([\n 'name' => 'required|string|max:255',\n 'email' => 'required|string|email|unique:users',\n 'password' => 'required|string|equals:password_confirmation'\n ]);\n\n // Get the validated data.\n $validated = $result['validated'];\n\n // _dump(bcrypt_hasher_make($validated['password']), true);\n\n // Create the user\n $user = create_new_user(\n $validated['name'],\n $validated['email'],\n bcrypt_hasher_make($validated['password']) // Always hash your users password\n );\n\n // Redirect back if the user was not created.\n _redirect_back_if($user === false, ['errors' => [\n 'Unable to register user at the moment.'\n ]]);\n\n // log the user in\n login_user($user);\n}", "public function create()\n {\n $request = (object) $this->request->getPost();\n\n if (! $this->validate(static::rules())) {\n return redirect()->back()->withInput()->with('errors', $this->validator->getErrors());\n }\n\n $user = static::createUser($request);\n\n Auth::login($user);\n\n // Automatic trigger send verify email if user\n // instanceof VerifyEmailInterface.\n if ($user instanceof VerifyEmailInterface) {\n Events::trigger(VerifyEmailInterface::class, $user->email);\n }\n\n return redirect(config('Auth')->home);\n }", "public function createUser()\n {\n }", "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "static private function createNewUserFromPost() {\r\n\t\t$errors = array();\r\n\r\n\t\t$activationHash = (System::isAtLocalhost()) ? '' : self::getRandomHash();\r\n\t\t$newAccountId = DB::getInstance()->insert('account',\r\n\t\t\t\tarray('username', 'name', 'mail', 'password', 'registerdate', 'activation_hash'),\r\n\t\t\t\tarray($_POST['new_username'], $_POST['name'], $_POST['email'], self::passwordToHash($_POST['password']), time(), $activationHash));\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = true;\r\n\t\tself::$NEW_REGISTERED_ID = $newAccountId;\r\n\r\n\t\tif ($newAccountId === false)\r\n\t\t\t$errors[] = __('There went something wrong. Please contact the administrator.');\r\n\t\telse {\r\n\t\t\tself::importEmptyValuesFor($newAccountId);\r\n\t\t\tself::setSpecialConfigValuesFor($newAccountId);\r\n\r\n\t\t\tif ($activationHash != '')\r\n\t\t\t\tself::setAndSendActivationKeyFor($newAccountId, $errors);\r\n\t\t}\r\n\r\n\t\tself::$IS_ON_REGISTER_PROCESS = false;\r\n\t\tself::$NEW_REGISTERED_ID = -1;\r\n\r\n\t\treturn $errors;\r\n\t}", "protected function create(array $data)\n {\n $user = $this->userService->createUser($data);\n if(!$user) \n return redirect()->back()->with([\"status\" => \"error\", \"msg\"=>\"An Error Occured While Creating a user\"]);\n $this->capsuleService->createParty(PartyDto::fromUser($user)); // create a party on capsule crm for representing registered user\n $this->capsuleService->notifySalesHeadOfNewUserSignup($user); // Send a notification to app sales head on user signup\n return $user;\n }", "protected function create(array $data)\n {\n $user = new User();\n $reference = str_random(30).time();\n// $user->generateReference();\n\n $user = $user->create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'phone' => $data['phone'],\n 'gender' => $data['gender'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activation_code' => $reference\n// 'avatar' => 'public/defaults/avatars/default.png'\n ]);\n\n $user->notify((new sendUserActivation($user))->delay(now()->addSeconds(2)));\n Session::flash('message', 'Welcome. Please complete your profile to continue');\n return $user;\n }", "public function createUser()\n {\n $class = $this->userClass;\n $user = new $class;\n return $user;\n }", "function new_user($firstName,$lastName,$email,$password){\t\n $salt = generate_salt();\n $encPassword = encrypt_password($password,$salt);\n\n //$user = create_user_object($firstName,$lastName,$email,$encPassword,$salt,$userType);\n save_user_info($firstName,$lastName,$email,$encPassword,$salt);\n \n return true;\n}", "private function register(): void\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n }", "protected function createUser ()\n {\n /* Method of the UserFactory class */\n $this->_objUser = UserFactory::createUser(ucfirst($_SESSION[\"userType\"])); \n $this->_objUser->setFirstName($_SESSION[\"emailID\"]);\n }", "public function createUserAction() {\n $this->authService->createUser();\n die();\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'uuid' => Uuid::generate(5,$data['email'], Uuid::NS_DNS),\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ]);\n\n $userObj = User::find($user->id);\n\n if(Event::fire(new WelcomeUser($userObj)))\n {\n return $user;\n }else\n {\n //Redirect to error page and log in the incident\n }\n\n }", "public function register() {\n\t\tif ($this->Session->check('Auth.User')) {\n\t\t\t$this->redirect('/');\n\t\t}\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$data = $this->request->data;\n\t\t\tif ($this->User->save($data)) {\n\t\t\t\t$this->Session->setFlash(\"User has been created.\", 'default', array(), 'register');\n\t\t\t\t$this->redirect('/login');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(\"This user couldn't created. Please try again.\");\n\t\t\t}\n\t\t} else\n\t\t\t$this->Session->delete('Message.register');\n\t}", "protected function create(array $data)\n {\n\n // incase the user does not enter the password and exits, then \n // we give give them to re register into the website, so \n // a new email is sent for verification and the old token is regenerated\n if($user = User::where('email', '=', $data['email'])->first()){\n\n $user->verification_token = str_random(30);\n $user->status = User::NOT_VERIFIED;\n $user->save();\n\n return $user;\n }\n\n return User::create([\n 'email' => $data['email'],\n 'name' => $data['name'],\n 'verification_token' => str_random(30)\n ]);\n }", "public function handle_create(RegisterRequest $request)\n {\n $request->validated();\n\n $user = new User;\n\n $user->fullname = $request->fullname;\n $user->username = $request->username;\n $user->email = $request->email;\n\n $user->phone = $request->phone;\n $user->address = $request->address;\n $user->password = Hash::make($request->password);\n\n\n if (\n isset($request->file_img)\n &&\n ($request->file_img->getMimeType() == 'image/png' ||\n $request->file_img->getMimeType() == 'image/jpeg' ||\n $request->file_img->getMimeType() == 'image/jpg')\n && $request->file_img->getSize() <= 5120\n ) {\n $extension = $request->file('file_img')->guessClientExtension();\n $new_name_img = time() . '-' . $request->username . '.' . $extension;\n\n // move image to public images folder\n $request->file_img->move(public_path('images', $new_name_img));\n\n $user->image = $new_name_img;\n }\n $user->create_by = Auth::guard('admin')->user()->username;\n\n $save = $user->save();\n if ($save) {\n return redirect()->route('admin.showuser');\n } else {\n return back()->with('fail', 'an error occurred!');\n }\n }", "public function user_signup_new(Request $request)\n {\n $request->validate([\n 'first_name' => 'required',\n 'email' => 'required|string|unique:users',\n 'other_mobile_number' => 'required|integer|unique:users',\n 'selectType' => 'required',\n 'agree_check' => 'required|boolean',\n 'password' => 'required|string|confirmed'\n ]);\n\n $token = getenv(\"TWILIO_AUTH_TOKEN\");\n $twilio_sid = getenv(\"TWILIO_SID\");\n $twilio_verify_sid = getenv(\"TWILIO_VERIFY_SID\");\n $twilio = new Client($twilio_sid, $token);\n $twilio->verify->v2->services($twilio_verify_sid)\n ->verifications\n ->create(\"+91\".$request->other_mobile_number, \"sms\");\n\n $user = new User([\n 'name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'email' => $request->email,\n 'usertype' => 3,\n 'userSelect_type' => $request->selectType,\n 'other_mobile_number' => $request->other_mobile_number,\n 'password' => bcrypt($request->password)\n ]);\n\n $user->save();\n eventtracker::create(['symbol_code' => '1', 'event' => $request->email.' created a new account as a User']);\n\n return response()->json([\n 'data' => $user,\n 'message' => 'Successfully created user!'\n ], 201);\n }", "public static function create() {\n\t\tif (empty(Validator::$errors)) {\n\t\t\tself::insert(self::$tablename, array(\"email\"=>self::$email, \"password_hash\"=>self::$password_hash));\n\t\t\tSession::setFlash(\"alert-success\",\"You have successfully signed up!\");\n\t\t} else {\n\t\t\tSession::setFlash(\"alert-danger\", self::display(Validator::$errors));\n\t\t\tValidator::$errors = [];\n\t\t}\n\t}", "public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t$data['User']['public_key'] = uniqid();\n\t\t\t$data['User']['role'] = \"user\";\n\t\t\t$data['User']['api_key'] = md5(microtime().rand());\n\t\t\tif ($this -> User -> save($data)) {\n\t\t\t\t$this -> Session -> setFlash(__('You have succesfully registered. Now you can login.'));\n\t\t\t\t$this -> redirect('/users/login');\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}\n\n\t\t$this -> set('title_for_layout', 'User Registration');\n\t}", "protected function create()\n {\n// dd(request());\n // create new user in database\n $newUser = User::create([\n 'name' => \\request('name'),\n 'email' => \\request('email'),\n 'student_id' => \\request('student_id'),\n 'phone' => \\request('phone'),\n 'password' => bcrypt(\\request('password')),\n 'remember_token' => \\request('_token'),\n ]);\n\n\n //login the new user\n\n auth()->login($newUser);\n\n }", "private static function register() {\n if ( !self::validatePost() ) {\n return;\n }\n\n if ( !self::validEmail($_POST['email']) ) {\n self::setError('E-Mail Adresse ist nicht g&uuml;ltig!<br>');\n return;\n }\n \n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $verified = md5($_POST['email'].$password.microtime(true));\n \n $result = Database::createUser($_POST['email'],$password,$verified);\n \n if ( $result === false || !is_numeric($result) ) {\n return;\n }\n \n $_SESSION['user']['id'] = $result;\n $_SESSION['user']['email'] = $_POST['email'];\n $_SESSION['user']['verified'] = $verified;\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n \n self::registerMail($verified);\n }", "public function store()\n {\n // Validate form\n $validator = User::registrationValidation();\n $this->validate(request(), $validator);\n\n // Register user\n $registrationParams = User::registrationParams();\n $user = User::create(request($registrationParams));\n\n // Log in user\n User::loginUser($user);\n\n // Redirect to home page\n return redirect('/');\n }", "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}", "private function createNewUser():User\n {\n $entityManager = $this->getDoctrine()->getManager();\n\n //create user\n $user = new User();\n $user->setEmail($this->request->request->get('email'));\n $user->setPassword('');\n $entityManager->persist($user);\n $entityManager->flush();\n //create user\n\n //encode user password\n $user->setPassword($user->encodePassword($this->request->request->get('password')));\n $entityManager->persist($user);\n $entityManager->flush();\n //encode user password\n return $user;\n }", "private function create()\n {\n return $this->db->putUser($this->getDefaultAttributes());\n }", "public function create(array $input)\n {\n Validator::make($input, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => $this->passwordRules(),\n 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['required', 'accepted'] : '',\n ])->validate();\n\n $user = User::create([\n 'name' => $input['name'],\n 'email' => $input['email'],\n 'password' => Hash::make($input['password']),\n 'timezone_id'=> Timezone::getTimezoneId($input['timezone'] ?? null),\n 'role_id'=> $input['role_id'] ?? Role::getDefaultRoleId()\n ]);\n\n $user->notify(new MyAccountRegistration);\n\n // todo: will require a change on role implementation\n User::where('id', '!=', $user->id)->get()->map(function ($admin) use ($user) {\n $admin->notify(new NewUserRegistration($user));\n });\n\n return $user;\n }", "public function newUser($request)\r\n {\r\n /*\r\n * As before we set $params1 'Username'. We need this to check if user exist in database beacuse we don't allow\r\n * two user in database with the same username.\r\n */\r\n $params1 = [\r\n 'Username' => $request['username']\r\n ];\r\n if ($this->existUser($params1) == True) {\r\n /*\r\n * If in the database exits user with the same username then you return false (user must change username)\r\n */\r\n\r\n return False;\r\n } else {\r\n\r\n /*\r\n * Next step is creating a valid activation hash code. We need this for security (in URL you dont want to show UserID\r\n * beacuse in this case attacker has more information about your database)\r\n * Each of users in database has unique activation hash code. Activation hash code we need for activation account and\r\n * reseting password.\r\n *\r\n * Now,follow algorithm for creating unique activation hash code.\r\n */\r\n while (True) {\r\n $params2 = [\r\n 'Activation' => password_hash(rand(), PASSWORD_DEFAULT)\r\n ];\r\n\r\n if ($this->existUser($params2) != True) {\r\n break;\r\n }\r\n }\r\n\r\n /*\r\n * Next step is set params which need to create new user into database.\r\n */\r\n\r\n $params3 = [\r\n 'Username' => $request['username'],\r\n 'Email' => $request['email'],\r\n 'Password' => password_hash($request['password'], PASSWORD_DEFAULT),\r\n 'IsDeleted' => '0',\r\n 'Registration' => (new DateTime('now'))->format('Y-m-d h:s'),\r\n 'Activation' => $params2['Activation']\r\n ];\r\n\r\n $userID = $this->create();\r\n\r\n /*\r\n * Creating link which is send to user mail at registration for activating his account.\r\n */\r\n $link = \"http://www.mdtohtml.com/index.php?activation=\" . $params3['Activation'];\r\n\r\n /*\r\n * Inserting new user in database\r\n */\r\n $this->update($userID, $params3);\r\n\r\n /*\r\n * Now we have to prepare data to send activation mail to user (mail).\r\n */\r\n\r\n $data = [\r\n 'email' => $request['email'],\r\n 'title' => 'Registration support',\r\n 'body' => \"Hello!\\n\\nClick on below link to confirm your registration.\\n\\n$link\",\r\n 'subject' => 'Confirm password',\r\n 'user' => $request['username'],\r\n 'link' => $link,\r\n 'username' => '[email protected]',\r\n 'password' => 'preskok123'\r\n\r\n ];\r\n\r\n /*\r\n * At the end sending activating mail to user.\r\n */\r\n\r\n $this->send_mail($data);\r\n return True;\r\n }\r\n\r\n }", "public function registerUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n $password_repeat = $request->input('password_repeat');\n\n\n // Check email\n if (!$email) {\n $this->showRegisterForm(['Please enter email']);\n }\n // Check password\n if(!$password){\n $this->showRegisterForm(['Please enter password']);\n }\n if (!$password || !$password_repeat || $password != $password_repeat) {\n $this->showRegisterForm(['Passwords do not match']);\n }\n\n // Check user exist\n if ($this->getUser($email)) {\n $this->showRegisterForm(['User already isset']);\n }\n\n // Save user to DB\n $user = new User();\n $user->email = $email;\n $user->password = md5($password);\n $user->rights = 20;\n\n // Check save process\n if (!$user->save()) {\n $this->showRegisterForm(['Something goes wrong']);\n }\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_register']);\n }", "function createUser(){\n\t\t\tglobal $db;\n\t\t\tglobal $json;\n\t\t\t\n\t\t\t//Check if username meets minimum requirements\n\t\t\tif($this->username == \"\" || $this->username == null || strlen($this->username) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Username\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t//Check if username already exists\n\t\t\t\tif($db->query('SELECT * FROM user WHERE Username = \"'.$this->username.'\"')->rowCount() > 0){\n\t\t\t\t\t$json->exists(\"Username\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if password meets minimum requirements\n\t\t\tif($this->password == \"\" || $this->password == null || strlen($this->password) < 6){\n\t\t\t\t$json->invalidMinimumRequirements(\"Password\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$passHash = generatePassword($this->password);\n\t\t\t\t$this->password = $passHash;\n\t\t\t\t$apiHash = generateApiKey($this->username.\"\".date('Y-m-d'));\n\t\t\t}\n\t\t\t\n\t\t\t//Check if admin is empty or invalid, if so make user non-admin\n\t\t\tif($this->admin == \"\" || $this->admin == null || $this->admin < 0)\n\t\t\t\t$this->admin = 0;\n\t\t\t\n\t\t\tif($this->subject == \"\" || $this->subject == null || $this->subject < 0)\n\t\t\t\t$this->subject = 0;\n\t\t\t\t\n\t\t\t$insert = $db->prepare('INSERT INTO user VALUES (DEFAULT, :username, :password, :subject, :admin, :api)');\n\t\t\t$insert->bindParam(':username', $this->username);\n\t\t\t$insert->bindParam(':password', $this->password);\n\t\t\t$insert->bindParam(':subject', $this->subject);\n\t\t\t$insert->bindParam(':admin', $this->admin);\n\t\t\t$insert->bindParam(':api', $apiHash);\n\t\t\t\n\t\t\tif($insert->execute()){\n\t\t\t\t$json->created(\"User\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$json->server();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "protected function create(array $data)\n {\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'verifyToken' => Str::random(40)\n ]);\n\n $thisUser = User::findorFail($user->id);\n $this->sendEmail($thisUser);\n \n Session::flash('status','Registered! but verify your email to active your account');\n\n return $user;\n\n }", "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 }", "public function createUser () {\n syslog( LOG_INFO, 'Create a Lineberty User \\n' );\n\n $url = '/users';\n\n return $this->runRequest($url, 'POST', null);\n }", "public function test_user_created()\n {\n $this->wrongCredentials = false;\n $credentials = self::DEFAULT_CREDENTIALS;\n $user = $this->registerService->registerUser($credentials);\n $this->assertInstanceOf(User::class, $user);\n $this->assertEquals($credentials['email'], $user->email);\n $this->assertEquals($credentials['name'], $user->name);\n\n }", "public function create_user()\n\t{\n\t\tif (!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// redirect them to the login page\n\t\t\tredirect('/admin/login', 'refresh');\n\t\t}\n\t\t$this->data['title'] = $this->lang->line('create_user_heading');\n\n\t\t//See the ion_auth config to check if allow_user_registration is TRUE\n\t\tif( ! $this->config->item('allow_user_registration', 'ion_auth')){\n\n\t\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t\t{\n\t\t\t\tredirect('/admin', 'refresh');\n\t\t\t}\n\n\t\t}\n\n\n\t\t$tables = $this->config->item('tables', 'ion_auth');\n\t\t$identity_column = $this->config->item('identity', 'ion_auth');\n\t\t$this->data['identity_column'] = $identity_column;\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('first_name', $this->lang->line('create_user_validation_fname_label'), 'trim|required');\n\t\t$this->form_validation->set_rules('last_name', $this->lang->line('create_user_validation_lname_label'), 'trim|required');\n\t\tif ($identity_column !== 'email')\n\t\t{\n\t\t\t$this->form_validation->set_rules('identity', $this->lang->line('create_user_validation_identity_label'), 'trim|required|is_unique[' . $tables['users'] . '.' . $identity_column . ']');\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email|is_unique[' . $tables['users'] . '.email]');\n\t\t}\n\t\t$this->form_validation->set_rules('phone', $this->lang->line('create_user_validation_phone_label'), 'trim');\n\t\t$this->form_validation->set_rules('company', $this->lang->line('create_user_validation_company_label'), 'trim');\n\t\t$this->form_validation->set_rules('password', $this->lang->line('create_user_validation_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\n\t\t$this->form_validation->set_rules('password_confirm', $this->lang->line('create_user_validation_password_confirm_label'), 'required');\n\n\t\tif ($this->form_validation->run() === TRUE)\n\t\t{\n\t\t\t$email = strtolower($this->input->post('email'));\n\t\t\t$identity = ($identity_column === 'email') ? $email : $this->input->post('identity');\n\t\t\t$password = $this->input->post('password');\n\n\t\t\t$additional_data = array(\n\t\t\t\t'first_name' => $this->input->post('first_name'),\n\t\t\t\t'last_name' => $this->input->post('last_name'),\n\t\t\t\t'company' => $this->input->post('company'),\n\t\t\t\t'phone' => $this->input->post('phone'),\n\t\t\t);\n\t\t}\n\t\tif ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data))\n\t\t{\n\t\t\t// check to see if we are creating the user\n\t\t\t// redirect them back to the admin page\n\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\tredirect(\"auth\", 'refresh');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create user form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->data['first_name'] = array(\n\t\t\t\t'name' => 'first_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'first_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('first_name'),\n\t\t\t);\n\t\t\t$this->data['last_name'] = array(\n\t\t\t\t'name' => 'last_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'last_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('last_name'),\n\t\t\t);\n\t\t\t$this->data['identity'] = array(\n\t\t\t\t'name' => 'identity',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'identity',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('identity'),\n\t\t\t);\n\t\t\t$this->data['email'] = array(\n\t\t\t\t'name' => 'email',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'email',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('email'),\n\t\t\t);\n\t\t\t$this->data['company'] = array(\n\t\t\t\t'name' => 'company',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'company',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('company'),\n\t\t\t);\n\t\t\t$this->data['phone'] = array(\n\t\t\t\t'name' => 'phone',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'phone',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('phone'),\n\t\t\t);\n\t\t\t$this->data['password'] = array(\n\t\t\t\t'name' => 'password',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password'),\n\t\t\t);\n\t\t\t$this->data['password_confirm'] = array(\n\t\t\t\t'name' => 'password_confirm',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password_confirm',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password_confirm'),\n\t\t\t);\n\n\n\t\t\t$this->load->view('templates/header',$this->data);\n\t\t\t$this->load->view('/admin/create_user');\n\t\t\t$this->load->view('templates/footer');\n\t\t}\n\t}", "public function signupUser()\n { \n $user = User::findByUserEmail($this->email);\n if($user == null) { \n $user = new User();\n $user->user_full_name = $this->username;\n if(!empty($this->phone)) {\n $user->phone_number = $this->phone;\n }\n if(!empty($this->email)) { \n $user->email = $this->email;\n }\n $user->password_hash = md5($this->password);\n $user->login_method = 'email';\n $user->save();\n } \n return $user;\n }", "protected function _createUser() {\n\t\t$user = System_Locator_TableLocator::getInstance()->get('User')->createRow();\n\t\t$user->username = $this->getUsername();\n\t\t$user->setPassword($this->getPassword());\n\t\t$user->email = $this->getEmail();\n\t\t$user->countryCode = $this->getCountryCode();\n\t\t$user->createdAt = date(DATE_ISO8601); \n\t\treturn $user;\n\t}", "public function registration(UserCreateRequest $request)\n {\n $credentials = request()->all(['phone', 'password']);\n\n if ($token = auth()->attempt($credentials)) {\n return $this->respondWithToken($token);\n }\n if (User::where('phone', $credentials['phone'])->count() > 0) {\n return response()->json([\n 'errors' => [\n 'wrong' => 'Already exist'\n ]\n ], 401);\n }\n\n $user = User::store($request->all());\n auth()->login($user);\n\n $token = auth()->attempt($credentials);\n return $this->respondWithToken($token);\n }", "public function postRegister()\n\t{\n\t\t$user = new \\User;\n\n\t\t$user->email = \\Input::get( 'email' );\n\t\t$user->password = \\Input::get( 'password' );\n\n\t\t// The password confirmation will be removed from model\n\t\t// before saving. This field will be used in Ardent's\n\t\t// auto validation.\n\t\t$user->password_confirmation = \\Input::get( 'password_confirmation' );\n\n\t\t// Save if valid. Password field will be hashed before save\n\t\t$user->save();\n\n\t\tif ( $user->id )\n\t\t{\n\t\t\t//Assign the company role to this person\n\t\t\t$roleId = \\Role::where('name', '=', 'Company')->first()->id;\n\t\t\t$user->attachRole($roleId);\n\n\t\t\t// Redirect with success message, You may replace \"Lang::get(...\" for your custom message.\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getLogin')\n\t\t\t\t->with( 'notice', \\Lang::get('confide::confide.alerts.account_created') );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get validation errors (see Ardent package)\n\t\t\t$error = $user->errors()->all(':message');\n\n\t\t\treturn \\Redirect::action('controllers\\company\\AuthController@getRegister')\n\t\t\t\t->withInput(\\Input::except('password'))\n\t\t\t\t->with( 'error', $error );\n\n\t\t}\n\n\t}", "public function create()\n {\n $this->validate($this->request, User::createRules());\n\n $user = new User;\n $user->name = $this->request->name;\n $user->phone = $this->request->phone;\n $user->dob = $this->request->dob;\n $user->image = $this->request->image_path;\n $plainPassword = $this->request->password;\n $user->password = app('hash')->make($plainPassword);\n\n $user->save();\n\n //return successful response\n return $this->response(201,\"User\", $user);\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 }", "public function create()\n {\n // TODO: Algún parámetro para no permitir el registro.\n \n // Es ya un usuario?\n if (Core::isUser())\n {\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('') . '\\';');\n return;\n }\n \n // Tenemos datos?\n if ($this->request->is('email'))\n {\n // Validamos los datos\n $form = Core::getLib('form.validator');\n $form->setRules(Core::getService('account.signup')->getValidation());\n \n // Si no hay errores procedemos a capturar los datos.\n if ($form->validate())\n {\n // Agregamos usuario\n if (Core::getService('account.process')->add($this->request->getRequest()))\n {\n if (Core::getParam('user.verify_email_at_signup'))\n {\n // Vamos a que verifique su email\n Core::getLib('session')->set('email', $this->request->get('email'));\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.verify') . '\\';');\n }\n else\n {\n // Iniciamos sesión\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.login') . '\\';');\n }\n \n return;\n }\n }\n }\n \n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.signup') . '\\';');\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 store(UserCreateRequest $request)\n {\n\t\t\t$user = User::create([\n\t\t\t\t'name' \t\t\t\t=> $request->input('name'),\n\t\t\t\t'lastname' \t\t=> $request->input('lastname'),\n\t\t\t\t'idNumber'\t\t=> $request->input('idNumber'),\n\t\t\t\t'email' \t\t\t=> $request->input('email'),\n\t\t\t\t'phone' \t\t\t=> $request->input('phone'),\n\t\t\t\t'address' \t\t=> $request->input('address'),\n\t\t\t\t'birthdate' \t=> $request->input('birthdate'),\n\t\t\t\t'category_id' => $request->input('category_id'),\n\t\t\t\t'password'\t\t=> 'password', // I NEED TO ADD LOGIN FUNCTIONALITY\n\t\t\t\t'is_admin'\t\t=> 0,\n\t\t\t\t'status' \t\t\t=> 'non live' // As default in the db?\n\t\t\t]);\n\n\t\t\treturn redirect('/users')->with('success', 'User Registered');\n }", "public function register()\n {\n if ($this->getIsNewRecord() == false) {\n throw new \\RuntimeException('Calling \"' . __CLASS__ . '::' . __METHOD__ . '\" on existing user');\n }\n\n if ($this->module->enableConfirmation == false) {\n $this->confirmed_at = time();\n }\n\n if ($this->module->enableGeneratingPassword) {\n $this->password = Password::generate(8);\n }\n\n $this->trigger(self::USER_REGISTER_INIT);\n\n if ($this->save(false)) {\n Yii::getLogger()->log($this->getErrors(), Logger::LEVEL_INFO);\n $this->trigger(self::USER_REGISTER_DONE);\n if ($this->module->enableConfirmation) {\n $token = \\Yii::createObject([\n 'class' => \\dektrium\\user\\models\\Token::className(),\n 'type' => \\dektrium\\user\\models\\Token::TYPE_CONFIRMATION,\n ]);\n $token->link('user', $this);\n $this->mailer->sendConfirmationMessage($this, $token);\n } else {\n \\Yii::$app->user->login($this);\n }\n if ($this->module->enableGeneratingPassword) {\n $this->mailer->sendWelcomeMessage($this);\n }\n \\Yii::$app->session->setFlash('info', $this->getFlashMessage());\n \\Yii::getLogger()->log('User has been registered', Logger::LEVEL_INFO);\n return true;\n }\n\n \\Yii::getLogger()->log('An error occurred while registering user account', Logger::LEVEL_ERROR);\n\n return false;\n }", "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'username'=> 'required|alpha_dash|min:3|unique:users,username',\n\t\t\t'display_name'=> 'required',\n\t\t\t'email'=>'email',\n\t\t\t'password'=> 'required',\n\t\t\t'repeat_password'=> 'required|same:password'\n\t\t);\t\n\n\t\t$validation= Validator::make(Input::all(), $rules);\n\n\t\tif ($validation ->fails()) {\n\t\t\treturn Redirect::to('register')\n\t\t\t\t->withErrors($validation)\n\t\t\t\t->withInput(Input::all());\n\t\t}\n\n\t\t$user = new User;\n\t\t$user->username = Input::get('username');\n\t\t$user->password = Hash::make(Input::get('password'));\n\t\t$user->display_name = Input::get('display_name');\n\t\t$user->email = Input::get('email');\n\t\t$user->role = 'user';\n\t\t$user->token = sha1(uniqid());\n\t\t$user->status = 'pending';\n\t\t$user->save();\n\n\t\treturn Redirect::to('/')\n\t\t\t->with('message','User Created, Waiting for Approval');\n\t}", "public function register()\n {\n $create_from = $this->request->get_body_params();\n\n $input = (object) array_intersect_key( $create_from,\n array_fill_keys(['username', 'password', 'email'], false)\n );\n\n $update = [\n 'first_name',\n 'last_name',\n ];\n\n /** @var \\WP_Error|integer $user */\n $user_id = \\wp_create_user($input->username, $input->password, $input->email);\n\n if (\\is_wp_error($user_id)) {\n throw new UnauthorizedException($user_id->get_error_message());\n }\n\n /** @var \\WP_User $user */\n $user = \\get_userdata($user_id);\n\n foreach ($update as $att) {\n $user->$att = $create_from[$att];\n }\n\n \\wp_update_user($user);\n\n return $this->response->ok([\n 'message' => sprintf(__('Hello %s', PMLD_TD), $user->nickname),\n 'user' => User::make($user),\n ]);\n\n }", "public function create(){\n\n $user = User::create($this->_cleaned);\n return $this->respond($user);\n }", "protected function create(array $data)\n {\n $company = Company::create([\n 'name' => $data['company'],\n 'referrer_id' => Session::pull(self::REFERRER_KEY),\n ]);\n\n $user = new User([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ]);\n\n $user->company()->associate($company);\n\n if (!$user->save()) {\n abort(500, 'User registration failure.');\n }\n\n return $user;\n }", "public function register() {\n \n $this->form_validation->set_rules('email', 'Email', 'required|valid_email');\n $this->form_validation->set_rules('password', 'Passwort', 'required');\n $this->form_validation->set_rules('dataprotection', 'Datenschutz', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n if (strtolower($this->input->post('dataprotection')) == 'true') {\n \t// TODO: save acceptance or acceptance date to db, i.e. hand over to model\n } else {\n \t$this->error(404, 'Dataprotection error');\n } \n \n $this->user_model->setValue('email', $this->input->post('email'));\n $this->user_model->setValue(\n \t'hashed_password', \n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n\n if (! $this->user_model->newUser()) {\n\t\t\t$this->error(409, 'Duplicate');\n }\n\n\t\t$this->sendConfirmationMail($this->input->post('email'));\n\t\t$data['msg'] = $this->input->post('email') . ' registered.';\n\t\t$this->responseWithCode(201, $data);\n }", "public function register( CreateUserRequest $request ) {\n // store the user in the database\n $credentials = $request->only( 'name', 'email', 'password');\n $credentials[ 'password' ] = bcrypt( $credentials[ 'password' ] );\n $user = User::create($credentials);\n\n // now wire up the provider account (e.g. facebook) to the user, if provided.\n if ( isset( $request['provider'] ) && isset( $request['provider_id'] ) && isset( $request['provider_token'] ) ) {\n $user->accounts()->save( new Account( [\n 'provider' => $request['provider'],\n 'provider_id' => $request['provider_id'],\n 'access_token' => $request['provider_token'],\n ] ) );\n }\n\n // return the JWT to the user\n $token = JWTAuth::fromUser( $user );\n return response( compact( 'token' ), 200 );\n }", "public function store() \n\t{\n\t\t$input = Input::all();\n\t\t$validation = $this->validator->on('create')->with($input);\n\n\t\tif ($validation->fails())\n\t\t{\n\t\t\treturn Redirect::to(handles(\"orchestra::users/create\"))\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->withErrors($validation);\n\t\t}\n\n\t\t$user = App::make('orchestra.user');\n\t\t$user->status = User::UNVERIFIED;\n\t\t$user->password = $input['password'];\n\n\t\t$this->saving($user, $input, 'create');\n\n\t\treturn Redirect::to(handles('orchestra::users'));\n\t}", "public function createUser(){\n $post = $this->_app->request->post();\n \n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-create.json\");\n \n // Get the alert message stream\n $ms = $this->_app->alerts; \n \n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_account')){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n\n // Set up Fortress to process the request\n $rf = new \\Fortress\\HTTPRequestFortress($ms, $requestSchema, $post); \n \n // Sanitize data\n $rf->sanitize();\n \n // Validate, and halt on validation errors.\n $error = !$rf->validate(true);\n \n // Get the filtered data\n $data = $rf->data(); \n \n // Remove csrf_token, password confirmation from object data\n $rf->removeFields(['csrf_token, passwordc']);\n \n // Perform desired data transformations on required fields. Is this a feature we could add to Fortress?\n $data['user_name'] = strtolower(trim($data['user_name']));\n $data['display_name'] = trim($data['display_name']);\n $data['email'] = strtolower(trim($data['email']));\n $data['active'] = 1;\n \n // Check if username or email already exists\n if (UserLoader::exists($data['user_name'], 'user_name')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_USERNAME_IN_USE\", $data);\n $error = true;\n }\n\n if (UserLoader::exists($data['email'], 'email')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_EMAIL_IN_USE\", $data);\n $error = true;\n }\n \n // Halt on any validation errors\n if ($error) {\n $this->_app->halt(400);\n }\n \n // Get default primary group (is_default = GROUP_DEFAULT_PRIMARY)\n $primaryGroup = GroupLoader::fetch(GROUP_DEFAULT_PRIMARY, \"is_default\");\n \n // Set default values if not specified or not authorized\n if (!isset($data['locale']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"locale\"]))\n $data['locale'] = $this->_app->site->default_locale;\n \n if (!isset($data['title']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"title\"])) {\n // Set default title for new users\n $data['title'] = $primaryGroup->new_user_title;\n }\n \n if (!isset($data['primary_group_id']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"primary_group_id\"])) {\n $data['primary_group_id'] = $primaryGroup->id;\n }\n \n // Set groups to default groups if not specified or not authorized to set groups\n if (!isset($data['groups']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"groups\"])) {\n $default_groups = GroupLoader::fetchAll(GROUP_DEFAULT, \"is_default\");\n $data['groups'] = [];\n foreach ($default_groups as $group_id => $group){\n $data['groups'][$group_id] = \"1\";\n }\n }\n \n // Hash password\n $data['password'] = Authentication::hashPassword($data['password']);\n \n // Create the user\n $user = new User($data);\n\n // Add user to groups, including selected primary group\n $user->addGroup($data['primary_group_id']);\n foreach ($data['groups'] as $group_id => $is_member) {\n if ($is_member == \"1\"){ \n $user->addGroup($group_id); \n }\n }\n \n // Store new user to database\n $user->store(); \n \n // Success message\n $ms->addMessageTranslated(\"success\", \"ACCOUNT_CREATION_COMPLETE\", $data);\n }", "private function generateUser()\n {\n \t$user=new User();\n \t$user->scenario = 'registration';\n \t$user->username=$this->user_name_prefix . '_' . time() . ++$this->userNameCounter;\n \t$user->email=time() . ++$this->emailCounter . $this->faker->unique()->email;\n \t$user->language = Yii::$app->language;\n \t$user->status = User::STATUS_ENABLED;\n \t$this->userId = $user->save(false) ? $user->id:false;\n \t$this->data[] = ['id'=>$user->id,'type'=>'user'];\n \treturn true;\n }", "private function registerNewUser()\n {\n if (empty($_POST['user_name'])) {\n $this->errors[] = \"Empty Username\";\n } elseif (empty($_POST['user_password_new']) || empty($_POST['user_password_repeat'])) {\n $this->errors[] = \"Empty Password\";\n } elseif ($_POST['user_password_new'] !== $_POST['user_password_repeat']) {\n $this->errors[] = \"Password and password repeat are not the same\";\n } elseif (strlen($_POST['user_password_new']) < 6) {\n $this->errors[] = \"Password has a minimum length of 6 characters\";\n } elseif (strlen($_POST['user_name']) > 64 || strlen($_POST['user_name']) < 2) {\n $this->errors[] = \"Username cannot be shorter than 2 or longer than 64 characters\";\n } elseif (!preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])) {\n $this->errors[] = \"Username does not fit the name scheme: only a-Z and numbers are allowed, 2 to 64 characters\";\n } elseif (empty($_POST['user_email'])) {\n $this->errors[] = \"Email cannot be empty\";\n } elseif (strlen($_POST['user_email']) > 64) {\n $this->errors[] = \"Email cannot be longer than 64 characters\";\n } elseif (!filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)) {\n $this->errors[] = \"Your email address is not in a valid email format\";\n } elseif (!empty($_POST['user_name'])\n && strlen($_POST['user_name']) <= 64\n && strlen($_POST['user_name']) >= 2\n && preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])\n && !empty($_POST['user_email'])\n && strlen($_POST['user_email']) <= 64\n && filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)\n && !empty($_POST['user_password_new'])\n && !empty($_POST['user_password_repeat'])\n && ($_POST['user_password_new'] === $_POST['user_password_repeat'])\n ) {\n // create a database connection\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // change character set to utf8 and check it\n if (!$this->db_connection->set_charset(\"utf8\")) {\n $this->errors[] = $this->db_connection->error;\n }\n\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n\n // escaping, additionally removing everything that could be (html/javascript-) code\n $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));\n $user_last = $this->db_connection->real_escape_string(strip_tags($_POST['user_last'], ENT_QUOTES));\n $user_email = $this->db_connection->real_escape_string(strip_tags($_POST['user_email'], ENT_QUOTES));\n\n $user_password = $_POST['user_password_new'];\n\n // crypt the user's password with PHP 5.5's password_hash() function, results in a 60 character\n // hash string. the PASSWORD_DEFAULT constant is defined by the PHP 5.5, or if you are using\n // PHP 5.3/5.4, by the password hashing compatibility library\n $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);\n\n // check if user or email address already exists\n $sql = \"SELECT * FROM users WHERE user_email = '\" . $user_email . \"';\";\n $query_check_user_name = $this->db_connection->query($sql);\n\n if ($query_check_user_name->num_rows == 1) {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, that username / email address is already taken. </div>\";\n } else {\n // write new user's data into database\n $sql = \"INSERT INTO users (user_name, user_last, user_password_hash, user_email)\n VALUES('\" . $user_name . \"', '\" . $user_last . \"', '\" . $user_password_hash . \"', '\" . $user_email . \"');\";\n $query_new_user_insert = $this->db_connection->query($sql);\n\n // if user has been added successfully\n if ($query_new_user_insert) {\n $this->messages[] = \"<div class='alert alert-success center' role='alert'> Your account has been created successfully. Please check your emails.</div>\";\n\n // Load username and datejoined for verifcation via email hashing\n $sql=\"SELECT `user_id`, `user_name`, `user_date_joined` FROM `users` WHERE `user_email` = '\" . $user_email . \"';\";\n $query_load_hash_verify = $this->db_connection->query($sql);\n\n // if loaded then include send email and display message\n if ( $query_load_hash_verify) {\n $result_row = $query_load_hash_verify -> fetch_object();\n $codeid = $result_row->user_id;\n $code2 = md5($result_row->user_name);\n $code3 = md5($result_row->user_date_joined);\n\n // created a hash of when the user joined split it into two parts\n $cuthashtime = substr($code3, 0, 4);\n $endhashtime = substr($code3, -4); \n\n $hashedname = $code2;\n $middlehashname = substr($hashedname, 0, 4);\n\n include 'Email.php';\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, but we couldn't send your email. Please contact support.</div>\";\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, your registration failed. Please go back and try again. </div>\";\n }\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> Sorry, no database connection. </div>\";\n }\n } else {\n $this->errors[] = \"<div class='alert alert-danger center' role='alert'> An unknown error occurred. </div>\";\n }\n }", "public function registerViaRequest()\n {\n return User::create(array_merge([\n 'password' => bcrypt(input('password')),\n ], only('email', 'name', 'is_public')));\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'role_id' => '3',\n 'status' => '0',\n 'territory' => $data['territory'],\n 'password' => bcrypt($data['password']),\n ]);\n $user->assignRole('client');\n try {\n EmailHelper::emailConfigChanges('user');\n Mail::send('emails.confirm-email', ['user' => $user, 'password' => false], function ($message) use ($user) {\n $message->from(config('mail.from.address'), config('mail.from.name'));\n $message->to($user->email);\n $message->bcc(config('site.bcc_users'));\n $message->subject(config('mail.from.name') . ': Verify your online account.');\n });\n } catch (\\Exception $e) {\n Log::info($e);\n }\n return $user;\n }", "public function store(CreateUserRequest $request)\n {\n\n // Try creating new user\n $newUser = User::createUserWithProfile($request->all());\n\n // Event new registered user\n event(new Registered($newUser));\n // Send user registered notification\n $newUser->sendUserRegisteredNotification();\n\n // Check if user need to verify email if not app will try to login the new user\n if (config('access.users.verify_email')) {\n // Send Email for Verification\n $newUser->sendEmailVerificationNotification();\n }\n\n return $newUser->sendResponse();\n }", "protected function create(array $data)\n {\n\n $user = User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'user_type' => $data['user_type'],\n 'active' => true,\n 'confirmed' => true,\n 'confirmation_code' => md5(uniqid(mt_rand(), true)),\n ]);\n\n // See if adding any additional permissions\n // if (! isset($data['permissions']) || ! count($data['permissions'])) {\n // $data['permissions'] = [];\n // }\n\n if ($user) {\n // User must have at least one role\n // if (! count($data['roles'])) {\n // throw new GeneralException(__('This User Needs atleast One Role'));\n // }\n\n // Add selected roles/permissions\n // $user->syncRoles($data['roles']);\n // $user->syncPermissions($data['permissions']);\n $user->assignRole('Organisation Superadmin');\n $user ->givePermissionTo('View Backend');\n\n //Send confirmation email if requested and account approval is off\n // if (isset($data['confirmation_email']) && $user->confirmed == 0 && ! config('access.users.requires_approval')) {\n // $user->notify(new UserNeedsConfirmation($user->confirmation_code));\n // }\n\n // event(new UserCreated($user));\n\n return $user;\n }\n\n }", "protected function create(array $data)\n {\n return User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'gender'=>$data['gender'],\n 'tel_mobile'=>$data['tel_mobile'],\n 'country_code'=>$data['country_code'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activated' => !config('settings.send_activation_email')\n ]);\n }", "protected function createUser()\n {\n $this->question('Enter your details for the admin user.');\n\n $user = \\App\\User::create([\n 'name' => $this->ask('Name', 'Admin'),\n 'email' => $this->ask('Email address', 'noreply@'.str_replace(['http://', 'https://'], '', config('app.url'))),\n 'password' => Hash::make($this->ask('Password')),\n ]);\n \n $this->info(\"Admin user created successfully. You can log in with username {$user->email}\");\n }", "public function createBlankUser()\r\n {\r\n $user = CrugeFactory::get()->getICrugeStoredUserNewModel();\r\n if ($user != null) {\r\n // asegura que no falle al validar por terminos y condiciones\r\n $user->terminosYCondiciones = true;\r\n // asegura que no falle al validar por captcha\r\n //\tcruge\\models\\data\\CrugeStoredUser.php (bypassCaptcha y _getCaptchaRule)\r\n $user->bypassCaptcha = true;\r\n return $user;\r\n } else {\r\n return null;\r\n }\r\n }", "public function newUser($user)\n\t{\n\t\t$input = $user;\n\t\t$rules = array(\n\t\t\t'username' => 'required|alpha_num|max:25|unique:users',\n\t\t\t'password' => 'required|min:8|max:25|confirmed',\n\t\t\t'dob' => 'required|before:'.date('Y-m-d', strtotime('-13 years')),\n\t\t\t'gender' => 'required|in:M,F',\n\t\t\t'email' => 'required|email|unique:users',\n\t\t\t'location' => 'regex:/[a-zA-Z0-9 \\-_]*/',\n\t\t\t'wug_api' => 'required_with:location|alpha_num'\n\t\t);\n\n\t\t$validation = Validator::make($input, $rules);\n\n\t\tif ($validation->fails())\n\t\t{\n\t\t return $validation->messages();\n\t\t}\n\n\t\t$api = new Api();\n\t\t$key = $api->randomString(40);\n\n\t\t$loc_id = NULL;\n\n\t\tif(!empty($input['location'])) {\n\t\t\t$loc = new Location();\n\t\t\t$loc_id = $loc->insertGetId(array(\n\t\t\t\t'location' => $input['location'],\n\t\t\t\t'wug_api' => $input['wug_api'],\n\t\t\t));\n\t\t}\n\n\t\t$user = new User();\n\t\t$user->api_key = $key;\n\t\t$user->username = $input['username'];\n\t\t$user->password = Hash::make($input['password']);\n\t\t$user->dob = $input['dob'];\n\t\t$user->gender = $input['gender'];\n\t\t$user->location_id = $loc_id;\n\t\t$user->email = $input['email'];\n\n\t\t$user->save();\n\n\t\treturn true;\n\t}", "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 create(UserCreateRequest $request): User\n {\n // TODO: Implement create() method.\n }", "public function newAppUser()\n {\n $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n $name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $role = filter_input(INPUT_POST, 'role', FILTER_SANITIZE_STRING);\n $status = filter_input(INPUT_POST, 'status', FILTER_SANITIZE_NUMBER_INT);\n\n $errorList = [];\n if (empty($email)) {\n $errorList[] = 'Vous devez saisir un email';\n }\n if (empty($name)) {\n $errorList[] = 'Vous devez saisir un nom';\n }\n if (empty($password)) {\n $errorList[] = 'Vous devez saisir un mot de passe';\n }\n if (empty($role)) {\n $errorList[] = 'Vous devez saisir un rôle';\n }\n\n if (empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $inserted = $user->create();\n\n if ($inserted) {\n global $router;\n header('Location: ' . $router->generate('appusers-list'));\n return;\n } else {\n $errorList[] = 'L\\'insertion des données s\\'est mal passée';\n }\n }\n\n if (!empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $this->show('users/add', [\n 'errorList' => $errorList,\n 'user' => $user\n ]);\n }\n }", "public function execute(array $data) : User\n {\n $data['password'] = Hash::make($data['password']);\n\n //We will create activation code to be used for Email Confirmation\n $data['activation_token'] = QioskApp::createToken('email');\n\n //Now we create the user by adding it to our database\n $user = $this->User::create($data);\n\n //throws an exception if user hasnt yet created\n if (!$user) {\n throw new CustomException('Registration falied!', 500);\n }\n\n //dispatch an event to send confirmation email and log user creation\n event(new $this->signedUpEvent($user));\n\n return $user;\n }", "public function createRegister(){\n\t\t$userRepo = new UserRepository(App::getInstance());\n\n\t\t//check if user exists first. Search user by email.\n\t\t$user = $userRepo->getUserByEmail($_POST['email']);\n\t\tif($user!=null){\n\t\t\t//Error Message\n\t\t\treturn view('newRegForm')->with('error', true);\n\t\t}\n\n\t\telse{\n\t\t\t//Creates a new user and then returns ALL the registers to the view\n\t\t\t$user = new User($_POST);\n\t\t\t$user = $userRepo->create($user);\n\t\t\t$user = $userRepo->selectAll();\n\n\t\t\treturn view('viewRegisters')->with(['users'=>$user,'error'=>false]);\n\t\t}\n\t}", "public function registerAction(Request $request){\n //for the view\n $params = array(\"title\" => _(\"Sign up\"), \"errors\" => array());\n\n $params['username'] = \"\";\n $params['email'] = \"\";\n\n //handle register form\n if ($request->isMethod('post')){\n\n $username = $request->input('username');\n $params['username'] = $username;\n $email = $request->input('email');\n $params['email'] = $email;\n $password = $request->input('password');\n $password_bis = $request->input('password_bis');\n\n //validation\n $validator = new CustomValidator();\n\n $validator->validateUsername($username);\n $validator->validateUniqueUsername($username);\n $validator->validateEmail($email);\n $validator->validateUniqueEmail($email);\n $validator->validatePassword($password);\n $validator->validatePasswordBis($password_bis, $password);\n\n if ($validator->isValid()){\n //hydrate user obj\n $securityHelper = new SH();\n $user = new User();\n \n $user->setNewUuid();\n $user->setUsername( $username );\n $user->setEmail( $email );\n $user->setEmailValidated(false);\n $user->setRole( \"user\" );\n $user->setSalt( SH::randomString() );\n $user->setToken( SH::randomString() );\n $user->setSiteLanguage( 'en' );\n $user->setActive( true );\n\n $hashedPassword = $securityHelper->hashPassword( $password, $user->getSalt() );\n \n $user->setPassword( $hashedPassword );\n// $user->setIpAtRegistration( $_SERVER['REMOTE_ADDR'] );\n $user->setIpAtRegistration($request->ip());\n $user->setDateCreated( time() );\n $user->setDateModified( time() );\n\n //save it\n $userManager = new UserManager();\n $userManager->save($user);\n// @TODO: MAILER\n// send email confirmation message\n// $mailer = new Mailer();\n//\n// $mailerResult = $mailer->sendRegistrationConfirmation($user);\n\n //log user in right now (will redirect home)\n $this->logUser($request, $user);\n// $this->logUser($request, $user);\n $json = new JsonResponse();\n $json->setData(array(\"redirectTo\" => Route('graph')));\n $json->send();\n }\n //not valid\n else {\n $errors = $validator->getErrors();\n $params[\"errors\"] = $errors;\n return response()->json([\n 'error' => $errors\n ],400);\n }\n\n }\n return view('auth.register',['params'=> $params]);\n// $view = new View(\"register.php\", $params);\n// $view->setLayout(\"../View/layouts/modal.php\");\n// $view->send(true);\n }", "public function signup()\n {\n if ($this->validate()) {\n $user = new User();\n $user->username = $this->username;\n $user->first_name = $this->firstName;\n $user->last_name = $this->lastName;\n $user->email = $this->email;\n $user->setPassword($this->password);\n $user->generateAuthKey();\n $user->ip = Yii::$app->request->getUserIP();\n $user->ua = Yii::$app->request->getUserAgent();\n if ($user->save()) {\n $this->user = $user;\n $this->sendMail();\n return $user;\n }\n }\n\n return false;\n }", "protected function create(array $data)\n {\n $userData = Request::all();\n $confirmationCode = str_random(30);\n\n $fields = [\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ];\n if (config('auth.providers.users.field', 'email') === 'username' && isset($data['username'])) {\n $fields['username'] = $data['username'];\n }\n\n //return User::create($fields);\n //create user with role and permisssion\n $user = new User;\n $user->name = $userData['name'];\n $user->email = $userData['email'];\n $user->password = Hash::make($userData['password']);\n $user->confirmation_code = $confirmationCode;\n $user->save();\n\n //adding roles to a user\n $user->assignRole('user');\n //adding permissions to a user\n $user->givePermissionTo('edit not allowed');\n //user id $user->id\n //save userlocation info\n $this->SaveUserMeta($user->id, \"182.185.148.11\");\n //send verification email.\n $this->SendActivationEmail($confirmationCode);\n\n return $user;\n\n }", "public function creating(User $user)\n {\n if (empty($user->login)) {\n $user->login = $user->email;\n }\n\n if (null === $user->my_id || empty($user->my_id)) {\n $user->my_id = generateMyId();\n }\n }", "public function registerUser() {\n $this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]|is_unique[user.username]',\n array('min_length' => 'Username length has to be between 5 & 12 characters.',\n 'max_length' => 'Username length has to be between 5 & 12 characters.',\n 'is_unique' => 'Username is already in use.'));\n $this->form_validation->set_rules('password', 'Password', 'required|min_length[8]|max_length[16]|matches[confirmPassword]',\n array('min_length' => 'Password length has to be between 8 & 16 characters.',\n 'max_length' => 'Password length has to be between 8 & 16 characters.',\n 'matches' => 'Passwords do not match.'));\n $this->form_validation->set_rules('confirmPassword', 'Password Confirmation', 'required');\n $this->form_validation->set_rules('emailAddress', 'Email Address', 'trim|required|valid_email|is_unique[user.userEmail]',\n array('valid_email' => 'Email is not valid.',\n 'is_unique' => 'Email is already in use.'));\n\n if ($this->form_validation->run() == FALSE) {\n $this->registration();\n\n } else {\n $formUsername = $this->input->post('username');\n $formPassword = $this->input->post('password');\n $formEmailAddress = $this->input->post('emailAddress');\n $this->UserManager->registerUser($formUsername, $formPassword, $formEmailAddress);\n $this->login();\n }\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'email' => $data['registerEmail'],\n 'password' => bcrypt($data['registerPassword']),\n 'status' => 'active'\n ]);\n\n $user->profile()->create($data['profile']);\n $user->travelInformation()->create($data['travel']);\n\n return $user;\n }", "public function save(CreateUserRequest $request)\n {\n $this->authorize('create', User::class);\n\n $pass = $this->get_password($request);\n $user = User::create([\n 'name' => $request->input('name'),\n 'phone_number' => $request->input('phone_number'),\n 'email' => $request->input('email'),\n 'password' => bcrypt($pass),\n 'role_id' => $request->input('role_id', 3)\n ]);\n\n $user->notify(new AdminUserCreated($user, $pass));\n\n return redirect()->route('active_user', $user->id);\n }", "public function createUser()\n {\n $c = $this->getConnectionWithConfig('default');\n\n // First we create the record that we need to update\n $create = 'CREATE (u:User {name: $name, email: $email, username: $username})';\n // The bindings structure is a little weird, I know\n // but this is how they are collected internally\n // so bare with it =)\n $createCypher = $c->getCypherQuery($create, array(\n 'name' => $this->user['name'],\n 'email' => $this->user['email'],\n 'username' => $this->user['username'],\n ));\n\n return $this->client->run($createCypher['statement'], $createCypher['parameters']);\n }", "public function create(CreateUserRequest $request) {\n $user = $request->commit();\n\n //Trigger user edited event\n event(new UserCreated($user));\n\n //Reloads page\n return redirect()->action('Platform\\UserController@edit', $user)->with('alert', [\n 'type' => 'success',\n 'message' => 'User created'\n ]);\n }", "function register_user() {\n\t\tglobal $ID, $lang, $conf, $auth, $yubikey_associations;\n\n\t\tif(!$auth->canDo('addUser')) return false;\n\n\t\t$_POST['login'] = $_POST['nickname'];\n\n\t\t// clean username\n\t\t$_POST['login'] = preg_replace('/.*:/','',$_POST['login']);\n\t\t$_POST['login'] = cleanID($_POST['login']);\n\t\t// clean fullname and email\n\t\t$_POST['fullname'] = trim(preg_replace('/[\\x00-\\x1f:<>&%,;]+/','',$_POST['fullname']));\n\t\t$_POST['email'] = trim(preg_replace('/[\\x00-\\x1f:<>&%,;]+/','',$_POST['email']));\n\n\t\tif (empty($_POST['login']) || empty($_POST['fullname']) || empty($_POST['email'])) {\n\t\t\tmsg($lang['regmissing'], -1);\n\t\t\treturn false;\n\t\t} else if (!mail_isvalid($_POST['email'])) {\n\t\t\tmsg($lang['regbadmail'], -1);\n\t\t\treturn false;\n\t\t}\n\n\t\t// okay try to create the user\n\t\tif (!$auth->createUser($_POST['login'], auth_pwgen(), $_POST['fullname'], $_POST['email'])) {\n\t\t\tmsg($lang['reguexists'], -1);\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = $_POST['login'];\n\t\t$yubikey = $_SERVER['REMOTE_USER'];\n\n\t\t// if our yubikey id is based on a non-registered user, we need to chunk off the \"yubikey:\"\n\t\t// part of it\n\t\tif (preg_match('!^yubikey:!', $yubikey)) {\n\t\t\t$yubikey = substr($yubikey, 8);\n\t\t}\n\n\t\t// we update the YubiKey associations array\n\t\t$this->register_yubikey_association($user, $yubikey);\n\n\t\t$this->update_session($user);\n\n\t\t// account created, everything OK\n\t\t$this->_redirect(wl($ID));\n\t}", "public function store(UserCreateRequest $request): UserResource\n {\n /* Convert request to array */\n $data = $request->all();\n\n /* Hashing password */\n $data['password'] = bcrypt($request->input('password'));\n\n /* Store data to database */\n $user = User::create($data);\n\n /* Send Register email to the user */\n event(new Registered($user));\n\n activity(\"Admin\")\n ->on($user)\n ->withProperties([\n ['IP' => $request->ip()],\n ['user_data' => $request->all()],\n ])\n ->log('Store a user');\n\n return new UserResource($user->loadMissing('plans'));\n }" ]
[ "0.77523947", "0.74900365", "0.7475983", "0.7475983", "0.7475983", "0.7475983", "0.7418979", "0.7418979", "0.73626566", "0.7310667", "0.72906804", "0.7172797", "0.71538836", "0.71376646", "0.71314734", "0.711611", "0.71076417", "0.7093154", "0.7086479", "0.70860976", "0.7068182", "0.7068182", "0.70558774", "0.7055038", "0.7034446", "0.70277023", "0.7017171", "0.7015014", "0.69858396", "0.6965429", "0.69522315", "0.6942356", "0.6940608", "0.6930439", "0.69025475", "0.6874989", "0.68549657", "0.68500966", "0.6847774", "0.68467", "0.68390393", "0.6820904", "0.6815146", "0.6806632", "0.67995745", "0.6792932", "0.678439", "0.6784296", "0.6784046", "0.67786705", "0.6775247", "0.67709947", "0.6770409", "0.6769475", "0.67579705", "0.674469", "0.6741053", "0.6738604", "0.6734855", "0.6725202", "0.6717405", "0.6712474", "0.6699088", "0.66936225", "0.6693161", "0.6692129", "0.6691984", "0.66911995", "0.66908324", "0.66889334", "0.66834056", "0.66823196", "0.6680575", "0.66775405", "0.66744626", "0.66734296", "0.66717756", "0.6668072", "0.6659507", "0.6656009", "0.6652059", "0.6648556", "0.6646911", "0.6639355", "0.6633071", "0.66292834", "0.6625639", "0.6625357", "0.6624335", "0.6621834", "0.66173345", "0.6614486", "0.6608278", "0.6602006", "0.66006684", "0.6598916", "0.65960526", "0.65959054", "0.65949327", "0.6585261", "0.65682805" ]
0.0
-1
Renders a scaled version of the image referenced by the provided filename, taken any (optional) manipulators into consideration.
public function scale($sourceData, $scaleParams, $imageType) { $this->_setInputParams($scaleParams); $mem = new Garp_Util_Memory(); $mem->useHighMemory(); if (strlen($sourceData) == 0) { throw new Exception("This is an empty file!"); } if (!($source = imagecreatefromstring($sourceData))) { $finfo = new finfo(FILEINFO_MIME); $mime = $finfo->buffer($sourceData); throw new Exception("This source image could not be scaled. It's probably not a valid file type. Instead, this file is of the following type: " . $mime); } $this->_analyzeSourceImage($source, $imageType); $this->_addOmittedCanvasDimension(); if ($this->_isFilterDefined($scaleParams)) { Garp_Image_Filter::filter($source, $scaleParams['filter']); } if ($this->_isSourceEqualToTarget($scaleParams)) { $outputImage = $sourceData; } else { $canvas = $this->_createCanvasImage($imageType); $this->_projectSourceOnCanvas($source, $canvas); // Enable progressive jpegs imageinterlace($canvas, true); $outputImage = $this->_renderToImageData($canvas); imagedestroy($canvas); } $output = array( 'resource' => $outputImage, 'mime' => $this->params['mime'], 'timestamp' => time() ); imagedestroy($source); return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function do_scaled() {\n $this->layout = FALSE;\n\n $status = $this->show_scaled_image(IMAGE_RESOLUTION, 'photos');\n if (TRUE !== $status) {\n $this->message($status);\n $this->redirect('/photo/index');\n }\n }", "private function render($filename, $size)\n {\n try {\n $blob = $this->objectStorage->get($filename);\n\n Thumbnail::createFromString($blob)\n ->resize($size, $size)\n ->toOutput();\n } catch (ObjectStorageException $e) {\n $this->logger->error($e->getMessage());\n }\n }", "function thumbnail($file,$width='120'){\n $name=$this->_dir.DS.$file.'[0]';\n $im = new imagick($name);\n $im->setImageFormat('jpg');\n $im->scaleImage($width,0);\n header('Content-Type: image/jpeg');\n echo $im;\n }", "protected function scaleImages() {}", "function show_art($file,$width,$height) {\n global $directory, $year,$media_url, $collection;\n $file = preg_replace('-\\.gif$-',\".png\",$file);\n // Scale down figures\n if ($width > 860) { $w = $width; $width = 860; $height *= 860/$w; }\n print \"<div><img src='$media_url/$collection/\" . strtolower(\"$directory/$file\") . \"'\"\n . ($width > 0 ? \" width='$width'\" : \"\")\n . ($height > 0 ? \" height='$height'\" : \"\")\n . \" /></div>\\n\";\n}", "static function img($filename, $arguments=false) {\n\t\t$arguments = self::arguments($arguments);\n\n\t\t//compute size\n\t\tif (empty($arguments['width']) || empty($arguments['height'])) {\n\n\t\t}\n\n\t\t$arguments['src'] = $filename;\n\t\tunset($arguments['maxwidth'], $arguments['maxheight']);\n\t\treturn self::tag('img', $arguments);\n\t}", "public function render(FileInterface $file, $width, $height, array $options = [], $usedPathsRelativeToCurrentScript = false);", "abstract public function render(FileInterface $file, $width, $height, array $options = [], $usedPathsRelativeToCurrentScript = false);", "public function index($filename)\r\n\t{\t\r\n\r\n\t\tif (is_int($filename)) {\r\n\t\t\t$filename = ORM::factory('media',$filename)->filename;\r\n\t\t}\r\n\t\t$image = new Image('assets/uploads/'.$filename);\t\t\r\n\t\t$image = $image->resize(100,100,Image::MINIMUM);\r\n\t\t$image = $image->crop(50, 50);\r\n\t\t$image->render();\r\n\t}", "public function show_image() {\n\t $options = Request::get(\"params\");\n\t $img_id = Request::get(\"id\");\n\t $img_size = $options[0];\n \t$this->use_view=false;\n\t\t$this->use_layout=false;\n \tif(!$size = $img_size) $size=110;\n \telse{\n\t\t\tif(strrpos($size, \".\")>0) $size = substr($size, 0, strrpos($size, \".\"));\n\t\t}\n \t$img = new WildfireFile($img_id);\n $img->show($size);\n }", "function scale($inFile, $outFile, $width, $height) {\n if ($inFile == $outFile) {\n // cannot write to source file\n return FALSE;\n }\n $cmd = sprintf(\n '%s -i %s -sameq -s %dx%d %s',\n escapeshellcmd($this->encoder),\n escapeshellarg($inFile),\n escapeshellcmd($width),\n escapeshellcmd($height),\n escapeshellcmd($outFile)\n );\n $this->execCmd($cmd, $null, $info);\n }", "function image_resize($filename){\n\t\t$width = 1000;\n\t\t$height = 500;\n\t\t$save_file_location = $filename;\n\t\t// File type\n\t\t//header('Content-Type: image/jpg');\n\t\t$source_properties = getimagesize($filename);\n\t\t$image_type = $source_properties[2];\n\n\t\t// Get new dimensions\n\t\tlist($width_orig, $height_orig) = getimagesize($filename);\n\n\t\t$ratio_orig = $width_orig/$height_orig;\n\t\tif ($width/$height > $ratio_orig) {\n\t\t\t$width = $height*$ratio_orig;\n\t\t} else {\n\t\t\t$height = $width/$ratio_orig;\n\t\t}\n\t\t// Resampling the image \n\t\t$image_p = imagecreatetruecolor($width, $height);\n\t\tif( $image_type == IMAGETYPE_JPEG ) {\n\t\t\t$image = imagecreatefromjpeg($filename);\n\t\t}else if($image_type == IMAGETYPE_GIF){\n\t\t\t$image = imagecreatefromgif($filename);\n\t\t}else if($image_type == IMAGETYPE_PNG){\n\t\t\t$image = imagecreatefrompng($filename);\n\t\t}\n\t\t$finalIMG = imagecopyresampled($image_p, $image, 0, 0, 0, 0,\n\t\t$width, $height, $width_orig, $height_orig);\n\t\t// Display of output image\n\n\t\tif( $image_type == IMAGETYPE_JPEG ) {\n\t\t\timagejpeg($image_p, $save_file_location);\n\t\t}else if($image_type == IMAGETYPE_GIF){\n\t\t\timagegif($image_p, $save_file_location);\n\t\t}else if($image_type == IMAGETYPE_PNG){\n\t\t\t$imagepng = imagepng($image_p, $save_file_location);\n\t\t}\n\t}", "function image_scale($src_abspath, $dest_abspath, $aspect, $width, $strategy)\n{\n $im = new \\Imagick($src_abspath);\n $im = image_scale_im_obj($im, $aspect, $width, $strategy);\n return image_return_write($im, $dest_abspath);\n}", "public function render($file, $quality=80, $destroy=true)\n\t{\n\t\t$this->sharpenImage();\n\n\t\t$quality = max(0, min($quality, 100));\n\t\t$destroy = (bool)$destroy;\n\t\t\n\t\t// Scale quality from 0-100 to 0-9\n\t\t$scaleQuality = round(($quality/100) * 9);\n\n\t\t// Invert quality setting as 0 is best, not 9\n\t\t$invertScaleQuality = 9 - $scaleQuality;\n\n\t\t$ext = strtolower(strrchr($file, '.'));\n\t\tswitch($ext) {\n\t\t\tcase '.jpg':\n\t\t\tcase '.jpeg':\n\t\t\t\tif (imagetypes() & IMG_JPG) {\n\t\t\t\t\theader('Content-Type: image/jpeg');\n\t\t\t\t\timagejpeg($this->imageResized, null, $quality);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '.gif':\n\t\t\t\tif (imagetypes() & IMG_GIF) {\n\t\t\t\t\theader('Content-Type: image/gif');\n\t\t\t\t\timagegif ($this->imageResized, null);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '.png':\n\t\t\t\tif (imagetypes() & IMG_PNG) {\n\t\t\t\t\theader('Content-Type: image/png');\n\t\t\t\t\timagepng($this->imageResized, null, $invertScaleQuality);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Exception('image type not allowed');\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$this->saveState = true;\n\n\t\tif ($destroy) {\n\t\t\timagedestroy($this->imageResized);\n\t\t\t$this->imageResized = null;\n\t\t}\n\t}", "protected function formatImage($file)\n {\n $img = Image::make($file->path());\n $img->resize(300, 300);\n $img->save();\n }", "public function render()\n {\n header('Content-Type: image/png');\n\n imagepng($this->imageResource);\n imagedestroy($this->imageResource);\n }", "public static function scale($fname,$max_image_size=600,$flag='image',$quality=100,$max_image_side=600,$max_thumb_size=300,$max_thumb_height=120,$thumb_scale=1) // scale image/thumbnail\n\t{\n\t\tif(ini_get('memory_limit')<100)\n\t\t\tini_set('memory_limit','100M'); // fix for serevrs with low memory limit\n\n\t\tif($flag=='rescaleimage')\n\t\t{\n\t\t\t$full_fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\tif(file_exists($full_fname))\n\t\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($full_fname);\n\t\t\telse\n\t\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($fname);\n\t\t}\n\t\telse\n\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($fname);\n\n\t\t$thumb=$flag=='thumb'||$flag=='rescalethumb';\n\t\t$max_size_param=$thumb?$max_thumb_size:$max_image_size;\n\t\tif($orig_width>$max_size_param||$orig_height>$max_size_param)\n\t\t{\n\t\t\tif($flag=='image')\n\t\t\t{\n\t\t\t\t$new_fname=$fname;\n\t\t\t\t$fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\trename($new_fname,$fname);\n\t\t\t}\n\t\t\telseif($flag=='rescaleimage')\n\t\t\t{\n\t\t\t\t$final_name=$fname;\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_tempimg\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\tif(file_exists($full_fname))\n\t\t\t\t{\n\t\t\t\t\tcopy($full_fname,$fname);\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($flag=='rescalethumb')\n\t\t\t{\n\t\t\t\t$final_name=substr($fname,0,strrpos($fname,\".\")).\"_thumb\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_thumb_tempimg\".substr($fname,strrpos($fname,\".\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_thumb\".substr($fname,strrpos($fname,\".\"));\n\t\t\t}\n\n\t\t\t$ratio=$orig_width/$orig_height;\n\n\t\t\tif($thumb_scale==2)\n\t\t\t\t$scaling='crop';\n\t\t\telse\n\t\t\t\t$scaling='default';\n//scaling_mode\n\t\t\tif(!$thumb||$scaling=='default') //old scaling\n\t\t\t{\n\t\t\t\tif($orig_width>=$orig_height)\n\t\t\t\t{\n\t\t\t\t\t$new_width=$max_size_param;\n\t\t\t\t\t$new_height=intval($max_size_param/$ratio);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_width=intval($max_size_param*$ratio);\n\t\t\t\t\t$new_height=$max_size_param;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($orig_width>=$orig_height)\n\t\t\t\t{\n\t\t\t\t\t$new_height=$max_thumb_height;\n\t\t\t\t\t$new_width=intval($new_height*$ratio);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_width=$max_size_param;\n\t\t\t\t\t$new_height=intval($new_width/$ratio);\n\t\t\t\t}\n\t\t\t}\n// Resample\n\t\t\t$image_p=@imagecreatetruecolor($new_width,$new_height);\n\t\t\t$image=self::gdCreate($img_type,$fname);\n//transparency\n\t\t\tif($img_type==1||$img_type==3)\n\t\t\t{\n\t\t\t\t$trnprt_indx=imagecolortransparent($image);\n\t\t\t\tif($trnprt_indx>=0)\n\t\t\t\t{\n\t\t\t\t\t$trnprt_color=imagecolorsforindex($image,$trnprt_indx);\n\t\t\t\t\t$trnprt_indx=imagecolorallocate($image_p,$trnprt_color['red'],$trnprt_color['green'],$trnprt_color['blue']);\n\t\t\t\t\timagefill($image_p,0,0,$trnprt_indx);\n\t\t\t\t\timagecolortransparent($image_p,$trnprt_indx);\n\t\t\t\t}\n\t\t\t\telseif($img_type==3)\n\t\t\t\t{\n\t\t\t\t\timagealphablending($image_p,false);\n\t\t\t\t\t$color=imagecolorallocatealpha($image_p,0,0,0,127);\n\t\t\t\t\timagefill($image_p,0,0,$color);\n\t\t\t\t\timagesavealpha($image_p,true);\n\t\t\t\t}\n\t\t\t}\n//end transparency\n\t\t\tif($image!='')\n\t\t\t{\n\t\t\t\timagecopyresampled($image_p,$image,0,0,0,0,$new_width,$new_height,$orig_width,$orig_height);\n\n\t\t\t\tself::gdSave($image_p,$new_fname,$quality,$img_type); // Save image\n\t\t\t\timagedestroy($image_p);\n\t\t\t\timagedestroy($image);\n\t\t\t\tif($flag=='rescalethumb'||$flag=='rescaleimage')\n\t\t\t\t{\n\t\t\t\t\tunlink($final_name);\n\t\t\t\t\trename($new_fname,$final_name);\n\t\t\t\t}\n\t\t\t\treturn $new_fname;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telseif($flag=='image')\n\t\t{\n\t\t\t$full_fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\tcopy($fname,$full_fname);\n\t\t\treturn $fname;\n\t\t}\n\t\telse\n\t\t\treturn $fname;\n\t}", "public function output($filename=null)\n\t{\n\t\tif($this->auto_rotate && $this->info('orientation') )\n\t\t{\n\t\t\tswitch($this->info('orientation') )\n\t\t\t{\n\t\t\t\tcase 8:\n\t\t\t\t\t$this->effect('rotate', array(90) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$this->effect('rotate', array(180) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\t$this->effect('rotate', array(-90) );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(empty($filename))\n\t\t{\n\t\t\theader(\"Content-Type: $this->mime\");\n\t\t\n\t\t\tswitch($this->format)\n\t\t\t{\n\t\t\t\tcase 'png':\n\t\t\t\t\timagepng($this->image);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'gif':\n\t\t\t\t\timagegif($this->image);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'jpg':\n\t\t\t\t\timagejpeg($this->image);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(!file_exists(dirname($filename) ) )\n\t\t\t\tmkdir(dirname($filename), 0777, true);\n\n\t\t\tswitch($this->format)\n\t\t\t{\n\t\t\t\tcase 'png':\n\t\t\t\t\timagepng($this->image, $filename, 9);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'gif':\n\t\t\t\t\timagegif($this->image, $filename);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'jpg':\n\t\t\t\t\timagejpeg($this->image, $filename);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}//end if\n\t}", "abstract public static function process(File $file, int $imageType, int $width, int $height): string;", "public function show() {\n\t\t$this->create();\n\t\theader(\"Content-Type: image/png\");\n\t\theader(\"Content-Transfer-Encoding: binary\");\n\t\theader(\"Content-Length: \" . filesize($this->fileName));\n\t\theader(\"ETag: \" . md5($this->fileName)); // note we calculate md5 from filename, not from the file content\n\t\theader(\"Cache-Control: max-age=3600\");\n\t\theader(\"Expires: \" . gmdate('D, j M Y H:i:s', time() + 3600) . ' GMT');\n\t\tob_clean();\n\t\tflush();\n\t\treadfile($this->fileName);\n\t}", "public function display() { ImageLib::serve($this->source_image, $this->source_image_mimetype); }", "function drawImage($filename){\n $img=imagecreatetruecolor(400,300);\n drawFromUserdata($img); //draw on $img\n imagepng($img, $filename); //output the $img to the given $filename as PNG\n imagedestroy($img); //destroy the $img\n }", "function show_image($image, $width, $height) { //$image_content = read_file($image); We does not want to use this as output.\n //resize image \n $image = imagecreatefromjpeg($image);\n $thumbImage = imagecreatetruecolor(50, 50);\n imagecopyresized($thumbImage, $image, 0, 0, 0, 0, 50, 50, $width, $height);\n imagedestroy($image);\n //imagedestroy($thumbImage); do not destroy before display :)\n // ob_end_clean(); // clean the output buffer ... if turned on.\n header('Content-Type: image/jpeg');\n imagejpeg($thumbImage); //you does not want to save.. just display\n }", "private function resizeWithScaleExact($width, $height, $scale) {\n\t\t//$new_height = (int)($this->info['height'] * $scale);\n\t\t$new_width = $width * $scale;\n\t\t$new_height = $height * $scale;\n\t\t$xpos = 0;//(int)(($width - $new_width) / 2);\n\t\t$ypos = 0;//(int)(($height - $new_height) / 2);\n\n if (isset($this->info['mime']) && $this->info['mime'] == 'image/gif' && $this->isAnimated) {\n $this->imagick = new Imagick($this->file);\n $this->imagick = $this->imagick->coalesceImages();\n foreach ($this->imagick as $frame) {\n $frame->thumbnailImage($new_width, $new_height);\n $frame->setImagePage($new_width, $new_height, 0, 0);\n }\n } else {\n $image_old = $this->image;\n $this->image = imagecreatetruecolor($width, $height);\n $bcg = $this->backgroundColor;\n\n if (isset($this->info['mime']) && $this->info['mime'] == 'image/png') {\n imagealphablending($this->image, false);\n imagesavealpha($this->image, true);\n $background = imagecolorallocatealpha($this->image, $bcg[0], $bcg[1], $bcg[2], 127);\n imagecolortransparent($this->image, $background);\n } else {\n $background = imagecolorallocate($this->image, $bcg[0], $bcg[1], $bcg[2]);\n }\n\n imagefilledrectangle($this->image, 0, 0, $width, $height, $background);\n imagecopyresampled($this->image, $image_old, $xpos, $ypos, 0, 0, $new_width, $new_height, $this->info['width'], $this->info['height']);\n imagedestroy($image_old);\n }\n\n\t\t$this->info['width'] = $width;\n\t\t$this->info['height'] = $height;\n }", "protected function image_render()\r\n {\r\n // Send the correct HTTP header\r\n \\header(\"Cache-Control:no-cache,must-revalidate\");\r\n \\header(\"Pragma:no-cache\");\r\n \\header('Content-Type: image/'.static::$image_type);\r\n \\header(\"Connection:close\");\r\n\r\n // Pick the correct output function\r\n $function = '\\\\image'.static::$image_type;\r\n $function(static::$image);\r\n\r\n // Free up resources\r\n \\imagedestroy(static::$image);\r\n }", "public function render($file);", "protected function renderResource()\n {\n $processedImageInfo = $this->imageService->processImage($this->originalAsset->getResource(), $this->adjustments->toArray());\n $this->resource = $processedImageInfo['resource'];\n $this->width = $processedImageInfo['width'];\n $this->height = $processedImageInfo['height'];\n $this->persistenceManager->whiteListObject($this->resource);\n }", "function createDisplayImage($filename, $file, $folder, $maxWidth, $fileType){\n\t\t//get original image size\n\t\tlist($width, $height) = getimagesize($file);\n\t\t$ratio = $width/$height;\n\t\t$newHeight = $maxWidth/$ratio;\n\t\t$thumb = imagecreatetruecolor($maxWidth, $newHeight);\n\t\tif($fileType == 'image/jpeg'){\n\t\t\t$source = imagecreatefromjpeg($file);\n\t\t}else {\n\t\t\t$source = imagecreatefrompng($file);\n\t\t}\n\n\t\timagecopyresampled($thumb, $source, 0, 0, 0, 0, $maxWidth, $newHeight, $width, $height);\n\t\t$newfilename = $folder . $filename;\n\t\tif($fileType == 'image/jpeg'){\n\t\t\timagejpeg($thumb, $newfilename, 80);\n\t\t}else {\n\t\t\timagepng($thumb, $newfilename, 8);\n\t\t}\n\t\t\n\t\timagedestroy($thumb);\n\t\timagedestroy($source);\n\t}", "public function handle($filename, array $methodArray = array()) {\n $pix = TMUtil::getSuffix ( $this->name );\n return $pix;\n }", "public function save($file)\r\n\t{\r\n\t\tif(empty($this->img))\r\n\t\t{\r\n\t\t\t$this->render();\r\n\t\t}\r\n\t\timagepng($this->img, $file);\r\n\t}", "function processImage($dir, $filename) {\r\n // Set up the variables\r\n $dir = $dir . '/';\r\n \r\n // Set up the image path\r\n $image_path = $dir . $filename;\r\n \r\n // Set up the thumbnail image path\r\n $image_path_tn = $dir.makeThumbnailName($filename);\r\n \r\n // Create a thumbnail image that's a maximum of 200 pixels square\r\n resizeImage($image_path, $image_path_tn, 200, 200);\r\n \r\n // Resize original to a maximum of 500 pixels square\r\n resizeImage($image_path, $image_path, 500, 500);\r\n }", "function processImage($dir, $filename)\n{\n // Set up the variables\n $dir = $dir . '/';\n\n // Set up the image path\n $image_path = $dir . $filename;\n\n // Set up the thumbnail image path\n $image_path_tn = $dir . makeThumbnailName($filename);\n\n // Create a thumbnail image that's a maximum of 200 pixels square\n resizeImage($image_path, $image_path_tn, 200, 200);\n\n // Resize original to a maximum of 500 pixels square\n resizeImage($image_path, $image_path, 500, 500);\n}", "private function _scale()\n\t{\n\t\t//scale down the image by 55%\n\t\t$weaponImageSize = $this->weapon->getImageGeometry();\n\t\t$this->weaponScale['w'] = $weaponImageSize['width'] * 0.55;\n\t\t$this->weaponScale['h'] = $weaponImageSize['height'] * 0.55;\n\n\t\t$this->weapon->scaleImage($this->weaponScale['w'], $this->weaponScale['h']);\n\n\t\t//scale down the image by 30%\n\t\t$emblemImageSize = $this->emblem->getImageGeometry();\n\t\t$this->emblemScale['w'] = $emblemImageSize['width'] * 0.30;\n\t\t$this->emblemScale['h'] = $emblemImageSize['height'] * 0.30;\n\n\t\t$this->emblem->scaleImage($this->emblemScale['w'], $this->emblemScale['h']);\n\n\t\t//scale down the image by 70%\n\t\t$profileImageSize = $this->profile->getImageGeometry();\n\t\t$this->profileScale['w'] = $profileImageSize['width'] * 0.70;\n\t\t$this->profileScale['h'] = $profileImageSize['height'] * 0.70;\n\n\t\t$this->profile->scaleImage($this->profileScale['w'], $this->profileScale['h']);\n\t}", "public function Image($file, $x = '', $y = '', $w = 0, $h = 0, $type = '', $link = '', $align = '', $resize = false, $dpi = 300, $palign = '', $ismask = false, $imgmask = false, $border = 0, $fitbox = false, $hidden = false, $fitonpage = false, $alt = false, $altimgs = [])\n {\n if (!strpos($file, 'data:image/png;base64,') === false) {\n $file = '@'.base64_decode(\n chunk_split(str_replace(' ', '+', str_replace('data:image/png;base64,', '', $file)))\n );\n }\n\n parent::Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border, $fitbox, $hidden, $fitonpage, $alt, $altimgs);\n }", "function scaleby_maxwidth($filename, $width = 500, $fillpath = true, $rnd_dir) \n\t\t{\n\t\t\treturn $this->scale($filename, $width, NULL, $fillpath, \"maxwidth\", $rnd_dir);\t\t\n\t\t}", "public function handleResizing($fileName): string\n {\n $this->convert($fileName);\n return $fileName;\n }", "public function resizeImage($filepath) {\n if (is_file($filepath)) {\n \n $dir_name = $this->destinationDirectory;\n\n $drawable_dpi = array();\n $drawable_dpi['drawable-ldpi'] = 0.1875;\n $drawable_dpi['drawable-mdpi'] = 0.25;\n $drawable_dpi['drawable-hdpi'] = 0.375;\n $drawable_dpi['drawable-xhdpi'] = 0.5;\n $drawable_dpi['drawable-xxhdpi'] = 0.75;\n $drawable_dpi['drawable-xxxhdpi'] = 1.0;\n\n $mipmap_dpi = array();\n $mipmap_dpi['mipmap-ldpi'] = 0.1875;\n $mipmap_dpi['mipmap-mdpi'] = 0.25;\n $mipmap_dpi['mipmap-hdpi'] = 0.375;\n $mipmap_dpi['mipmap-xhdpi'] = 0.5;\n $mipmap_dpi['mipmap-xxhdpi'] = 0.75;\n $mipmap_dpi['mipmap-xxxhdpi'] = 1.0;\n\n $selected_dpi = array();\n if($this->folderCode == 0) {\n $selected_dpi = $drawable_dpi; \n }\n if($this->folderCode == 1) {\n $selected_dpi = $mipmap_dpi; \n }\n if($this->folderCode == 2) {\n $selected_dpi = array_merge($drawable_dpi, $mipmap_dpi); \n }\n\n\n // Content type\n $image_ext = \"png\";\n header('\"Content-Type: image/\"'.$image_ext);\n\n // Get new sizes\n $dir_path = $this->dirHelper($dir_name);\n $imageFileName = $this->extract_file_name($filepath);\n $final_dir_path = $dir_path.\"res/\"; \n if (!is_dir($final_dir_path)) {\n mkdir($final_dir_path);\n }\n foreach ($selected_dpi as $key => $value) {\n if (!is_dir($final_dir_path.$key)) {\n mkdir($final_dir_path.$key);\n }\n list($width, $height) = getimagesize($filepath);\n $newwidth = $width * $value;\n $newheight = $height * $value;\n\n // Load\n $thumb = imagecreatetruecolor($newwidth, $newheight);\n $source = imagecreatefrompng($filepath);\n\n // Resize\n imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n imagepng($thumb, $final_dir_path.$key.\"/\".$imageFileName);\n }\n echo \"<h1>$filepath has been resized into different sizes</h1>\";\n }\n elseif(!file_exists($filepath)) {\n echo \"<h1>Invalid File path</h1>\";\n }\n else {\n echo \"<h1>This is not a file</h1>\";\n }\n\n }", "public function images($file) {\n\t\t$this->image($file);\n\t}", "public function indexAction($stylename, $filename)\n {\n // Get image style information.\n if (empty($this->get('responsive_image.style_manager')->styleExists($stylename))) {\n // @TODO: Custom exception would better.\n throw $this->createNotFoundException('The style does not exist');\n }\n\n // Create image if the file exists.\n $imageObject = $this->get('responsive_image.file_to_object')->getObjectFromFilename($filename);\n if (!empty($imageObject)) {\n $generatedImageArray = $this->get('responsive_image.image_manager')->createStyledImages(\n $imageObject,\n [$stylename]\n );\n\n if (!empty($generatedImageArray[$stylename])) {\n $path = $generatedImageArray[$stylename];\n\n $cache = $this->get('responsive_image.file_system_wrapper')->getAdapter();\n $stream = $cache->readStream($path);\n\n $response = new StreamedResponse();\n $response->headers->set('Content-Type', $cache->getMimetype($path));\n $response->headers->set('Content-Length', $cache->getSize($path));\n $response->setPublic();\n $response->setMaxAge(31536000);\n $response->setExpires(date_create()->modify('+1 years'));\n\n $response->setCallback(\n function () use ($stream) {\n if (ftell($stream['stream']) !== 0) {\n rewind($stream['stream']);\n }\n fpassthru($stream['stream']);\n fclose($stream['stream']);\n }\n );\n\n return $response;\n }\n else {\n throw $this->createNotFoundException('Derived image could not be created');\n }\n }\n else {\n throw $this->createNotFoundException('The file does not exist');\n }\n }", "public function createThumbnail($filename)\n\t{\n\t\tif(preg_match('/[.](jpg)$/', $filename)) {\n\t\t\t$im = imagecreatefromjpeg($this->path_to_image_directory . $filename);\n\t\t} else if (preg_match('/[.](gif)$/', $filename)) {\n\t\t\t$im = imagecreatefromgif($this->path_to_image_directory . $filename);\n\t\t} else if (preg_match('/[.](png)$/', $filename)) {\n\t\t\t$im = imagecreatefrompng($this->path_to_image_directory . $filename);\n\t\t}\n\n\t\t$ox = imagesx($im);\n\t\t$oy = imagesy($im);\n\n\t\t$nx = $this->final_width_of_image;\n\t\t$ny = floor($oy * ($this->final_width_of_image / $ox));\n\n\t\t$nm = imagecreatetruecolor($nx, $ny);\n\n\t\timagecopyresized($nm, $im, 0,0,0,0,$nx,$ny,$ox,$oy);\n\n\t\tif(!file_exists($this->path_to_thumbs_directory)) {\n\t\t\tif(!mkdir($this->path_to_thumbs_directory)) {\n\t\t\t\tdie(\"There was a problem. Please try again!\");\n\t\t\t}\n\t\t}\n\n\t\timagejpeg($nm, $this->path_to_thumbs_directory . $filename);\n\n\t\t$tn = '<img src=\"' . $this->path_to_thumbs_directory . $filename . '\" alt=\"image\" />';\n\t\t$tn .= '<br />Congratulations. Your file has been successfully uploaded, and a thumbnail has been created.';\n\t}", "function resize_image($filename)\n {\n $img_source = 'assets/images/products/'. $filename;\n $img_target = 'assets/images/thumb/';\n\n // image lib settings\n $config = array(\n 'image_library' => 'gd2',\n 'source_image' => $img_source,\n 'new_image' => $img_target,\n 'maintain_ratio' => FALSE,\n 'width' => 128,\n 'height' => 128\n );\n // load image library\n $this->load->library('image_lib', $config);\n\n // resize image\n if(!$this->image_lib->resize())\n echo $this->image_lib->display_errors();\n $this->image_lib->clear();\n }", "public function thumbAction() // {{{\n {\n $file_id = $this->getScalarParam('file_id', 0);\n $file = $this->_driveHelper->getRepository()->getFileOrThrow($file_id);\n\n if (!$this->_driveHelper->isFileReadable($file)) {\n throw new Maniple_Controller_NotAllowedException('You are not allowed to access this file');\n }\n\n if (!in_array($file->mimetype, array('image/jpeg', 'image/gif', 'image/png'))) {\n throw new Exception('Plik nie jest obrazem');\n }\n\n $options = array(\n 'width' => 0,\n 'height' => 0,\n 'scale' => true,\n 'crop' => true,\n );\n\n if (null !== ($dims = $this->getScalarParam('dims'))) {\n $dims = explode('x', $dims);\n $width = (int) array_shift($dims);\n $height = (int) array_shift($dims);\n $options['width'] = min($width, 1024);\n $options['height'] = min($height, 1024);\n } elseif (null !== ($max = $this->getScalarParam('max'))) {\n $options['max'] = max(0, $max);\n }\n\n $image_path = $this->getResource('core.image_helper')->getImagePath(\n $file->getPath(),\n $options\n );\n\n $options = array(\n 'type' => $file->mimetype,\n 'cache' => true,\n );\n if ($this->getScalarParam('download')) {\n $options['name'] = $file->name;\n }\n\n $this->getResource('core.file_helper')->sendFile(\n $this->_request,\n $this->_response,\n $image_path,\n $options\n );\n }", "public static function renderFile();", "public function render() {\n if (!$this->layout) return false;\n \n $mime = $this->layoutInfo['mime'] ? $this->layoutInfo['mime'] : 'image/png';\n \n header('Content-Type: ' . $mime);\n switch ($mime) {\n case 'image/jpeg':\n imagejpeg($this->layout);\n break;\n case 'image/gif':\n imagegif($this->layout);\n case 'image/png':\n default:\n imagepng($this->layout);\n break;\n }\n }", "function show_image ($mime_type, $image_resized, $quality, $cache_dir, $zoom_crop) {\n $is_writable = 0;\n $cache_file_name = $cache_dir . '/' . get_cache_file($quality, $zoom_crop);\n\n if( touch( $cache_file_name ) ) {\n // give 666 permissions so that the developer\n // can overwrite web server user\n chmod( $cache_file_name, 0666 );\n $is_writable = 1;\n } else {\n $cache_file_name = NULL;\n header('Content-type: ' . $mime_type);\n }\n\n if(stristr( $mime_type, 'gif' ) ) {\n imagegif( $image_resized, $cache_file_name );\n } elseif( stristr( $mime_type, 'jpeg' ) ) {\n imagejpeg( $image_resized, $cache_file_name, $quality );\n } elseif( stristr( $mime_type, 'png' ) ) {\n imagepng( $image_resized, $cache_file_name, ceil( $quality / 10 ) );\n }\n\n if( $is_writable ) { show_cache_file( $cache_dir, $quality, $zoom_crop ); }\n\n exit;\n\n}", "public function render($name = ''){\n \n $ret_str = '';\n $extension = $this->getField('public_file')->getExtension();\n $ext = mb_strtolower($extension);\n \n switch($ext){\n \n case 'css':\n \n $ret_str = $this->renderStylesheet();\n break;\n \n case 'js':\n \n $ret_str = $this->renderJavascript();\n break;\n \n default:\n \n $ret_str = $this->renderImage();\n break;\n \n }//switch\n \n return $ret_str;\n \n }", "public function filerendererAction() {\n\t\t$filename = basename($this->_getParam('image'));\n\t\t$this->_helper->layout()->disableLayout();\n\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t$this->getResponse()\n\t\t\t\t->setHeader('Content-Type', 'image/jpeg')\n\t\t\t\t->setBody(file_get_contents(ROOT_DIR . '/files/' . $filename));\n\t}", "public function generateTemplateScaledImages($filename, $id, $overwrite = false) {\n\t\tif ($filename && $id) {\n\t\t\t$templates = $this->getTemplateNames();\n\n\t\t\tforeach ($templates as $t) {\n\t\t\t\ttry {\n\t\t\t\t\t$this->scaleAndStore($filename, $id, $t, $overwrite);\n\t\t\t\t} catch(Exception $e) {\n\t\t\t\t\tthrow new Exception(\"Error scaling \".$filename.\" (#\".$id.\"): \".$e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t} else throw new Exception('A filename and id were not provided. Filename ['.$filename.'] Id ['.$id.']');\n\t}", "public function resize($file, $size, $height, $name, $path)\n {\n\n if (!is_dir($path . '/'))\n if (!mkdir($path, 0777)) ;\n\n $array = explode('.', $name);\n $ext = strtolower(end($array));\n\n switch (strtolower($ext)) {\n\n case \"gif\":\n $out = imagecreatefromgif($file);\n break;\n\n case \"jpg\":\n $out = imagecreatefromjpeg($file);\n break;\n\n case \"jpeg\":\n $out = imagecreatefromjpeg($file);\n break;\n\n case \"png\":\n $out = imagecreatefrompng($file);\n break;\n }\n\n $src_w = imagesx($out);\n $src_h = imagesy($out);\n\n if ($src_w > $size || $src_h > $height) {\n\n if ($src_w > $size) {\n\n $dst_w = $size;\n $dst_h = floor($src_h / ($src_w / $size));\n\n\n $img_out = imagecreatetruecolor($dst_w, $dst_h);\n imagecopyresampled($img_out, $out, 0, 0, 0, 0, $dst_w, $dst_h, $src_w, $src_h);\n\n switch (strtolower($ext)) {\n case \"gif\":\n imagegif($img_out, $path . $name);\n break;\n case \"jpg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"jpeg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"png\":\n imagepng($img_out, $path . $name);\n break;\n }\n\n } else if ($src_h > $height) {\n\n $dst_h = $height;\n $dst_w = floor($src_w / ($src_h / $height));\n\n if ($dst_w > $size) {\n\n $dst_w = $size;\n $dst_h = floor($src_h / ($src_w / $size));\n\n }\n\n\n $img_out = imagecreatetruecolor($dst_w, $dst_h);\n imagecopyresampled($img_out, $out, 0, 0, 0, 0, $dst_w, $dst_h, $src_w, $src_h);\n\n switch (strtolower($ext)) {\n case \"gif\":\n imagegif($img_out, $path . $name);\n break;\n case \"jpg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"jpeg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"png\":\n imagepng($img_out, $path . $name);\n break;\n }\n\n }\n\n $array = explode('.', $name);\n $ext = strtolower(end($array));\n\n switch (strtolower($ext)) {\n\n case \"gif\":\n $out = imagecreatefromgif($path . $name);\n break;\n\n case \"jpg\":\n $out = imagecreatefromjpeg($path . $name);\n break;\n\n case \"jpeg\":\n $out = imagecreatefromjpeg($path . $name);\n break;\n\n case \"png\":\n $out = imagecreatefrompng($path . $name);\n break;\n }\n\n $src_w = imagesx($out);\n $src_h = imagesy($out);\n\n if ($src_h > $height) {\n\n $dst_h = $height;\n $dst_w = floor($src_w / ($src_h / $height));\n\n if ($dst_w > $size) {\n\n $dst_w = $size;\n $dst_h = floor($src_h / ($src_w / $size));\n\n }\n\n $img_out = imagecreatetruecolor($dst_w, $dst_h);\n imagecopyresampled($img_out, $out, 0, 0, 0, 0, $dst_w, $dst_h, $src_w, $src_h);\n\n switch (strtolower($ext)) {\n case \"gif\":\n imagegif($img_out, $path . $name);\n break;\n case \"jpg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"jpeg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"png\":\n imagepng($img_out, $path . $name);\n break;\n }\n\n }\n\n } else {\n\n copy($file, $path . $name);\n\n }\n\n\n }", "public static function getPreview($filename)\n {\n $path = '/src/Frontend/Files/userfiles/images/slideshow/thumbnails/' . $filename;\n return '<img src=\"' . $path . '\" width=\"50\" height=\"50\" />';\n }", "protected function processImage()\n {\n // Start from the last scale (bigger image).\n $tier = (count($this->_scaleInfo) - 1);\n $row = 0;\n $ul_y = 0;\n $lr_y = 0;\n\n list($root, $ext) = $this->getRootAndDotExtension($this->_imageFilename);\n\n // Create a row from the original image and process it.\n while ($row * $this->tileSize < $this->_originalHeight) {\n $ul_y = $row * $this->tileSize;\n $lr_y = ($ul_y + $this->tileSize < $this->_originalHeight)\n ? $ul_y + $this->tileSize\n : $this->_originalHeight;\n $saveFilename = $root . '-' . $tier . '-' . $row . '.' . $ext;\n $width = $this->_originalWidth;\n $height = abs($lr_y - $ul_y);\n $crop = [];\n $crop['width'] = $width;\n $crop['height'] = $height;\n $crop['x'] = 0;\n $crop['y'] = $ul_y;\n $this->imageResizeCrop($this->_imageFilename, $saveFilename, [], $crop);\n\n $this->processRowImage($tier, $row);\n ++$row;\n }\n }", "public function output() {\n //\n // Get information on the image\n //\n $this->Information();\n\n //\n // Calculate new width and height for the image\n //\n $this->CalcWidthHeight();\n\n //\n // Creating a filename for the cache\n //\n $cacheFileName = $this->CacheFileName();\n\n //\n // Is there already a valid image in the cache directory, then use it and exit\n //\n $imageModifiedTime = filemtime($this->pathToImage);\n $cacheModifiedTime = is_file($cacheFileName) ? filemtime($cacheFileName) : null;\n\n // If cached image is valid, output it.\n if(!$this->ignoreCache && is_file($cacheFileName) && $imageModifiedTime < $cacheModifiedTime) {\n if($this->verbose) { self::verbose(\"Cache file is valid, output it.\"); }\n $this->outputFile($cacheFileName);\n }\n\n if($this->verbose) { self::verbose(\"Cache is not valid, process image and create a cached version of it.\"); }\n\n // If there is no valid cached file, create one, store in cache, and output this.\n //\n // Open up the original image from file\n //\n $image = $this->PrepareImageForCache();\n\n //\n // Resize the image if needed\n //\n $image = $this->Resize($image);\n //\n // Apply filters and postprocessing of image\n //\n if($this->sharpen) {\n $image = $this->sharpen($image);\n }\n //\n // Save the image\n //\n $this->CacheSave($image, $cacheFileName);\n //\n // Output the resulting image\n //\n $this->outputFile($cacheFileName);\n }", "public function render($file, $datasource = null);", "public function action_image()\n\t{\n\t\t//Image::load(DOCROOT.'/files/04_2021/79199dcc06baf4cc230262fcbb4d1094.jpg')->preset('mypreset', DOCROOT.'/files/04_2021/ea7e8ed4bc9d6f7c03f5f374e30b183b.png');\n\t\t$image = Image::forge();\n\n\t\t// Or with optional config\n\t\t$image = Image::forge(array(\n\t\t\t\t'quality' => 80\n\t\t));\n\t\t$image->load(DOCROOT.'/files/04_2021/79199dcc06baf4cc230262fcbb4d1094.jpg')\n\t\t\t\t\t->crop_resize(200, 200)\n\t\t\t\t\t->rounded(100)\n\t\t\t\t\t->output();\n\t\t// Upload an image and pass it directly into the Image::load method.\n\t\tUpload::process(array(\n\t\t\t'path' => DOCROOT.DS.'files'\n\t\t));\n\n\t\tif (Upload::is_valid())\n\t\t{\n\t\t\t$data = Upload::get_files(0);\n\n\t\t\t// Using the file upload data, we can force the image's extension\n\t\t\t// via $force_extension\n\t\t\tImage::load($data['file'], false, $data['extension'])\n\t\t\t\t\t->crop_resize(200, 200)\n\t\t\t\t\t->save('image');\n\t\t} \n\t}", "function showImage($filename){\n if(file_exists($filename))\n echo \"<img src=\\\"$filename\\\">\";\n }", "function showImage()\n\t{\n\t\tif (!$this->ImageStream) {\n\t\t\t$this->printError('image not loaded');\n\t\t}\n\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\timagegif($this->ImageStream);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\timagejpeg($this->ImageStream);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\timagepng($this->ImageStream);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\t\t}\n\t}", "public function displayImage($params) { \n /// first make sure all params are valid\n $this->imgPath = realpath($this->imgDirPath . $params['src']);\n $this->validateParameters($params);\n $image = $this->getOriginalImg();\n if (isset($params['verbose'])) {\n $this->createVerboseLog();\n }\n if(isset($params['crop_to_fit']) || isset($params['height']) || isset($params['width'])) {\n $image = $this->resizeImage($params['height'], $params['width'], $params['crop_to_fit'], $image);\n }\n if (isset($params['sharpen'])) {\n $image = $this->sharpenImage($image);\n }\n $cacheFileName = $this->createCacheFileName($params);\n $this->checkCachePath($cacheFileName, $params['no_cache']);\n \n $this->saveImg($image, $cacheFileName, $params['quality']);\n $this->outputImage($cacheFileName, $this->verbose);\n }", "public function scale() { }", "public static function mla_handle_thumbnail_sideload( $input_file, $args ) {\r\n\t\tif ( ! class_exists( 'Imagick' ) ) {\r\n\t\t\treturn self::_mla_error_return( 'Imagick not installed', __LINE__ );\r\n\t\t}\r\n\r\n\t\tif( ini_get( 'zlib.output_compression' ) ) { \r\n\t\t\tini_set( 'zlib.output_compression', 'Off' );\r\n\t\t}\r\n\r\n\t\tif ( ! is_file( $input_file ) ) {\r\n\t\t\treturn self::_mla_error_return( 'File not found: ' . $input_file, __LINE__ );\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Process generation parameters and supply defaults\r\n\t\t */\r\n\t\t$width = isset( $args['width'] ) ? abs( intval( $args['width'] ) ) : 0;\r\n\t\t$height = isset( $args['height'] ) ? abs( intval( $args['height'] ) ) : 0;\r\n\t\t$type = isset( $args['type'] ) ? $args['type'] : 'image/jpeg';\r\n\t\t$quality = isset( $args['quality'] ) ? abs( intval( $args['quality'] ) ) : 0;\r\n\t\t$frame = isset( $args['frame'] ) ? abs( intval( $args['frame'] ) ) : 0;\r\n\t\t$resolution = isset( $args['resolution'] ) ? abs( intval( $args['resolution'] ) ) : 72;\r\n\t\t$best_fit = isset( $args['best_fit'] ) ? (boolean) $args['best_fit'] : false;\r\n\t\t$ghostscript_path = isset( $args['ghostscript_path'] ) ? $args['ghostscript_path'] : '';\r\n\r\n\t\t// Retain WordPress type for _prepare_image and adjust defaults\r\n\t\tif ( 'WordPress' === $type ) {\r\n\t\t\t$mime_type = 'image/jpeg';\r\n\t\t\t$resolution = isset( $args['resolution'] ) ? abs( intval( $args['resolution'] ) ) : 128;\r\n\t\t} else {\r\n\t\t\t$mime_type = $type;\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Convert the file to an image format and load it\r\n\t\t */\r\n\t\ttry {\r\n\t\t\tself::$image = new Imagick();\r\n\r\n\t\t\t/*\r\n\t\t\t * this must be called before reading the image, otherwise has no effect - \r\n\t\t\t * \"-density {$x_resolution}x{$y_resolution}\"\r\n\t\t\t * this is important to give good quality output, otherwise text might be unclear\r\n\t\t\t * default resolution is 72,72 or 128,128 for WordPress thumbnails\r\n\t\t\t */\r\n\t\t\tself::$image->setResolution( $resolution, $resolution );\r\n\r\n\t\t\t$result = self::_ghostscript_convert( $input_file, $frame, $resolution, $mime_type, $ghostscript_path );\r\n\r\n\t\t\tif ( false === $result ) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tself::$image->readImage( $input_file . '[' . $frame . ']' );\r\n\t\t\t\t}\r\n\t\t\t\tcatch ( Exception $e ) {\r\n\t\t\t\t\tself::$image->readImage( $input_file . '[0]' );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( 'image/jpeg' == $mime_type ) {\r\n\t\t\t\t\t$extension = 'JPG';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$extension = 'PNG';\r\n\t\t\t\t}\r\n\r\n\t\t\t\tself::$image->setImageFormat( $extension );\r\n\t\t\t}\r\n\r\n\t\t\tif ( ! self::$image->valid() ) {\r\n\t\t\t\tself::_mla_die( 'File not loaded', __LINE__, 404 );\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch ( Exception $e ) {\r\n\t\t\treturn self::_mla_error_return( 'Image load exception: ' . $e->getMessage(), __LINE__ );\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Prepare the output image; resize and flatten, if necessary.\r\n\t\t * $type retains \"WordPress\" selection\r\n\t\t */\r\n\t\ttry {\r\n\t\t\tself::_prepare_image( $width, $height, $best_fit, $type, $quality );\r\n\t\t\t}\r\n\t\tcatch ( Exception $e ) {\r\n\t\t\treturn self::_mla_error_return( '_prepare_image exception: ' . $e->getMessage(), __LINE__ );\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Write the image to an appropriately-named file\r\n\t\t */\r\n\t\ttry {\r\n\t\t\t$output_file = wp_tempnam( $input_file );\r\n\t\t\tself::$image->writeImage( $output_file );\r\n\t\t\t$dimensions = self::$image->getImageGeometry();\r\n\t\t}\r\n\t\tcatch ( Exception $e ) {\r\n\t\t\t@unlink( $output_file );\r\n\t\t\treturn self::_mla_error_return( 'Image write exception: ' . $e->getMessage(), __LINE__ );\r\n\t\t}\r\n\r\n\t\t// array based on $_FILE as seen in PHP file uploads\r\n\t\t$results = array(\r\n\t\t\t'name' => basename( $input_file ),\r\n\t\t\t'type' => $mime_type,\r\n\t\t\t'tmp_name' => $output_file,\r\n\t\t\t'error' => 0,\r\n\t\t\t'size' => filesize( $output_file ),\r\n\t\t\t'width' => $dimensions['width'],\r\n\t\t\t'height' => $dimensions['height'],\r\n\t\t);\t\t\r\n\r\n\t\treturn\t$results;\r\n\t}", "static function resize($filename , $width, $height, $disk='local' ){\n\n $pathinfo = pathinfo( $filename );\n $resized = $pathinfo['filename'] . '-' . $width . 'x' . $height . '.' . $pathinfo['extension'];\n\n if( !Storage::disk( $disk )->exists( $resized ) ){\n\n Image::make( self::path( $filename , $disk ) )->resize( $width , $height , function($constraint){\n\n $constraint->aspectRatio();\n\n })->save( self::path( $resized , $disk ) );\n\n }\n\n return $resized;\n\n }", "public function draw(){\n\t\t$this->doOutputResource();\n\t\t$defExt=\"gif\";\n\t\t$ext = ($this->outputFilename && strtolower(substr($this->outputFilename,-3))==\"$defExt\") ? substr($this->outputFilename,-4) :\".$defExt\";\n\t\t$out = $this->outputFilename.$ext;\n\t\tif(!$this->outputFilename){\n\t\t\theader(\"Content-Type: image/gif\");\n\t\t\t$out=null;\n\t\t}\n\t\t$this->outputFilename = $out;\n\t\treturn imagegif($this->outImage,$this->outputFilename);\n\t}", "public function scale($scale = 1) {\n\t\tif(stristr($scale, '%') !== false) {\n\t\t\t$scale = (float) preg_replace('/[^0-9\\.]/', '', $scale);\n\t\t\t$scale = $scale/100;\n\t\t}\n\t\t$scale = (float) $scale;\n\t\t$new_width = ceil($this->width * $scale);\n\t\t$new_height = ceil($this->height * $scale);\n\n\t\t$working_image = imagecreatetruecolor($new_width, $new_height);\n\n\t\tif(imagecopyresampled($working_image, $this->image, 0, 0, 0, 0, $new_width, $new_height, $this->width, $this->height)) {\n\t\t\t$this->image = $working_image;\n\t\t\t$this->width = $new_width;\n\t\t\t$this->height = $new_height;\n\t\t\treturn true;\n\t\t} else {\n\t\t\ttrigger_error('Resize failed.', E_USER_WARNING);\n\t\t\treturn false;\n\t\t}\n\t}", "public function ratioResize($file, $width=null, $height=null, $rename='') {\n\n $file = $this->uploadPath . $file;\n $imginfo = $this->getInfo($file);\n\n if ($rename == '')\n $newName = substr($imginfo['name'], 0, strrpos($imginfo['name'], '.')) . $this->thumbSuffix . '.' . $this->generatedType;\n else\n $newName = $rename . '.' . $this->generatedType;\n\n if ($width === null && $height === null) {\n return false;\n } elseif ($width !== null && $height === null) {\n $resizeWidth = $width;\n $resizeHeight = ($width / $imginfo['width']) * $imginfo['height'];\n } elseif ($width === null && $height !== null) {\n $resizeWidth = ($height / $imginfo['height']) * $imginfo['width'];\n $resizeHeight = $height;\n } else {\n\t\t\t\n\t\t\tif($imginfo['width'] < $width and $imginfo['height'] < $height) {\n\t\t\t\t$width = $imginfo['width'];\n\t\t\t\t$height = $imginfo['height'];\n\t\t\t}\n\t\t\t\n if ($imginfo['width'] > $imginfo['height']) {\n $resizeWidth = $width;\n $resizeHeight = ($width / $imginfo['width']) * $imginfo['height'];\n } else {\n $resizeWidth = ($height / $imginfo['height']) * $imginfo['width'];\n $resizeHeight = $height;\n }\n }\n\n //create image object based on the image file type, gif, jpeg or png\n $this->createImageObject($img, $imginfo['type'], $file);\n if (!$img)\n return false;\n\n if (function_exists('imagecreatetruecolor')) {\n $newImg = imagecreatetruecolor($resizeWidth, $resizeHeight);\n imagecopyresampled($newImg, $img, 0, 0, 0, 0, $resizeWidth, $resizeHeight, $imginfo['width'], $imginfo['height']);\n } else {\n $newImg = imagecreate($resizeWidth, $resizeHeight);\n imagecopyresampled($newImg, $img, ($width - $resizeWidth) / 2, ($height - $resizeHeight) / 2, 0, 0, $resizeWidth, $resizeHeight, $imginfo['width'], $imginfo['height']);\n }\n\n imagedestroy($img);\n\n if ($this->saveFile) {\n //delete if exist\n if (file_exists($this->processPath . $newName))\n unlink($this->processPath . $newName);\n $this->generateImage($newImg, $this->processPath . $newName);\n imagedestroy($newImg);\n return $this->processPath . $newName;\n }\n else {\n $this->generateImage($newImg);\n imagedestroy($newImg);\n }\n\n return true;\n }", "public function image($file) {\n\t\theader('Content-Type: image/png');\n\t\tdie(file_get_contents(APPPATH.'third_party/blog/images/'.$file));\n\t}", "function resizer($image_file_name,$desc_location=null,$new_width=null,$new_height=null,$min_size=null,$show_image=true)\n\t{\n\t list($width, $height) = @getimagesize($image_file_name);\n\t if (empty($width) or empty($height)) {return false;}\n\n\t if (!is_null($min_size)) {\n\t if (is_null($min_size)) {$min_size=$new_width;}\n\t if (is_null($min_size)) {$min_size=$new_height;}\n\n\t if ($width>$height) {$new_height=$min_size;$new_width=null;}\n\t else {$new_width=$min_size;$new_height=null;}\n\t }\n\n\t// $my_new_height=$new_height;\n\t if (is_null($new_height) and !is_null($new_width))\n\t { $my_new_height=round($height*$new_width/$width);$my_new_width=$new_width; }\n\t elseif (!is_null($new_height))\n\t { $my_new_width=round($width*$new_height/$height);$my_new_height=$new_height; }\n\t//echo \"$my_new_width, $my_new_height <br/>\";\n\t $image_resized = imagecreatetruecolor($my_new_width, $my_new_height);\n\t $image = imagecreatefromjpeg($image_file_name);\n\t imagecopyresampled($image_resized, $image, 0, 0, 0, 0, $my_new_width, $my_new_height, $width, $height);\n\n\t //--(BEGIN)-->save , show or send image pointer as result\n\t if (!is_null($desc_location))\n\t imagejpeg($image_resized, $desc_location,100);\n\t elseif ($show_image==true)\n\t imagejpeg($image_resized);\n\t return $image_resized;\n\t //--(END)-->save , show or send image pointer as result\n\t}", "function saveFile(UploadedFile $file, $width)\n{\n $filename = md5(mt_rand().$file->getBasename()).'.'.$file->guessClientExtension();\n\n $file->move(__DIR__.'/../../img', $filename);\n\n $imagine = new Imagine\\Gd\\Imagine();\n $image = $imagine->open(__DIR__.'/../../img/'.$filename);\n\n $box = $image->getSize();\n $box = $box->widen((int) $width);\n\n $image = $image->thumbnail($box, Imagine\\Image\\ImageInterface::THUMBNAIL_OUTBOUND);\n $image->save(__DIR__.'/../../img/mini_'.$filename);\n\n return $filename;\n}", "function image_scale_blob($blob, $aspect, $width, $strategy)\n{\n $im = new \\Imagick();\n $im->readImageBlob($blob);\n $im = image_scale_im_obj($im, $aspect, $width, $strategy);\n return image_return_blob($im);\n}", "public function imageBannerResize($file, $path, $filename, $width, $height)\n\t{\n\n\t\t$img = Image::make($file);\n\t\t$img->resize($width, $height, function ($constraint) {\n $constraint->aspectRatio();\n });\n\n $img->resizeCanvas($width, $height, 'center', false, array(255, 255, 255, 0));\n\t\t$img->save($path);\n\t\tImageOptimizer::optimize($path);\n\t}", "public function smartResizeImage($file, $width = 0, $height = 0, $proportional = false, $output = 'file') {\n //echo $file;\n if ($height <= 0 && $width <= 0) {\n return false;\n }\n $info = getimagesize($file);\n $image = '';\n $final_width = 0;\n $final_height = 0;\n list($width_old, $height_old) = $info;\n if (\n $proportional) {\n if ($width == 0)\n $factor = $height / $height_old;\n elseif ($height == 0)\n $factor = $width / $width_old;\n else\n $factor = min($width / $width_old, $height / $height_old);\n $final_width = round($width_old * $factor);\n $final_height = round($height_old * $factor);\n } else {\n $final_width = ( $width <= 0 ) ? $width_old : $width;\n $final_height = ( $height <= 0 ) ? $height_old : $height;\n }\n switch (\n $info[2]) {\n case IMAGETYPE_GIF:\n $image = imagecreatefromgif($file);\n break;\n case IMAGETYPE_JPEG:\n $image = imagecreatefromjpeg($file);\n break;\n case IMAGETYPE_PNG:\n $image = imagecreatefrompng($file);\n break;\n default:\n return false;\n }\n $image_resized = imagecreatetruecolor($final_width, $final_height);\n if (($info[2] == IMAGETYPE_GIF) || ($info[2] == IMAGETYPE_PNG)) {\n $trnprt_indx = imagecolortransparent($image);\n // If we have a specific transparent color\n if ($trnprt_indx >= 0) {\n // Get the original image's transparent color's RGB values\n $trnprt_color = imagecolorsforindex($image, $trnprt_indx);\n // Allocate the same color in the new image resource\n $trnprt_indx = imagecolorallocate($image_resized, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']);\n // Completely fill the background of the new image with allocated color.\n imagefill($image_resized, 0, 0, $trnprt_indx);\n // Set the background color for new image to transparent\n imagecolortransparent($image_resized, $trnprt_indx);\n }\n // Always make a transparent background color for PNGs that don't have one allocated already\n elseif ($info[2] == IMAGETYPE_PNG) {\n // Turn off transparency blending (temporarily)\n imagealphablending($image_resized, false);\n // Create a new transparent color for image\n $color = imagecolorallocatealpha($image_resized, 0, 0, 0, 127);\n // Completely fill the background of the new image with allocated color.\n imagefill($image_resized, 0, 0, $color);\n // Restore transparency blending\n imagesavealpha($image_resized, true);\n }\n }\n //echo $image_resized.' AND '.$image;\n imagecopyresampled($image_resized, $image, 0, 0, 0, 0, $final_width, $final_height, $width_old, $height_old);\n /* if ( $delete_original ) {\n if ( $use_linux_commands )\n exec('rm '.$file);\n else\n @unlink($file);\n } */\n switch (strtolower($output)) {\n case 'browser':\n $mime = image_type_to_mime_type($info[2]);\n header(\"Content-type: $mime\");\n $output = NULL;\n break;\n case 'file':\n $output = $file;\n break;\n case 'return':\n return $image_resized;\n break;\n default:\n break;\n }\n switch (\n $info[2]) {\n case IMAGETYPE_GIF:\n imagegif($image_resized, $output);\n break;\n case IMAGETYPE_JPEG:\n imagejpeg($image_resized, $output);\n break;\n case IMAGETYPE_PNG:\n imagepng($image_resized, $output);\n break;\n default:\n return false;\n }\n return\n true;\n }", "public function setImage($fileName)\n {\n // Test to see if an image is available to present the user\n // when switching themes\n $imageFile = $this->path . '/' . $fileName;\n if (file_exists($imageFile) && is_readable($imageFile)) {\n $img = WEB_PUBLIC_THEME . '/' . $this->directory . '/' . $fileName;\n $this->image = $img;\n }\n }", "function resize_image($src, $width, $height){\n // initializing\n $save_path = Wordless::theme_temp_path();\n $img_filename = Wordless::join_paths($save_path, md5($width . 'x' . $height . '_' . basename($src)) . '.jpg');\n\n // if file doesn't exists, create it\n if (!file_exists($img_filename)) {\n $to_scale = 0;\n $to_crop = 0;\n\n // Get orig dimensions\n list ($width_orig, $height_orig, $type_orig) = getimagesize($src);\n\n // get original image ... to improve!\n switch($type_orig){\n case IMAGETYPE_JPEG: $image = imagecreatefromjpeg($src);\n break;\n case IMAGETYPE_PNG: $image = imagecreatefrompng($src);\n break;\n case IMAGETYPE_GIF: $image = imagecreatefromgif($src);\n break;\n default:\n return;\n }\n\n // which is the new smallest?\n if ($width < $height)\n $min_dim = $width;\n else\n $min_dim = $height;\n\n // which is the orig smallest?\n if ($width_orig < $height_orig)\n $min_orig = $width_orig;\n else\n $min_orig = $height_orig;\n\n // image of the right size\n if ($height_orig == $height && $width_orig == $width) ; // nothing to do\n // if something smaller => scale\n else if ($width_orig < $width) {\n $to_scale = 1;\n $ratio = $width / $width_orig;\n }\n else if ($height_orig < $height) {\n $to_scale = 1;\n $ratio = $height / $height_orig;\n }\n // if both bigger => scale\n else if ($height_orig > $height && $width_orig > $width) {\n $to_scale = 1;\n $ratio_dest = $width / $height;\n $ratio_orig = $width_orig / $height_orig;\n if ($ratio_dest > $ratio_orig)\n $ratio = $width / $width_orig;\n else\n $ratio = $height / $height_orig;\n }\n // one equal one bigger\n else if ( ($width == $width_orig && $height_orig > $height) || ($height == $height_orig && $width_orig > $width) )\n $to_crop = 1;\n // some problem...\n else\n echo \"ALARM\";\n\n // we need to zoom to get the right size\n if ($to_scale == 1) {\n $new_width = $width_orig * $ratio;\n $new_height = $height_orig * $ratio;\n $image_scaled = imagecreatetruecolor($new_width, $new_height);\n // scaling!\n imagecopyresampled($image_scaled, $image, 0, 0, 0, 0, $new_width, $new_height, $width_orig, $height_orig);\n $image = $image_scaled;\n\n if($new_width > $width || $new_height > $height)\n $to_crop = 1;\n }\n else {\n $new_width = $width_orig;\n $new_height = $height_orig;\n }\n\n // we need to crop the image\n if ($to_crop == 1) {\n $image_cropped = imagecreatetruecolor($width, $height);\n\n // find margins for images\n $margin_x = ($new_width - $width) / 2;\n $margin_y = ($new_height - $height) / 2;\n\n // cropping!\n imagecopy($image_cropped, $image, 0, 0, $margin_x, $margin_y, $width, $height);\n $image = $image_cropped;\n }\n\n // Save image\n imagejpeg($image, $img_filename, 95);\n }\n\n // Return image URL\n return Wordless::join_paths(Wordless::theme_temp_path(), basename($img_filename));\n }", "public function display()\n {\n header(\"Content-Type: image/png; name=\\\"barcode.png\\\"\");\n imagepng($this->_image);\n }", "public function render(): string\n {\n $src = (string)$this->arguments['src'];\n if (($src === '' && $this->arguments['image'] === null) || ($src !== '' && $this->arguments['image'] !== null)) {\n throw new Exception('You must either specify a string src or a File object.', 1382284106);\n }\n\n if ((string)$this->arguments['fileExtension'] && !GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], (string)$this->arguments['fileExtension'])) {\n throw new Exception(\n 'The extension ' . $this->arguments['fileExtension'] . ' is not specified in $GLOBALS[\\'TYPO3_CONF_VARS\\'][\\'GFX\\'][\\'imagefile_ext\\']'\n . ' as a valid image file extension and can not be processed.',\n 1618989190\n );\n }\n\n try {\n $image = $this->imageService->getImage($src, $this->arguments['image'], (bool)$this->arguments['treatIdAsReference']);\n $cropString = $this->arguments['crop'];\n if ($cropString === null && $image->hasProperty('crop') && $image->getProperty('crop')) {\n $cropString = $image->getProperty('crop');\n }\n $cropVariantCollection = CropVariantCollection::create((string)$cropString);\n $cropVariant = $this->arguments['cropVariant'] ?: 'default';\n $cropArea = $cropVariantCollection->getCropArea($cropVariant);\n $processingInstructions = [\n 'width' => $this->arguments['width'],\n 'height' => $this->arguments['height'],\n 'minWidth' => $this->arguments['minWidth'],\n 'minHeight' => $this->arguments['minHeight'],\n 'maxWidth' => $this->arguments['maxWidth'],\n 'maxHeight' => $this->arguments['maxHeight'],\n 'crop' => $cropArea->isEmpty() ? null : $cropArea->makeAbsoluteBasedOnFile($image),\n ];\n if (!empty($this->arguments['fileExtension'] ?? '')) {\n $processingInstructions['fileExtension'] = $this->arguments['fileExtension'];\n }\n $processedImage = $this->imageService->applyProcessingInstructions($image, $processingInstructions);\n $imageUri = $this->imageService->getImageUri($processedImage, $this->arguments['absolute']);\n\n if (!$this->tag->hasAttribute('data-focus-area')) {\n $focusArea = $cropVariantCollection->getFocusArea($cropVariant);\n if (!$focusArea->isEmpty()) {\n $this->tag->addAttribute('data-focus-area', $focusArea->makeAbsoluteBasedOnFile($image));\n }\n }\n $this->tag->addAttribute('data-lazy', $imageUri);\n // $this->tag->addAttribute('src', $imageUri);\n $this->tag->addAttribute('width', $processedImage->getProperty('width'));\n $this->tag->addAttribute('height', $processedImage->getProperty('height'));\n\n // The alt-attribute is mandatory to have valid html-code, therefore add it even if it is empty\n if (empty($this->arguments['alt'])) {\n $this->tag->addAttribute('alt', $image->hasProperty('alternative') ? $image->getProperty('alternative') : '');\n }\n // Add title-attribute from property if not already set and the property is not an empty string\n $title = (string)($image->hasProperty('title') ? $image->getProperty('title') : '');\n if (empty($this->arguments['title']) && $title !== '') {\n $this->tag->addAttribute('title', $title);\n }\n } catch (ResourceDoesNotExistException $e) {\n // thrown if file does not exist\n throw new Exception($e->getMessage(), 1509741911, $e);\n } catch (\\UnexpectedValueException $e) {\n // thrown if a file has been replaced with a folder\n throw new Exception($e->getMessage(), 1509741912, $e);\n } catch (\\RuntimeException $e) {\n // RuntimeException thrown if a file is outside of a storage\n throw new Exception($e->getMessage(), 1509741913, $e);\n } catch (\\InvalidArgumentException $e) {\n // thrown if file storage does not exist\n throw new Exception($e->getMessage(), 1509741914, $e);\n }\n\n return $this->tag->render();\n }", "public function reprocess()\n {\n $fileLocation = $this->storage == 'filesystem' ? $this->path('original') : $this->url('original');\n\n if (!$this->originalFilename() || !file_exists($fileLocation)) {\n return;\n }\n\n foreach ($this->styles as $style) {\n $file = FileFactory::create($fileLocation);\n\n $ext = pathinfo($file->getFilename(), PATHINFO_EXTENSION);\n if (\n $style->dimensions\n && (\n $file->isImage()\n || in_array($ext, ['psd', 'ai', 'eps', 'ar3'])\n )\n ) {\n if ($ext == 'psd') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/psd.png'), 'psd.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($ext == 'ai') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/ai.png'), 'ai.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($ext == 'eps') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/eps.png'), 'eps.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($ext == 'ar3') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/ar3.png'), 'ar3.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($file->isImage()) {\n $file = $this->resizer->resize($file, $style);\n }\n }\n else {\n $file = $file->getRealPath();\n }\n\n $filePath = $this->path($style->name);\n $this->move($file, $filePath);\n }\n }", "public function resizeImage()\n {\n \treturn view('resizeImage');\n }", "public function image()\n {\n $user_id = $this->request->getIntegerParam('user_id');\n $size = $this->request->getStringParam('size', 48);\n $hash = $this->request->getStringParam('hash');\n\n if ($size > 100) {\n $this->response->status(400);\n return;\n }\n\n $filename = $this->avatarFileModel->getFilename($user_id);\n $etag = md5($filename.$size);\n\n if ($hash !== $etag) {\n $this->response->status(404);\n return;\n }\n\n $this->response->withCache(365 * 86400, $etag);\n $this->response->withContentType('image/png');\n\n if ($this->request->getHeader('If-None-Match') !== '\"'.$etag.'\"') {\n $this->response->send();\n $this->render($filename, $size);\n } else {\n $this->response->status(304);\n }\n }", "public function scale($scaleX, $scaleY) {}", "public function scale($scaleX, $scaleY) {}", "public function scale($scaleX, $scaleY) {}", "function scale($scale) {\r\n\t\t$width = $this->getWidth() * $scale/100;\r\n\t\t$height = $this->getheight() * $scale/100;\r\n\t\t$this->resize($width,$height);\r\n\t}", "public static function image($originalFileName, $options = array())\n\t{\n\t\tif( is_null(self::$_physicalFolder) )\n\t\t{\n\t\t\tthrow new Exception('ThumbCacher: Physical folder cannot be null.');\n\t\t}\n\n\t\tif( is_null(self::$_virtualFolder) )\n\t\t{\n\t\t\tthrow new Exception('ThumbCacher: Virtual folder cannot be null.');\n\t\t}\n\n\t\tif( is_numeric(strpos($originalFileName, '/')) )\n\t\t{\n\t\t\treturn $originalFileName;\n\t\t}\n\n\t\t$originalURL = self::$_virtualFolder . '/originals/' . $originalFileName;\n\t\t$cached = false;\n\t\t$originalPath = self::$_physicalFolder . DIRECTORY_SEPARATOR . 'originals' . DIRECTORY_SEPARATOR . $originalFileName;\n\t\t$resizedFolder = self::$_physicalFolder . DIRECTORY_SEPARATOR . 'resized' . DIRECTORY_SEPARATOR;\n\n\t\tif( !is_file($originalPath) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if desired width and height were passed\n\t\tif( empty($options['width']) && empty($options['height']) )\n\t\t{\n\t\t\treturn $originalURL;\n\t\t}\n\n\t\tlist($originalWidth, $originalHeight, $type) = getimagesize($originalPath);\n\n\t\tif( !isset(self::$_allowedExtensions[$type]) )\n\t\t{\n\t\t\treturn $originalURL;\n\t\t}\n\n\t\t// Calculate the proportinal width if it was defined\n\t\tif( empty($options['width']) )\n\t\t{\n\t\t\t$options['width'] = floor(($originalWidth * $options['height']) / $originalHeight);\n\t\t}\n\n\t\t// Calculate the proportinal height if it was defined\n\t\tif( empty($options['height']) )\n\t\t{\n\t\t\t$options['height'] = floor(($options['width'] * $originalHeight) / $originalWidth);\n\t\t}\n\n\t\t$resizedWidth = $options['width'];\n\t\t$resizedHeight = $options['height'];\n\n\t\t// Calculate the ratios\n\t\t$originalRatio = $originalWidth / $originalHeight;\n\t\t$resizedRatio = $resizedWidth / $resizedHeight;\n\n\t\t// Check the highest dimension and resize the other\n\t\tif($originalRatio > $resizedRatio)\n\t\t{\n\t\t\t$finalWidth = $originalHeight * $resizedRatio;\n\t\t\t$finalHeight = $originalHeight;\n\t\t\t$finalX = ($originalWidth - $finalWidth) / 2;\n\t\t\t$finalY = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$finalWidth = $originalWidth;\n\t\t\t$finalHeight = $originalWidth / $resizedRatio;\n\t\t\t$finalX = 0;\n\t\t\t$finalY = ($originalHeight - $finalHeight) / 2;\n\t\t}\n\n\t\t$cacheFileName = $resizedWidth . 'x' . $resizedHeight . '_' . $originalFileName;\n\t\t$cachePath = '';\n\t\t$cacheURL = '';\n\t\tif( self::$_useResizedFolder )\n\t\t{\n\t\t\t// If the resized folder does not exists, it will be created\n\t\t\tif( file_exists($resizedFolder) == false )\n\t\t\t{\n\t\t\t\tmkdir($resizedFolder, 0777);\n\t\t\t}\n\n\t\t\t$cachePath = $resizedFolder . $cacheFileName;\n\t\t\t$cacheURL = str_replace('originals', 'resized', $originalURL);\n\t\t\t$cacheURL = str_replace($originalFileName, $cacheFileName, $cacheURL);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cachePath = str_replace($originalFileName, $cacheFileName, $originalPath);\n\t\t\t$cacheURL = str_replace($originalFileName, $cacheFileName, $originalURL);\n\t\t}\n\n\t\tif( file_exists($cachePath) )\n\t\t{\n\t\t\tif( filemtime($cachePath) >= filemtime($originalPath) )\n\t\t\t{\n\t\t\t\t$cached = true;\n\t\t\t}\n\t\t}\n\n\t\t// If it is not in cache\n\t\tif( $cached === false )\n\t\t{\n\t\t\t// Creates an image object from the original\n\t\t\t$image = call_user_func('imagecreatefrom' . self::$_allowedExtensions[$type], $originalPath);\n\n\t\t\t// Creates a new image object and copy from the original\n\t\t\tif( function_exists('imagecreatetruecolor') )\n\t\t\t{\n\t\t\t\t$temp = imagecreatetruecolor($resizedWidth, $resizedHeight);\n\n\t\t\t\tif( $type == IMAGETYPE_GIF || $type == IMAGETYPE_PNG )\n\t\t\t\t{\n\t\t\t\t\timagecolortransparent($temp, imagecolorallocatealpha($temp, 0, 0, 0, 127));\n\t\t\t\t\timagealphablending($temp, false);\n\t\t\t\t\timagesavealpha($temp, true);\n\t\t\t\t}\n\n\t\t\t\timagecopyresampled($temp, $image, 0, 0, $finalX, $finalY, $resizedWidth, $resizedHeight, $finalWidth, $finalHeight);\n\t\t\t}\n\n\t\t\t// Creates a new image object and copy from the original\n\t\t\telse\n\t\t\t{\n\t\t\t\t$temp = imagecreate($resizedWidth, $resizedHeight);\n\t\t\t\timagecopyresized($temp, $image, 0, 0, $finalX, $finalY, $resizedWidth, $resizedHeight, $finalWidth, $finalHeight);\n\t\t\t}\n\n\t\t\tswitch( $type )\n\t\t\t{\n\t\t\t\tcase IMAGETYPE_JPEG:\n\t\t\t\t\timagejpeg($temp, $cachePath, self::$_JPEGQuality);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase IMAGETYPE_PNG:\n\t\t\t\t\timagepng($temp, $cachePath, self::$_PNGQuality);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tcall_user_func('image' . self::$_allowedExtensions[$type], $temp, $cachePath);\n\t\t\t}\n\n\t\t\timagedestroy($image);\n\t\t\timagedestroy($temp);\n\t\t}\n\n\t\treturn $cacheURL;\n\t}", "function showFile($file){ \n\t$pathToRes = \"images/\";\t\t\t\t\t// directory to parse for image-resources     \n\t$splitedFile = split('[.]',$file);\t\t// divides the file into extension and filename \n\n\tif ($dh = opendir($pathToRes)) {\t\t// opens directory with image-resources \n\t\twhile (false !== ($files = readdir($dh))){ \n\t\t\tif ($files != \"..\" && $files != \".\") { \n\t\t\t\t$parts = split('[.]',$files); \n\t\t\t\t// the next step will compare all filenames from the images-resources with the extension of the passed file \n\t\t\t\tif ($parts[0] == $splitedFile[1]){\n\t\t\t\t\techo '<img src='.$pathToRes.\"/\".$files.' > '.$splitedFile[0].'<br>'; \n\t\t\t\t} \n\t\t\t} \n\t\t} \n\t    closedir($dh); \n\t} \n}", "function spc_resizeImage( $file, $thumbpath, $max_side , $fixfor = NULL ) {\n\n\tif ( file_exists( $file ) ) {\n\t\t$type = getimagesize( $file );\n\n\t\tif (!function_exists( 'imagegif' ) && $type[2] == 1 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t}\n\t\telseif (!function_exists( 'imagejpeg' ) && $type[2] == 2 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t}\n\t\telseif (!function_exists( 'imagepng' ) && $type[2] == 3 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t} else {\n\n\t\t\t// create the initial copy from the original file\n\t\t\tif ( $type[2] == 1 ) {\n\t\t\t\t$image = imagecreatefromgif( $file );\n\t\t\t}\n\t\t\telseif ( $type[2] == 2 ) {\n\t\t\t\t$image = imagecreatefromjpeg( $file );\n\t\t\t}\n\t\t\telseif ( $type[2] == 3 ) {\n\t\t\t\t$image = imagecreatefrompng( $file );\n\t\t\t}\n\n\t\t\tif ( function_exists( 'imageantialias' ))\n\t\t\t\timageantialias( $image, TRUE );\n\n\t\t\t$image_attr = getimagesize( $file );\n\n\t\t\t// figure out the longest side\n if($fixfor){\n \t if($fixfor == 'width'){\n \t \t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_width = $max_side;\n\n\t\t\t\t$image_ratio = $image_width / $image_new_width;\n\t\t\t\t$image_new_height = $image_height / $image_ratio;\n \t }elseif($fixfor == 'height'){\n \t $image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_height = $max_side;\n\n\t\t\t\t$image_ratio = $image_height / $image_new_height;\n\t\t\t\t$image_new_width = $image_width / $image_ratio;\t\n \t }\n }else{\n\t\t\tif ( $image_attr[0] > $image_attr[1] ) {\n\t\t\t\t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_width = $max_side;\n\n\t\t\t\t$image_ratio = $image_width / $image_new_width;\n\t\t\t\t$image_new_height = $image_height / $image_ratio;\n\t\t\t\t//width is > height\n\t\t\t} else {\n\t\t\t\t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_height = $max_side;\n\n\t\t\t\t$image_ratio = $image_height / $image_new_height;\n\t\t\t\t$image_new_width = $image_width / $image_ratio;\n\t\t\t\t//height > width\n\t\t\t}\n }\t\n\n\t\t\t$thumbnail = imagecreatetruecolor( $image_new_width, $image_new_height);\n\t\t\t@ imagecopyresampled( $thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $image_attr[0], $image_attr[1] );\n\n\t\t\t// move the thumbnail to its final destination\n\t\t\tif ( $type[2] == 1 ) {\n\t\t\t\tif (!imagegif( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( $type[2] == 2 ) {\n\t\t\t\tif (!imagejpeg( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( $type[2] == 3 ) {\n\t\t\t\tif (!imagepng( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$error = 0;\n\t}\n\n\tif (!empty ( $error ) ) {\n\t\treturn $error;\n\t} else {\n\t\treturn $thumbpath;\n\t}\n}", "public function autoScale($img, $size) {\n\t// NOT YET IMPLEMENTED.\n}", "public function imageResize($file, $path, $filename, $width, $height)\n\t{\n\n\t\t$img = Image::make($file);\n\t\t$img->resize($width, $height, function ($constraint) {\n $constraint->aspectRatio();\n });\n\n\t\t// if ($request->has('optimize')) {\n\t\t\t// ImageOptimizer::optimize($path);\n\t\t// }\n $img->resizeCanvas($width, $height, 'center', false, array(255, 255, 255, 0));\n\t\t$img->save($path);\n\t\t//dd($path);\n\t\tImageOptimizer::optimize($path);\n\t}", "function ShowImage($spr = NULL, $lang_id = NULL, $img = NULL, $size = NULL, $quality = 85, $wtm = NULL, $parameters = NULL, $return_src=null)\n {\n\n $size_auto = NULL;\n $size_width = NULL;\n $size_height = NULL;\n $alt = NULL;\n $title = NULL;\n $str = NULL;\n\n $img_with_path = $this->GetImgPath($img, $spr, $lang_id);\n// echo '<br/>$img_with_path='.$img_with_path;\n $imgSmall = ImageK::getResizedImg($img_with_path, $size, $quality, null);\n //echo '<br/>$imgSmall='.$imgSmall;\n if($return_src){\n return $imgSmall;\n }else{\n return '<img src=\"'.$imgSmall.'\" '.$parameters.' />';\n }\n }", "protected function make_image($filename, $callback, $arguments)\n {\n }", "protected function make_image($filename, $callback, $arguments)\n {\n }", "function createImage($idName) { //TODO: Add parameter for passing image files to use instead \n echo '<img src=\"/php/cms-img/file2.png\" id=\"' . $idName . '\" class=\"nested\"/>';\n }", "function Image($file,$x,$y,$w=0,$h=0,$type='',$link='',$paint=true)\n\t\t{\n\t\t\tif(!isset($this->images[$file]))\n\t\t\t{\n\t\t\t\t//First use of image, get info\n\t\t\t\tif($type=='')\n\t\t\t\t{\n\t\t\t\t\t$pos=strrpos($file,'.');\n\t\t\t\t\tif(!$pos)\t$this->Error('Image file has no extension and no type was specified: '.$file);\n\t\t\t\t\t$type=substr($file,$pos+1);\n\t\t\t\t}\n\t\t\t\t$type=strtolower($type);\n\t\t\t\t$mqr=get_magic_quotes_runtime();\n\t\t\t\tset_magic_quotes_runtime(0);\n\t\t\t\tif($type=='jpg' or $type=='jpeg')\t$info=$this->_parsejpg($file);\n\t\t\t\telseif($type=='png') $info=$this->_parsepng($file);\n\t\t\t\telseif($type=='gif') $info=$this->_parsegif($file); //EDITEI - GIF format included\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//Allow for additional formats\n\t\t\t\t\t$mtd='_parse'.$type;\n\t\t\t\t\tif(!method_exists($this,$mtd)) $this->Error('Unsupported image type: '.$type);\n\t\t\t\t\t$info=$this->$mtd($file);\n\t\t\t\t}\n\t\t\t\tset_magic_quotes_runtime($mqr);\n\t\t\t\t$info['i']=count($this->images)+1;\n\t\t\t\t$this->images[$file]=$info;\n\t\t\t}\n\t\t\telse $info=$this->images[$file];\n\t\t\t//Automatic width and height calculation if needed\n\t\t\tif($w==0 and $h==0)\n\t\t\t{\n\t\t\t\t//Put image at 72 dpi\n\t\t\t\t$w=$info['w']/$this->k;\n\t\t\t\t$h=$info['h']/$this->k;\n\t\t\t}\n\t\t\tif($w==0)\t$w=$h*$info['w']/$info['h'];\n\t\t\tif($h==0)\t$h=$w*$info['h']/$info['w'];\n\n\t\t\t$changedpage = false; //EDITEI\n\n\t\t\t//Avoid drawing out of the paper(exceeding width limits). //EDITEI\n\t\t\tif ( ($x + $w) > $this->fw )\n\t\t\t{\n\t\t\t\t$x = $this->lMargin;\n\t\t\t\t$y += 5;\n\t\t\t}\n\t\t\t//Avoid drawing out of the page. //EDITEI\n\t\t\tif ( ($y + $h) > $this->fh ) \n\t\t\t{\n\t\t\t\t$this->AddPage();\n\t\t\t\t$y = $tMargin + 10; // +10 to avoid drawing too close to border of page\n\t\t\t\t$changedpage = true;\n\t\t\t}\n\n\t\t\t$outstring = sprintf('q %.2f 0 0 %.2f %.2f %.2f cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']);\n\n\t\t\tif($paint) //EDITEI\n\t\t\t{\n\t\t\t$this->_out($outstring);\n\t\t\t if($link) $this->Link($x,$y,$w,$h,$link);\n\t\t\t}\n\n\t\t\t//Avoid writing text on top of the image. //EDITEI\n\t\t\tif ($changedpage) $this->y = $y + $h;\n\t\t\telse $this->y = $y + $h;\n\n\t\t\t//Return width-height array //EDITEI\n\t\t\t$sizesarray['WIDTH'] = $w;\n\t\t\t$sizesarray['HEIGHT'] = $h;\n\t\t\t$sizesarray['X'] = $x; //Position before painting image\n\t\t\t$sizesarray['Y'] = $y; //Position before painting image\n\t\t\t$sizesarray['OUTPUT'] = $outstring;\n\t\t\treturn $sizesarray;\n\t\t}", "function local_image(\n\tstring $filename,\n\tstring|int|null $width = '',\n\tstring|int|null $height = '',\n\t?string $alt = '',\n\t?string $classes = '',\n\t?string $loading = ''\n): string {\n\t$img_tag = '<img src=\"' . esc_attr(Assets\\asset_path('images/' . $filename)) . '\"';\n\tif (!empty($width)) {\n\t\t$img_tag .= ' width=\"' . esc_attr($width) . '\"';\n\t}\n\tif (!empty($height)) {\n\t\t$img_tag .= ' height=\"' . esc_attr($height) . '\"';\n\t}\n\tif (!empty($alt)) {\n\t\t$img_tag .= ' alt=\"' . esc_attr($alt) . '\"';\n\t}\n\tif (!empty($classes)) {\n\t\t$img_tag .= ' class=\"' . esc_attr($classes) . '\"';\n\t}\n\tif (empty($loading)) {\n\t\t$img_tag .= ' loading=\"lazy\"';\n\t} else {\n\t\t$img_tag .= ' loading=\"' . esc_attr($loading) . '\"';\n\t}\n\t$img_tag .= '>';\n\treturn $img_tag;\n}", "public function render()\n {\n $this->image->blurImage($this->radius, $this->sigma, $this->channel);\n }", "public function resizeEmbed($dir) {\n switch ($this->filetype) {\n case 'svg':\n $svgImage = $dir . 'image.png';\n if ($this->isTransparent($svgImage)) {\n $ext = 'png';\n } else {\n $ext = 'jpg';\n }\n break;\n case 'png':\n if ($this->isApng()) {\n $ext = 'gif';\n } else if ($this->isTransparent()) {\n $ext = 'png';\n } else {\n $ext = 'jpg';\n }\n break;\n case 'mp4':\n case 'webm':\n $ext = 'gif';\n break;\n default:\n $ext = $this->filetype;\n break;\n }\n $imageName = $dir . \"original.\" . $this->filetype;\n if ($this->filetype == 'svg') {\n $imageName = $svgImage;\n }\n $thumbnail = $dir . \"thumbnail.\" . $ext;\n if ($this->isVideo) {\n exec('ffmpeg -i ' . $this->image . ' -filter_complex \"[0:v] fps=30,scale=64:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse\" ' . $thumbnail . ' 2>&1', $output);\n FishyUtils::getInstance()->logExecError($output);\n $imageName = $thumbnail;\n }\n switch ($this->filetype) {\n case \"png\":\n exec(\"magick convert -background none $imageName -resize 64x64^ \\ -gravity center -extent 64x64 $thumbnail 2>&1\", $output);\n FishyUtils::getInstance()->logExecError($output);\n break;\n case \"jpg\":\n exec(\"magick convert $imageName -resize 64x64^ \\ -gravity center -extent 64x64 $thumbnail 2>&1\", $output);\n FishyUtils::getInstance()->logExecError($output);\n break;\n case 'mp4':\n case 'webm':\n case \"gif\":\n exec(\"magick convert $imageName -layers Coalesce -resize 64x64 -layers Optimize $thumbnail 2>&1\", $output);\n FishyUtils::getInstance()->logExecError($output);\n break;\n }\n }", "function load($filename)\n {\n $image_info = getimagesize($filename);\n $this->image_type = $image_info[2];\n //crea la imagen JPEG.\n if( $this->image_type == IMAGETYPE_JPEG ) \n {\n $this->image = imagecreatefromjpeg($filename);\n } \n //crea la imagen GIF.\n elseif( $this->image_type == IMAGETYPE_GIF ) \n {\n $this->image = imagecreatefromgif($filename);\n } \n //Crea la imagen PNG\n elseif( $this->image_type == IMAGETYPE_PNG ) \n {\n $this->image = imagecreatefrompng($filename);\n }\n }", "function outputImage( $code, $filename ) {\n\n if ( empty( $this->filePath ) ) {\n #Header( \"Content-type: text/plain\"); \n Header( \"Content-type: image/\".$this->imgMime); \n } else {\n if ( empty($filename) ) $filename = \"$code.\".$this->imgType;\n $filename = $this->filePath.$filename;\n }\n\n $func = \"image\".$this->imgType;\n \n if ( $this->imgQuality < 100 ) \n\n // Output JPEG with lower quality to browser or file\n\t \n $func($this->img, $filename,$this->imgQuality); \n\n else {\n if ( $filename ) \n\n // Output image to file\n\t\t\n $func($this->img, $filename); \n else\n\n // Output image to browser\n\n $func($this->img); \n }\n\n ImageDestroy($this->img);\n return $filename;\n}", "public function transcodeFile($file) : void{\n\t\t\n\t\t$file = $this -> fixOrientation($file);\n\t\t\n\t\tif($file) {\n\t\t\t\n\t\t\t$storageProdiver = $this -> _storageService;\n\t\t\t$storage_service = new $storageProdiver;\n\t\t\t$mime_type = \\FileManager::getFileMimeType($file);\n\t\t\t$extension = $this -> getExtension($mime_type);\n\t\t\t$save_location = '';\n\t\t\t\n\t\t\tif($this -> _localStorage) {\n\t\t\t\t$save_location = SITE_PATH.'/public_html/img/uploads/'.$this -> image_id.$extension;\n\t\t\t} else {\n\t\t\t\t$save_location = $this -> image_id.$extension;\n\t\t\t}\n\t\t\t\n\t\t\t$uploaded_file = $storage_service ->upload( $save_location , file_get_contents($file) , $mime_type);\n\t\t\t\n\t\t\tif($uploaded_file) {\n\t\t\t\t\n\t\t\t\t$this -> update(array(\n\t\t\t\t\t'image_original_url' => $uploaded_file\n\t\t\t\t));\t\n\t\t\t\t\n\t\t\t\t$this -> scaleImage(800, 600, $file, 'image_large_url', 'image_large_square_url');\n\t\t\t\t$this -> scaleImage(500, 334, $file, 'image_medium_url', 'image_medium_square_url');\n\t\t\t\t$this -> scaleImage(240, 160, $file, 'image_small_url', 'image_small_square_url');\n\t\t\t\t$this -> scaleImage(100, 100, $file, 'image_thumbnail_url', 'image_thumbnail_square_url');\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(file_exists($file)) {\n\t\t\t\t\tunlink($file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function resize($img_filename, $size)\n {\n $height = $this->config->get($size . '/height');\n $width = $this->config->get($size . '/width');\n $crop = $this->config->get($size . '/crop');\n $filters = $this->config->get($size . '/filters');\n $src_image_name = $this->config->get('archive') . $img_filename;\n $dst_image_name = $this->config->get('imageCache') . $size . $img_filename;\n if ($this->isResizeNeeded($src_image_name, $dst_image_name)) {\n if (is_int($height) && is_int($width) && $crop) {\n $this->resizer->crop($src_image_name, $dst_image_name, $width, $height, $filters);\n } elseif ($height !== null && $width !== null) {\n $this->resizer->scale($src_image_name, $dst_image_name, $width, $height, $filters);\n } else {\n die('Error resizing image');\n }\n }\n return $dst_image_name;\n }", "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\n\t\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t\t$imageType = image_type_to_mime_type($imageType);\n\t\t\n\t\t$newImageWidth = ceil($width * $scale);\n\t\t$newImageHeight = ceil($height * $scale);\n\t\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\t\tswitch($imageType) {\n\t\t\tcase \"image/gif\":\n\t\t\t\t$source=imagecreatefromgif($image); \n\t\t\t\tbreak;\n\t\t\tcase \"image/pjpeg\":\n\t\t\tcase \"image/jpeg\":\n\t\t\tcase \"image/jpg\":\n\t\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\t\tbreak;\n\t\t\tcase \"image/png\":\n\t\t\tcase \"image/x-png\":\n\t\t\t\t$source=imagecreatefrompng($image); \n\t\t\t\tbreak;\n\t\t}\n\t\timagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n\t\tswitch($imageType) {\n\t\t\tcase \"image/gif\":\n\t\t\t\timagegif($newImage,$thumb_image_name); \n\t\t\t\tbreak;\n\t\t\tcase \"image/pjpeg\":\n\t\t\tcase \"image/jpeg\":\n\t\t\tcase \"image/jpg\":\n\t\t\t\timagejpeg($newImage,$thumb_image_name,90); \n\t\t\t\tbreak;\n\t\t\tcase \"image/png\":\n\t\t\tcase \"image/x-png\":\n\t\t\t\timagepng($newImage,$thumb_image_name); \n\t\t\t\tbreak;\n\t\t}\n\t\tchmod($thumb_image_name, 0777);\n\t\treturn $thumb_image_name;\n\t}", "public function getResize()\n {\n $ratio = 1.0;\n $image = Input::get('img');\n $dir = Input::get('dir');\n\n $original_width = Image::make(base_path() . \"/\" . Config::get('lfm.images_dir') . $dir . \"/\" . $image)->width();\n $original_height = Image::make(base_path() . \"/\" . Config::get('lfm.images_dir') . $dir . \"/\" . $image)->height();\n\n $scaled = false;\n\n if ($original_width > 600)\n {\n $ratio = 600 / $original_width;\n $width = $original_width * $ratio;\n $height = $original_height * $ratio;\n $scaled = true;\n } else\n {\n $height = $original_height;\n $width = $original_width;\n }\n\n if ($height > 400)\n {\n $ratio = 400 / $original_height;\n $width = $original_width * $ratio;\n $height = $original_height * $ratio;\n $scaled = true;\n }\n\n return View::make('laravel-filemanager::resize')\n ->with('img', Config::get('lfm.images_url') . $dir . \"/\" . $image)\n ->with('dir', $dir)\n ->with('image', $image)\n ->with('height', number_format($height, 0))\n ->with('width', $width)\n ->with('original_height', $original_height)\n ->with('original_width', $original_width)\n ->with('scaled', $scaled)\n ->with('ratio', $ratio);\n }", "public function scaleImage($scale)\n {\n if ($scale == 1) {\n return;\n }\n\n $scaledSize = $this->getScaledImageSize($scale);\n\n $image = $this->createNewTransparentImage($scaledSize->width, $scaledSize->height);\n\n imagecopyresampled(\n $image,\n $this->image,\n 0,\n 0,\n 0,\n 0,\n $scaledSize->width,\n $scaledSize->height,\n $this->width,\n $this->height\n );\n\n imagedestroy($this->image);\n $this->image = $image;\n $this->width = $scaledSize->width;\n $this->height = $scaledSize->height;\n }", "function createMovieThumb($file, $size, $filename) {\r\n global $mosConfig_absolute_path, $zoom;\r\n if ($this->_FFMPEG_path == 'auto') {\r\n $this->_FFMPEG_path = '';\r\n } else {\r\n if (!empty($this->_FFMPEG_path) && !$zoom->_CONFIG['override_FFMPEG']) {\r\n if (!$zoom->platform->is_dir($this->_FFMPEG_path)) {\r\n echo (\"<div align=\\\"center\\\"><font color=\\\"red\\\">Error: your FFmpeg path is not correct! Please (re)specify it in the Admin-system under 'Settings'</font></div>\");\r\n return false;\r\n }\r\n }\r\n }\r\n $desfile = ereg_replace(\"(.*)\\.([^\\.]*)$\", \"\\\\1\", $filename).\".jpg\";\r\n if ($tempdir = $zoom->createTempDir()) {\r\n $gen_path = $mosConfig_absolute_path.\"/\".$tempdir;\r\n $cmd = $this->_FFMPEG_path.\"ffmpeg -an -y -t 0:0:0.001 -i \\\"$file\\\" -f mjpeg \\\"$gen_path/file.jpg\\\"\";\r\n $output = $retval = null;\r\n exec($cmd, $output, $retval);\r\n if (!$retval) {\r\n if ($zoom->platform->file_exists($gen_path.\"/file.jpg\")) {\r\n $the_thumb = $gen_path.\"/file.jpg\";\r\n $imgobj = new image(0);\r\n $imgobj->_filename = $desfile;\r\n $imgobj->_type = \"jpg\";\r\n $imgobj->_size = $zoom->platform->getimagesize($the_thumb);\r\n $target = $mosConfig_absolute_path.\"/\".$zoom->_CONFIG['imagepath'].$zoom->_gallery->getDir().\"/thumbs/\".$desfile;\r\n if (!$this->resizeImage($the_thumb, $target, $size, $imgobj)) {\r\n return false;\r\n } else {\r\n @$zoom->deldir($gen_path);\r\n return true;\r\n }\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n }" ]
[ "0.6533965", "0.62015045", "0.61817837", "0.6179196", "0.61561316", "0.5982344", "0.59598905", "0.5890852", "0.5886384", "0.5799704", "0.5780956", "0.57601225", "0.5741086", "0.5736257", "0.57012224", "0.5647823", "0.5633356", "0.56275177", "0.5594549", "0.55292886", "0.54935116", "0.54565203", "0.5357022", "0.53487754", "0.5329657", "0.53211117", "0.5316243", "0.5312206", "0.52951074", "0.5277129", "0.52729374", "0.5265152", "0.5262526", "0.52591044", "0.52489567", "0.52476764", "0.51952314", "0.51913357", "0.51816624", "0.5176628", "0.516717", "0.5146677", "0.51398987", "0.51381266", "0.5127711", "0.511992", "0.5116097", "0.5109142", "0.5102857", "0.5102653", "0.50970954", "0.509664", "0.5087511", "0.50547326", "0.5042936", "0.5042681", "0.5040858", "0.5027115", "0.502042", "0.5017138", "0.50108206", "0.50104713", "0.5009395", "0.5009336", "0.5007789", "0.5003283", "0.50010866", "0.49955967", "0.4990873", "0.4984399", "0.49835223", "0.49822876", "0.49772003", "0.49771792", "0.49755338", "0.4967056", "0.496398", "0.4963918", "0.4963918", "0.49571076", "0.49467745", "0.4942842", "0.49417242", "0.49304214", "0.49273437", "0.49249327", "0.49156976", "0.49131966", "0.49109265", "0.489881", "0.48940402", "0.4893767", "0.4892605", "0.4891619", "0.4889676", "0.48868358", "0.48854408", "0.487989", "0.48670036", "0.48653564", "0.48616216" ]
0.0
-1
Fetches the scaling parameters for this template.
public function getTemplateParameters($template) { if (count(self::$_config->template->{$template})) { $tplConfig = self::$_config->template->{$template}->toArray(); return $tplConfig; } else throw new Exception('The template "'.$template.'" is not configured.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getScaling() {}", "public function getScaling()\n {\n return $this->scaling;\n }", "public function getScaling()\n {\n return $this->scaling;\n }", "function load_scale() {\n if (!empty($this->scaleid)) {\n $this->scale = grade_scale::fetch('id', $this->scaleid);\n $this->scale->load_items();\n }\n return $this->scale;\n }", "public function getScales() {\n return $this->scales;\n }", "public function getPrintScaling() {}", "public function getScale()\n {\n return $this->scale;\n }", "public function getScale()\n {\n return $this->scale;\n }", "public function getScale()\n\t{\n\t\treturn $this->scale;\n\t}", "public function setScaling($scaleing) {}", "public function setScaling($scaling = 100) {}", "public function getScaleControl()\n {\n return $this->scaleControl;\n }", "public function getScale()\n {\n return $this->domain->getScale();\n }", "function scale_get_scalings($cognitivefactoryid, $userid=null, $groupid=0, $excludemyself=false, $configdata) {\n global $CFG, $DB;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, $excludemyself, 'od.');\n $orderClause = (@$configdata->ordereddisplay) ? ' ORDER BY intvalue, floatvalue ' : '' ;\n\n $sql = \"\n SELECT\n r.id,\n r.response,\n od.intvalue,\n od.floatvalue,\n od.blobvalue,\n od.userid,\n od.groupid\n FROM\n {cognitivefactory_responses} as r,\n {cognitivefactory_opdata} as od\n WHERE\n r.id = od.itemsource AND\n operatorid = 'scale' AND\n r.cognitivefactoryid = {$cognitivefactoryid} \n {$accessClause}\n {$orderClause}\n \";\n if (!$records = $DB->get_records_sql($sql)) {\n return array();\n }\n return $records;\n}", "public function getProdScale()\n {\n return $this->prod_scale;\n }", "public function scale() { }", "private function _scale()\n\t{\n\t\t//scale down the image by 55%\n\t\t$weaponImageSize = $this->weapon->getImageGeometry();\n\t\t$this->weaponScale['w'] = $weaponImageSize['width'] * 0.55;\n\t\t$this->weaponScale['h'] = $weaponImageSize['height'] * 0.55;\n\n\t\t$this->weapon->scaleImage($this->weaponScale['w'], $this->weaponScale['h']);\n\n\t\t//scale down the image by 30%\n\t\t$emblemImageSize = $this->emblem->getImageGeometry();\n\t\t$this->emblemScale['w'] = $emblemImageSize['width'] * 0.30;\n\t\t$this->emblemScale['h'] = $emblemImageSize['height'] * 0.30;\n\n\t\t$this->emblem->scaleImage($this->emblemScale['w'], $this->emblemScale['h']);\n\n\t\t//scale down the image by 70%\n\t\t$profileImageSize = $this->profile->getImageGeometry();\n\t\t$this->profileScale['w'] = $profileImageSize['width'] * 0.70;\n\t\t$this->profileScale['h'] = $profileImageSize['height'] * 0.70;\n\n\t\t$this->profile->scaleImage($this->profileScale['w'], $this->profileScale['h']);\n\t}", "public function getPropScaling($skf, $posx, $posy)\n {\n return $this->getScaling($skf, $skf, $posx, $posy);\n }", "public function getAutoscaling()\n {\n return $this->autoscaling;\n }", "public static function get_sizes()\n {\n }", "function getStretch() {return $this->_stretch;}", "public function getScale($index) {\n if (isset($this->scales[$index])) {\n return $this->scales[$index];\n }\n\n return null;\n }", "public function getSizes()\n {\n return $this->sizes;\n }", "public function scale()\n {\n return $this->belongsTo(Scale::class);\n }", "public function setScale($var)\n {\n GPBUtil::checkInt32($var);\n $this->scale = $var;\n\n return $this;\n }", "public function getSizes() {\n return $this->_sizes;\n }", "public function setSize()\n {\n //Available sizes\n $sizes = [\n 'xs' => '16',\n 'sm' => '24',\n 'md' => '32',\n 'lg' => '48',\n 'xl' => '64',\n 'xxl' => '80',\n ];\n\n //Size class\n if (isset($sizes[$this->compParams['size']])) {\n $this->data['classList'][] = $this->getBaseClass() . \"--size-\" . $this->compParams['size'];\n } else {\n $this->data['classList'][] = $this->getBaseClass() . \"--size-inherit\";\n }\n\n return $this->data;\n }", "public function getSizes(){\n return (array) $this->getAttr('size');\n }", "public function getCloudZoomSettings()\n {\n $modulName = Mage::app()->getRequest()->getModuleName();\n $store = Mage::app()->getStore();\n if ($modulName == 'quickview') {\n $pageType = '_quickview';\n } else {\n $pageType = '';\n }\n\n $settings = array(\n 'zoomWidth' => (int)Mage::getStoreConfig('quickview/cloudzoom/zoom_width' . $pageType, $store),\n 'zoomHeight' => (int)Mage::getStoreConfig('quickview/cloudzoom/zoom_height' . $pageType, $store),\n 'position' => Mage::getStoreConfig('quickview/cloudzoom/position' . $pageType, $store),\n 'adjustX' => (int)Mage::getStoreConfig('quickview/cloudzoom/adjust_x' . $pageType, $store),\n 'adjustY' => (int)Mage::getStoreConfig('quickview/cloudzoom/adjust_y' . $pageType, $store),\n 'tint' => Mage::getStoreConfig('quickview/cloudzoom/tint', $store),\n 'softFocus' => (int)Mage::getStoreConfig('quickview/cloudzoom/soft_focus', $store),\n 'smoothMove' => (int)Mage::getStoreConfig('quickview/cloudzoom/smooth_move', $store),\n 'showTitle' => (int)Mage::getStoreConfig('quickview/cloudzoom/show_title', $store),\n 'tintOpacity' => (float)str_replace(',', '.', Mage::getStoreConfig('quickview/cloudzoom/tint_opacity', $store)),\n 'lensOpacity' => (float)str_replace(',', '.', Mage::getStoreConfig('quickview/cloudzoom/lens_opacity', $store)),\n 'titleOpacity' => (float)str_replace(',', '.', Mage::getStoreConfig('quickview/cloudzoom/title_opacity', $store))\n );\n if (!$settings['position']) {\n $settings['position'] = Mage::getStoreConfig('quickview/cloudzoom' . $pageType . '/position_element', $store);\n }\n\n $settings = $this->checkDefaultCloudZoomSettings($settings);\n return $settings;\n }", "public function __get($param)\n\t{\n\t\tif(in_array($param, array('width', 'height', 'image') ) )\n\t\t\treturn $this->$param;\n\t}", "public function setPrintScaling($name) {}", "public function setScale($var)\n {\n GPBUtil::checkDouble($var);\n $this->scale = $var;\n\n return $this;\n }", "protected function getLiipImagine_Filter_Loader_ScaleService()\n {\n return $this->services['liip_imagine.filter.loader.scale'] = new \\Liip\\ImagineBundle\\Imagine\\Filter\\Loader\\ScaleFilterLoader();\n }", "public function get_collection_params() {\n\t\t$params = parent::get_collection_params();\n\n\t\t$params['slug'] = array(\n\t\t\t'description' => __( 'Limit result set to products with a specific slug.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['status'] = array(\n\t\t\t'default' => 'any',\n\t\t\t'description' => __( 'Limit result set to products assigned a specific status.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => array_merge( array( 'any', 'future' ), array_keys( get_post_statuses() ) ),\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['type'] = array(\n\t\t\t'description' => __( 'Limit result set to products assigned a specific type.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => array_keys( wc_get_product_types() ),\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['sku'] = array(\n\t\t\t'description' => __( 'Limit result set to products with specific SKU(s). Use commas to separate.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['featured'] = array(\n\t\t\t'description' => __( 'Limit result set to featured products.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'boolean',\n\t\t\t'sanitize_callback' => 'wc_string_to_bool',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['category'] = array(\n\t\t\t'description' => __( 'Limit result set to products assigned a specific category ID.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['tag'] = array(\n\t\t\t'description' => __( 'Limit result set to products assigned a specific tag ID.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['shipping_class'] = array(\n\t\t\t'description' => __( 'Limit result set to products assigned a specific shipping class ID.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['attribute'] = array(\n\t\t\t'description' => __( 'Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['attribute_term'] = array(\n\t\t\t'description' => __( 'Limit result set to products with a specific attribute term ID (required an assigned attribute).', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\tif ( wc_tax_enabled() ) {\n\t\t\t$params['tax_class'] = array(\n\t\t\t\t'description' => __( 'Limit result set to products with a specific tax class.', 'woocommerce-rest-api' ),\n\t\t\t\t'type' => 'string',\n\t\t\t\t'enum' => array_merge( array( 'standard' ), \\WC_Tax::get_tax_class_slugs() ),\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t);\n\t\t}\n\n\t\t$params['on_sale'] = array(\n\t\t\t'description' => __( 'Limit result set to products on sale.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'boolean',\n\t\t\t'sanitize_callback' => 'wc_string_to_bool',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['min_price'] = array(\n\t\t\t'description' => __( 'Limit result set to products based on a minimum price.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['max_price'] = array(\n\t\t\t'description' => __( 'Limit result set to products based on a maximum price.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['stock_status'] = array(\n\t\t\t'description' => __( 'Limit result set to products with specified stock status.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => array_keys( wc_get_product_stock_status_options() ),\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['low_in_stock'] = array(\n\t\t\t'description' => __( 'Limit result set to products that are low or out of stock.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'boolean',\n\t\t\t'default' => false,\n\t\t\t'sanitize_callback' => 'wc_string_to_bool',\n\t\t);\n\n\t\t$params['search'] = array(\n\t\t\t'description' => __( 'Search by similar product name or sku.', 'woocommerce-rest-api' ),\n\t\t\t'type' => 'string',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['orderby']['enum'] = array_merge( $params['orderby']['enum'], array( 'menu_order', 'price', 'popularity', 'rating' ) );\n\n\t\treturn $params;\n\t}", "private function get_settings()\r\n\t{\r\n\t\tlist ($this->path, $this->webpath, $this->maxwidth, $this->maxheight, $this->type, $this->size, $this->preview_width, $this->preview_cols, $this->tablestyle, $this->picstyle) = $this->elements->get_element(0, \"show\", 0, 0);\r\n\t}", "public static function get_params() {\n\n\t\t\t$params = array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'false' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_ofswitch',\n\t\t\t\t\t'heading' => esc_html__( 'Responsive?', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'responsive',\n\t\t\t\t\t'value' => 'false',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_responsive_sizes',\n\t\t\t\t\t'heading' => esc_html__( 'Height', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'size_responsive',\n\t\t\t\t\t'value' => '30px',\n\t\t\t\t\t'description' => vcex_shortcode_param_description( 'height' ),\n\t\t\t\t\t'dependency' => array( 'element' => 'responsive', 'value' => 'true' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t'heading' => esc_html__( 'Custom Classes', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'vcex_visibility',\n\t\t\t\t\t'heading' => esc_html__( 'Visibility', 'total-theme-core' ),\n\t\t\t\t\t'param_name' => 'visibility',\n\t\t\t\t),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'vcex_shortcode_params', $params, 'vcex_spacing' );\n\n\t\t}", "public function getGemstoneScale() {\r\n\t\t$this->db->from('stone_scale');\r\n\t\t$this->db->order_by('scale_id');\r\n\t\t$query = $this->db->get();\r\n\t\t$data = array();\r\n\t\tif($query->num_rows() > 0) {\r\n\t\t\tforeach($query->result_array() as $row) {\r\n\t\t\t\t$data[$row['scale_id']] = $row;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "protected function getPricingDimensions()\n {\n return $this->pricingDimensions;\n }", "public function getReadNamespacedScaleScale(\n $name,\n $mnamespace,\n $pretty = null\n ) {\n\n //the base uri for api requests\n $_queryBuilder = Configuration::$BASEURI;\n \n //prepare query string for API call\n $_queryBuilder = $_queryBuilder.\n '/oapi/v1/namespaces/{namespace}/deploymentconfigs/{name}/scale';\n\n //process optional query parameters\n $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array (\n 'name' => $name,\n 'namespace' => $mnamespace,\n ));\n\n //process optional query parameters\n APIHelper::appendUrlWithQueryParameters($_queryBuilder, array (\n 'pretty' => $pretty,\n ));\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl($_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => 'APIMATIC 2.0',\n 'Accept' => 'application/json'\n );\n\n //call on-before Http callback\n $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl);\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n //and invoke the API call request to fetch the response\n $response = Request::get($_queryUrl, $_headers);\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n //handle errors defined at the API level\n $this->validateResponse($_httpResponse, $_httpContext);\n\n $mapper = $this->getJsonMapper();\n\n return $mapper->mapClass($response->body, 'OpenShiftAPIWithKubernetesLib\\\\Models\\\\V1beta1Scale');\n }", "public function sizes(){\n\t\t$meta = ProductMeta::where('product_id', $this->id)->where('meta', 'product_packages_id')->get();\n\t\t$metaGroup = array();\n\t\tif($meta){\n\t\t\tforeach($meta as $each){\n\t\t\t\t$metaGroup[] = $each->value;\n\t\t\t}\n\t\t}\n\t\treturn ProductPackage::find($metaGroup);\n\t}", "protected function scaleImages() {}", "public function getParameters()\n {\n // TODO: Implement getParameters() method.\n }", "public function show($id)\n {\n $scale = Survey::find($id);\n return $scale;\n }", "public function getParameters() {\r\n $paramArray = array(\r\n 'optionsName' => $this->optionsName,\r\n 'userName' => $this->userName,\r\n 'isActive' => $this->isActive,\r\n 'activeMeasurement' => $this->activeMeasurement,\r\n 'bloodPressureUnits' => $this->bloodPressureUnits,\r\n 'calorieUnits' => $this->calorieUnits,\r\n 'exerciseUnits' => $this->exerciseUnits,\r\n 'glucoseUnits' => $this->glucoseUnits,\r\n 'sleepUnits' => $this->sleepUnits,\r\n 'weightUnits' => $this->weightUnits,\r\n 'timeFormat' => $this->timeFormat,\r\n 'durationFormat' => $this->durationFormat,\r\n 'showTooltips' => $this->showTooltips,\r\n 'showSecondaryCols' => $this->showSecondaryCols,\r\n 'showDateCol' => $this->showDateCol,\r\n 'showTimeCol' => $this->showTimeCol,\r\n 'showNotesCol' => $this->showNotesCol,\r\n 'numRows' => $this->numRows,\r\n 'showTable' => $this->showTable,\r\n 'tableSize' => $this->tableSize,\r\n 'chartPlacement' => $this->chartPlacement,\r\n 'showFirstChart' => $this->showFirstChart,\r\n 'showSecondChart' => $this->showSecondChart,\r\n 'firstChartType' => $this->firstChartType,\r\n 'secondChartType' => $this->secondChartType,\r\n 'chartLastYear' => $this->chartLastYear,\r\n 'chartGroupDays' => $this->chartGroupDays,\r\n 'individualBloodPressureChartStart' => $this->individualBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'individualBloodPressureChartEnd' => $this->individualBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'dailyBloodPressureChartStart' => $this->dailyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'dailyBloodPressureChartEnd' => $this->dailyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyBloodPressureChartStart' => $this->weeklyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'weeklyBloodPressureChartEnd' => $this->weeklyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyBloodPressureChartStart' => $this->monthlyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'monthlyBloodPressureChartEnd' => $this->monthlyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyBloodPressureChartStart' => $this->yearlyBloodPressureChartStart->format(self::DATE_FORMAT),\r\n 'yearlyBloodPressureChartEnd' => $this->yearlyBloodPressureChartEnd->format(self::DATE_FORMAT),\r\n 'individualCaloriesChartStart' => $this->individualCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'individualCaloriesChartEnd' => $this->individualCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'dailyCaloriesChartStart' => $this->dailyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'dailyCaloriesChartEnd' => $this->dailyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyCaloriesChartStart' => $this->weeklyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'weeklyCaloriesChartEnd' => $this->weeklyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyCaloriesChartStart' => $this->monthlyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'monthlyCaloriesChartEnd' => $this->monthlyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyCaloriesChartStart' => $this->yearlyCaloriesChartStart->format(self::DATE_FORMAT),\r\n 'yearlyCaloriesChartEnd' => $this->yearlyCaloriesChartEnd->format(self::DATE_FORMAT),\r\n 'individualExerciseChartStart' => $this->individualExerciseChartStart->format(self::DATE_FORMAT),\r\n 'individualExerciseChartEnd' => $this->individualExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'dailyExerciseChartStart' => $this->dailyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'dailyExerciseChartEnd' => $this->dailyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyExerciseChartStart' => $this->weeklyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'weeklyExerciseChartEnd' => $this->weeklyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyExerciseChartStart' => $this->monthlyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'monthlyExerciseChartEnd' => $this->monthlyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyExerciseChartStart' => $this->yearlyExerciseChartStart->format(self::DATE_FORMAT),\r\n 'yearlyExerciseChartEnd' => $this->yearlyExerciseChartEnd->format(self::DATE_FORMAT),\r\n 'individualGlucoseChartStart' => $this->individualGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'individualGlucoseChartEnd' => $this->individualGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'dailyGlucoseChartStart' => $this->dailyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'dailyGlucoseChartEnd' => $this->dailyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyGlucoseChartStart' => $this->weeklyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'weeklyGlucoseChartEnd' => $this->weeklyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyGlucoseChartStart' => $this->monthlyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'monthlyGlucoseChartEnd' => $this->monthlyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyGlucoseChartStart' => $this->yearlyGlucoseChartStart->format(self::DATE_FORMAT),\r\n 'yearlyGlucoseChartEnd' => $this->yearlyGlucoseChartEnd->format(self::DATE_FORMAT),\r\n 'individualSleepChartStart' => $this->individualSleepChartStart->format(self::DATE_FORMAT),\r\n 'individualSleepChartEnd' => $this->individualSleepChartEnd->format(self::DATE_FORMAT),\r\n 'dailySleepChartStart' => $this->dailySleepChartStart->format(self::DATE_FORMAT),\r\n 'dailySleepChartEnd' => $this->dailySleepChartEnd->format(self::DATE_FORMAT),\r\n 'weeklySleepChartStart' => $this->weeklySleepChartStart->format(self::DATE_FORMAT),\r\n 'weeklySleepChartEnd' => $this->weeklySleepChartEnd->format(self::DATE_FORMAT),\r\n 'monthlySleepChartStart' => $this->monthlySleepChartStart->format(self::DATE_FORMAT),\r\n 'monthlySleepChartEnd' => $this->monthlySleepChartEnd->format(self::DATE_FORMAT),\r\n 'yearlySleepChartStart' => $this->yearlySleepChartStart->format(self::DATE_FORMAT),\r\n 'yearlySleepChartEnd' => $this->yearlySleepChartEnd->format(self::DATE_FORMAT),\r\n 'individualWeightChartStart' => $this->individualWeightChartStart->format(self::DATE_FORMAT),\r\n 'individualWeightChartEnd' => $this->individualWeightChartEnd->format(self::DATE_FORMAT),\r\n 'dailyWeightChartStart' => $this->dailyWeightChartStart->format(self::DATE_FORMAT),\r\n 'dailyWeightChartEnd' => $this->dailyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'weeklyWeightChartStart' => $this->weeklyWeightChartStart->format(self::DATE_FORMAT),\r\n 'weeklyWeightChartEnd' => $this->weeklyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'monthlyWeightChartStart' => $this->monthlyWeightChartStart->format(self::DATE_FORMAT),\r\n 'monthlyWeightChartEnd' => $this->monthlyWeightChartEnd->format(self::DATE_FORMAT),\r\n 'yearlyWeightChartStart' => $this->yearlyWeightChartStart->format(self::DATE_FORMAT),\r\n 'yearlyWeightChartEnd' => $this->yearlyWeightChartEnd->format(self::DATE_FORMAT)\r\n );\r\n \r\n return $paramArray;\r\n }", "public function getParameters() {}", "function prepareTemplateVars() {\n\t\t$calcModel = KenedoModel::getModel('ConfigboxModelAdmincalculations');\n\t\t$this->calculations = $calcModel->getRecords(array('admincalculations.product_id'=>$this->productId));\n\n\t\t$this->addViewCssClasses();\n\n\t}", "function scale($scale) {\r\n\t\t$width = $this->getWidth() * $scale/100;\r\n\t\t$height = $this->getheight() * $scale/100;\r\n\t\t$this->resize($width,$height);\r\n\t}", "private function getScaledImageSize($scale)\n {\n $size = new \\stdClass();\n\n $size->width = $this->width * $scale;\n $size->height = $this->height * $scale;\n\n return $size;\n }", "abstract public function getSamlParameters();", "public function setScale($scale)\n {\n $this->scale = $scale;\n return $this;\n }", "public function getScaling($skx, $sky, $posx, $posy)\n {\n if (($skx == 0) || ($sky == 0)) {\n throw new GraphException('Scaling factors must be different than zero');\n }\n $posy = (($this->pageh - $posy) * $this->kunit);\n $posx = ($posx * $this->kunit);\n $ctm = array($skx, 0, 0, $sky, ($posx * (1 - $skx)), ($posy * (1 - $sky)));\n return $this->getTransformation($ctm);\n }", "public function scale(float $scale_x = 0, float $scale_y = 0, float $scale_z = 0): EntityInterface;", "function getImageResolutions() {\n // Load Report Video values\n $model = Settings::where('key', IMAGE_RESOLUTIONS_KEY)->get();\n // Return array of values\n return $model;\n}", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "public function getParameters();", "abstract protected function getScaleFromFormatNode(\\DOMNode $formatNode);", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function get_collection_params()\n {\n }", "public function scale($by) {}", "abstract public function getParameters();", "public function __construct()\n {\n parent::__construct();\n $this->endpoint = 'scales';\n $this->init();\n }", "public function getDimensions() {}", "public function scale($scaleX, $scaleY) {}", "public function scale($scaleX, $scaleY) {}", "public function scale($scaleX, $scaleY) {}", "public function getPoolDistribution()\n\t{\n\t\treturn($this->getProperty('distribution'));\n\t}", "public function getReticleDifficultyScale()\n {\n return $this->reticle_difficulty_scale;\n }", "function getProportional() {return $this->_proportional;}", "public function getImageSizes(): array\n {\n $additionalSizes = wp_get_additional_image_sizes();\n $names = $this->getImageSizesNames();\n\n return array_map(function (string $name) use ($additionalSizes) {\n if (isset($additionalSizes[$name])) {\n return [\n \"name\" => $name,\n \"width\" => $additionalSizes[$name][\"width\"],\n \"height\" => $additionalSizes[$name][\"height\"],\n \"crop\" => $additionalSizes[$name][\"crop\"],\n ];\n }\n \n return [\n \"name\" => $name,\n \"width\" => get_option(\"{$name}_size_w\"),\n \"height\" => get_option(\"{$name}_size_h\"),\n \"crop\" => !!get_option(\"{$name}_crop\"),\n ];\n }, $names);\n }", "public function scale($s_)\n\t{\n\t\t$this->setX( $this->x*$s_ );\n\t\t$this->setY( $this->y*$s_ );\n\t}", "public function __get( $key )\n {\n $p = parent::__get( $key );\n if ( !is_null( $p ) ) {\n return $p;\n }\n\n switch ( $key ) {\n case 'oid':\n return $this->scale_no->value;\n break;\n case 'name':\n return $this->scale_name->value;\n break;\n case 'level':\n return $this->level_name->value;\n break;\n case 'start':\n case 't0':\n return $this->early_age->value;\n break;\n case 'end':\n case 't1':\n case 'tf':\n return $this->late_age->value;\n break;\n default:\n throw new \\DomainException( sprintf( 'Invalid property %s', $key ) );\n }\n\n return null;\n }", "protected function getWidthSQuery()\n {\n return $this->widthSQuery;\n }" ]
[ "0.7292234", "0.6859926", "0.6859926", "0.614846", "0.60712963", "0.5921551", "0.58965933", "0.58965933", "0.5878252", "0.5725659", "0.5709081", "0.5657465", "0.5491793", "0.5457685", "0.5452041", "0.5318045", "0.5297813", "0.52380604", "0.50718063", "0.50099367", "0.49946538", "0.49518988", "0.4943088", "0.49131447", "0.48932204", "0.4891352", "0.482603", "0.48232332", "0.47653142", "0.4745493", "0.47396222", "0.47212437", "0.47159928", "0.4709842", "0.4705471", "0.46940687", "0.4684917", "0.4675335", "0.46678823", "0.465565", "0.46505183", "0.4647132", "0.46466616", "0.46196923", "0.46177498", "0.461395", "0.46079406", "0.45975056", "0.45947236", "0.45755792", "0.45620298", "0.45593125", "0.45462874", "0.45305073", "0.45305073", "0.45305073", "0.45305073", "0.45305073", "0.45305073", "0.45305073", "0.45305073", "0.45266917", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.45023918", "0.450003", "0.44969946", "0.44914225", "0.44858062", "0.44807035", "0.44792613", "0.44792613", "0.44762433", "0.4471496", "0.4471083", "0.4459474", "0.4459078", "0.4447369", "0.44460806" ]
0.0
-1
Fetches existing template names.
public function getTemplateNames() { return array_keys(self::$_config->template->toArray()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ListTemplates()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $Config;\r\n\t\t\t\r\n\t\t\t$sql = \"select * from templates order by TemplateDisplayName asc\" ; \r\n\t\t\treturn $this->get_results($sql);\t\t\r\n\t }", "function customcert_get_templates() {\n global $DB;\n\n return $DB->get_records_menu('customcert_template', array(), 'name ASC', 'id, name');\n}", "public function getAllTemplates(){ //return all templates in database to the select to choose from templates\n return TemplatesResource::collection(TemplateProject::all());\n }", "function get_template_names()\n {\n \t//-----------------------------------------\n \t// INIT\n \t//-----------------------------------------\n \t\n \t$name = $this->ipsclass->parse_clean_value( urldecode( $_REQUEST['name'] ) );\n \t$id = intval( $_REQUEST['id'] );\n \t\n \t//-----------------------------------------\n\t\t// Get $skin_names stuff\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( ROOT_PATH.'sources/lib/skin_info.php' );\n\t\t\n \t//-----------------------------------------\n \t// Check length\n \t//-----------------------------------------\n \t\n \tif ( strlen( $name ) < 3 )\n \t{\n \t\t$this->return_null();\n \t}\n \t\n \t//-----------------------------------------\n \t// Try query...\n \t//-----------------------------------------\n \t\n \t$this->ipsclass->DB->build_query( array( 'select' => \"suid,set_id,group_name,func_name\",\n \t\t\t\t\t\t\t\t\t\t\t 'from' => 'skin_templates',\n \t\t\t\t\t\t\t\t\t\t\t 'where' => \"set_id=1 AND LOWER(func_name) LIKE '{$name}%'\",\n \t\t\t\t\t\t\t\t\t\t\t 'order' => 'LENGTH(func_name) ASC',\n \t\t\t\t\t\t\t\t\t\t\t 'limit' => array( 0,20 ) ) );\n \t\t\t\t\t\t\t\t\t\t\t \n \t$this->ipsclass->DB->exec_query();\n \t\n \t$names = array();\n\t\t$ids = array();\n\t\t\n\t\twhile( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$names[] = '\"'.$r['func_name'].' ('.$r['group_name'].')\"';\n\t\t\t$ids[] = intval($r['suid']);\n\t\t}\n\t\t\n\t\t$this->print_nocache_headers();\n\t\t@header( \"Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}\" );\n\t\tprint \"returnSearch( '\".str_replace( \"'\", \"\", $name ).\"', new Array(\".implode( \",\", $names ).\"), new Array(\".implode( \",\", $ids ).\") );\";\n\t\texit();\n }", "public function getTemplatesFromDB();", "private function find_templates () {\r\n\t\t$results = array();\r\n\r\n\t\t$files = WooDojo_Utils::glob_php( '*.php', GLOB_MARK, $this->templates_dir );\r\n\r\n\t\tif ( is_array( $files ) && count( $files ) > 0 ) {\r\n\t\t\tforeach ( $files as $k => $v ) {\r\n\t\t\t\t$data = $this->get_template_data( $v );\r\n\t\t\t\tif ( is_object( $data ) && isset( $data->title ) ) {\r\n\t\t\t\t\t$results[$v] = $data->title;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $results;\r\n\t}", "function getTemplates() {\n\n // Lets load the data if it doesn't already exist\n if (empty($this->_data)) {\n\n // constructs the query\n $query = ' SELECT * '\n . ' FROM #__templateck';\n\n // retrieves the data\n $this->_data = $this->_getList($query);\n }\n\n return $this->_data;\n }", "protected function fetch($name, $data=array()){\n\t\t\n\t\t\t# Register all stored vars in the Template Engine\n\t\t\tforeach( $data + $this->tplVars as $k => $v ){\n\t\t\t\t$this->Layers->get('templates')->assign($k, $v);\n\t\t\t}\n\t\t\t\n\t\t\t$name = preg_replace('/\\.tpl$/', '', $name);\n\t\t\tif( !is_file(SNIPPET_TEMPLATES.\"/{$name}.tpl\") ) $name = '404';\n\t\t\t\n\t\t\t$pathToFile = SNIPPET_TEMPLATES.\"/{$name}.tpl\";\n\t\t\t$this->Layers->get('templates')->assign('pathToTemplate', $pathToFile);\n\t\t\t\n\t\t\treturn $this->Layers->get('templates')->fetch('global.tpl');\n\t\t\n\t\t}", "public function getTemplateList() {\n\t\t$aArgs = func_get_args();\n\t\t$aRet = call_user_func_array( array( $this, 'getTemplates' ), $aArgs );\n\t\treturn implode( '|', $aRet );\n\t}", "public function getTemplates(){\n\t\n\t\tif( empty($this->_templates) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 't.tmpl_id AS value, t.tmpl_name AS text' );\n\t\t\t$query->from( '#__zbrochure_templates AS t' );\n\t\t\t$query->where( 't.tmpl_published = 1' );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_templates = $this->_db->loadObjectList();\n\n\t\t}\n\t\t\n\t\treturn $this->_templates;\n\t\n\t}", "public function getAllSMSTemplates()\n {\n $selectTempsql = 'SELECT temp_id, temp_name FROM ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $selectTempsql .= ' WHERE 1 Order By temp_name ASC';\n $templateRes = Db::getInstance()->ExecuteS($selectTempsql);\n return $templateRes;\n }", "public function fetchNames()\n {\n $res = $this->_fetch($this->_cfg['namesUri']);\n\n return $res;\n }", "public function getTemplates (){\n $dir = conf::pathHtdocs() . \"/templates\";\n $templates = file::getFileList($dir, array('dir_only' => true));\n\n $ary = array ();\n foreach ($templates as $val){\n $info = $this->getSingleTemplate($val);\n if (empty($info)) {\n continue;\n }\n $ary[] = $info;\n }\n return $ary;\n }", "public function retrieveMessageTemplates()\n {\n return $this->start()->uri(\"/api/message/template\")\n ->get()\n ->go();\n }", "protected function _loadTemplates()\n {\n $this->_tpl = array();\n $dir = Solar_Class::dir($this, 'Data');\n $list = glob($dir . '*.php');\n foreach ($list as $file) {\n \n // strip .php off the end of the file name to get the key\n $key = substr(basename($file), 0, -4);\n \n // load the file template\n $this->_tpl[$key] = file_get_contents($file);\n \n // we need to add the php-open tag ourselves, instead of\n // having it in the template file, becuase the PEAR packager\n // complains about parsing the skeleton code.\n // \n // however, only do this on non-view files.\n if (substr($key, 0, 4) != 'view') {\n $this->_tpl[$key] = \"<?php\\n\" . $this->_tpl[$key];\n }\n }\n }", "function getPrintTemplates(){\r\n require $this->sRessourcesFile;\r\n if (in_array(\"print_templates\", $this->aSelectedFields)){\r\n $aParams['sSchemaVmap'] = array('value' => $this->aProperties['schema_vmap'], 'type' => 'schema_name');\r\n $aParams['group_id'] = array('value' => $this->aValues['my_vitis_id'], 'type' => 'number');\r\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getGroupPrintTemplates'], $aParams);\r\n\t\t$sListPrintTemplateId = \"\";\r\n\t\t$aListPrintTemplateName = array();\r\n\t\twhile($aLigne=$this->oConnection->oBd->ligneSuivante ($oPDOresult)) {\r\n\t\t\tif ($sListPrintTemplateId == \"\"){\r\n\t\t\t\t$sListPrintTemplateId = $aLigne[\"printtemplate_id\"];\r\n\t\t\t}else{\r\n\t\t\t\t$sListPrintTemplateId .= \"|\".$aLigne[\"printtemplate_id\"];\r\n\t\t\t}\r\n $aListPrintTemplateName[] = $aLigne[\"name\"];\r\n\t\t}\r\n\t\t$oPDOresult=$this->oConnection->oBd->fermeResultat();\r\n $this->aFields['print_templates'] = $sListPrintTemplateId;\r\n $this->aFields['print_templates_label'] = implode(',', $aListPrintTemplateName);\r\n }\r\n }", "public static function get_template_by_name($conn, $template_name)\n { \n Ossim_db::check_connection($conn);\n \n $template_data = array();\n \n $query = \"SELECT HEX(id) as id, name FROM acl_templates WHERE name = ?\"; \n \n $rs_1 = $conn->Execute($query, array($template_name));\n \n if (!$rs_1)\n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n { \n while (!$rs_1->EOF) \n {\n $template_id = $rs_1->fields['id'];\n \n //Menu permissions\n $query_2 = \"SELECT p.* FROM acl_templates_perms tp, acl_perm p WHERE tp.ac_templates_id=UNHEX(?) AND tp.ac_perm_id=p.id\";\n \n $rs_2 = $conn->Execute($query_2, array($template_id));\n \n if (!$rs_2) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n {\n $perms = array();\n \n while (!$rs_2->EOF) \n {\n $perms[$rs_2->fields['id']] = $rs_2->fields['value'];\n \n $rs_2->MoveNext();\n }\n \n $template_data[$template_id] = array(\n 'id' => $template_id,\n 'name' => $rs_1->fields['name'],\n 'perms' => $perms\n );\n }\n \n $rs_1->MoveNext();\n }\n }\n \n return $template_data;\n }", "function locate_template($template_names, $load = \\false, $load_once = \\true, $args = array())\n {\n }", "function LoadTemplate( $name )\n{\n if ( file_exists(\"$name.html\") ) return file_get_contents(\"$name.html\");\n if ( file_exists(\"templates/$name.html\") ) return file_get_contents(\"templates/$name.html\");\n if ( file_exists(\"../templates/$name.html\") ) return file_get_contents(\"../templates/$name.html\");\n}", "public function loadTemplates() {\n // Get database hooks.\n $doctrine = $this->container->get('doctrine');\n $slideTemplateRepository = $doctrine->getRepository('Os2DisplayCoreBundle:SlideTemplate');\n $screenemplateRepository = $doctrine->getRepository('Os2DisplayCoreBundle:ScreenTemplate');\n $entityManager = $doctrine->getManager();\n\n // Get parameters.\n $path = $this->container->get('kernel')->getRootDir() . '/../web/';\n $serverAddress = $this->container->getParameter('absolute_path_to_server');\n\n // Locate templates in /web/bundles/\n $templates = $this->findTemplates($path . 'bundles/');\n\n foreach ($templates['slides'] as $config) {\n $dir = explode('/web/', pathinfo($config, PATHINFO_DIRNAME));\n $this->loadSlideTemplate($config, $slideTemplateRepository, $entityManager, $dir[1], $serverAddress, $path);\n }\n\n foreach ($templates['screens'] as $config) {\n $dir = explode('/web/', pathinfo($config, PATHINFO_DIRNAME));\n $this->loadScreenTemplate($config, $screenemplateRepository, $entityManager, $dir[1], $serverAddress, $path);\n }\n\n // Get all templates from the database, and push update to screens.\n $existingTemplates = $screenemplateRepository->findAll();\n $middlewareService = $this->container->get('os2display.middleware.communication');\n foreach ($existingTemplates as $template) {\n foreach ($template->getScreens() as $screen) {\n $middlewareService->pushScreenUpdate($screen);\n }\n }\n }", "public function getTemplates()\n {\n $finder = Finder::create()\n ->files()\n ->name('*.sql')\n ->in($this->rootDir.'/../templates')\n ;\n\n $templates = [];\n\n /** @var SplFileInfo $file */\n foreach ($finder as $file) {\n $templates[] = $file->getRelativePathname();\n }\n\n return $templates;\n }", "private function _refreshTemplates() {\n $token = $this->_token;\n $response = $this->_apiClient->GET(\"sessions/$token/templates\", ['accept-language' => $this->_language]);\n if ($response->isError()) {\n throw $response->asException();\n }\n $templates = [];\n $raw_templates = $response->body;\n foreach ($raw_templates as $raw_template) {\n $template = new Template($this->_apiClient, $this, $this->_language, 'sessions/' . $this->getUUID() . '/templates/' . $raw_template['template_id']);\n $template->_pushUpdate($raw_template);\n $templates[] = $template;\n }\n $this->_templates = $templates;\n }", "public function retrieveEmailTemplates()\n {\n return $this->start()->uri(\"/api/email/template\")\n ->get()\n ->go();\n }", "function fetch_templates( $module_id = false ) // fetch templates for module or all or global\n\t{\n\t\tif( $module_id ) {\n\t\t\t$this->db->where( 'module_id', $module_id );\n\t\t}\n\t\t$query=$this->db->get( 'templates' );\n\t\t$this->db->flush_cache();\n\t\treturn $query->result_array();\n\t}", "public function get_custom_templates()\n {\n }", "public function getCreatedTemplates ()\n {\n // Get all the templates\n $table = DB::select('select id_template, name_template, created_at, icon from ezz_templates');\n return response()->json([\n 'templates' => $table\n ], 200);\n }", "function templates()\n {\n return [];\n }", "public function fetch_builder_template()\n\t\t{\n\t\t $error = false;\n $name = isset($_POST['templateName']) ? $_POST['templateName'] : false;\n if(empty($name)) \n $error = true;\n \n $key = $this->generate_key($name);\n $template = $this->get_meta_values($key);\n \n if(empty($template)) $error = true;\n \n \n if($error)\n {\n echo \"avia_fetching_error\";\n }\n else\n {\n $text = str_replace('{{{'.$name.'}}}','',$template[0]);\n $return = $this->builder->text_to_interface($text);\n \n echo $return;\n }\n \n die();\n\t\t}", "function getTemplates( $cwd = '.' ) {\n\n // New list\n $templates = array();\n\n // Use cache\n if ( !is_file( \"{$cwd}/tmp/cache/templates.cache\" ) ) {\n\n // Handle themes here\n $list = browse( \"{$cwd}/templates/\", false, true, false );\n\n // Loop\n foreach ( $list as $dir ) {\n\n // Definitions?\n if ( is_file( \"{$cwd}/templates/{$dir}/manifest.json\" ) ) {\n\n // Get json\n $loadedFile = json_decode( file_get_contents( \"{$cwd}/templates/{$dir}/manifest.json\" ), true );\n\n // Verify List - Do not append unless manifest is correct\n if ( !empty( $loadedFile[ 'name' ] ) && is_file( \"{$cwd}/templates/{$dir}/{$loadedFile['template']}\" ) ) {\n\n // This is JSON from the template\n $templates[ $dir ] = $loadedFile;\n\n // Add full path to the variable\n $templates[ $dir ][ 'path' ] = \"/templates/{$dir}\";\n\n }\n\n }\n\n }\n\n // Sort them ascending\n asort( $templates );\n\n // Store cache\n file_put_contents( \"{$cwd}/tmp/cache/templates.cache\", json_encode( $templates ) );\n\n } else {\n\n return json_decode( file_get_contents( \"{$cwd}/tmp/cache/templates.cache\" ), true );\n\n }\n\n return $templates;\n\n }", "public function getAllTemplates() {\n $pages = Templates::templates()->get();\n\n return response()->json($pages);\n }", "function tidyt_get_simple_feed_templates($name){\n $templates = array();\n $paged = array();\n\n $paged = tidyt_get_paged_template_functions($name);\n\n $templates = array_merge($paged, $templates);\n\n return $templates;\n}", "function getFormTemplates(){\n\t\t$AccessToken = Auth::token();\n\t\t$baseUrl = url . '/api/v1/' . customerAlias . '/' . databaseAlias;\n\t\t$endpoint = '/formtemplates';\n\t\t$request = $baseUrl . $endpoint;\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, array(\n\t\t CURLOPT_HTTPGET => true,\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t\t\t'Authorization: Bearer ' . $AccessToken),\n\t\t CURLOPT_URL => $request,\n\t\t\tCURLOPT_RETURNTRANSFER => 1\n\t\t ));\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $response;\n\t}", "public function getTemplate($name){\n if(isset($name)){\n return $this->template[$name]; // $this->envir->loadTemplate($template)\n }\n return $this->template[$this->templace_interator++]; // $this->envir->loadTemplate($template)\n }", "public function get_post_templates()\n {\n }", "protected function getTemplatesRequest(){\n\t\t\n\t\t//If the user is logged in\n\t\tif($this->getModel()->checkLogin(true))\n\t\t{\n\t\t\t// Set the state and tell plugins.\n\t\t\t$this->setState('GETTING_TEMPLATES_LIST');\n\t\t\t$this->notifyObservers();\n\t\t\t\n\t\t\t//Gets template data\n\t\t\t$data = $this->getModel()->getFeaturedTemplates();\n\t\t\t\n\t\t\t//Show data\n\t\t\t$this->getView()->showInstallableTemplates($data);\n\t\t}\n\t}", "static public function listTemplates($type)\n {\n $templates = array();\n\n $_templates = Horde::loadConfiguration('templates.php', '_templates', 'whups');\n foreach ($_templates as $name => $info) {\n if ($info['type'] == $type) {\n $templates[$name] = $info['name'];\n }\n }\n\n return $templates;\n }", "protected function template_names()\n {\n $templates = $this->get_meta_values();\n $names = array();\n \n foreach($templates as $template)\n {\n $name = explode(\"}}}\", $template);\n $names[] = str_replace('{{{', \"\", $name[0]);\n }\n \n natcasesort($names);\n return $names;\n }", "public function GetSavedTemplates() {\n\t\t$templates = &drupal_static(__FUNCTION__, NULL, $this->reset);\n\n\t\tif (!isset($templates)) {\n\t\t\t$templates = db_select('{'.ACQUIA_COMPOSER_TEMPLATES_TABLE.'}', 'ac')\n\t\t\t\t->fields('ac')\n\t\t\t\t->execute()\n\t\t\t\t->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t\tif (!count($templates)) {\n\t\t\t\t$templates = array();\n\t\t\t}\n\t\t}\n\t\treturn $templates;\n\t}", "public function get_templates()\n {\n $template = new MailTemplate();\n return $template->findAll();\n }", "public function index()\n\t{\n\t $this->authorize('index', 'Template');\n\n\t $templates = $this->templateLoader->loadAll();\n\n\t $perPage = $this->request->get('per_page', 10);\n\t $page = $this->request->get('page', 1);\n\n\t if ($this->request->has('query')) {\n\t $templates = $templates->filter(function($template) {\n\t return str_contains(strtolower($template['name']), $this->request->get('query'));\n });\n }\n\n if ($orderBy = $this->request->get('order_by', 'updated_at')) {\n $desc = $this->request->get('order_dir', 'desc') === 'desc';\n $templates = $templates->sortBy($orderBy, SORT_REGULAR, $desc);\n }\n\n\t $pagination = new LengthAwarePaginator(\n\t $templates->slice($perPage * ($page - 1), $perPage)->values(),\n count($templates),\n $perPage,\n $page\n );\n\n\t return $this->success(['pagination' => $pagination]);\n\t}", "function _get_templates()\n\t{\n\t\t$location = FILESYSTEM_PATH .'modules/customcats/templates/cattemplates/';\n\t\t$filelist=array();\n\t\tif ($handle = opendir($location))\n\t\t{\n\t\t\twhile (false !== ($file = readdir($handle)))\n\t\t\t{\n\t\t\t\tif ($file != \".\" && $file != \"..\" && $file!=\".svn\" && $file!=\"index.htm\")\n\t\t\t\t{\n\t\t\t\t\t$filelist[]=$file;\n\t\t\t\t}\n\t\t\t}\n \t\t\tclosedir($handle);\n\t\t}\n\t\treturn $filelist;\n\t}", "abstract public function getTemplateName();", "function Get_user_system_emails_tmpl_names()\r\n {\r\n $CI = &get_instance();\r\n $CI->load->model('mail_model');\r\n //read the whole info about templates and get template names for users only\r\n $templates_info = $CI->mail_model->Get_system_email_data('USER_TEMPLATES_NAMES');\r\n return $templates_info;\r\n }", "public function loadAllNames();", "function admin_get_idtemplates()\n{\n global $app;\n\n $idtemplates = $app->bbs->idTemplates();\n $idtypes = $app->calibre->idTypes();\n $ids2add = [];\n foreach ($idtypes as $idtype) {\n if (empty($idtemplates)) {\n array_push($ids2add, $idtype['type']);\n } else {\n $found = false;\n foreach ($idtemplates as $idtemplate) {\n if ($idtype['type'] === $idtemplate->name) {\n $found = true;\n break;\n }\n }\n if (!$found) {\n array_push($ids2add, $idtype['type']);\n }\n }\n }\n foreach ($ids2add as $id2add) {\n $ni = new IdUrlTemplate();\n $ni->name = $id2add;\n $ni->val = '';\n $ni->label = '';\n array_push($idtemplates, $ni);\n }\n $app->getLog()->debug('admin_get_idtemplates ' . var_export($idtemplates, true));\n $app->render('admin_idtemplates.html', [\n 'page' => mkPage(getMessageString('admin_idtemplates'), 0, 2),\n 'templates' => $idtemplates,\n 'isadmin' => is_admin()]);\n}", "public static function getTemplatesUsed()\n {\n return static::$allTemplates;\n }", "function Get_admin_system_emails_tmpl_names()\r\n {\r\n $CI = &get_instance();\r\n $CI->load->model('mail_model');\r\n //read the whole info about templates and get template names for admin only\r\n $templates_info = $CI->mail_model->Get_system_email_data('ADMIN_TEMPLATES_NAMES');\r\n return $templates_info;\r\n }", "function getAllPageTemplates() {\n global $wpdb;\n return $wpdb->get_col(\"SELECT DISTINCT meta_value FROM wp_postmeta WHERE meta_key = '_wp_page_template'\"); \n }", "public function index() {\n $templates = Template::all();\n return $templates;\n }", "public function getTemplateName()\n {\n }", "public function getTemplatesList($hint, $uacc_uid=''){\r\n\r\n\t\t$list = array();\r\n\r\n\t\tif($uacc_uid != '')\r\n\t\t\t$query = $this->db->select(\"template_id,name,html_body\")->like(\"name\", $hint)->where(array(\"created_by\"=>$uacc_uid,\"deleted\"=>0))->order_by(\"name\", \"asc\")->get(\"sc_templates\");\r\n\t\telse\r\n\t\t\t$query = $this->db->select(\"template_id,name,html_body\")->like(\"name\", $hint)->where(array(\"deleted\"=>0))->order_by(\"name\", \"asc\")->get(\"sc_templates\");\r\n\r\n\t if ($query->num_rows() > 0){\r\n\t\t\tforeach($query->result() as $row){\r\n\r\n\t\t\t\t$list[] = array(\"name\"=>$row->name, \"label\"=>$row->name, \"id\"=>$row->template_id);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $list;\r\n\t}", "public function get()\n {\n return $this->templates;\n }", "public static function get_templates($conn, $from = 0, $max = 20, $search = '') \n {\n Ossim_db::check_connection($conn);\n \n $list = array();\n \n $num_rows = 0;\n \n // Filter if am i proadmin\n $perms_where = '';\n $users_allowed = array();\n \n if (self::is_pro() && Acl::am_i_proadmin()) \n {\n if (is_array($_SESSION['_user_vision']['users_to_assign'])) \n {\n foreach ($_SESSION['_user_vision']['users_to_assign'] as $user => $perm) \n {\n if ($perm && $user != self::get_session_user())\n { \n $users_allowed[] = $user; \n }\n }\n }\n \n if (count($users_allowed) > 0) \n {\n $perms_where = \"WHERE (id NOT IN (SELECT DISTINCT template_id FROM users) OR id IN (SELECT DISTINCT template_id FROM users WHERE login IN ('\".implode(\"', '\", $users_allowed).\"')))\";\n } \n else \n {\n $perms_where = \"WHERE id NOT IN (SELECT DISTINCT template_id FROM users)\";\n }\n }\n \n //Search filter\n if($search != '' && preg_match('/where/i', $perms_where)) \n {\n $search = preg_replace('/where/i', 'AND', $search);\n }\n \n $query = \"SELECT SQL_CALC_FOUND_ROWS HEX(id) as id, name FROM acl_templates $perms_where $search LIMIT $from, $max\";\n \n $rs = $conn->Execute($query);\n \n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n {\n $total = $conn->Execute('SELECT FOUND_ROWS() AS counter');\n \n if (!$total->EOF) \n {\n $num_rows = $total->fields['counter'];\n }\n \n while (!$rs->EOF) \n {\n // Get users assigned\n $users = array();\n $query = 'SELECT login FROM users WHERE template_id = UNHEX(?)';\n \n $rs_2 = $conn->Execute($query, array($rs->fields['id']));\n \n if (!$rs_2) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n {\n while (!$rs_2->EOF) \n {\n $users[] = $rs_2->fields['login'];\n \n $rs_2->MoveNext();\n }\n }\n \n // Get sections allowed\n $total = $conn->Execute(\"SELECT count(*) AS total FROM acl_perm WHERE type = 'MENU' AND description != '' AND enabled = 1\");\n \n $conf = $GLOBALS['CONF'];\n $av_features = ($conf->get_conf('advanced_features') == 1) ? TRUE : FALSE;\n \n \n // av_features = 1 Enable advanced features\n // 50 = Analysis -> Detection -> Anomalies\n // 80 = Configuration -> Network Discovery\n \n if (!$total->EOF)\n {\n $total_perms = $total->fields['total'];\n $total_perms = ($av_features == TRUE) ? $total_perms : $total_perms-2;\n }\n \n $total_perms = ($total_perms < 1) ? 1 : $total_perms;\n \n $total = $conn->Execute(\"SELECT count(*) AS num FROM acl_templates_perms WHERE ac_templates_id = UNHEX(?)\", array($rs->fields['id']));\n \n if (!$total->EOF) \n {\n $count_perms = $total->fields['num'];\n $count_perms = ($count_perms > $total_perms) ? $total_perms : $count_perms;\n }\n \n $perc = round($count_perms * 100 / $total_perms);\n \n $list[] = array(\n \"id\" => $rs->fields['id'],\n \"name\" => $rs->fields['name'],\n \"users\" => implode(', ', $users),\n \"percent\" => $perc\n );\n \n $rs->MoveNext();\n }\n }\n \n return array($list, $num_rows);\n }", "public function getTemplates() {\n $pages = Templates::templates()->paginate(Templates::getPageSize());\n\n return response()->json($pages);\n }", "protected function templatesSelectList(){\n $selectList = array('' => 'Default (Vertical List)');\n foreach( $this->templateAndDirectoryList() AS $fileSystemHandle => $path ){\n if( strpos($fileSystemHandle, '.') !== false ){\n $selectList[ $fileSystemHandle ] = substr($this->getHelper('text')->unhandle($fileSystemHandle), 0, strrpos($fileSystemHandle, '.'));\n }else{\n $selectList[ $fileSystemHandle ] = $this->getHelper('text')->unhandle($fileSystemHandle);\n }\n }\n return $selectList;\n }", "function GetTemplates($userid=0)\n\t{\n\t\t$this->GetDb();\n\n\t\t$qry = \"SELECT templateid, name, ownerid FROM \" \n\t\t . SENDSTUDIO_TABLEPREFIX \n\t\t . \"templates\";\n\t\t\n\t\tif ($userid) {\n\t\t\t$qry .= \" AS t, \" . SENDSTUDIO_TABLEPREFIX \n\t\t\t . \" usergroups_access AS a \"\n\t\t\t . \" WHERE \"\n\t\t\t . \" a.resourceid = t.templateid AND \" \n\t\t\t . \" a.resourcetype = 'templates' \";\n\t\t\t$qry .= \" OR t.ownerid='\" . $this->Db->Quote($userid) . \"'\";\n\t\t} else {\n\t\t\tif (!$this->TemplateAdmin()) {\n\t\t\t\t$qry .= \" WHERE ownerid='\" . $this->Db->Quote($this->userid) . \"'\";\n\t\t\t\t\n\t\t\t\tif (!empty($this->access['templates'])) {\n\t\t\t\t\t$qry .= \" OR templateid IN (\" . implode(',', $this->access['templates']) . \")\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$qry .= \" OR isglobal='1'\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$qry .= \" ORDER BY LOWER(name) ASC\";\n\n\t\t$templates = array();\n\t\t$result = $this->Db->Query($qry);\n\t\t\n\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\t$templates[$row['templateid']] = $row['name'];\n\t\t}\n\n\t\treturn $templates;\n\t}", "public static function msgTemplatesList(){\n $accessToken = WxApi::accessToken();\n $offset = 0;\n $count = 5;\n $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=' . $accessToken;\n $postFields = json_encode(array(\n // \"access_token\" => $accessToken,\n \"offset\" => 0,\n \"count\" => 5,\n ));\n $api = curl_init();\n curl_setopt($api, CURLOPT_URL, $url);\n curl_setopt($api, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($api, CURLOPT_HEADER, false);\n curl_setopt($api, CURLOPT_POST, true);\n curl_setopt($api, CURLOPT_POSTFIELDS, $postFields);\n $listObj = curl_exec($api);\n curl_close($api);\n $listObj = json_decode($listObj);\n if($listObj->errcode != 0){\n return NULL;\n }else{\n return $listObj->list;\n // return json_encode($listObj->list);\n }\n }", "public function fetchAll()\n {\n $templateTypeTable = new Api_Model_DbTable_TemplateType();\n\n $rowset = $templateTypeTable->fetchAll(null, 'name');\n\n $templateTypes = new Set();\n foreach ($rowset as $row) {\n $templateType = Type::factory($row);\n\n $templateTypes->addItem($templateType);\n }\n\n return $templateTypes;\n }", "public function onGetPageTemplates(Event $event)\n {\n $event->types->scanTemplates(__DIR__.\"/templates\");\n }", "public function getPushoverTemplateDropdownValues()\n\t{\n\t\t$templates = [];\n\n\t\t$finder = new FileFinder();\n\t\t$finder->setOption('name_regex', '/^.*\\.ss$/');\n\n $parent = $this->getFormParent();\n\t\t\n if (!$parent) {\n return [];\n }\n\n $pushoverTemplateDirectory = $parent->config()->get('pushover_template_directory');\n $templateDirectory = ModuleResourceLoader::resourcePath($pushoverTemplateDirectory);\n\n if (!$templateDirectory) {\n\t\t\treturn [];\n }\n\t\t\n $found = $finder->find(BASE_PATH . DIRECTORY_SEPARATOR . $templateDirectory);\n\n\t\tforeach ($found as $key => $value) {\n\t\t\t$template = pathinfo($value);\n $absoluteFilename = $template['dirname'] . DIRECTORY_SEPARATOR . $template['filename'];\n\n // Optionally remove vendor/ path prefixes\n $resource = ModuleResourceLoader::singleton()->resolveResource($templateDirectory);\n if ($resource instanceof ModuleResource && $resource->getModule()) {\n $prefixToStrip = $resource->getModule()->getPath();\n } else {\n $prefixToStrip = BASE_PATH;\n }\n $templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1);\n\n // Optionally remove \"templates/\" prefixes\n if (preg_match('/(?<=templates\\/).*$/', $templatePath, $matches)) {\n $templatePath = $matches[0];\n }\n\n $templates[$templatePath] = $template['filename'];\n }\n return $templates;\n\t}", "function get_all_templates () {\n global $dbconnect;\n $query = \"SELECT * FROM emails ORDER BY email_id ASC;\";\n $result = mysql_query($query, $dbconnect);\n confirm_query($result);\n return $result;\n}", "public static function loadTemplateData()\n {\n $templateId = 0;\n $app = Factory::getApplication();\n\n if ($app->isClient('site'))\n {\n $currentTemplate = $app->getTemplate(true);\n $templateId = $currentTemplate->id ?? 0;\n\n\t\t\t/**\n\t\t\t * If a page/menu is assigned to a specific template\n\t\t\t * then get the template ID.\n\t\t\t */\n\t\t\t$activeMenu = $app->getMenu()->getActive();\n\n\t\t\tif (!empty($activeMenu) && !empty($activeMenu->template_style_id))\n\t\t\t{\n\t\t\t\t$templateId = $activeMenu->template_style_id;\n\t\t\t}\n }\n else\n {\n if ($app->input->get('option') === 'com_ajax' && $app->input->get('helix') === 'ultimate')\n {\n $templateId = $app->input->get('id', 0, 'INT');\n }\n }\n\n\t\tif (empty($templateId))\n\t\t{\n\t\t\t$templateId = $app->input->get('helix_id', 0, 'INT');\n\t\t}\n\n if($templateId)\n {\n $template = [];\n\n $draftKeyOptions = [\n 'option' => 'com_ajax',\n 'helix' => 'ultimate',\n 'status' => 'draft',\n 'id' => $templateId\n ];\n\n $draftKey = self::generateKey($draftKeyOptions);\n $cache = new HelixCache($draftKey);\n\n /**\n * Check the fetch destination. If it is iframe then load the settings\n * from draft, otherwise if it is document that means this request\n * comes from the original site visit. So load from saved cache.\n */\n $requestFromIframe = $app->input->get('helixMode', '') === 'edit';\n \n if ($cache->contains() && $requestFromIframe)\n {\n $template = $cache->loadData();\n }\n else\n {\n $keyOptions = [\n 'option' => 'com_ajax',\n 'helix' => 'ultimate',\n 'status' => 'init',\n 'id' => $templateId\n ];\n \n $key = self::generateKey($keyOptions);\n $cache->setCacheKey($key);\n \n if ($cache->contains())\n {\n $template = $cache->loadData();\n }\n else\n {\n $template = self::getTemplateStyle($templateId); \n }\n }\n\n\t\t\tif (isset($template->template) && !empty($template->template))\n\t\t\t{\n\t\t\t\tif (!empty($template->params) && \\is_string($template->params))\n\t\t\t\t{\n\t\t\t\t\t$template->params = new Registry($template->params);\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * If params field is found empty in the database or cache then\n\t\t\t\t * read the default options.json file from the template and assign\n\t\t\t\t * the options as template params.\n\t\t\t\t */\n\t\t\t\telseif (empty($template->params))\n\t\t\t\t{\n\t\t\t\t\t$filePath = JPATH_ROOT . '/templates/' . $template->template . '/' . 'options.json';\n\n\t\t\t\t\tif (\\file_exists($filePath))\n\t\t\t\t\t{\n\t\t\t\t\t\t$defaultParams = \\file_get_contents($filePath);\n\t\t\t\t\t\t$template->params = new Registry($defaultParams);\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$template->params = new Registry;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn $template;\n\t\t\t}\n }\n\n $template = new \\stdClass;\n $template->template = 'system';\n $template->params = new Registry;\n\n return $template;\n }", "function getTemplateFiles()\r\n{\r\n\t$directory = \"models/site-templates/\";\r\n\t$languages = glob($directory . \"*.css\");\r\n\t//print each file name\r\n\treturn $languages;\r\n}", "function templateToUse() {\n\t\t// loop until templateType = name | custom\n\t\t$templateType = $this->getTemplateType();\n\t\t$templateCustom = $this->getTemplateCustom();\n\t\t$templateName = $this->getTemplateName();\n\t\t$articleName = $this->getTitleArticle();\n\t\t$articleId = $this->getId();\n\t\t$parent = $this->parent();\n\t\t\n\t\t$i = 0;\n\t\twhile ($templateType != 'name' && $templateType != 'custom' && $parent !== null) {\n\t\t\t$templateType = $parent->getTemplateType();\n\t\t\t$templateCustom = $parent->getTemplateCustom();\n\t\t\t$templateName = $parent->getTemplateName();\n\t\t\t$articleName = $parent->getTitleArticle();\n\t\t\t$articleId = $parent->getId();\n\t\t\t$parent = $parent->parent();\n\t\t}\n\t\t\n\t\t/*\n\t\techo \"<br><br>templateType: \" . $templateType;\n\t\techo \"<br>templateCustom: \" . $templateCustom;\n\t\techo \"<br>templateName: \" . $templateName;\n\t\techo \"<br>articleName: \" . $articleName;\n\t\techo \"<br>articleID: $articleId\";\n\t\t// */\n\t\t\n\t\t$templates = polarbear_getTemplates();\n\t\t\n\t\tpb_pqp_log_speed(\"article templateToUse\");\n\t\t\n\t\tif ($templateType == 'custom') {\n\t\t\treturn $templateCustom;\n\t\t} else if (isset($templates[$templateName])) {\n\t\t\treturn $templates[$templateName]['file'];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "public function loadMatchingTemplate()\n {\n $assignments = self::getAssignments();\n $hlp = $this;\n $matches = array_filter($assignments, function ($data) use ($hlp) {\n return $hlp::matchPagePattern($data['pattern']);\n });\n\n $template = array_pop($matches);\n return $template;\n }", "public function resolveTemplateName($name);", "protected function readTemplatePacks() {\n\t\tif ($this->items) {\n\t\t\t$sql = \"SELECT\t\tpack.*, COUNT(template.templateID) AS templates\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_template_pack pack\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_template template\n\t\t\t\tON\t\t(template.templatePackID = pack.templatePackID)\n\t\t\t\tGROUP BY\tpack.templatePackID\n\t\t\t\tORDER BY\t\".($this->sortField != 'templates' ? 'pack.' : '').$this->sortField.\" \".$this->sortOrder;\n\t\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$this->templatePacks[] = $row;\n\t\t\t}\n\t\t}\n\t}", "public function getTemplate() {}", "public static function get_available_templates( $type ) {\n $paths = glob( get_template_directory() . \"/portfolio/$type*.php\" );\n $names = array();\n\n foreach ( $paths as $path ) {\n $file_data = get_file_data( $path, array( 'Portfolio Style' ) );\n $names[] = $file_data[0];\n }\n\n return $names;\n }", "abstract protected function getTemplateFilenameIterator(): \\Traversable;", "public function getTemplateName(): string;", "public function loadTemplate()\n\t\t{\n\t\t}", "public function load(string $templateName): string;", "function mail_template_load($name, $locale, $strict = false)\n{\n static $templates = array();\n\n if (!isset($templates[$locale][$name])) {\n // Try to load the template from the database.\n $template = Database::getInstance()->query(\n \"SELECT * FROM {mailtemplate} WHERE name = :name AND locale = :locale\",\n array(\n ':name' => $name,\n ':locale' => $locale,\n ),\n array(\n 'return_rows' => Database::RETURN_ONE_ROW,\n )\n );\n\n if (!$template) {\n if ($strict) {\n return false;\n }\n\n // There is no template in the database.\n if ($locale == get_default_locale()) {\n // The template is still not found.\n $template = false;\n } else {\n // Try to load the template for the default locale.\n $template = mail_template_load($name, get_default_locale());\n }\n }\n\n $templates[$locale][$name] = $template;\n }\n\n return $templates[$locale][$name];\n}", "public function getTemplates()\n {\n $templates = SSViewer::get_templates_by_class(static::class, '', __CLASS__);\n // Prefer any custom template\n if ($this->getTemplate()) {\n array_unshift($templates, $this->getTemplate());\n }\n return $templates;\n }", "public function getShowTemplates();", "public function viewProvider()\n {\n $config = $this->getMartyConfig();\n $templateDir = $config['templateDir'];\n $templates = [];\n $it = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($templateDir));\n /** @var \\SplFileInfo $file */\n foreach ($it as $file) {\n if ($file->isFile() && $file->getExtension() == 'tpl') {\n $templateName = substr($file->getPathname(), strlen($templateDir) + 1);\n $templateId = str_replace(['/', '.tpl'], ['.', ''], $templateName);\n $templates[$templateId] = [$templateName];\n }\n }\n\n return $templates;\n }", "protected function getTemplates()\r\n\t{\r\n\t\t$templates = array();\r\n\t\tforeach ($this->getProjectDao()->getAllModelTemplates() as $template)\r\n\t\t\t$templates[$template->ID] = $template->Template;\r\n\t\treturn $templates;\r\n\t}", "function GetDocumentTemplates()\n\t{\n\t\t$result = $this->sendRequest(\"GetDocumentTemplates\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function templates()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['templates'] == 1 ) ? 'Skin Template' : 'Skin Templates';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t\n\t\tforeach ( $this->xml_array['templates_group']['template'] as $k => $v )\n\t\t{\n\t\t\t$this->ipsclass->DB->do_delete( 'skin_templates', \"set_id=1 AND group_name='\".$v['group_name']['VALUE'].\"' AND func_name='\".$v['func_name']['VALUE'].\"'\" );\n\t\t\t\n\t\t\tif ( !$this->ipsclass->input['un'] )\n\t\t\t{\n\t\t\t\t$this->_add_template( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['templates']} {$object} {$operation}....\" );\n\t}", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "function get_template()\n {\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "function db_get_template ($tpl_name, &$tpl_source, &$smarty_obj) {\n Global $loq;\n $rs = $loq->_adb->Execute(\"select template from \".T_TEMPLATES.\" where templatename='$tpl_id'\");\n if($rs !== false && !$rs->EOF){\n $tpl_source = $rs->fields[0];\n }\n return true;\n}", "function get_mail_template( $varname ) {\n // based on the received template name\n $query = $this->db->query(\"Select * from email_templates where template_name='$varname'\");\n\n\t return\t$row = $query->row_array(); \n\t\t\n\t}", "private function mergeData()\n {\n\n $files = $this->files;\n $folders = $this->folders;\n $this->templates = [];\n\n if($this->deletedTemplates) {\n\n if ($folders) {\n foreach ($folders as $item) {\n if ($item->is_dir) {\n $this->templates[] = $item;\n } else {\n $this->folderReferenceFiles[] = $item;\n $this->templates[] = $this->fileFindById($item->reference_id);\n }\n }\n }\n\n } else {\n\n if ($folders) {\n foreach ($folders as $item) {\n if ($item->is_dir) {\n $this->templates[] = $item;\n } else {\n $this->folderReferenceFiles[] = $item;\n }\n }\n }\n\n if($files) {\n foreach($files as $file) {\n $file['parent_id'] = $this->findParentIdByRefId($file->id);\n $file['ancestors'] = $this->getFileAncestors($file->id);\n $this->templates[] = $file;\n }\n }\n }\n\n if(!$this->limit) {\n return $this->templates;\n }\n $this->templates = Paginator::make($this->templates, $this->folders->getTotal(), $this->folders->getPerPage());\n return true;\n }", "function getTemplates($use_defintion, $template_id = null) {\n\t\t$conditions = array();\n\t\t$find_type = $template_id? 'first' : 'all';\n\t\tswitch($use_defintion) {\n\t\t\tcase 'template edition':\n\t\t\t\t$conditions = array(\n\t\t\t\t\t'OR' => array(\n\t\t\t\t\t\tarray('Template.owner' => 'user', 'Template.owning_entity_id' => AppController::getInstance()->Session->read('Auth.User.id')),\n\t\t\t\t\t\tarray('Template.owner' => 'bank', 'Template.owning_entity_id' => AppController::getInstance()->Session->read('Auth.User.group_id')),\n\t\t\t\t\t\tarray('Template.owner' => 'all')),\t\t\t\n\t\t\t\t\t// Both active and inactive template\n\t\t\t\t\t'Template.flag_system' => false);\n\t\t\t\tif(AppController::getInstance()->Session->read('Auth.User.group_id') == '1') unset($conditions['OR']);\t// Admin can work on all templates\n\t\t\t\tif($template_id) $conditions['Template.id'] = $template_id;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'template use':\n\t\t\t\t$conditions = array(\n\t\t\t\t\t'OR' => array(\n\t\t\t\t\t\tarray('Template.visibility' => 'user', 'Template.visible_entity_id' => AppController::getInstance()->Session->read('Auth.User.id')),\n\t\t\t\t\t\tarray('Template.visibility' => 'bank', 'Template.visible_entity_id' => AppController::getInstance()->Session->read('Auth.User.group_id')),\n\t\t\t\t\t\tarray('Template.visibility' => 'all'),\n\t\t\t\t\t\tarray('Template.flag_system' => true)),\n\t\t\t\t\t'Template.flag_active' => 1);\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tAppController::getInstance()->redirect('/Pages/err_plugin_system_error?method='.__METHOD__.',line='.__LINE__, null, true);\t\n\t\t}\n\t\t\n\t\t$templates = $this->find($find_type, array('conditions' => $conditions));\n\t\tif($templates && $find_type == 'first') {\n\t\t\t$templates['Template']['allow_properties_edition'] = ((AppController::getInstance()->Session->read('Auth.User.group_id') == 1) || (AppController::getInstance()->Session->read('Auth.User.id') == $templates['Template']['created_by']));\n\t\t}\n\t\treturn $templates;\n\t}", "function getTemplateFiles() {\n $directory = \"models/site-templates/\";\n $languages = glob($directory . \"*.css\");\n //print each file name\n return $languages;\n}", "function bok_locate_template( $template_names, $load = false, $require_once = true, $template_vars ) {\n\t// No file found yet\n\t$located = false;\n\n\t// Try to find a template file\n\tforeach ( (array) $template_names as $template_name ) {\n\n\t\t// Continue if template is empty\n\t\tif ( empty( $template_name ) )\n\t\t\tcontinue;\n\n\t\t// Trim off any slashes from the template name\n\t\t$template_name = ltrim( $template_name, '/' );\n\n\t\t// Check child theme first\n\t\tif ( file_exists( trailingslashit( get_stylesheet_directory() ) . 'multi-rating/' . $template_name ) ) {\n\t\t\t$located = trailingslashit( get_stylesheet_directory() ) . 'multi-rating/' . $template_name;\n\t\t\tbreak;\n\n\t\t\t// Check parent theme next\n\t\t} elseif ( file_exists( trailingslashit( get_template_directory() ) . 'multi-rating/' . $template_name ) ) {\n\t\t\t$located = trailingslashit( get_template_directory() ) . 'multi-rating/' . $template_name;\n\t\t\tbreak;\n\n\t\t\t// Check theme compatibility last\n\t\t} elseif ( file_exists( trailingslashit( bok_get_templates_dir() ) . $template_name ) ) {\n\t\t\t$located = trailingslashit( bok_get_templates_dir() ) . $template_name;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ( ( true == $load ) && ! empty( $located ) ) {\n\t\tbok_load_template( $located, $require_once, $template_vars );\n\t}\n\n\treturn $located;\n}", "function scan_templates_for_translations () {\r\n $this->CI->load->helper( 'file' );\r\n $filename = config_item( 'dummy_translates_filename' );\r\n\r\n // Clean Pattern for new file\r\n $clean_pattern = \"<?php\\n\";\r\n\r\n // Emptying file\r\n write_file( $filename, $clean_pattern );\r\n\r\n $path = realpath( config_item( 'current_template_uri' ) );\r\n $directory = new RecursiveDirectoryIterator( $path );\r\n $iterator = new RecursiveIteratorIterator( $directory );\r\n\r\n // Regex for no deprecated twig templates\r\n $regex = '/^((?!DEPRECATED).)*\\.twig$/i';\r\n $file_iterator = new RegexIterator( $iterator, $regex, RecursiveRegexIterator::GET_MATCH );\r\n\r\n $files = 0;\r\n $arr_strings = array();\r\n\r\n foreach( $file_iterator as $name => $object ) {\r\n $files++;\r\n\r\n // Mega regex for Quoted String tokens with escapable quotes\r\n // http://www.metaltoad.com/blog/regex-quoted-string-escapable-quotes\r\n $pattern = '/{%\\s?trans\\s?((?<![\\\\\\\\])[\\'\"])((?:.(?!(?<![\\\\\\\\])\\1))*.?)\\1/';\r\n $current_file = fopen( $name, 'r' );\r\n\r\n while ( ( $buffer = fgets( $current_file ) ) !== false ) {\r\n if ( preg_match_all( $pattern, $buffer, $matches ) ) {\r\n foreach( $matches[ 2 ] as $match ) {\r\n // Escaping quotes not yet escaped\r\n $match = preg_replace( '/(?<![\\\\\\\\])(\\'|\")/', \"\\'\", $match );\r\n array_push( $arr_strings, \"echo _( '$match' );\\n\" );\r\n }\r\n }\r\n }\r\n\r\n fclose( $current_file );\r\n }\r\n\r\n // Remove duplicates\r\n $arr_strings = array_unique( $arr_strings );\r\n write_file( $filename, implode( $arr_strings ), 'a' );\r\n\r\n $result = array(\r\n 'templates' => $files,\r\n 'strings' => count( $arr_strings ),\r\n 'output' => $filename,\r\n 'lint' => check_php_file_syntax( $filename )\r\n );\r\n\r\n return $result;\r\n }", "public static function resetTemplates()\n\t{\n\t\tself::$_template_names = array();\n\t}", "function getTemplateFiles() // used in admin_configuration.php\r\n\r\n{\r\n\r\n\t$directory = \"models/site-templates/\";\r\n\r\n\t$languages = glob($directory . \"*.css\");\r\n\r\n\t//print each file name\r\n\r\n\treturn $languages;\r\n\r\n}", "protected function getAvailableTemplates( )\n\t{\n\t\t$available_templates = $this->getConfig( 'templates' );\n\n\t\treturn $available_templates;\n\t}", "public function get_templates($data)\n {\n $res = $this->service->getApi()->getAllTemplates();\n return $res;\n }" ]
[ "0.6913435", "0.6302367", "0.6262201", "0.62236094", "0.6190175", "0.61651254", "0.61639214", "0.6068347", "0.60488683", "0.60366875", "0.59554374", "0.5886176", "0.58323765", "0.5802826", "0.5783429", "0.5732423", "0.57215095", "0.57186747", "0.5702361", "0.56959623", "0.56942606", "0.5693797", "0.56602484", "0.56408834", "0.56400627", "0.5639311", "0.5635848", "0.5610926", "0.55967635", "0.558256", "0.55824506", "0.55679023", "0.5563423", "0.5552835", "0.55354095", "0.5512365", "0.55091244", "0.5502699", "0.54934454", "0.5491091", "0.547992", "0.54769456", "0.5469823", "0.54632497", "0.5457886", "0.5450852", "0.5446435", "0.54272974", "0.53997475", "0.5399476", "0.53963894", "0.5393756", "0.5390519", "0.5385053", "0.5383772", "0.53690606", "0.5367152", "0.53656965", "0.53575075", "0.5355893", "0.535435", "0.5342911", "0.5337315", "0.53355694", "0.53352696", "0.5326017", "0.5322434", "0.5320875", "0.5320721", "0.53197056", "0.5317228", "0.5309667", "0.5294905", "0.52887297", "0.5288152", "0.5286516", "0.52826405", "0.52725303", "0.5270033", "0.5269115", "0.52590835", "0.52590835", "0.52590835", "0.52590835", "0.52590835", "0.52590835", "0.5253396", "0.52529556", "0.52529556", "0.5246777", "0.52419025", "0.52385104", "0.5225802", "0.5220102", "0.5215398", "0.5214906", "0.52071005", "0.5203353", "0.5200603", "0.5200553" ]
0.5855509
12
Generate versions of an image file that are scaled according to the configured scaling templates.
public function generateTemplateScaledImages($filename, $id, $overwrite = false) { if ($filename && $id) { $templates = $this->getTemplateNames(); foreach ($templates as $t) { try { $this->scaleAndStore($filename, $id, $t, $overwrite); } catch(Exception $e) { throw new Exception("Error scaling ".$filename." (#".$id."): ".$e->getMessage()); } } } else throw new Exception('A filename and id were not provided. Filename ['.$filename.'] Id ['.$id.']'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function scaleImages() {}", "private function generate()\n {\n $originalImages = Storage::files(env('PHOTO_PATH'));\n\n foreach ($originalImages as $originalImage) {\n $pieces = explode('/', $originalImage);\n\n $exp = explode('.', end($pieces));\n\n $extension = end($exp);\n\n array_pop($exp);\n\n $imageId = implode('.', $exp);\n\n $photos = [];\n\n foreach ($this->dimensions as $key => $dimension) {\n $fileName = env('PHOTO_PATH_RESIZE') . \"{$imageId}_{$key}.$extension\";\n\n if (! Storage::exists($fileName)) {\n $img = Image::make(Storage::get($originalImage));\n $img->resize($dimension['width'], $dimension['height']);\n\n Storage::put($fileName, (string)$img->encode(), 'public');\n\n if (Storage::exists($fileName)) {\n $photos[$key] = asset(Storage::url($fileName));\n }\n }\n }\n\n /**\n * Save on Storage\n */\n if (count($photos)) {\n $photo = new Photo();\n $photo->name = $imageId;\n $photo->photos = $photos;\n $photo->photos = $photos;\n $photo->save();\n }\n }\n }", "private function generateThumbnailImagick(){\n\t}", "private function generateThumbnailGD(){\n\t\t\n\t}", "function PREFIX_add_image_sizes() {\n\t/*\n\t// 16:9\n\tadd_image_size( 'wide-xsmall', 295, 165, true );\n\tadd_image_size( 'wide-small', 360, 202, true );\n\tadd_image_size( 'wide-medium', 470, 264, true );\n\tadd_image_size( 'wide-large', 770, 433, true );\n\tadd_image_size( 'wide-xlarge', 1440, 810, true );\n\n\t// 4x3\n\tadd_image_size( 'ratio-4-3-small', 300, 225, true );\n\tadd_image_size( 'ratio-4-3-medium', 470, 353, true );\n\tadd_image_size( 'ratio-4-3-large', 740, 555, true );\n\tadd_image_size( 'ratio-4-3-xlarge', 1440, 1080, true );\n\n\t// Golden Ratio\n\tadd_image_size( 'ratio-gold-small', 300, 300 * 0.618, true );\n\tadd_image_size( 'ratio-gold-medium', 470, 470 * 0.618, true );\n\tadd_image_size( 'ratio-gold-large', 740, 740 * 0.618, true );\n\tadd_image_size( 'ratio-gold-xlarge', 1440, 1440 * 0.618, true );\n\n\t// Square\n\tadd_image_size( 'square-xsmall', 160, 160, true );\n\tadd_image_size( 'square-small', 300, 300, true );\n\tadd_image_size( 'square-medium', 470, 470, true );\n\tadd_image_size( 'square-large', 800, 800, true );\n\t*/\n}", "function do_scaled() {\n $this->layout = FALSE;\n\n $status = $this->show_scaled_image(IMAGE_RESOLUTION, 'photos');\n if (TRUE !== $status) {\n $this->message($status);\n $this->redirect('/photo/index');\n }\n }", "function image_scale($src_abspath, $dest_abspath, $aspect, $width, $strategy)\n{\n $im = new \\Imagick($src_abspath);\n $im = image_scale_im_obj($im, $aspect, $width, $strategy);\n return image_return_write($im, $dest_abspath);\n}", "protected function makeThumbnails()\n {\n $sizes = [\n 'image_211' => [\n 'width' => 211,\n 'mode' => ImageInterface::THUMBNAIL_OUTBOUND,\n ],\n ];\n $data = $this->image;\n if (!$data) {\n return;\n }\n\n if (is_string($data)) {\n $tempFile = tempnam('/tmp', 'temp_');\n file_put_contents($tempFile, $data);\n $data = fopen($tempFile, 'r+');\n }\n\n if (stream_get_contents($data) == '') {\n return;\n }\n\n fseek($data, 0);\n $sourceImage = @ImagineImage::getImagine()->read($data);\n foreach ($sizes as $sizeName => $size) {\n $thumbnailAttributeName = $sizeName;\n if (!empty($size['width'])) {\n $width = $size['width'];\n if ($width < 0) {\n $originalWidgth = $sourceImage->getSize()->getWidth();\n if (-$originalWidgth < $width * 4) {\n $width = $sourceImage->getSize()->getWidth() + $width;\n } else {\n $width = $originalWidgth;\n }\n }\n } else {\n $width = null;\n }\n\n if (!empty($size['height'])) {\n $height = $size['height'];\n if ($height < 0) {\n $originalHeight = $sourceImage->getSize()->getHeight();\n if (-$originalHeight < $height * 4) {\n $height = $sourceImage->getSize()->getHeight() + $height;\n } else {\n $height = $originalHeight;\n }\n }\n } else {\n $height = null;\n }\n\n if (!empty($size['mode'])) {\n $mode = $size['mode'];\n } else {\n $mode = ImageInterface::THUMBNAIL_INSET;\n }\n\n BaseImage::$thumbnailBackgroundAlpha = 0;\n $image = ImagineImage::thumbnail($sourceImage, $width, $height, $mode);\n\n if (!empty($size['watermark'])) {\n $watermark = fopen($size['watermark'], 'r+');\n $watermark = ImagineImage::thumbnail($watermark, $image->getSize()->getWidth(), $image->getSize()->getHeight(), ManipulatorInterface::THUMBNAIL_OUTBOUND);\n $watermark = ImagineImage::crop($watermark, $image->getSize()->getWidth(), $image->getSize()->getHeight());\n\n $image = ImagineImage::watermark($image, $watermark);\n }\n\n $fileName = tempnam(sys_get_temp_dir(), 'test');\n $image->save($fileName, [\n 'format' => $this->image_extension,\n ]);\n\n $thumbData = fopen($fileName, 'r+');\n $this->$thumbnailAttributeName = $thumbData;\n }\n\n fseek($data, 0);\n }", "public function generate() {\n\t\t$modelName = $this->in(__('Which model would you like to regenerate thumbnails for?'));\n\n\t\ttry {\n\t\t\t$this->loadModel($modelName);\n\t\t} catch (Exception $exc) {\n\t\t\t$this->out(__('<error>' . $exc->getMessage() . '</error>'));\n\t\t\texit;\n\t\t}\n\n\t\tif (get_class($this->{$modelName}) === 'AppModel') {\n\t\t\t$this->out(__(\"<error>Model '$modelName' not found.</error>\"));\n\t\t\texit;\n\t\t}\n\n\t\tif (!$this->{$modelName}->Behaviors->attached('Upload')) {\n\t\t\t$this->out(__(\"<error>Model '$modelName' does not use the Upload behavior.</error>\"));\n\t\t\texit;\n\t\t}\n\n\t\t$uploadBehavior = new ShellUploadBehavior;\n\t\t$behaviorConfig = $this->{$modelName}->actsAs['Upload.Upload'];\n\n\t\tforeach ($behaviorConfig as $field => $config) {\n\t\t\t$mergedConfig = array_merge($uploadBehavior->defaults, $config);\n\n\t\t\t$options = array(\n\t\t\t\t'isThumbnail' => true,\n\t\t\t\t'path' => $mergedConfig['path'],\n\t\t\t\t'rootDir' => $mergedConfig['rootDir'],\n\t\t\t);\n\n\t\t\t$files = $this->{$modelName}->find('all', array(\n\t\t\t\t'fields' => [$this->{$modelName}->primaryKey, $field, $mergedConfig['fields']['dir']],\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t$modelName . '.' . $field . \" IS NOT NULL\"\n\t\t\t\t)\n\t\t\t));\n\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$this->{$modelName}->Behaviors->load('ShellUpload', $behaviorConfig);\n\t\t\t\t$sourceFilePath = $this->{$modelName}->path($field, $options) . $file[$modelName][$mergedConfig['fields']['dir']] . DS . $file[$modelName][$field];\n\t\t\t\t$this->{$modelName}->Behaviors->unload('ShellUpload');\n\n\t\t\t\tif (!file_exists($sourceFilePath)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// $field needs to be an array like uploading an image\n\t\t\t\t$fieldData = array(\n\t\t\t\t\t'name' => basename($sourceFilePath),\n\t\t\t\t\t'type' => mime_content_type($sourceFilePath),\n\t\t\t\t\t'size' => filesize($sourceFilePath),\n\t\t\t\t\t'tmp_name' => $sourceFilePath,\n\t\t\t\t\t'error' => UPLOAD_ERR_OK\n\t\t\t\t);\n\n\t\t\t\t$data = array(\n\t\t\t\t\t$this->{$modelName}->primaryKey => $file[$modelName][$this->{$modelName}->primaryKey],\n\t\t\t\t\t$field => $fieldData,\n\t\t\t\t\t$config['fields']['dir'] => $file[$modelName][$this->{$modelName}->primaryKey],\n\t\t\t\t);\n\n\t\t\t\tif ($this->{$modelName}->hasField('modified')) {\n\t\t\t\t\t$data['modified'] = false;\n\t\t\t\t}\n\n\t\t\t\t$this->{$modelName}->set($data);\n\n\t\t\t\tif ($this->{$modelName}->save(null, false)) {\n\t\t\t\t\t$this->out(__(\"Created thumbnails in {$file[$modelName][$mergedConfig['fields']['dir']]} for {$file[$modelName][$field]}\"));\n\t\t\t\t} else {\n\t\t\t\t\t$this->out(__(\"<error> Could not create thumbnails in {$file[$modelName][$mergedConfig['fields']['dir']]} for {$file[$modelName][$field]}</error>\"));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function testThemeImageWithSizes() {\n // Test with multipliers.\n $sizes = '(max-width: ' . rand(10, 30) . 'em) 100vw, (max-width: ' . rand(30, 50) . 'em) 50vw, 30vw';\n $image = [\n '#theme' => 'image',\n '#sizes' => $sizes,\n '#uri' => reset($this->testImages),\n '#width' => rand(0, 1000) . 'px',\n '#height' => rand(0, 500) . 'px',\n '#alt' => $this->randomMachineName(),\n '#title' => $this->randomMachineName(),\n ];\n $this->render($image);\n\n // Make sure sizes is set.\n $this->assertRaw($sizes, 'Sizes is set correctly.');\n }", "function wp_create_image_subsizes($file, $attachment_id)\n {\n }", "function makesitesmages()\n\t{\n\n\t\tglobal $option, $mainframe;\n\n\t\t//First we'll nee access to the file system and we'll use the Joomla way to be all safe.\n\t\tjimport('joomla.filesystem.file');\n\t\t$uploads_path = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"masters\" ;\n\t\t$site_path = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"site\" ;\n\n\t\t// this is the width in px that we're telling GD to scale to, where's imagemagik when you need it.\n\t\t$new_w = 235;\n\t\t// where our source images live b/c GD needs to read them\n\t\t$cfg_fullsizepics_path = $uploads_path;\n\t\t//where we're sending them when we are done\n\t\t$cfg_thumb_path = $site_path;\n\t\t// we need one more path for this to work\n\t\t$filepath = $uploads_path ;\n\t\t// the directory\n\t\t$dir = dir($filepath);\n\n\t\t//check folders\n\t\t\t\n\t\twhile($entry=$dir->read()) {\n\t\t\t//check the files\n\t\t\tif($entry == \".\" || $entry == \"..\") {\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\n\t\t\t$fp = @fopen(\"$filepath/$entry\",\"r\");\n\n\t\t\t$photo_filename = \"$entry\";\n\n\t\t\t$image_stats = GetImageSize($cfg_fullsizepics_path.\"/\".$entry);\n\n\t\t\t$imagewidth = $image_stats[0];\n\n\t\t\t$imageheight = $image_stats[1];\n\n\t\t\t$img_type = $image_stats[2];\n\n\t\t\t$ratio = ($imagewidth / $new_w);\n\n\t\t\t$new_h = round($imageheight / $ratio);\n\n\t\t\tif (!file_exists($cfg_thumb_path.\"/\".$entry)) {\n\n\t\t\t\tif ($img_type==\"2\") {\n\n\t\t\t\t\t$src_img = imagecreatefromjpeg($cfg_fullsizepics_path.\"/\".$entry);\n\n\t\t\t\t\t$dst_img = imagecreatetruecolor($new_w,$new_h);\n\n\t\t\t\t\timagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));\n\n\t\t\t\t\timagejpeg($dst_img, \"$cfg_thumb_path\".\"/$entry\", 100);\n\t\t\t\t\t\t\n\t\t\t\t\timagedestroy($dst_img);\n\n\t\t\t\t} elseif ($img_type==\"3\") {\n\n\t\t\t\t\t$src_img=ImageCreateFrompng($cfg_fullsizepics_path.\"/\".$entry);\n\t\t\t\t\t \n\t\t\t\t\t$dst_img=ImageCreateTrueColor($new_w,$new_h);\n\t\t\t\t\t\t\n\t\t\t\t\tImageCopyResampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));\n\n\t\t\t\t\tImagepng($dst_img, \"$cfg_thumb_path\".\"/$entry\",100);\n\n\t\t\t\t\timagedestroy($dst_img);\n\n\t\t\t\t} elseif ($img_type==\"1\") {\n\n\t\t\t\t\t$cfg_thumb_url=$cfg_fullsizepics_url;\n\n\t\t\t\t} \n\n\t\t\t}\n\n\n\t\t\t\t\n\t\t} //the files are now in the /images/content/sketchup/site directory\n\n\n\t\t//$this->setRedirect( 'index.php?option=' . $option.'&task=movesiteimages&controller=items', 'Site Images made' );\n\t\t$this->setRedirect( 'index.php?option=' . $option, 'Site Images made' );\n\t\n\t}", "public function testThemeImageWithSrcsetMultiplier() {\n // Test with multipliers.\n $image = [\n '#theme' => 'image',\n '#srcset' => [\n [\n 'uri' => $this->testImages[0],\n 'multiplier' => '1x',\n ],\n [\n 'uri' => $this->testImages[1],\n 'multiplier' => '2x',\n ],\n ],\n '#width' => rand(0, 1000) . 'px',\n '#height' => rand(0, 500) . 'px',\n '#alt' => $this->randomMachineName(),\n '#title' => $this->randomMachineName(),\n ];\n $this->render($image);\n\n // Make sure the srcset attribute has the correct value.\n $this->assertRaw($this->fileUrlGenerator->transformRelative($this->fileUrlGenerator->generateString($this->testImages[0])) . ' 1x, ' . $this->fileUrlGenerator->transformRelative($this->fileUrlGenerator->generateString($this->testImages[1])) . ' 2x', 'Correct output for image with srcset attribute and multipliers.');\n }", "function generate_image_sizes() {\n\t$display_options = get_customizer_settings()[ WPM_PREFIX . 'collection_style' ];\n\n\tadd_image_size(\n\t\tWPM_PREFIX . 'list_thumb',\n\t\t$display_options['list_image_max_width'],\n\t\t$display_options['list_image_max_height']\n\t);\n}", "function small($sfp,$w='',$h='',$scale=true) {\n if(empty($sfp)){\n echo iCMS_FS_URL.'1x1.gif';\n return;\n }\n if(strpos($sfp,'_')!==false){\n if(preg_match('|.+\\d+x\\d+\\.jpg$|is', $sfp)!=0){\n echo $sfp;\n return;\n }\n }\n $uri = parse_url(iCMS_FS_URL);\n if(stripos($sfp,$uri['host']) === false){\n echo $sfp;\n return;\n }\n\n if(empty(iCMS::$config['thumb']['size'])){\n echo $sfp;\n return;\n }\n\n $size_map = explode(\"\\n\", iCMS::$config['thumb']['size']);\n $size_map = array_map('trim', $size_map);\n $size_map = array_flip($size_map);\n $size = $w.'x'.$h;\n if(!isset($size_map[$size])){\n echo $sfp;\n return;\n }\n\n if(iCMS::$config['FS']['yun']['enable']){\n if(iCMS::$config['FS']['yun']['sdk']['QiNiuYun']['Bucket']){\n echo $sfp.'?imageView2/1/w/'.$w.'/h/'.$h;\n return;\n }\n if(iCMS::$config['FS']['yun']['sdk']['TencentYun']['Bucket']){\n echo $sfp.'?imageView2/2/w/'.$w.'/h/'.$h;\n return;\n }\n }\n echo $sfp.'_'.$size.'.jpg';\n}", "public function reprocess()\n {\n $fileLocation = $this->storage == 'filesystem' ? $this->path('original') : $this->url('original');\n\n if (!$this->originalFilename() || !file_exists($fileLocation)) {\n return;\n }\n\n foreach ($this->styles as $style) {\n $file = FileFactory::create($fileLocation);\n\n $ext = pathinfo($file->getFilename(), PATHINFO_EXTENSION);\n if (\n $style->dimensions\n && (\n $file->isImage()\n || in_array($ext, ['psd', 'ai', 'eps', 'ar3'])\n )\n ) {\n if ($ext == 'psd') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/psd.png'), 'psd.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($ext == 'ai') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/ai.png'), 'ai.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($ext == 'eps') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/eps.png'), 'eps.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($ext == 'ar3') {\n $uploadedFile = new UploadedFile(\n new SymfonyUploadedFile(public_path('img/files/ar3.png'), 'ar3.png')\n );\n $file = $this->resizer->resize($uploadedFile, $style);\n }\n else if ($file->isImage()) {\n $file = $this->resizer->resize($file, $style);\n }\n }\n else {\n $file = $file->getRealPath();\n }\n\n $filePath = $this->path($style->name);\n $this->move($file, $filePath);\n }\n }", "public function resizeImage($filepath) {\n if (is_file($filepath)) {\n \n $dir_name = $this->destinationDirectory;\n\n $drawable_dpi = array();\n $drawable_dpi['drawable-ldpi'] = 0.1875;\n $drawable_dpi['drawable-mdpi'] = 0.25;\n $drawable_dpi['drawable-hdpi'] = 0.375;\n $drawable_dpi['drawable-xhdpi'] = 0.5;\n $drawable_dpi['drawable-xxhdpi'] = 0.75;\n $drawable_dpi['drawable-xxxhdpi'] = 1.0;\n\n $mipmap_dpi = array();\n $mipmap_dpi['mipmap-ldpi'] = 0.1875;\n $mipmap_dpi['mipmap-mdpi'] = 0.25;\n $mipmap_dpi['mipmap-hdpi'] = 0.375;\n $mipmap_dpi['mipmap-xhdpi'] = 0.5;\n $mipmap_dpi['mipmap-xxhdpi'] = 0.75;\n $mipmap_dpi['mipmap-xxxhdpi'] = 1.0;\n\n $selected_dpi = array();\n if($this->folderCode == 0) {\n $selected_dpi = $drawable_dpi; \n }\n if($this->folderCode == 1) {\n $selected_dpi = $mipmap_dpi; \n }\n if($this->folderCode == 2) {\n $selected_dpi = array_merge($drawable_dpi, $mipmap_dpi); \n }\n\n\n // Content type\n $image_ext = \"png\";\n header('\"Content-Type: image/\"'.$image_ext);\n\n // Get new sizes\n $dir_path = $this->dirHelper($dir_name);\n $imageFileName = $this->extract_file_name($filepath);\n $final_dir_path = $dir_path.\"res/\"; \n if (!is_dir($final_dir_path)) {\n mkdir($final_dir_path);\n }\n foreach ($selected_dpi as $key => $value) {\n if (!is_dir($final_dir_path.$key)) {\n mkdir($final_dir_path.$key);\n }\n list($width, $height) = getimagesize($filepath);\n $newwidth = $width * $value;\n $newheight = $height * $value;\n\n // Load\n $thumb = imagecreatetruecolor($newwidth, $newheight);\n $source = imagecreatefrompng($filepath);\n\n // Resize\n imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n imagepng($thumb, $final_dir_path.$key.\"/\".$imageFileName);\n }\n echo \"<h1>$filepath has been resized into different sizes</h1>\";\n }\n elseif(!file_exists($filepath)) {\n echo \"<h1>Invalid File path</h1>\";\n }\n else {\n echo \"<h1>This is not a file</h1>\";\n }\n\n }", "function generateImage($source_file, $cache_file, $resolution_req) {\t/* Renamed $resolution to $resolution_req(ested), to not confuse this with the global variable! */\n \n global $sharpen, $sharpen_amount, $sharpen_progressive;\n\t\tglobal $jpg_quality, $jpg_quality_retina, $jpg_quality_progressive;\n\t\tglobal $setup_ratio, $wp_setup_ratio;\n global $is_highppi;\n\t\t\n\n\t\t// Double-check, if path exists and is writable\n $cache_dir = dirname($cache_file);\n\n /* does the directory exist already? */\n if (!is_dir($cache_dir)) { \n if (!mkdir($cache_dir, 0755, true)) {\n /* check again if it really doesn't exist to protect against race conditions */\n if (!is_dir($cache_dir)) {\n sendErrorImage(\"Failed to create cache directory: $cache_dir\");\n \t}\n \t}\n \t}\n\n if (!is_writable($cache_dir)) {\n sendErrorImage(\"The cache directory is not writable: $cache_dir\");\n \t}\n\t\t\n\t\t\n $extension = strtolower(pathinfo($source_file, PATHINFO_EXTENSION));\n\n /* Check the image dimensions */\n $dimensions = GetImageSize($source_file);\n $width = $dimensions[0];\n $height = $dimensions[1];\n\t\t\n\n /* Do we need to downscale the image? */\n /* because of cropping, we need to prozess the image\n if ($width <= $resolution) { // no, because the width of the source image is already less than the client width\n return $source_file;\n }\n */\n \n // General quality setting\n $jpg_quality_high = $jpg_quality;\n\t\tif ($is_highppi) $jpg_quality = $jpg_quality_retina;\n\t\t\n\n\t\t \n\t\t// TODO! ################\n\t\t// When jpg_quality_progressive \n\t\t// Do some clever stuff to only scale and compress when necessary\n\t\t// Or maybe even serve the original file\n\t\t\n\t\tif ($jpg_quality_progressive) {\n\t\t\t\n\t\t\t\t// Give slighly higher quality, when requested image is already very small\n\t\t\t\t$threshold_min = 320; /* px */\n\t\t\t\tif ($resolution_req <= $threshold_min and !$is_highppi) $jpg_quality = ($jpg_quality+1 > 100) ? 100 : $jpg_quality + 1;\n\t\t\t\tif ($resolution_req <= $threshold_min*1.5 and $is_highppi) $jpg_quality = ($jpg_quality+2 > 99) ? 99 : $jpg_quality + 2;\n\t\t\t\t\n\t\t\t\t// Lower quality just a bit more, when image should become relatively huge\n\t\t\t\t$threshold_max = 1280; /* px */\n\t\t\t\tif ( $resolution_req > $threshold_max and !$is_highppi) $jpg_quality = $jpg_quality - 3;\n\t\t\t\tif ( $resolution_req > $threshold_max*1.5 and $is_highppi) $jpg_quality = $jpg_quality - 2;\n\n\t\t\t\t// In case no cropping needs to be done and no high-ppi compression, and no resizing at all: we can serve the source file\n\t\t\t\tif (!$setup_ratio and $width <= $resolution_req and !$is_highppi) return $source_file;\n\t\t\t\tif (!$wp_setup_ratio and $width <= $resolution_req and !$is_highppi) return $source_file;\n\t\t\n\t\t\t\t}\n\n\n\n\t\t// Progressive Sharpening\n\t\tif ( $sharpen_progressive ) {\n\t\t\t$factor = $resolution_req / $width;\n\t\t\t$sharpen_amount = $sharpen_amount * ( 1 - pow($factor,3) );\n\t\t\t$sharpen_amount = ($sharpen_amount > 0) ? floor($sharpen_amount) : 0;\n\t\t\t}\n\t\t\n\n \n /* We need to resize the source image to the width of the resolution breakpoint we're working with */\n $ratio = $height / $width;\n if ($width <= $resolution_req) {\n \t\t$new_width = $width;\n }\n else {\n \t$new_width = $resolution_req;\n }\n \n $new_height = ceil($new_width * $ratio);\n \n $debug_width = $new_width;\n $debug_height = $new_height;\n \n $start_x = 0;\n $start_y = 0;\n \n\t\t\n\t\t// In case something about cropping is to be done\n if ( $setup_ratio or $wp_setup_ratio) {\n\n /* set height for new image */ \n $orig_ratio = $new_width / $new_height;\n \n\t\t\t// Set crop ration, but priorize the one of the size terms\n $crop_ratio = ($setup_ratio) ? $setup_ratio : $wp_setup_ratio;\n\t\t\t\n $ratio_diff = $orig_ratio / $crop_ratio;\n $ini_new_height = ceil($new_height * $ratio_diff);\n \n $dst = ImageCreateTrueColor($new_width, $ini_new_height); /* re-sized image */\n \n $debug_width = $new_width;\n $debug_height = $ini_new_height;\n \n /* set new width and height for skaleing image to fit new height */\n \n if($ini_new_height > $new_height) {\n $crop_factor = $ini_new_height / $new_height;\n $temp_new_width = ceil($new_width * $crop_factor);\n $new_height = ceil($new_height * $crop_factor);\n $start_x = ($new_width - $temp_new_width) / 2;\n $new_width = $temp_new_width;\n }\n else {\n $start_y = -($new_height - $ini_new_height) / 2;\n }\n }\n else {\n $dst = ImageCreateTrueColor($new_width, $new_height); /* re-sized image */\n }\n \n switch ($extension) {\n case 'png':\n $src = @ImageCreateFromPng($source_file); \t/* original image */\n break;\n case 'gif':\n $src = @ImageCreateFromGif($source_file); \t/* original image */\n break;\n default:\n $src = @ImageCreateFromJpeg($source_file); \t/* original image */\n ImageInterlace($dst, true); \t\t\t\t/* Enable interlancing (progressive JPG, smaller size file) */\n break;\n }\n if($extension=='png') {\n imagealphablending($dst, false);\n imagesavealpha($dst,true);\n $transparent = imagecolorallocatealpha($dst, 255, 255, 255, 127);\n imagefilledrectangle($dst, 0, 0, $new_width, $new_height, $transparent);\n }\n \n ImageCopyResampled($dst, $src, $start_x, $start_y, 0, 0, $new_width, $new_height, $width, $height); /* do the resize in memory */\n \n /* debug mode */\n global $debug_mode;\n\t\tglobal $wp, $wp_width, $wp_height, $fallback;\n\t\t\n if($debug_mode) {\n \t\n\t\t\t$color = imagecolorallocate($dst, 255, 0, 255); // Use fresh magenta\n\t\t\t\n // first debug line: write a textstring with dimensions etc.\n $cookie_data = explode(',', $_COOKIE['resolution']);\n $debug_ratio = false;\n\t \tif( $setup_ratio ) $debug_ratio = $setup_ratio . ':1';\n imagestring( $dst, 5, 10, 5, $debug_width.\" x \".$debug_height . ' ' . $debug_ratio . ' device:' . $cookie_data[0] . '*' . $cookie_data[1] . '=' . ceil($cookie_data[0] * $cookie_data[1]) . $addonstring, $color);\n\t \n\t \t// second debug line: show size term if provided\n\t \t$secondline = $_GET['size'];\n\t \timagestring( $dst, 5, 10, 20, $secondline, $color);\n\n\t\t\t// Third line: Wpordpress detection active\n\t\t\tif ( $wp ) $thirdline = \"Wordpress detection is active!\";\n\t\t\timagestring( $dst, 5, 10, 35, $thirdline, $color);\n\t\t\t\n\t\t\t// Fourth debug line: is fallback active?\n\t\t \tif ( $fallback ) $fourthline = \"Fallback active!\";\n\t\t \timagestring( $dst, 5, 10, 50, $fourthline, $color);\n\t\t\t\n\t\t\t$fifthline = \"Sharpen Amount: \" . $sharpen_amount;\n\t\t\timagestring( $dst, 5, 10, 65, $fifthline, $color);\n\t\t\t\n }\n\n \n ImageDestroy($src);\n\n\n\n /* sharpen the image */\n if($sharpen == TRUE) {\n $amount = $sharpen_amount; /* max 500 */\n $radius = '1'; /* 50 */\n $threshold = '0'; /* max 255 */\n \n if ( strtolower($extension) == 'jpg' OR strtolower($extension) == 'jpeg') {\n if($amount !== '0') $dst = UnsharpMask($dst, $amount, $radius, $threshold);\n }\n }\n\n\n\n /* save the new file in the appropriate path, and send a version to the browser */\n switch ($extension) {\n case 'png':\n $gotSaved = ImagePng($dst, $cache_file);\n break;\n case 'gif':\n $gotSaved = ImageGif($dst, $cache_file);\n break;\n default:\n $gotSaved = ImageJpeg($dst, $cache_file, $jpg_quality);\n break;\n }\n ImageDestroy($dst);\n\n if (!$gotSaved && !file_exists($cache_file)) {\n sendErrorImage(\"Failed to create image: $cache_file\");\n }\n\n return $cache_file;\n\t\t\n }", "private function createImageResource()\n {\n // We are currently using vips_image_new_from_file(), but we could consider\n // calling vips_jpegload / vips_pngload instead\n $result = /** @scrutinizer ignore-call */ vips_image_new_from_file($this->source, []);\n if ($result === -1) {\n /*throw new ConversionFailedException(\n 'Failed creating new vips image from file: ' . $this->source\n );*/\n $message = /** @scrutinizer ignore-call */ vips_error_buffer();\n throw new ConversionFailedException($message);\n }\n\n if (!is_array($result)) {\n throw new ConversionFailedException(\n 'vips_image_new_from_file did not return an array, which we expected'\n );\n }\n\n if (count($result) != 1) {\n throw new ConversionFailedException(\n 'vips_image_new_from_file did not return an array of length 1 as we expected ' .\n '- length was: ' . count($result)\n );\n }\n\n $im = array_shift($result);\n return $im;\n }", "function reg_image_sizes() {\n add_image_size( 'medium', 480, 0, false );\n add_image_size( 'medium-large', 500, 0, false );\n add_image_size( 'large', 600, 0, false );\n}", "function image_sizes() {\n\tadd_image_size( 'rwd-small', 400, 200 );\n\tadd_image_size( 'rwd-medium', 800, 400 );\n\tadd_image_size( 'rwd-large', 1200, 600 );\n\tadd_image_size( 'rwd-mediumx2', 1600, 800 );\n\tadd_image_size( 'rwd-xl', 2000, 1000 );\n\tadd_image_size( 'rwd-largex2', 2400, 1200 );\n\tadd_image_size( 'rwd-xlx2', 4000, 2000 );\n}", "public function scaleAndStore($filename, $id, $template = null, $overwrite = false) {\n\t\t$templates = !is_null($template) ?\n\t\t\t(array)$template :\n\t\t\t//\ttemplate is left empty; scale source file along all configured templates\n\t\t\t$templates = $this->getTemplateNames()\n\t\t;\n\n\t\t$file \t\t= new Garp_Image_File(Garp_File::FILE_VARIANT_UPLOAD);\n\t\t$sourceData = $file->fetch($filename);\n\t\t$imageType \t= $file->getImageType($filename);\n\n\n\t\tforeach ($templates as $template) {\n\t\t\t$this->_scaleAndStoreForTemplate($sourceData, $imageType, $id, $template, $overwrite);\n\t\t}\n\t}", "public function register_image_sizes() {\n\n }", "function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}", "function register_image_sizes() {\n\t}", "private function create() {\n\n\t\t// Use cached version if we have one\n\t\tif ($this->cache && file_exists($this->fileName)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there is only one color, just create an image\n\t\tif (count($this->colors) == 1) {\n\t\t\t$command = sprintf(\"%s -size %dx%d xc:%s %s\", \n\t\t\t\t$this->convert, \n\t\t\t\t$this->width, \n\t\t\t\t$this->height, \n\t\t\t\t$this->colors[0], \n\t\t\t\t$this->fileName\n\t\t\t);\n\t\t}\n\t\t// If there is more than one color, compute sizes and locations of additional color boxes\n\t\telse {\n\t\t\t$command = sprintf(\"%s -size %dx%d xc:%s \",\n\t\t\t\t$this->convert,\n\t\t\t\t$this->width,\n\t\t\t\t$this->height,\n\t\t\t\t$this->colors[0]\n\t\t\t);\n\t\t\t$counter = 0;\n\t\t\t$marginX = $this->width / 20;\n\t\t\t$marginY = $this->height / 20;\n\t\t\t$positionX = $marginX;\n\n\t\t\tforeach ($this->colors as $color) {\n\t\t\t\tif ($counter == 0) {\n\t\t\t\t\t$counter++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Progressively smaller size for each box\n\t\t\t\t$width = (int) (($this->width / 3 / $counter) + ($this->width * 0.07));\n\t\t\t\t$height = (int) (($this->height / 3 / $counter) + ($this->width * 0.07));\n\n\t\t\t\t$command .= ' -draw \"';\n\t\t\t\t$command .= 'stroke ' . $color;\n\t\t\t\t$command .= ' fill ' . $color;\n\t\t\t\t$command .= ' rectangle ';\n\t\t\t\t$command .= $positionX . ',' . ($this->height - $height - $marginY); // starting coordinates\n\t\t\t\t$command .= ' ';\n\t\t\t\t$command .=\t($positionX + $width) . ',' . ($this->height - $marginY); // ending coordinates\n\t\t\t\t$command .=\t'\"';\n\n\t\t\t\t$counter++;\n\t\t\t\t$positionX += $marginX + $width;\n\t\t\t}\n\t\t\t$command .= ' ' . $this->fileName;\n\t\t}\n\t\texec($command);\n\t}", "public function addImagesSizes() {\n\t\t// add_image_size( 'small', 225, 9999 );\n\t\t// add_image_size( 'hero', 1600, 9999 );\n\t}", "private function _scale()\n\t{\n\t\t//scale down the image by 55%\n\t\t$weaponImageSize = $this->weapon->getImageGeometry();\n\t\t$this->weaponScale['w'] = $weaponImageSize['width'] * 0.55;\n\t\t$this->weaponScale['h'] = $weaponImageSize['height'] * 0.55;\n\n\t\t$this->weapon->scaleImage($this->weaponScale['w'], $this->weaponScale['h']);\n\n\t\t//scale down the image by 30%\n\t\t$emblemImageSize = $this->emblem->getImageGeometry();\n\t\t$this->emblemScale['w'] = $emblemImageSize['width'] * 0.30;\n\t\t$this->emblemScale['h'] = $emblemImageSize['height'] * 0.30;\n\n\t\t$this->emblem->scaleImage($this->emblemScale['w'], $this->emblemScale['h']);\n\n\t\t//scale down the image by 70%\n\t\t$profileImageSize = $this->profile->getImageGeometry();\n\t\t$this->profileScale['w'] = $profileImageSize['width'] * 0.70;\n\t\t$this->profileScale['h'] = $profileImageSize['height'] * 0.70;\n\n\t\t$this->profile->scaleImage($this->profileScale['w'], $this->profileScale['h']);\n\t}", "protected function processImage()\n {\n // Start from the last scale (bigger image).\n $tier = (count($this->_scaleInfo) - 1);\n $row = 0;\n $ul_y = 0;\n $lr_y = 0;\n\n list($root, $ext) = $this->getRootAndDotExtension($this->_imageFilename);\n\n // Create a row from the original image and process it.\n while ($row * $this->tileSize < $this->_originalHeight) {\n $ul_y = $row * $this->tileSize;\n $lr_y = ($ul_y + $this->tileSize < $this->_originalHeight)\n ? $ul_y + $this->tileSize\n : $this->_originalHeight;\n $saveFilename = $root . '-' . $tier . '-' . $row . '.' . $ext;\n $width = $this->_originalWidth;\n $height = abs($lr_y - $ul_y);\n $crop = [];\n $crop['width'] = $width;\n $crop['height'] = $height;\n $crop['x'] = 0;\n $crop['y'] = $ul_y;\n $this->imageResizeCrop($this->_imageFilename, $saveFilename, [], $crop);\n\n $this->processRowImage($tier, $row);\n ++$row;\n }\n }", "function ezp_create_thumbnail( $file, $max_side, $effect = '', $prefix = \"\", $suffix = \".post\" ) {\n\t\t// 1 = GIF, 2 = JPEG, 3 = PNG\n\t$max_width = $max_side;\n\t$max_height = ezp_max_resizing_ratio * $max_side;\n\t\n\tif ( file_exists( $file ) ) {\n\t\t$type = getimagesize( $file );\n\n\t\t// if the associated function doesn't exist - then it's not\n\t\t// handle. duh. i hope.\n\t\t\n\t\tif (!function_exists( 'imagegif' ) && $type[2] == 1 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' ); \n\t\t}\n\t\telseif (!function_exists( 'imagejpeg' ) && $type[2] == 2 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' ); \n\t\t}\n\t\telseif (!function_exists( 'imagepng' ) && $type[2] == 3 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t} else {\n\n\t\t\t// create the initial copy from the original file\n\t\t\tif ( $type[2] == 1 ) {\n\t\t\t\t$image = imagecreatefromgif( $file );\n\t\t\t}\n\t\t\telseif ( $type[2] == 2 ) {\n\t\t\t\t$image = imagecreatefromjpeg( $file );\n\t\t\t}\n\t\t\telseif ( $type[2] == 3 ) {\n\t\t\t\t$image = imagecreatefrompng( $file );\n\t\t\t}\n\n\t\t\tif ( function_exists( 'imageantialias' ))\n\t\t\t\timageantialias( $image, TRUE );\n\n\t\t\t$image_attr = getimagesize( $file );\n\n\t\t\t// figure out if the image has to be resized (width & height < max and dontmagnify option set)\n\t\t\tif ( $image_attr[0] < $max_width AND $image_attr[1] < $max_height AND ezp_dontmagnify ) { \n\t\t\t\t// New image must not be bigger than original \n\t\t\t\t\t$image_new_width = $image_attr[0];\n\t\t\t\t\t$image_new_height = $image_attr[1];\n\t\t\t} else { \n\t\t\t\t// figure out the longest side\n\t\t\t\tif ( $image_attr[0] > $image_attr[1] ) { //width is > height\n\t\t\t\t\t$image_width = $image_attr[0];\n\t\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t\t$image_new_width = $max_side;\n\n\t\t\t\t\t$image_ratio = $image_width / $image_new_width;\n\t\t\t\t\t$image_new_height = $image_height / $image_ratio;\n\t\t\t\t\t\n\t\t\t\t} else { //height > width\n\t\t\t\t\t$image_width = $image_attr[0];\n\t\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\n\t\t\t\t\t$image_new_height = $max_side;\n\n\t\t\t\t\t$image_ratio = $image_height / $image_new_height;\n\t\t\t\t\t$image_new_width = $image_width / $image_ratio;\n\t\t\t\t}\n\t\t\t} \n\t\t\t$thumbnail = imagecreatetruecolor( $image_new_width, $image_new_height);\n\t\t\t@ imagecopyresampled( $thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $image_attr[0], $image_attr[1] );\n\n\t\t\t// If no filters change the filename, we'll do a default transformation.\n\t\t\tif ( basename( $file ) == $thumb = ezp_thumbnail_filename_custom ( basename( $file ), $prefix, $suffix ) )\n\t\t\t\t$thumb = preg_replace( '!(\\.[^.]+)?$!', __( '.thumbnail' ).'$1', basename( $file ), 1 );\n\n\t\t\t$thumbpath = str_replace( basename( $file ), $thumb, $file );\n\n\t\t\t// move the thumbnail to it's final destination\n\t\t\tif ( $type[2] == 1 ) {\n\t\t\t\tif (!imagegif( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = __( \"Thumbnail path invalid\" );\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( $type[2] == 2 ) {\n\t\t\t\tif (!imagejpeg( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = __( \"Thumbnail path invalid\" ); \n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( $type[2] == 3 ) {\n\t\t\t\tif (!imagepng( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = __( \"Thumbnail path invalid\" );\n\t\t\t\t}\n\t\t\t}\n\n\t\t} \n\t} else { \n\t\t$error = __( 'File not found' );\n\t}\n\n\tif (!empty ( $error ) ) {\n\t\treturn $error;\n\t} else {\n\t\treturn $thumbpath;\n\t}\n}", "function zen_image_OLD($src, $alt = '', $width = '', $height = '', $parameters = '') {\n global $template_dir;\n\n//auto replace with defined missing image\n if ($src == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {\n $src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;\n }\n\n if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {\n return false;\n }\n\n // if not in current template switch to template_default\n if (!file_exists($src)) {\n $src = str_replace(DIR_WS_TEMPLATES . $template_dir, DIR_WS_TEMPLATES . 'template_default', $src);\n }\n\n// alt is added to the img tag even if it is null to prevent browsers from outputting\n// the image filename as default\n//EDITED FOR LAZY LOAD\n $image = '<img src=\"' . zen_output_string($src) . '\" alt=\"' . zen_output_string($alt) . '\"';\n\n if (zen_not_null($alt)) {\n $image .= ' title=\" ' . zen_output_string($alt) . ' \"';\n }\n\n if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {\n if ($image_size = @getimagesize($src)) {\n if (empty($width) && zen_not_null($height)) {\n $ratio = $height / $image_size[1];\n $width = $image_size[0] * $ratio;\n } elseif (zen_not_null($width) && empty($height)) {\n $ratio = $width / $image_size[0];\n $height = $image_size[1] * $ratio;\n } elseif (empty($width) && empty($height)) {\n $width = $image_size[0];\n $height = $image_size[1];\n }\n } elseif (IMAGE_REQUIRED == 'false') {\n return false;\n }\n }\n\n if (zen_not_null($width) && zen_not_null($height)) {\n $image .= ' width=\"' . zen_output_string($width) . '\" height=\"' . zen_output_string($height) . '\"';\n }\n\n if (zen_not_null($parameters)) $image .= ' ' . $parameters;\n\n $image .= ' />';\n\n return $image;\n }", "public function gen_thumbnail()\n {\n }", "public function gen_thumbnail()\n {\n }", "function create_image($source,$sizes){\n // Tony Smith uploaded a big image once (7000x3000pixels) that was 1.1MB as a JPEG compressed,\n // but when inflated out using imagecreatefromjpeg used more memory than there was available!\n // So lets make this nice and large to handle Tony's massive bits\n ini_set('memory_limit', '256M');\n\n // Save parts of source image path\n $path_parts = pathinfo($source);\n\n // Load image and get image size.\n $img = imagecreatefromjpeg($source);\n $width = imagesx($img);\n $height = imagesy($img);\n\n foreach($sizes as $s){\n\n // Create new filename\n $new_name = $path_parts['dirname'].\"/\".$path_parts['filename'].\"_\".$s['suffix'].\".\".$path_parts['extension'];\n\n // Scale to fit the required width\n if ($width > $height) {\n $newwidth = $s['dim'];\n $divisor = $width / $s['dim'];\n $newheight = floor($height/$divisor);\n }else{\n $newheight = $s['dim'];\n $divisor = $height / $s['dim'];\n $newwidth = floor($width/$divisor);\n }\n\n // Create a new temporary image.\n $tmpimg = imagecreatetruecolor($newwidth,$newheight);\n \n // Copy and resize old image into new image.\n imagecopyresampled($tmpimg,$img,0,0,0,0,$newwidth,$newheight,$width,$height);\n\n // Save thumbnail into a file.\n imagejpeg($tmpimg,$new_name,$s['q']);\n\n // release the memory\n imagedestroy($tmpimg);\n\n }\n imagedestroy($img);\n}", "private function generateThumbnails(Image $image) {\n\n\t $attrs = $image->attributesToArray();\n\t $this->command->info(\"Generating thumbs for '{$attrs['path']}'\");\n\n\t $filePath = dirname(__FILE__).\"/Images/{$attrs['path']}\";\n\t $pathAsArray = explode(\".\", $attrs['path']);\n\t $extension = end($pathAsArray);\n\t $baseName = basename($attrs['path'], \".{$extension}\");\n\n\t array_map(function($size) use ($filePath, $extension, $attrs, $baseName){\n\n\t\t $this->command->info(\"Generating {$size[0]}x{$size[1]} thumb\");\n\t\t $thumb = $this->imageManager->make($filePath)->fit($size[0], $size[1])->stream($extension, 80);\n\t\t Storage::put(\"public/images/{$attrs['id']}/{$baseName}-{$size[0]}x{$size[1]}.{$extension}\", $thumb);\n\n\t\t Thumbnail::create([\n\t\t\t 'path' => \"{$baseName}-{$size[0]}x{$size[1]}.{$extension}\",\n\t\t\t 'image_id' => $attrs['id'],\n\t\t\t 'width' => $size[0],\n\t\t\t 'height' => $size[1]\n\t\t ]);\n\n\t }, $this->thumbSizes);\n\n }", "public function createImage()\n {\n if ($this->resize) {\n\n // get the resize dimensions\n $height = (int)array_get($this->resizeDimensions, 'new_height', 320);\n\n $width = (int)array_get($this->resizeDimensions, 'new_width', 240);\n\n if ($this->fit) {\n return Image::make($this->originalPath)->fit($width, $height)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n } else {\n return Image::make($this->originalPath)->resize($width, $height)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n }\n\n } else {\n\n return Image::make($this->originalPath)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n }\n }", "function generate_thumbnail () {\n global $Config;\n\n //Builds thumbnail filename\n $sourceFile = $this->path;\n $pos = strrpos($this->path, '.');\n $thumbnailFile = substr($sourceFile, 0, $pos) . 'Square' . substr($sourceFile, $pos);\n\n //Executes imagemagick command\n $command = $Config['ImageMagick']['convert'] . \" \\\"$sourceFile\\\" -resize 162x162 \\\"$thumbnailFile\\\"\";\n @system($command, $code);\n\n //Returns true if the command have exited with errorcode 0 (= ok)\n return ($code == 0);\n }", "function make_vImage($element){\n\t\t$dir=base_url().$element->getFile();\n\t\tif(substr($element->getFile(),0,7)=='http://'){\n\t\t\t$dir=$element->getFile();\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si están definidos ancho y alto, usamos esos\n\t\telse if($element->getWidth() or $element->getHeight()){\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si no, miramos el tamaño de la imagen\n\t\telse list($width,$height)=getimagesize($element->getFile());\n\t\t\n\t\treturn '<img'.$this->setStyle($element).($width?' width=\"'.$width.'\"':'').($height?' height=\"'.$height.'\"':'').' alt=\"'.$element->getAltText().'\" src=\"'.\n\t\t\t$dir.'\" />\n\t\t';\n\t}", "public function generate($cache = true)\n {\n if ($cache)\n {\n $d = $this->cache_get();\n if ($d) return $d;\n }\n\n $src_img = $this->image->load();\n\n // get image info - TODO: error handling\n $size = getimagesize($this->image->file->path);\n $exif = $this->image->get_exif();\n\n $src_width = $size[0];\n $src_height = $size[1];\n $max_width = $this->max_width;\n $max_height = $this->max_height;\n\n // shall be rotated? switch width/height temporarily and rotate after image has been scaled\n $rotation = $exif->get_rotation();\n if ($rotation) {\n $t = $max_height;\n $max_height = $max_width;\n $max_width = $t;\n }\n\n // calculate new size\n if ($src_width / $src_height > $max_width / $max_height) {\n $new_width = $max_width;\n $new_height = round($max_width / $src_width * $src_height);\n } else {\n $new_height = $max_height;\n $new_width = round($max_height / $src_height * $src_width);\n }\n\n // create new image\n $new_img = imagecreatetruecolor($new_width, $new_height);\n\n // copy to new image\n imagecopyresampled($new_img, $src_img, 0, 0, 0, 0, $new_width, $new_height, $src_width, $src_height);\n imagedestroy($src_img);\n\n // rotate?\n if ($rotation) {\n $rotated = imagerotate($new_img, $rotation, 0);\n imagedestroy($new_img);\n $new_img = $rotated;\n\n // switch width/height back\n #$t = $new_height;\n #$new_height = $new_width;\n #$new_width = $t;\n }\n\n // catch output\n ob_start();\n ob_clean();\n imagejpeg($new_img, null, $this->quality);\n imagedestroy($new_img);\n\n $data = ob_get_contents();\n ob_clean();\n\n // save cache\n $this->cache_save($data);\n\n return $data;\n }", "public function generate($config)\n {\n // phpcs:disable Magento2.Functions.DiscouragedFunction\n $binaryData = '';\n $data = str_split(sha1($config['image-name']), 2);\n foreach ($data as $item) {\n $binaryData .= base_convert($item, 16, 2);\n }\n $binaryData = str_split($binaryData, 1);\n\n $image = imagecreate($config['image-width'], $config['image-height']);\n $bgColor = imagecolorallocate($image, 240, 240, 240);\n // mt_rand() here is not for cryptographic use.\n // phpcs:ignore Magento2.Security.InsecureFunction\n $fgColor = imagecolorallocate($image, mt_rand(0, 230), mt_rand(0, 230), mt_rand(0, 230));\n $colors = [$fgColor, $bgColor];\n imagefilledrectangle($image, 0, 0, $config['image-width'], $config['image-height'], $bgColor);\n\n for ($row = 10; $row < ($config['image-height'] - 10); $row += 10) {\n for ($col = 10; $col < ($config['image-width'] - 10); $col += 10) {\n if (next($binaryData) === false) {\n reset($binaryData);\n }\n\n imagefilledrectangle($image, $row, $col, $row + 10, $col + 10, $colors[current($binaryData)]);\n }\n }\n\n $mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA);\n $relativePathToMedia = $mediaDirectory->getRelativePath($this->mediaConfig->getBaseTmpMediaPath());\n $mediaDirectory->create($relativePathToMedia);\n\n $imagePath = $relativePathToMedia . DIRECTORY_SEPARATOR . $config['image-name'];\n $imagePath = preg_replace('|/{2,}|', '/', $imagePath);\n $memory = fopen('php://memory', 'r+');\n if(!imagejpeg($image, $memory)) {\n throw new \\Exception('Could not create picture ' . $imagePath);\n }\n $mediaDirectory->writeFile($imagePath, stream_get_contents($memory, -1, 0));\n fclose($memory);\n imagedestroy($image);\n // phpcs:enable\n\n return $imagePath;\n }", "public function generate()\n {\n $self = $this;\n\n // Clear errors\n $this->_errors = array();\n\n // Normalize destination image path\n $this->imgDestPath = str_replace(array('\\\\', '/'), DIRECTORY_SEPARATOR, $this->imgDestPath);\n\n // Check modification time\n if ((is_dir($this->imgSourcePath)) && (is_file($this->imgDestPath))) {\n $imgSourceStat = stat($this->imgSourcePath);\n $imgDestStat = stat($this->imgDestPath);\n if ($imgSourceStat['mtime'] <= $imgDestStat['mtime']) {\n $this->addError(static::ERROR_SPRITE_EQUALS_TO_SOURCE);\n return;\n }\n }\n\n // Get list of images\n $fillImgList = function($dir) use(&$self, &$xOffset, &$imgList, &$imgWidth, &$imgHeight, &$fillImgList) {\n $imageList = glob($dir . DIRECTORY_SEPARATOR . '*.{' . $self->imgSourceExt . '}', GLOB_BRACE);\n foreach ($imageList as $imagePath) {\n\n // Skip previously generated sprite\n if ($imagePath === $self->imgDestPath) {\n continue;\n }\n\n // Get image sizes\n $imageSize = @getimagesize($imagePath);\n if ($imageSize === false) {\n $self->addError($self::ERROR_WRONG_IMAGE_FORMAT, $imagePath);\n continue;\n } else {\n list($itemWidth, $itemHeight, $itemType) = $imageSize;\n }\n\n // Check size\n if ($self->imgSourceSkipSize) {\n if (($itemWidth > $self->imgSourceSkipSize) || ($itemHeight > $self->imgSourceSkipSize)) {\n continue;\n }\n }\n\n // Inc sprite size\n $imgWidth += $itemWidth;\n if ($itemHeight > $imgHeight) {\n $imgHeight = $itemHeight;\n }\n\n // Push image to the list\n $imgList[$imagePath] = array(\n 'width' => $itemWidth,\n 'height' => $itemHeight,\n 'x' => $xOffset,\n 'ext' => image_type_to_extension($itemType, false),\n );\n\n $xOffset += $itemWidth;\n }\n $subdirList = glob($dir . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR);\n foreach ($subdirList as $subdir) {\n $fillImgList($subdir);\n }\n };\n $xOffset = 0;\n $imgList = array();\n $imgWidth = $imgHeight = 0;\n $fillImgList($this->imgSourcePath);\n if (count($imgList) === 0) {\n $this->addError(static::ERROR_NO_SOURCE_IMAGES);\n return;\n }\n\n // Create transparent image\n $dest = imagecreatetruecolor($imgWidth, $imgHeight);\n imagesavealpha($dest, true);\n $trans_colour = imagecolorallocatealpha($dest, 0, 0, 0, 127);\n imagefill($dest, 0, 0, $trans_colour);\n\n // Init CSS\n $cssList = array();\n $cssList[] = array(\n 'selectors' => array(\n '[class^=\"' . $this->cssNamespace . '-\"]',\n '[class*=\" ' . $this->cssNamespace . '-\"]',\n ),\n 'styles' => array(\n 'background-image' => 'url(\"' . $this->cssImgUrl . '\")',\n 'background-position' => '0 0',\n 'background-repeat' => 'no-repeat',\n 'display' => 'inline-block',\n 'height' => '64px',\n 'vertical-align' => 'middle',\n 'width' => '64px',\n ),\n );\n\n // Copy all images, create CSS file and list of tags\n $this->_tagList = array();\n foreach ($imgList as $imgPath => $imgData) {\n\n // Copy image\n $imgCreateFunc = 'imagecreatefrom' . $imgData['ext'];\n if (!function_exists($imgCreateFunc)) {\n continue;\n }\n $src = $imgCreateFunc($imgPath);\n imagealphablending($src, true);\n imagesavealpha($src, true);\n imagecopy($dest, $src, $imgData['x'], 0, 0, 0, $imgData['width'], $imgData['height']);\n imagedestroy($src);\n\n // Append CSS (if not a magic action)\n $sourcePathLeng = mb_strlen($this->imgSourcePath);\n $class = '.' . $this->cssNamespace . '-' . mb_substr($imgPath, $sourcePathLeng + 1);\n $class = mb_substr($class, 0, mb_strlen($class) - mb_strlen($imgData['ext']) - 1);\n $class = str_replace(DIRECTORY_SEPARATOR, '-', $class);\n $isMagicAction = false;\n foreach (static::$magicActions as $magicAction) {\n $isMagicAction = (mb_substr($class, -mb_strlen('.' . $magicAction)) === '.' . $magicAction);\n if ($isMagicAction) {\n break;\n }\n }\n if (!$isMagicAction) {\n $cssList[] = array(\n 'selectors' => array($class),\n 'styles' => array(\n 'background-position' => '-' . $imgData['x'] . 'px 0',\n 'height' => $imgData['height'] . 'px',\n 'width' => $imgData['width'] . 'px',\n ),\n );\n }\n\n // Check if image has magic action (active, hover, target)\n if (!$isMagicAction) {\n $extPos = mb_strrpos($imgPath, $imgData['ext']);\n foreach (static::$magicActions as $magicAction) {\n if ($extPos !== false) {\n $magicActionPath = substr_replace($imgPath, $magicAction . '.' . $imgData['ext'], $extPos, strlen($imgData['ext']));\n $hasMagicAction = isset($imgList[$magicActionPath]);\n } else {\n $hasMagicAction = false;\n }\n if ($hasMagicAction) {\n $magicActionData = $imgList[$magicActionPath];\n $css = array();\n if (in_array($magicAction, array('checked', 'disabled'))) {\n $css['selectors'] = array(\n \"input:{$magicAction} + {$class}\",\n \"{$class}.{$magicAction}\",\n );\n } else {\n $css['selectors'] = array(\n \"{$class}:{$magicAction}\",\n \"{$class}.{$magicAction}\",\n \".wrap-{$this->cssNamespace}:{$magicAction} {$class}\",\n \".wrap-{$this->cssNamespace}.{$magicAction} {$class}\",\n );\n }\n $css['styles'] = array(\n 'background-position' => '-' . $magicActionData['x'] . 'px 0',\n 'background-position-x' => '-' . $magicActionData['x'] . 'px',\n 'height' => $magicActionData['height'] . 'px',\n 'width' => $magicActionData['width'] . 'px',\n );\n $cssList[] = $css;\n }\n }\n }\n\n // Append tag\n if (!$isMagicAction) {\n $this->_tagList[] = '<span class=\"' . mb_substr($class, 1) . '\"></span>';\n }\n }\n\n // Save image to file\n $imgDestExt = mb_strtolower(mb_substr($this->imgDestPath, mb_strrpos($this->imgDestPath, '.') + 1));\n switch ($imgDestExt) {\n case 'jpg':\n case 'jpeg':\n imagejpeg($dest, $this->imgDestPath);\n break;\n case 'gif':\n imagegif($dest, $this->imgDestPath);\n break;\n case 'png':\n imagepng($dest, $this->imgDestPath);\n break;\n default:\n $this->addError(static::ERROR_UNKNOWN_IMAGE_EXT, $this->imgDestPath);\n return;\n break;\n }\n imagedestroy($dest);\n\n // Save CSS file\n $cssString = '';\n foreach ($cssList as $css) {\n $cssString .= implode(',', $css['selectors']) . '{';\n foreach ($css['styles'] as $key => $value) {\n $cssString .= $key . ':' .$value . ';';\n }\n $cssString .= '}';\n }\n file_put_contents($this->cssPath, $cssString);\n }", "private function generateThumbnailCmd(){\n\t}", "public function action_image()\n\t{\n\t\t//Image::load(DOCROOT.'/files/04_2021/79199dcc06baf4cc230262fcbb4d1094.jpg')->preset('mypreset', DOCROOT.'/files/04_2021/ea7e8ed4bc9d6f7c03f5f374e30b183b.png');\n\t\t$image = Image::forge();\n\n\t\t// Or with optional config\n\t\t$image = Image::forge(array(\n\t\t\t\t'quality' => 80\n\t\t));\n\t\t$image->load(DOCROOT.'/files/04_2021/79199dcc06baf4cc230262fcbb4d1094.jpg')\n\t\t\t\t\t->crop_resize(200, 200)\n\t\t\t\t\t->rounded(100)\n\t\t\t\t\t->output();\n\t\t// Upload an image and pass it directly into the Image::load method.\n\t\tUpload::process(array(\n\t\t\t'path' => DOCROOT.DS.'files'\n\t\t));\n\n\t\tif (Upload::is_valid())\n\t\t{\n\t\t\t$data = Upload::get_files(0);\n\n\t\t\t// Using the file upload data, we can force the image's extension\n\t\t\t// via $force_extension\n\t\t\tImage::load($data['file'], false, $data['extension'])\n\t\t\t\t\t->crop_resize(200, 200)\n\t\t\t\t\t->save('image');\n\t\t} \n\t}", "protected function generateImages() {\n if ($this->buildNamespace($this->imageFolder) && $this->createShortUrl()) {\n foreach ($this->inputs as $input) {\n $this->generate($input);\n }\n }\n\n return $this->responseJSON();\n }", "function spc_resizeImage( $file, $thumbpath, $max_side , $fixfor = NULL ) {\n\n\tif ( file_exists( $file ) ) {\n\t\t$type = getimagesize( $file );\n\n\t\tif (!function_exists( 'imagegif' ) && $type[2] == 1 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t}\n\t\telseif (!function_exists( 'imagejpeg' ) && $type[2] == 2 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t}\n\t\telseif (!function_exists( 'imagepng' ) && $type[2] == 3 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t} else {\n\n\t\t\t// create the initial copy from the original file\n\t\t\tif ( $type[2] == 1 ) {\n\t\t\t\t$image = imagecreatefromgif( $file );\n\t\t\t}\n\t\t\telseif ( $type[2] == 2 ) {\n\t\t\t\t$image = imagecreatefromjpeg( $file );\n\t\t\t}\n\t\t\telseif ( $type[2] == 3 ) {\n\t\t\t\t$image = imagecreatefrompng( $file );\n\t\t\t}\n\n\t\t\tif ( function_exists( 'imageantialias' ))\n\t\t\t\timageantialias( $image, TRUE );\n\n\t\t\t$image_attr = getimagesize( $file );\n\n\t\t\t// figure out the longest side\n if($fixfor){\n \t if($fixfor == 'width'){\n \t \t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_width = $max_side;\n\n\t\t\t\t$image_ratio = $image_width / $image_new_width;\n\t\t\t\t$image_new_height = $image_height / $image_ratio;\n \t }elseif($fixfor == 'height'){\n \t $image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_height = $max_side;\n\n\t\t\t\t$image_ratio = $image_height / $image_new_height;\n\t\t\t\t$image_new_width = $image_width / $image_ratio;\t\n \t }\n }else{\n\t\t\tif ( $image_attr[0] > $image_attr[1] ) {\n\t\t\t\t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_width = $max_side;\n\n\t\t\t\t$image_ratio = $image_width / $image_new_width;\n\t\t\t\t$image_new_height = $image_height / $image_ratio;\n\t\t\t\t//width is > height\n\t\t\t} else {\n\t\t\t\t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_height = $max_side;\n\n\t\t\t\t$image_ratio = $image_height / $image_new_height;\n\t\t\t\t$image_new_width = $image_width / $image_ratio;\n\t\t\t\t//height > width\n\t\t\t}\n }\t\n\n\t\t\t$thumbnail = imagecreatetruecolor( $image_new_width, $image_new_height);\n\t\t\t@ imagecopyresampled( $thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $image_attr[0], $image_attr[1] );\n\n\t\t\t// move the thumbnail to its final destination\n\t\t\tif ( $type[2] == 1 ) {\n\t\t\t\tif (!imagegif( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( $type[2] == 2 ) {\n\t\t\t\tif (!imagejpeg( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( $type[2] == 3 ) {\n\t\t\t\tif (!imagepng( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$error = 0;\n\t}\n\n\tif (!empty ( $error ) ) {\n\t\treturn $error;\n\t} else {\n\t\treturn $thumbpath;\n\t}\n}", "public function run()\n {\n \\App\\Pic::create(array(\n 'filename' => '17993.png',\n ));\n\n \\App\\Pic::create(array(\n 'filename' => '68496.jpg',\n ));\n\n \\App\\Pic::create(array(\n 'filename' => '38592.jpg',\n ));\n\n \\App\\Pic::create(array(\n 'filename' => '14154.jpg',\n ));\n }", "public function generate()\n {\n if (!file_exists(SSG_OUTPUT_DIR)) {\n if (!mkdir($concurrentDirectory = SSG_OUTPUT_DIR) && !is_dir($concurrentDirectory)) {\n throw new \\RuntimeException(sprintf('Directory \"%s\" was not created', $concurrentDirectory));\n }\n }\n\n //Empty output dir\n $this->emptyBuildFolder();\n\n //Create needed directories in build folder\n if (!mkdir($concurrentDirectory = SSG_OUTPUT_DIR . TEMPLATE_URI) && !is_dir($concurrentDirectory)) {\n throw new \\RuntimeException(sprintf('Directory \"%s\" was not created', $concurrentDirectory));\n }\n\n //If we are running on Netlify and Mix wasn't triggered we get the Mix assets from the live site, meaning the last build\n if (getenv('NETLIFY') && USE_MIX && !defined('NETLIFY_MIX_TRIGGERED')) {\n $rootUrl = getenv('URL');\n $manifest = @file_get_contents($rootUrl . TEMPLATE_URI . '/dist/mix-manifest.json');\n if($manifest) {\n if (!mkdir($concurrentDirectory = APP_ROOT . TEMPLATE_DIR . '/dist') && !is_dir($concurrentDirectory)) {\n throw new \\RuntimeException(sprintf('Directory \"%s\" was not created', $concurrentDirectory));\n }\n file_put_contents(APP_ROOT . TEMPLATE_DIR . '/dist/mix-manifest.json', $manifest);\n foreach (json_decode($manifest) ?? [] as $filename => $hash) {\n $file = file_get_contents($rootUrl . TEMPLATE_URI . '/dist' . $filename);\n file_put_contents(APP_ROOT . TEMPLATE_DIR . '/dist' . $filename, $file);\n }\n }\n\n }\n\n $sitemapCreated = (new Sitemap)->createSitemap();\n if ($sitemapCreated) {\n copy(APP_ROOT . PUBLIC_DIR . '/sitemap.xml', SSG_OUTPUT_DIR . '/sitemap.xml');\n }\n\n //Create blog home\n if (file_exists(POSTS_DIR)) {\n $this->renderBlogHome();\n }\n\n //TODO: Support for CPT here\n //Scan trough content types and render HTML\n $collections = $this->router->getKnownCollections();\n foreach ($collections as $collection) {\n $pages = $this->getDirContents(APP_ROOT . CONTENT_DIR . '/' . $collection);\n foreach ($pages as $page) {\n $this->renderContentJsonToHtml($page, $collection);\n }\n }\n\n //Copy theme images to build directory\n $this->syncDirectoryToBuild('uploads');\n $this->syncDirectoryToBuild('theme/img');\n $this->syncDirectoryToBuild('theme/dist');\n $this->syncDirectoryToBuild('theme/fonts');\n\n //If redirect file exists, move it over\n if(file_exists(APP_ROOT . '/_redirects')) {\n copy(APP_ROOT . '/_redirects', SSG_OUTPUT_DIR . '/_redirects');\n }\n\n //Create Netlify CMS admin index file from dynamic json config\n $this->createNetlifyCmsAdminFolder();\n }", "public function generate(Image $image);", "private function resizeWithScaleExact($width, $height, $scale) {\n\t\t//$new_height = (int)($this->info['height'] * $scale);\n\t\t$new_width = $width * $scale;\n\t\t$new_height = $height * $scale;\n\t\t$xpos = 0;//(int)(($width - $new_width) / 2);\n\t\t$ypos = 0;//(int)(($height - $new_height) / 2);\n\n if (isset($this->info['mime']) && $this->info['mime'] == 'image/gif' && $this->isAnimated) {\n $this->imagick = new Imagick($this->file);\n $this->imagick = $this->imagick->coalesceImages();\n foreach ($this->imagick as $frame) {\n $frame->thumbnailImage($new_width, $new_height);\n $frame->setImagePage($new_width, $new_height, 0, 0);\n }\n } else {\n $image_old = $this->image;\n $this->image = imagecreatetruecolor($width, $height);\n $bcg = $this->backgroundColor;\n\n if (isset($this->info['mime']) && $this->info['mime'] == 'image/png') {\n imagealphablending($this->image, false);\n imagesavealpha($this->image, true);\n $background = imagecolorallocatealpha($this->image, $bcg[0], $bcg[1], $bcg[2], 127);\n imagecolortransparent($this->image, $background);\n } else {\n $background = imagecolorallocate($this->image, $bcg[0], $bcg[1], $bcg[2]);\n }\n\n imagefilledrectangle($this->image, 0, 0, $width, $height, $background);\n imagecopyresampled($this->image, $image_old, $xpos, $ypos, 0, 0, $new_width, $new_height, $this->info['width'], $this->info['height']);\n imagedestroy($image_old);\n }\n\n\t\t$this->info['width'] = $width;\n\t\t$this->info['height'] = $height;\n }", "function makethumbs()\n\t{\n\n\t\tglobal $option, $mainframe;\n\n\t\t//First we'll access to the file system and we'll use the Joomla way to all safe.\n\t\tjimport('joomla.filesystem.file');\n\t\t$uploads_path = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"masters\" ;\n\t\t$thumb_path = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"thumbs\" ;\n\n\t\t// this is the width in px that we're telling GD to scale to, where's imagemagik whe you need it.\n\t\t$new_w = 90;\n\t\t// where our source images live b/c GD needs to read them\n\t\t$cfg_fullsizepics_path = $uploads_path;\n\t\t//where we're sending them when we are done\n\t\t$cfg_thumb_path = $thumb_path;\n\t\t// we need one more path for this to work\n\t\t$filepath = $uploads_path ;\n\t\t// the directory\n\t\t$dir = dir($filepath);\n\n\t\t//check folders\n\t\t\t\n\t\twhile($entry=$dir->read()) {\n\t\t\t//check the files\n\t\t\tif($entry == \".\" || $entry == \"..\") {\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\n\t\t\t$fp = @fopen(\"$filepath/$entry\",\"r\");\n\n\t\t\t$photo_filename = \"$entry\";\n\n\t\t\t$image_stats = GetImageSize($cfg_fullsizepics_path.\"/\".$entry);\n\n\t\t\t$imagewidth = $image_stats[0];\n\n\t\t\t$imageheight = $image_stats[1];\n\n\t\t\t$img_type = $image_stats[2];\n\n\t\t\t$ratio = ($imagewidth / $new_w);\n\n\t\t\t$new_h = round($imageheight / $ratio);\n\n\t\t\tif (!file_exists($cfg_thumb_path.\"/\".$entry)) {\n\n\t\t\t\tif ($img_type==\"2\") {\n\n\t\t\t\t\t$src_img = imagecreatefromjpeg($cfg_fullsizepics_path.\"/\".$entry);\n\n\t\t\t\t\t$dst_img = imagecreatetruecolor($new_w,$new_h);\n\n\t\t\t\t\timagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));\n\n\t\t\t\t\timagejpeg($dst_img, \"$cfg_thumb_path\".\"/$entry\", 100);\n\t\t\t\t\t\t\n\t\t\t\t\timagedestroy($dst_img);\n\n\t\t\t\t} elseif ($img_type==\"3\") {\n\n\t\t\t\t\t$src_img=ImageCreateFrompng($cfg_fullsizepics_path.\"/\".$entry);\n\t\t\t\t\t \n\t\t\t\t\t$dst_img=ImageCreateTrueColor($new_w,$new_h);\n\t\t\t\t\t\t\n\t\t\t\t\tImageCopyResampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));\n\n\t\t\t\t\tImagepng($dst_img, \"$cfg_thumb_path\".\"/$entry\",100);\n\n\t\t\t\t\timagedestroy($dst_img);\n\n\t\t\t\t} elseif ($img_type==\"1\") {\n\n\t\t\t\t\t$cfg_thumb_url=$cfg_fullsizepics_url;\n\n\t\t\t\t} \n\n\t\t\t}\n\n\n\n\t\t} //the files are now in the /images/content/arts_curriculum/thumbs directory\n\n\t\t$this->setRedirect( 'index.php?option=' . $option. '&task=makesitesmages&controller=items' , 'Thumbnails are made' );\n\n\n\t}", "public static function generateThumbs($filename)\n\t{\n\t\t$folders = SpoonDirectory::getList(FRONTEND_FILES_PATH . '/pictures', false, array('source'));\n\n\t\tforeach($folders as $folder)\n\t\t{\n\t\t\t$size = explode('x', $folder);\n\n\t\t\t// set Null in stead of ''\n\t\t\tforeach($size as $i => $dim) if($dim == '') $size[$i] = null;\n\n\t\t\t$thumb = new SpoonThumbnail(FRONTEND_FILES_PATH . '/pictures/source/' . $filename, $size[0], $size[1]);\n\t\t\t$thumb->setAllowEnlargement(true);\n\t\t\t// if both sizes are set ignore Aspect Ratio\n\t\t\t$thumb->setForceOriginalAspectRatio($size[0] == null || $size[1] == null);\n\t\t\tif(!SpoonFile::exists(FRONTEND_FILES_PATH . '/pictures/' . $folder . '/' . $filename)) $thumb->parseToFile(FRONTEND_FILES_PATH . '/pictures/' . $folder . '/' . $filename);\n\t\t}\n\n\t}", "public function execute()\n\t{\n\t\t$outputPath = null != $this->outputPath ? $this->outputPath : $this->imagePath;\n\t\t$dotPos = stripos($outputPath, '.');\n\t\t$path = substr($outputPath, 0, $dotPos);\n\t\t$ext = substr($outputPath, $dotPos+1);\n\t\t\n\t\t$this->setDensities();\n\t\t\n\t\t$filter = $this->imagine instanceof \\Imagine\\Imagick\\Imagine \n\t\t ? \\Imagine\\Image\\ImageInterface::FILTER_POINT \n\t\t : \\Imagine\\Image\\ImageInterface::FILTER_UNDEFINED;\n\t\t \n\t\tforeach ($this->densities as $dens => $size) {\n\t\t\t$this->imagine->open($this->imagePath)\n\t\t\t ->resize(new \\Imagine\\Image\\Box($size[0], $size[1]), $filter)\n\t\t\t ->save($path.'-'.$dens.'.'.$ext, array($this->compressionType => $this->compressionValue));\n\t\t}\n\t}", "function custom_image_sizes() {\n}", "private function procEsfPic($url){\r\n $picurl = WEB_ROOT.$url;\r\n //计算图片缩放比例\r\n $imageInfo = @getimagesize($picurl);\r\n $arrParts = pathinfo($url);\r\n $sExtN = strtolower($arrParts['extension']);\r\n $newurl = $arrParts['dirname'] . '/' . date(\"YW\") . \"/\" . $arrParts['basename'];\r\n $targetSrc = WEB_ROOT.$newurl;\r\n\r\n $srcWidth = $imageInfo[0];\r\n $srcHeight = $imageInfo[1];\r\n\r\n $thumbscale = min(160 / $srcWidth, 160 / $srcHeight); // 计算缩放比例\r\n $smlscale = min(320 / $imageInfo[0], 320 / $imageInfo[1]); // 计算缩放比例\r\n $midscale = min(900 / $imageInfo[0], 900 / $imageInfo[1]); // 计算缩放比例\r\n // 图像小于缩放大小,安原始图像大小生成图片,即$scale值为1\r\n if (ceil($thumbscale) > 1) {\r\n $thumbscale = '100%';\r\n } else {\r\n $thumbscale = ($thumbscale * 100) . '%';\r\n }\r\n if (ceil($smlscale) > 1) {\r\n $smlscale = '100%';\r\n } else {\r\n $smlscale = ($smlscale * 100) . '%';\r\n }\r\n if (ceil($midscale) > 1) {\r\n $midscale = '100%';\r\n } else {\r\n $midscale = ($midscale * 100) . '%';\r\n }\r\n\r\n $thumb_x = substr($targetSrc, 0, strrpos($targetSrc, '.')) . '_x.' . $sExtN;\r\n $thumb_s = substr($targetSrc, 0, strrpos($targetSrc, '.')) . '_s.' . $sExtN;\r\n $thumb_m = substr($targetSrc, 0, strrpos($targetSrc, '.')) . '_m.' . $sExtN;\r\n\r\n //Image::open($this->disk_path)->resize($this->thumbWidth,$this->thumbHeight)->save($thumb_x, $sExtN);\r\n Image::open($picurl)->resize($thumbscale)->save($thumb_x, $sExtN);\r\n Image::open($picurl)->resize($smlscale)->save($thumb_s, $sExtN);\r\n Image::open($picurl)->resize($midscale)->save($thumb_m, $sExtN);\r\n\r\n $fsize = filesize($picurl);//ceil(filesize($picurl) / 1000) . \"k\"; //获取文件大小\r\n //移动原始图片\r\n $rlt = FileUtil::moveFile($picurl, $targetSrc);\r\n\r\n //返回处理图片信息\r\n $attachData=array();\r\n $attachData['rlt'] = $rlt;\r\n $attachData['name'] = $arrParts['basename'];\r\n $attachData['url'] = $newurl;\r\n $attachData['type'] = strtolower($arrParts['extension']);\r\n $attachData['size'] = $fsize;\r\n $attachData['update_at'] = time();\r\n return $attachData;\r\n }", "function generateImage($source_file, $cache_file, $quality)\n{\n\t$extension = strtolower(pathinfo($source_file, PATHINFO_EXTENSION));\n\n // Check the image dimensions\n $dimensions = GetImageSize($source_file);\n $width = $dimensions[0];\n $height = $dimensions[1];\n\t\n $dst = ImageCreateTrueColor($width, $height); // re-sized image\n\n\tswitch ($extension) {\n case 'png':\n $src = @ImageCreateFromPng($source_file); // original image\n break;\n case 'gif':\n $src = @ImageCreateFromGif($source_file); // original image\n break;\n default:\n $src = @ImageCreateFromJpeg($source_file); // original image\n ImageInterlace($dst, true); // Enable interlancing (progressive JPG, smaller size file)\n break;\n }\n\n if ($extension == 'png') {\n imagealphablending($dst, false);\n imagesavealpha($dst, true);\n $transparent = imagecolorallocatealpha($dst, 255, 255, 255, 127);\n imagefilledrectangle($dst, 0, 0, $width, $height, $transparent);\n }\n\n ImageCopyResampled($dst, $src, 0, 0, 0, 0, $width, $height, $width, $height); // do the resize in memory\n ImageDestroy($src);\n\n\tif(STAMPED)\n {\n $text_color = ImageColorAllocate($dst, 255, 255, 255);\n\t\timagettftext($dst, 40, 0, 10, 50, $text_color, '../font/coolvetica.ttf', 'Qualité : '.$quality);\n }\n\n $cache_dir = dirname($cache_file);\n\n // does the directory exist already?\n if (!is_dir($cache_dir)) {\n if (!mkdir($cache_dir, 0755, true)) {\n // check again if it really doesn't exist to protect against race conditions\n if (!is_dir($cache_dir)) {\n // uh-oh, failed to make that directory\n ImageDestroy($dst);\n sendErrorImage(\"Failed to create cache directory: $cache_dir\");\n }\n }\n }\n\n if (!is_writable($cache_dir)) {\n sendErrorImage(\"The cache directory is not writable: $cache_dir\");\n }\n\t\n // save the new file in the appropriate path, and send a version to the browser\n switch ($extension) {\n case 'png':\n $gotSaved = ImagePng($dst, $cache_file);\n break;\n case 'gif':\n $gotSaved = ImageGif($dst, $cache_file);\n break;\n default:\n $gotSaved = ImageJpeg($dst, $cache_file, $quality);\n break;\n }\n ImageDestroy($dst);\n\t\n if (!$gotSaved && !file_exists($cache_file)) {\t\n\t\tsendErrorImage(\"Failed to create image: $cache_file\");\n }\n\n return $cache_file;\n}", "function thumbnail($file,$width='120'){\n $name=$this->_dir.DS.$file.'[0]';\n $im = new imagick($name);\n $im->setImageFormat('jpg');\n $im->scaleImage($width,0);\n header('Content-Type: image/jpeg');\n echo $im;\n }", "public function generate($params = null)\n {\n return $this->parseParams($params)\n ->prepareSourceImageData()\n ->validateSourceImagePath()\n ->parseSourceImageData()\n ->calculateRatio()\n ->prepareThumbData()\n ->calculateFactorHeight()\n ->calculateFactorWidth()\n ->calculateDestinationImageDimensions()\n ->calculateDestinationStartPoints()\n ->generateThumbnail();\n }", "function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->gz_image_name = @iconv(\"utf-8\",\"GBK\",$this->gz_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->gz_image_name){\n $this->gz_image_name = strtolower(trim($this->gz_image_name));\n $gz_image_type = $this->get_type($this->gz_image_name);\n $gz_image = $this->createImage($gz_image_type,$this->gz_image_name);\n $gz_image_w=ImageSX($gz_image);\n $gz_image_h=ImageSY($gz_image);\n $temp_gz_image = $this->getPos($src_image_w,$src_image_h,$this->gz_image_pos,$gz_image);\n $gz_image_x = $temp_gz_image[\"dest_x\"];\n $gz_image_y = $temp_gz_image[\"dest_y\"];\n\t if($this->get_type($this->gz_image_name)=='png'){imagecopy($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h);}\n\t else{imagecopymerge($src_image,$gz_image,$gz_image_x,$gz_image_y,0,0,$gz_image_w,$gz_image_h,$this->gz_image_transition);}\n}\nif ($this->gz_text){\n $temp_gz_text = $this->getPos($src_image_w,$src_image_h,$this->gz_text_pos);\n $gz_text_x = $temp_gz_text[\"dest_x\"];\n $gz_text_y = $temp_gz_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->gz_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $gz_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $gz_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->gz_text_size, $this->gz_text_angle, $gz_text_x, $gz_text_y, $gz_text_color,$this->gz_text_font, $this->gz_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}", "function ciniki_web_getScaledImageURL($ciniki, $image_id, $version, $maxwidth, $maxheight, $quality='60') {\n\n if( $maxwidth == 0 && $maxheight == 0 ) {\n $size = 'o';\n } elseif( $maxwidth == 0 ) {\n $size = 'h' . $maxheight;\n } else {\n $size = 'w' . $maxwidth;\n }\n\n //\n // NOTE: The cache.db was an attempt to speed up EFS(nfs) on Amazon AWS. It did not appear\n // help performance at all and should not be enabled. The code remains in here incase\n // it can be useful in the future.\n //\n\n //\n // Load last_updated date to check against the cache\n //\n $reload_image = 'no';\n/* if( isset($ciniki['config']['ciniki.web']['cache.db']) && $ciniki['config']['ciniki.web']['cache.db'] == 'on' ) {\n $strsql = \"SELECT ciniki_images.id, \"\n . \"ciniki_images.type, \"\n . \"UNIX_TIMESTAMP(ciniki_images.last_updated) AS last_updated, \"\n . \"UNIX_TIMESTAMP(ciniki_web_image_cache.last_updated) AS cache_last_updated \"\n . \"FROM ciniki_images \"\n . \"LEFT JOIN ciniki_web_image_cache ON (\"\n . \"ciniki_images.id = ciniki_web_image_cache.image_id \"\n . \"AND ciniki_web_image_cache.tnid = '\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['tnid']) . \"' \"\n . \"AND ciniki_web_image_cache.size = '\" . ciniki_core_dbQuote($ciniki, $size) . \"' \"\n . \") \"\n . \"WHERE ciniki_images.id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \"\n . \"AND ciniki_images.tnid = '\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['tnid']) . \"' \"\n . \"\";\n $reload_image = 'yes';\n } else { */\n $strsql = \"SELECT id, type, UNIX_TIMESTAMP(ciniki_images.last_updated) AS last_updated \"\n . \"FROM ciniki_images \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $image_id) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['tnid']) . \"' \"\n . \"\";\n/* } */\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.images', 'image');\n if( $rc['stat'] != 'ok' ) { \n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.web.103', 'msg'=>'Unable to load image', 'err'=>$rc['err']));\n }\n if( !isset($rc['image']) ) {\n return array('stat'=>'404', 'err'=>array('code'=>'ciniki.web.104', 'msg'=>'The image you requested does not exist.'));\n }\n $img = $rc['image'];\n\n //\n // Build working path, and final url\n //\n if( $img['type'] == 2 ) {\n $extension = 'png';\n } else {\n $extension = 'jpg';\n }\n if( $maxwidth == 0 && $maxheight == 0 ) {\n// $filename = '/' . sprintf('%02d', ($ciniki['request']['tnid']%100)) . '/'\n// . sprintf('%07d', $ciniki['request']['tnid'])\n// . '/o/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $filename = '/o/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $size = 'o';\n } elseif( $maxwidth == 0 ) {\n// $filename = '/' . sprintf('%02d', ($ciniki['request']['tnid']%100)) . '/'\n// . sprintf('%07d', $ciniki['request']['tnid'])\n// . '/h' . $maxheight . '/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $filename = '/h' . $maxheight . '/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $size = 'h' . $maxheight;\n } else {\n// $filename = '/' . sprintf('%02d', ($ciniki['request']['tnid']%100)) . '/'\n// . sprintf('%07d', $ciniki['request']['tnid'])\n// . '/w' . $maxwidth . '/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $filename = '/w' . $maxwidth . '/' . sprintf('%010d', $img['id']) . '.' . $extension;\n $size = 'w' . $maxwidth;\n }\n $img_filename = $ciniki['tenant']['web_cache_dir'] . $filename;\n $img_url = $ciniki['tenant']['web_cache_url'] . $filename;\n $img_domain_url = 'http://' . $ciniki['request']['domain'] . $ciniki['tenant']['web_cache_url'] . $filename;\n\n //\n // Check db for cache details\n //\n if( isset($ciniki['config']['ciniki.web']['cache.db']) && $ciniki['config']['ciniki.web']['cache.db'] == 'on'\n && isset($img['cache_last_updated']) && $img['cache_last_updated'] >= $img['last_updated']\n ) {\n return array('stat'=>'ok', 'url'=>$img_url, 'domain_url'=>$img_domain_url);\n }\n\n //\n // Check last_updated against the file timestamp, if the file exists\n //\n if( $reload_image == 'yes' || !file_exists($img_filename) || filemtime($img_filename) < $img['last_updated'] ) {\n\n //\n // Load the image from the database\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'images', 'private', 'loadImage');\n $rc = ciniki_images_loadImage($ciniki, $ciniki['request']['tnid'], $img['id'], $version);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $image = $rc['image'];\n\n //\n // Scale image\n //\n if( $maxwidth > 0 || $maxheight > 0 ) {\n $image->scaleImage($maxwidth, $maxheight);\n }\n\n //\n // Apply a border\n //\n // $image->borderImage(\"rgb(255,255,255)\", 10, 10);\n\n //\n // Check if directory exists\n //\n if( !file_exists(dirname($img_filename)) ) {\n mkdir(dirname($img_filename), 0755, true);\n }\n\n //\n // Write the file\n //\n $h = fopen($img_filename, 'w');\n if( $h ) {\n if( $img['type'] == 2 ) {\n $image->setImageFormat('png');\n } else {\n $image->setImageCompressionQuality($quality);\n }\n fwrite($h, $image->getImageBlob());\n fclose($h);\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.web.105', 'msg'=>'Unable to load image'));\n }\n\n //\n // Update database\n //\n/* if( isset($ciniki['config']['ciniki.web']['cache.db']) && $ciniki['config']['ciniki.web']['cache.db'] == 'on' ) {\n $strsql = \"INSERT INTO ciniki_web_image_cache (tnid, image_id, size, last_updated) \" \n . \"VALUES('\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['tnid']) . \"'\"\n . \", '\" . ciniki_core_dbQuote($ciniki, $img['id']) . \"'\"\n . \", '\" . ciniki_core_dbQuote($ciniki, $size) . \"'\"\n . \", UTC_TIMESTAMP()) \"\n . \"ON DUPLICATE KEY UPDATE last_updated = UTC_TIMESTAMP() \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbInsert');\n $rc = ciniki_core_dbInsert($ciniki, $strsql, 'ciniki.tenants');\n if( $rc['stat'] != 'ok' ) {\n error_log('CACHE: Unable to save ' . $img_filename . ' to ciniki_web_cache');\n return $rc;\n }\n } */\n }\n\n return array('stat'=>'ok', 'url'=>$img_url, 'domain_url'=>$img_domain_url, 'filename'=>$img_filename);\n}", "function mergeImages($files) {\n global $TMPFILES;\n global $MIN_IMAGE_WIDTH, $TMP_PATH; // from config\n $res = array();\n $TMPFILES []= $TMP_PATH . '/' . substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, 16);\n $res['tmpFileName'] = end($TMPFILES);\n\n // load images\n $width = 2147483647;\n foreach ($files as $key => &$file) {\n $imgData = loadImage($file['tmpFileName']);\n if (empty($imgData)) {\n throw new Exception(\"Bad image.\");\n }\n $file = array_merge($file, $imgData);\n $file['width'] = $file['imageInfo'][0];\n $file['height'] = $file['imageInfo'][1];\n if ($width > $file['width']) {\n $width = $file['width'];\n }\n }\n if ($width < $MIN_IMAGE_WIDTH) {\n $width = $MIN_IMAGE_WIDTH;\n }\n $height = 0;\n foreach ($files as $key => &$file) {\n $file['newWidth'] = $width;\n if ($file['width']) {\n $file['newHeight'] = ($width / $file['width']) * $file['height'];\n $height += $file['newHeight'];\n }\n }\n $height += count($files) - 1;\n $dstImage = imagecreatetruecolor($width, $height);\n imagefill($dstImage, 0, 0, 0xFFFFFF);\n $hgh=0;\n foreach ($files as $key => &$file) {\n imagecopyresampled($dstImage, $file['image'], 0, $hgh, 0, 0, $width, $file['newHeight'], $file['width'], $file['height']);\n $hgh += $file['newHeight'] + 1;\n imagedestroy($file['image']);\n deleteFile($file['tmpFileName']);\n }\n\n imagepng($dstImage, $res['tmpFileName']);\n $res['contentType'] = 'image/png';\n $res['hash'] = hash_file('sha256', $res['tmpFileName']);\n $res['srcPathInfo'] = pathinfo(basename($src));\n $res['ext'] = 'png';\n $res['imgType'] = 3;\n imagedestroy($dstImage);\n return $res;\n}", "function dg_add_custom_img_sizes() {\n\t\n\tadd_image_size( 'dg-large', 1250, 1250 );\n\tadd_image_size( 'dg-extra-large', 1700, 1700 );\n\tadd_image_size( 'dg-super-large', 2500, 2500 );\n\t\n\tupdate_option( 'medium_large_size_w', 1000 );\n\tupdate_option( 'medium_large_size_h', 1000 );\n}", "function createThumb($path1, $path2, $file_type, $new_w, $new_h, $squareSize = '')\n {\n $source_image = FALSE;\n \n if (preg_match(\"/jpg|JPG|jpeg|JPEG/\", $file_type)) {\n $source_image = imagecreatefromjpeg($path1);\n }\n elseif (preg_match(\"/png|PNG/\", $file_type)) {\n \n if (!$source_image = @imagecreatefrompng($path1)) {\n $source_image = imagecreatefromjpeg($path1);\n }\n }\n elseif (preg_match(\"/gif|GIF/\", $file_type)) {\n $source_image = imagecreatefromgif($path1);\n }\t\t\n if ($source_image == FALSE) {\n $source_image = imagecreatefromjpeg($path1);\n }\n\n $orig_w = imageSX($source_image);\n $orig_h = imageSY($source_image);\n \n if ($orig_w < $new_w && $orig_h < $new_h) {\n $desired_width = $orig_w;\n $desired_height = $orig_h;\n } else {\n $scale = min($new_w / $orig_w, $new_h / $orig_h);\n $desired_width = ceil($scale * $orig_w);\n $desired_height = ceil($scale * $orig_h);\n }\n \n if ($squareSize != '') {\n $desired_width = $desired_height = $squareSize;\n }\n\n /* create a new, \"virtual\" image */\n $virtual_image = imagecreatetruecolor($desired_width, $desired_height);\n // for PNG background white----------->\n $kek = imagecolorallocate($virtual_image, 255, 255, 255);\n imagefill($virtual_image, 0, 0, $kek);\n \n if ($squareSize == '') {\n /* copy source image at a resized size */\n imagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $desired_width, $desired_height, $orig_w, $orig_h);\n } else {\n $wm = $orig_w / $squareSize;\n $hm = $orig_h / $squareSize;\n $h_height = $squareSize / 2;\n $w_height = $squareSize / 2;\n \n if ($orig_w > $orig_h) {\n $adjusted_width = $orig_w / $hm;\n $half_width = $adjusted_width / 2;\n $int_width = $half_width - $w_height;\n imagecopyresampled($virtual_image, $source_image, -$int_width, 0, 0, 0, $adjusted_width, $squareSize, $orig_w, $orig_h);\n }\n\n elseif (($orig_w <= $orig_h)) {\n $adjusted_height = $orig_h / $wm;\n $half_height = $adjusted_height / 2;\n imagecopyresampled($virtual_image, $source_image, 0,0, 0, 0, $squareSize, $adjusted_height, $orig_w, $orig_h);\n } else {\n imagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $squareSize, $squareSize, $orig_w, $orig_h);\n }\n }\n \n \n $img_size=filesize($virtual_image);\n $quality=90;\n if($img_size>= 2097152)\n {\n $quality= 50;\n }\n else if($img_size<= 2097152 && $img_size>= 1048576)\n {\n $quality= 70;\n }\n\n if (@imagejpeg($virtual_image, $path2, $quality)) {\n imagedestroy($virtual_image);\n imagedestroy($source_image);\n return TRUE;\n } else {\n return FALSE;\n }\n }", "private function getImageStylesConfig() {\n static $styles = [];\n if (!empty($styles)) {\n return $styles;\n }\n $image_style_config_files = Utils::getConfigFiles($this->scaffolder->getConfigDir() . '/image_style');\n if (!empty($image_style_config_files)) {\n foreach ($image_style_config_files as $image_style_config_file) {\n $config_data = Utils::getConfig($image_style_config_file);\n if ($config_data) {\n if (!empty($config_data['image_styles'])) {\n $prefix_machine_name = isset($config_data['prefix']['machine_name']) ? $config_data['prefix']['machine_name'] : '';\n $prefix_name = isset($config_data['prefix']['name']) ? $config_data['prefix']['name'] : '';\n $multiplier_config = isset($config_data['multiplier']) ? $config_data['multiplier'] : ['1x' => '1x'];\n $multiplier = [];\n foreach ($multiplier_config as $key => $value) {\n $multiplier[$value] = floatval(str_replace('x', '', $value));\n }\n\n $new_image_styles = [];\n foreach ($multiplier as $suffix => $scale) {\n foreach ($config_data['image_styles'] as $config) {\n $config['name'] = empty($config['name']) ? $config['machine_name'] : $config['name'];\n $config['name'] = $prefix_name . $config['name'];\n $config['machine_name'] = $prefix_machine_name . $config['machine_name'];\n if (count($multiplier) > 1) {\n $config['name'] .= '@' . $suffix;\n $config['machine_name'] .= '_' . $suffix;\n }\n $config['machine_name'] = preg_replace(\"/[^a-z0-9_]/\", '_', $config['machine_name']);\n\n if ($config['effects']) {\n foreach ($config['effects'] as $key => &$effects) {\n $index = $key + 1;\n $effects['index'] = $index;\n $effects['weight'] = empty($effects['weight']) ? $index : $effects['weight'];\n foreach (array('width', 'height') as $k) {\n if (isset ($effects['data'][$k])) {\n $effects['data'][$k] = round($effects['data'][$k] * $scale);\n }\n }\n }\n }\n $styles[$config['machine_name']] = $this->getImageData($config);\n }\n }\n }\n }\n }\n }\n return $styles;\n }", "function single() {\n\t\t\n\t\t$thumbs\t\t = 'thumbs';\n\t\t$source \t = \"./product_assets/WMANSAPREL/issuenewyork/evening/product_front/\";\n\t\t$images = directory_map($source);\n \n\t\t\t//print each file name\n\t\t\tforeach($images as $image)\n\t\t\t{\n\t\t\t\tif(!directory_map($source.$thumbs)) {\n\t\t\t\t\tmkdir($source.$thumbs,0777);\n\t\t\t\t}\n\t\t\t\t\t$thumb = file_exists($source.$thumbs.'/'.$image);\n\t\t\t\t\t\n\t\t\t\t\tif(!$thumb) {\n\t\t\t\t\t\tImageCR($source.$image, 'null', '327*', $source.$thumbs.'/'.$image);\n\t\t\t\t\t}\n\t\t\t}\n\t\techo '<p>Generating thumbs done...</p>';\n\t}", "function image_scale_blob($blob, $aspect, $width, $strategy)\n{\n $im = new \\Imagick();\n $im->readImageBlob($blob);\n $im = image_scale_im_obj($im, $aspect, $width, $strategy);\n return image_return_blob($im);\n}", "function scale($inFile, $outFile, $width, $height) {\n if ($inFile == $outFile) {\n // cannot write to source file\n return FALSE;\n }\n $cmd = sprintf(\n '%s -i %s -sameq -s %dx%d %s',\n escapeshellcmd($this->encoder),\n escapeshellarg($inFile),\n escapeshellcmd($width),\n escapeshellcmd($height),\n escapeshellcmd($outFile)\n );\n $this->execCmd($cmd, $null, $info);\n }", "function createThumb($path1, $path2, $file_type, $new_w, $new_h, $squareSize = ''){\n\t$source_image = FALSE;\n\t\n\tif (preg_match(\"/jpg|JPG|jpeg|JPEG/\", $file_type)) {\n\t\t$source_image = imagecreatefromjpeg($path1);\n\t}\n\telseif (preg_match(\"/png|PNG/\", $file_type)) {\n\t\t\n\t\tif (!$source_image = @imagecreatefrompng($path1)) {\n\t\t\t$source_image = imagecreatefromjpeg($path1);\n\t\t}\n\t}\n\telseif (preg_match(\"/gif|GIF/\", $file_type)) {\n\t\t$source_image = imagecreatefromgif($path1);\n\t}\t\t\n\tif ($source_image == FALSE) {\n\t\t$source_image = imagecreatefromjpeg($path1);\n\t}\n\n\t$orig_w = imageSX($source_image);\n\t$orig_h = imageSY($source_image);\n\t\n\tif ($orig_w < $new_w && $orig_h < $new_h) {\n\t\t$desired_width = $orig_w;\n\t\t$desired_height = $orig_h;\n\t} else {\n\t\t$scale = min($new_w / $orig_w, $new_h / $orig_h);\n\t\t$desired_width = ceil($scale * $orig_w);\n\t\t$desired_height = ceil($scale * $orig_h);\n\t}\n\t\t\t\n\tif ($squareSize != '') {\n\t\t$desired_width = $desired_height = $squareSize;\n\t}\n\n\t/* create a new, \"virtual\" image */\n\t$virtual_image = imagecreatetruecolor($desired_width, $desired_height);\n\t// for PNG background white----------->\n\t$kek = imagecolorallocate($virtual_image, 255, 255, 255);\n\timagefill($virtual_image, 0, 0, $kek);\n\t\n\tif ($squareSize == '') {\n\t\t/* copy source image at a resized size */\n\t\timagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $desired_width, $desired_height, $orig_w, $orig_h);\n\t} else {\n\t\t$wm = $orig_w / $squareSize;\n\t\t$hm = $orig_h / $squareSize;\n\t\t$h_height = $squareSize / 2;\n\t\t$w_height = $squareSize / 2;\n\t\t\n\t\tif ($orig_w > $orig_h) {\n\t\t\t$adjusted_width = $orig_w / $hm;\n\t\t\t$half_width = $adjusted_width / 2;\n\t\t\t$int_width = $half_width - $w_height;\n\t\t\timagecopyresampled($virtual_image, $source_image, -$int_width, 0, 0, 0, $adjusted_width, $squareSize, $orig_w, $orig_h);\n\t\t}\n\n\t\telseif (($orig_w <= $orig_h)) {\n\t\t\t$adjusted_height = $orig_h / $wm;\n\t\t\t$half_height = $adjusted_height / 2;\n\t\t\timagecopyresampled($virtual_image, $source_image, 0,0, 0, 0, $squareSize, $adjusted_height, $orig_w, $orig_h);\n\t\t} else {\n\t\t\timagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $squareSize, $squareSize, $orig_w, $orig_h);\n\t\t}\n\t}\n\t\n\tif (@imagejpeg($virtual_image, $path2, 90)) {\n\t\timagedestroy($virtual_image);\n\t\timagedestroy($source_image);\n\t\treturn TRUE;\n\t} else {\n\t\treturn FALSE;\n\t}\n}", "protected static function setPdfThumbnails($file) {\n\n\t\tif (is_readable($file->getFilenameOnFilestore())) {\n\t\t\t$file->icontime = time();\n\t\t\t$prefix = \"file/\";\n\n\t\t\t// use same filename on the disk - ensures thumbnails are overwritten\n\t\t\t$filestorename = $file->getFilename();\n\t\t\t$filestorename = elgg_substr($filestorename, elgg_strlen($prefix));\n\n\t\t\t$thumb = new ElggFile();\n\t\t\t$thumb->setMimeType('image/jpeg');\n\n\t\t\t$im = new Imagick();\n\t\t\t$im->setResolution(300, 300);\n\t\t\t$im->readImage($file->getFilenameOnFilestore().'[0]');\n\t\t\t$im->setCompression(Imagick::COMPRESSION_JPEG);\n\t\t\t$im->setCompressionQuality(90);\n\t\t\t$im->setBackgroundColor('white');\n\t\t\t$im = $im->flattenImages();\n\t\t\t$im->setImageFormat('jpeg');\n\t\t\t$im->thumbnailImage(600, 0);\n\n\t\t\tif ($im) {\n\n\t\t\t\t$thumb->setFilename($prefix.\"largethumb\".$filestorename.'.jpg');\n\t\t\t\t$thumb->open('write');\n\t\t\t\t$thumb->write($im);\n\t\t\t\t$thumbs_path = $thumb->getFilenameOnFilestore();\n\t\t\t\t$thumb->close();\n\t\t\t\t$file->largethumb = $prefix.\"largethumb\".$filestorename.'.jpg';\n\t\t\t\t$im->clear();\n\t\t\t\t$im->destroy();\n\t\t\t\tunset($im);\n\n\t\t\t\t$thumbnail = get_resized_image_from_existing_file($thumbs_path, 60, 60, true);\n\t\t\t\tif ($thumbnail) {\n\t\t\t\t\t$thumb->setFilename($prefix.\"thumb\".$filestorename.'.jpg');\n\t\t\t\t\t$thumb->open('write');\n\t\t\t\t\t$thumb->write($thumbnail);\n\t\t\t\t\t$thumb->close();\n\t\t\t\t\t$file->thumbnail = $prefix.\"thumb\".$filestorename.'.jpg';\n\t\t\t\t\tunset($thumbnail);\n\t\t\t\t}\n\n\t\t\t\t$thumbsmall = get_resized_image_from_existing_file($thumbs_path, 153, 153, true);\n\t\t\t\tif ($thumbsmall) {\n\t\t\t\t\t$thumb->setFilename($prefix.\"smallthumb\".$filestorename.'.jpg');\n\t\t\t\t\t$thumb->open('write');\n\t\t\t\t\t$thumb->write($thumbsmall);\n\t\t\t\t\t$thumb->close();\n\t\t\t\t\t$file->smallthumb = $prefix.\"smallthumb\".$filestorename.'.jpg';\n\t\t\t\t\tunset($thumbsmall);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "function resize_image($src, $width, $height){\n // initializing\n $save_path = Wordless::theme_temp_path();\n $img_filename = Wordless::join_paths($save_path, md5($width . 'x' . $height . '_' . basename($src)) . '.jpg');\n\n // if file doesn't exists, create it\n if (!file_exists($img_filename)) {\n $to_scale = 0;\n $to_crop = 0;\n\n // Get orig dimensions\n list ($width_orig, $height_orig, $type_orig) = getimagesize($src);\n\n // get original image ... to improve!\n switch($type_orig){\n case IMAGETYPE_JPEG: $image = imagecreatefromjpeg($src);\n break;\n case IMAGETYPE_PNG: $image = imagecreatefrompng($src);\n break;\n case IMAGETYPE_GIF: $image = imagecreatefromgif($src);\n break;\n default:\n return;\n }\n\n // which is the new smallest?\n if ($width < $height)\n $min_dim = $width;\n else\n $min_dim = $height;\n\n // which is the orig smallest?\n if ($width_orig < $height_orig)\n $min_orig = $width_orig;\n else\n $min_orig = $height_orig;\n\n // image of the right size\n if ($height_orig == $height && $width_orig == $width) ; // nothing to do\n // if something smaller => scale\n else if ($width_orig < $width) {\n $to_scale = 1;\n $ratio = $width / $width_orig;\n }\n else if ($height_orig < $height) {\n $to_scale = 1;\n $ratio = $height / $height_orig;\n }\n // if both bigger => scale\n else if ($height_orig > $height && $width_orig > $width) {\n $to_scale = 1;\n $ratio_dest = $width / $height;\n $ratio_orig = $width_orig / $height_orig;\n if ($ratio_dest > $ratio_orig)\n $ratio = $width / $width_orig;\n else\n $ratio = $height / $height_orig;\n }\n // one equal one bigger\n else if ( ($width == $width_orig && $height_orig > $height) || ($height == $height_orig && $width_orig > $width) )\n $to_crop = 1;\n // some problem...\n else\n echo \"ALARM\";\n\n // we need to zoom to get the right size\n if ($to_scale == 1) {\n $new_width = $width_orig * $ratio;\n $new_height = $height_orig * $ratio;\n $image_scaled = imagecreatetruecolor($new_width, $new_height);\n // scaling!\n imagecopyresampled($image_scaled, $image, 0, 0, 0, 0, $new_width, $new_height, $width_orig, $height_orig);\n $image = $image_scaled;\n\n if($new_width > $width || $new_height > $height)\n $to_crop = 1;\n }\n else {\n $new_width = $width_orig;\n $new_height = $height_orig;\n }\n\n // we need to crop the image\n if ($to_crop == 1) {\n $image_cropped = imagecreatetruecolor($width, $height);\n\n // find margins for images\n $margin_x = ($new_width - $width) / 2;\n $margin_y = ($new_height - $height) / 2;\n\n // cropping!\n imagecopy($image_cropped, $image, 0, 0, $margin_x, $margin_y, $width, $height);\n $image = $image_cropped;\n }\n\n // Save image\n imagejpeg($image, $img_filename, 95);\n }\n\n // Return image URL\n return Wordless::join_paths(Wordless::theme_temp_path(), basename($img_filename));\n }", "public function testThemeImageWithSrcsetWidth() {\n // Test with multipliers.\n $widths = [\n rand(0, 500) . 'w',\n rand(500, 1000) . 'w',\n ];\n $image = [\n '#theme' => 'image',\n '#srcset' => [\n [\n 'uri' => $this->testImages[0],\n 'width' => $widths[0],\n ],\n [\n 'uri' => $this->testImages[1],\n 'width' => $widths[1],\n ],\n ],\n '#width' => rand(0, 1000) . 'px',\n '#height' => rand(0, 500) . 'px',\n '#alt' => $this->randomMachineName(),\n '#title' => $this->randomMachineName(),\n ];\n $this->render($image);\n\n // Make sure the srcset attribute has the correct value.\n $this->assertRaw($this->fileUrlGenerator->generateString($this->testImages[0]) . ' ' . $widths[0] . ', ' . $this->fileUrlGenerator->transformRelative($this->fileUrlGenerator->generateString($this->testImages[1])) . ' ' . $widths[1], 'Correct output for image with srcset attribute and width descriptors.');\n }", "protected static function setImageThumbnails($file) {\n\n\t\t$file->icontime = time();\n\t\t$prefix = \"file/\";\n\n\t\t// use same filename on the disk - ensures thumbnails are overwritten\n\t\t$filestorename = $file->getFilename();\n\t\t$filestorename = elgg_substr($filestorename, elgg_strlen($prefix));\n\n\t\t$thumb = new ElggFile();\n\t\t$thumb->setMimeType($file->mimetype);\n\n\t\t$thumbnail = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 60, 60, true);\n\t\tif ($thumbnail) {\n\t\t\t$thumb->setFilename($prefix.\"thumb\".$filestorename);\n\t\t\t$thumb->open('write');\n\t\t\t$thumb->write($thumbnail);\n\t\t\t$thumb->close();\n\t\t\t$file->thumbnail = $prefix.\"thumb\".$filestorename;\n\t\t\tunset($thumbnail);\n\t\t}\n\n\t\t$thumbsmall = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 153, 153, true);\n\t\tif ($thumbsmall) {\n\t\t\t$thumb->setFilename($prefix.\"smallthumb\".$filestorename);\n\t\t\t$thumb->open('write');\n\t\t\t$thumb->write($thumbsmall);\n\t\t\t$thumb->close();\n\t\t\t$file->smallthumb = $prefix.\"smallthumb\".$filestorename;\n\t\t\tunset($thumbsmall);\n\t\t}\n\n\t\t$thumblarge = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 600, 600, false);\n\t\tif ($thumblarge) {\n\t\t\t$thumb->setFilename($prefix.\"largethumb\".$filestorename);\n\t\t\t$thumb->open('write');\n\t\t\t$thumb->write($thumblarge);\n\t\t\t$thumb->close();\n\t\t\t$file->largethumb = $prefix.\"largethumb\".$filestorename;\n\t\t\tunset($thumblarge);\n\t\t}\n\t}", "function adds_new_image_sizes() {\n\t$config = array(\n\t\t'featured-image' => array(\n\t\t\t'width' => 720,\n\t\t\t'height' => 400,\n\t\t\t'crop' => true,\n\t\t)\n\t);\n\n\tforeach( $config as $name => $args) {\n\t\t$crop = array_key_exists( 'crop', $args ) ? $args['crop'] : false;\n\n\t\tadd_image_size( $name, $args['width'], $args['height'], $args['crop'] );\n\t}\n}", "public function makeThumbnail() {\n Image::make($this->filePath())->fit(200)->save($this->thumbnailPath());\n }", "public function run()\n {\n $image = new Image([\n \"path\" => \"placeholder_light.png\",\n \"alt\" => \"A placeholder image in light colors.\",\n \"description\" => \"The placeholder image with some light color.\",\n ]);\n $image->save();\n \n $image = new Image([\n \"path\" => \"placeholder_small_light.png\",\n \"alt\" => \"A small placeholder image in light colors.\",\n \"description\" => \"The small placeholder image with some light color.\",\n ]);\n $image->save();\n \n $image = new Image([\n \"path\" => \"placeholder_square_light.jpg\",\n \"alt\" => \"A square placeholder image in light colors.\",\n \"description\" => \"The square placeholder image with some light color.\",\n ]);\n $image->save();\n \n $image = new Image([\n \"path\" => \"placeholder_wide_dark.png\",\n \"alt\" => \"A wide placeholder image in dark colors.\",\n \"description\" => \"The wide placeholder image with some dark color.\",\n ]);\n $image->save();\n \n $image = new Image([\n \"path\" => \"placeholder_wide_light.png\",\n \"alt\" => \"A wide placeholder image in light colors.\",\n \"description\" => \"The wide placeholder image with some light color.\",\n ]);\n $image->save();\n }", "protected function createThumbnails() {\n\t\tglobal $prindot;\n\t\t$success = true;\n\n\t\t$fileName = $this->uploadName;\n\t\t$targetDir = $prindot['paths']['storage_root_js'];\n\n$filePath = $targetDir . $fileName;\nerror_log($_SERVER[\"SCRIPT_NAME\"] . \" : \" . 'filepath:\"' . $filePath . '\"');\n\n$filePath_thumbnail = $targetDir . $prindot['paths']['thumbnails'] . DIRECTORY_SEPARATOR . $fileName;\nerror_log($_SERVER[\"SCRIPT_NAME\"] . \" : \" . 'filePath_thumb:\"' . $filePath_thumbnail . '\"');\n\n$filePath_preview = $targetDir . $prindot['paths']['previews'] . DIRECTORY_SEPARATOR . $fileName;\nerror_log($_SERVER[\"SCRIPT_NAME\"] . \" : \" . 'filePath_preview:\"' . $filePath_preview . '\"');\n\n\n\t\terror_log($_SERVER[\"SCRIPT_NAME\"] . \" : \" . \"written file '\" . $filePath . \"'\");\n\t\t// TODO: hier thumbnail und preview generieren (und ggf. info.datei mit wichtigen daten, damit nicht immer wieder aufgefragt werden muss )\n\t\terror_log($_SERVER[\"SCRIPT_NAME\"] . \" : preview : '\" . $filePath_preview . \"'\");\n\t\terror_log($_SERVER[\"SCRIPT_NAME\"] . \" : thumbnail : '\" . $filePath_thumbnail . \"'\");\n\n\n\t\t// thumbs and previews\n\n\t\t// TODO: make preview and thumbnail with dedicated php file (same logic as with logs.php etc)\n\t\t// ... so previews may be rendered if deleted before\n\n\t\t$filename = $filePath;\n\n\t\t$dir = $_SERVER[\"SCRIPT_FILENAME\"];\n\t\terror_log($_SERVER[\"SCRIPT_NAME\"] . \" : \" . \"dir '\" . $dir . \"'\");\n\n\t\t$dir = dirname($dir) . '/';\n\t\terror_log($_SERVER[\"SCRIPT_NAME\"] . \" : \" . \"dir '\" . $dir . \"'\");\n\n\t\t//$dir = $dir . $prindot['paths']['storage_root_js'];\n\t\t//error_log($_SERVER[\"SCRIPT_NAME\"] . \" : \" . \"dir '\" . $dir . \"'\");\n\n\t\t/* Create new object */\n\t\t//$im = new Imagick( 'D:\\xampp\\htdocs\\prindot\\plupload2\\examples\\uploads\\cylinder.jpg' );\t// OK\n\t\t//$im = new Imagick( __DIR__ . '/' . $filename );\n\t\t$im = new Imagick($dir . $filename);\n\n\t\t$i = $im->getImageProperties(\"*\", true);\n\t\t//error_log(my_print_r($i));\n\t\t$r = $im->getImageResolution();\n\t\t//error_log(my_print_r($r));\n\t\t$g = $im->getImageGeometry();\n\t\t//error_log(my_print_r($g));\n\t\t//die();\n\t\t// PREVIEW\n\t\t/* Scale down */\n\t\t$im->thumbnailImage($prindot['dimensions']['previews']['width'], $prindot['dimensions']['previews']['height'], true);\n\t\t$im->setImageFormat('jpeg');\n\n\t\t/* save */\n\t\t$outpath = $dir . $filePath_preview . \".jpg\";\n\t\terror_log($_SERVER[\"SCRIPT_NAME\"] . \" : \" . \"outpath '\" . $outpath . \"'\");\n\t\t@unlink($outpath);\n\t\t$im->writeImage($outpath);\n\n\t\t//echo \"preview FERTIG (\" . $outpath . \")<br>\";\n\t\t// THUMBNAIL\n\t\t/* Scale down */\n\t\t$im->thumbnailImage($prindot['dimensions']['thumbnails']['width'], $prindot['dimensions']['thumbnails']['height'], true);\n\t\t$im->setImageFormat('jpeg');\n\n\t\t/* save */\n\t\t$outpath = $dir . $filePath_thumbnail . \".jpg\";\n\t\terror_log($_SERVER[\"SCRIPT_NAME\"] . \" : \" . \"outpath '\" . $outpath . \"'\");\n\t\t@unlink($outpath);\n\t\t$im->writeImage($outpath);\n\n\t\t//echo \"thumbnail FERTIG (\" . $outpath . \")<br>\";\n\t\treturn $success;\n\t}", "private function updateImgThumbnail()\n {\n //====================================================================//\n // Load Object Images List\n foreach (Image::getImages(SLM::getDefaultLangId(), $this->ProductId) as $image) {\n $imageObj = new Image($image['id_image']);\n $imagePath = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n if (!file_exists($imagePath.'.jpg')) {\n continue;\n }\n foreach (ImageType::getImagesTypes(\"products\") as $imageType) {\n $imgThumb = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n $imgThumb .= '-'.Tools::stripslashes($imageType['name']).'.jpg';\n if (!file_exists($imgThumb)) {\n ImageManager::resize(\n $imagePath.'.jpg',\n $imgThumb,\n (int)($imageType['width']),\n (int)($imageType['height'])\n );\n }\n }\n }\n }", "public function createFilesFromSeriesInstances($seriesData,$extension=\"png\")\n {\n\n $extension = strtolower($extension);\n\n $result = array();\n\n $order = 0;\n $instancesLn = count($seriesData[\"Instances\"]);\n\n //$studio->cc_tSetProgressLabel(\"Nacitavam snimky 0/\".$instancesLn);\n foreach ($seriesData[\"Instances\"] as $instance){\n\n \t$dirData = $this->createDirStructure($instance);\n\n \t$picDir = $dirData[\"osDir\"];\n \t$webDir = $dirData[\"webDir\"];\n \t\n \t$res = $this->getContent2($this->dicomData[\"main_server\"].\"/instances/\".$instance);\n \t\n \tif ($res[\"status\"]==FALSE){\n \t\n \t return $res;\n \t}\n \t\n \t$instanceData = $res[\"result\"];\n \t\n $fileName = $picDir.$instance;\n\n $fileNameExt = sprintf(\"%s.dcm\",$fileName);\n\n if (!file_exists($fileNameExt)){\n\n $picData = $this->getDCMContent($this->dicomData[\"main_server\"].\"/instances/\".$instance.\"/file\");\n \n if (file_put_contents($fileNameExt,$picData)==FALSE){\n return array(\"status\"=>FALSE,\"result\"=>\"Error writinng DICOM data to DISK !!!\");\n }\n }\n \n $nFile = str_replace(\"dcm\",$extension,$fileNameExt);\n \n $tagDataRes = $this->getInstanceSimplifiedTags($instance);\n \n if ($tagDataRes[\"status\"] === false){\n \n return array(\"status\"=>FALSE,\"result\"=>\"Error getting DICOM Tags from Instance !!!\");\n \n }\n $tagData = $tagDataRes[\"result\"];\n \n if (array_key_exists(\"WindowCenter\", $tagData)){\n \n $windowData = $this->getWindowCenterWidth($tagData);\n \n }else{\n \n $windowData = array();\n \n }\n \n //$cmd = IM_DIR.\"convert -verbose \".$fileNameExt.\" -auto-level \".$nFile;\n \n $dcmTask = \"\";\n \n switch ($extension){\n \n case \"png\":\n // $dcmTask = sprintf(\"dcmj2pnm -v\")\n if (array_key_exists(\"center\", $windowData)){\n \n $dcmString = sprintf(\"%sdcm2pnm -v %s --set-window %s %s --write-png %s 2>&1\"\n ,DCMTK_DIR\n ,$fileNameExt\n ,$windowData[\"center\"]\n ,$windowData[\"width\"]\n ,$nFile\n );\n }\n else{\n $dcmString = sprintf(\"%sdcm2pnm -v %s --write-png %s 2>&1\"\n ,DCMTK_DIR\n ,$fileNameExt\n ,$nFile\n );\n }\n break;\n case \"jpg\":\n \n if (array_key_exists(\"center\", $windowData)){\n $dcmString = sprintf(\"%sdcm2pnm -v %s --set-window %s %s --write-jpeg %s 2>&1\"\n ,DCMTK_DIR\n ,$fileNameExt\n ,$windowData[\"center\"]\n ,$windowData[\"width\"]\n ,$nFile\n );\n }else{\n \n $dcmString = sprintf(\"%sdcm2pnm -v %s --write-jpeg %s 2>&1\"\n ,DCMTK_DIR\n ,$fileNameExt\n ,$nFile\n );\n \n }\n break;\n \n \n \n }\n \n $shellRes = array();\n exec($dcmString,$shellRes);\n \n $command=\"\";\n $fileTmp = basename($fileName);\n \n // $studio->cc_tSetProgressLabel(\"Nacitavam snimku \".$order.\" z \".$instancesLn);\n $order = $instanceData[\"IndexInSeries\"]; \n switch ($extension){\n\n case \"png\":\n\n $result[$order][\"instance\"] = $instance;\n\n $result[$order][\"extension\"] = $extension;\n $result[$order][\"file\"]= $webDir.$fileTmp.\".png\";\n $result[$order][\"order\"] = $instanceData[\"IndexInSeries\"];\n $output=array();\n $command = sprintf($this->dicomData[\"imagemagick_dir\"].\"identify %s.png 2>&1\",$fileName);\n exec($command,$output);\n $result[$order][\"info\"] = $this->parseFileInfo($output);\n \t$result[$order][\"SOAPSeriesUID\"] = $seriesData[\"MainDicomTags\"][\"SeriesInstanceUID\"];\n\n \tbreak;\n case \"jpg\":\n\n $command = sprintf($this->dicomData[\"imagemagick_dir\"].\"identify %s.jpg 2>&1\",$fileName);\n $output=array();\n exec($command,$output);\n $result[$order][\"info\"] = $this->parseFileInfo($output);\n \t$result[$order][\"order\"] = $instanceData[\"IndexInSeries\"];\n \t$result[$order][\"SeriesInstanceUID\"] = $seriesData[\"MainDicomTags\"][\"SeriesInstanceUID\"];\n\n break;\n }\n //$order++;\n }\n return array(\"status\"=>true,\"result\"=>$result);\n }", "function create_new_pdf_thumb($target_path, $only_name, $thumb_path, $screenshot_path){\n global $jlistConfig; \n \n $pdf_thumb_file_name = '';\n \n if (extension_loaded('imagick')){ \n // create small thumb\n $image = new Imagick($target_path.'[0]');\n $image -> setImageIndex(0);\n $image -> setImageFormat($jlistConfig['pdf.thumb.image.type']);\n $image -> scaleImage($jlistConfig['pdf.thumb.height'],$jlistConfig['pdf.thumb.width'],1);\n $pdf_thumb_file_name = $only_name.'.'.strtolower($jlistConfig['pdf.thumb.image.type']);\n $image->writeImage($thumb_path.$only_name.'.'.strtolower($jlistConfig['pdf.thumb.image.type']));\n $image->clear();\n $image->destroy();\n // create big thumb\n $image = new Imagick($target_path.'[0]');\n $image -> setImageIndex(0);\n $image -> setImageFormat($jlistConfig['pdf.thumb.image.type']);\n $image -> scaleImage($jlistConfig['pdf.thumb.pic.height'],$jlistConfig['pdf.thumb.pic.width'],1);\n $image->writeImage($screenshot_path.$only_name.'.'.strtolower($jlistConfig['pdf.thumb.image.type']));\n $image->clear();\n $image->destroy(); \n }\n return $pdf_thumb_file_name; \n}", "public function testTransform()\n {\n $img = new P4Cms_Image();\n $data = file_get_contents(TEST_ASSETS_PATH . '/images/luigi.png');\n $img->setData($data);\n\n // test the behavior of scale with width and height\n $img->transform('scale', array(258, 355));\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 258, 'height' => 355),\n 'Expected image to be scaled to 258x355 pixels.'\n );\n\n // test the behavior of scale with width only\n // 516/710 = 400/h => h = 550\n $img->transform('scale', array(400));\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 400, 'height' => 550),\n 'Expected image to be scaled to 300x300 pixels.'\n );\n\n // test the behavior of crop\n $img->transform('crop', array(100, 100, 50, 50));\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 100, 'height' => 100),\n 'Expected image to be cropped to 100x100 pixels.'\n );\n\n // test the behavior of unsupported transform\n try {\n $img->transform('foo');\n $this->fail('Expected failure with an unsupported transform.');\n } catch (P4Cms_Image_Exception $e) {\n $this->assertSame($e->getMessage(), \"Transform \\\"foo\\\" is not supported.\");\n } catch (Exception $e) {\n $this->fail('Unexpected exception: '. $e->getMessage());\n }\n }", "public function setScaling($scaling = 100) {}", "function image_sprite($sprite_abspath, $icons_abspaths, $orientation = 'portrait', $padding = 5)\n{\n\n // open all the images, create teardown function\n $sprite = new \\Imagick();\n $icons = array();\n\n foreach($icons_abspaths as $icon_abspath) {\n $icons[] = new \\Imagick($icon_abspath);\n }\n\n $tear_down = function ($return) use (&$sprite, $icons) {\n foreach($icons as $icon) {\n $icon->clear();\n $icon->destroy();\n }\n $sprite->clear();\n $sprite->destroy();\n return $return;\n };\n\n // calculate dimensions\n $max_width = $max_height = 0;\n foreach($icons as $icon) {\n $max_height = max($max_height, $icon->getImageHeight());\n $max_width = max($max_width, $icon->getImageWidth());\n }\n $sprite_width = $max_width + ($padding * 2);\n $sprite_height = $max_height + ($padding * 2);\n if ($orientation == 'landscape') {\n $sprite_width *= count($icons);\n } else {\n $sprite_height *= count($icons);\n }\n\n // check if we really need to do this\n $sprite_mtime = file_exists($sprite_abspath) ? filemtime($sprite_abspath):0;\n $icons_mtime = 0;\n\n foreach($icons_abspaths as $icon_abspath) {\n $icons_mtime = max($icons_mtime, filemtime($icon_abspath));\n }\n\n if ($sprite_mtime >= $icons_mtime) {\n $sprite_size = getimagesize($sprite_abspath);\n if ($sprite_size[0] == $sprite_width && $sprite_size[1] == $sprite_height) {\n return $tear_down(array(\n 'box_height' => $max_height,\n 'box_width' => $max_width,\n 'sprite_height' => $sprite_height,\n 'sprite_width' => $sprite_width,\n ));\n }\n }\n\n // compose the sprite\n $sprite->newImage($sprite_width, $sprite_height, new \\ImagickPixel('transparent'));\n\n foreach($icons as $n => $icon) {\n $x = $y = $padding;\n $x += round(($max_height - $icon->getImageHeight())/2);\n $y += round(($max_width - $icon->getImageWidth())/2);\n $cumulative_padding = $n * $padding * 2;\n if ($orientation == 'landscape') {\n $x += ($n * $max_width) + $cumulative_padding;\n } else {\n $y += ($n * $max_height) + $cumulative_padding;\n }\n $sprite->compositeImage($icon, \\Imagick::COMPOSITE_COPY, $x, $y);\n }\n $sprite->setImageCompressionQuality(100);\n $sprite->writeImage($sprite_abspath);\n\n return $tear_down(array(\n 'box_height' => $max_height + ($padding * 2),\n 'box_width' => $max_width + ($padding * 2),\n 'icon_height' => $max_height,\n 'icon_width' => $max_width,\n 'sprite_height' => $sprite_height,\n 'sprite_width' => $sprite_width,\n ));\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}", "public function run()\n {\n $sizes = [\n ['name' => 'xs','label' => 'extra small'],\n ['name' => 'sm','label' => 'small'],\n ['name' => 'md','label' => 'medium'],\n ['name' => 'lg','label' => 'large'],\n ['name' => 'xl','label' => 'extra large'],\n ['name' => '2xl','label' => 'double extra large'],\n ];\n\n foreach ($sizes as $size) {\n Size::create(['name' => $size['name'], 'label' => $size['label']]);\n }\n }", "public function displayRegenerate()\n\t{\n\t \tglobal $currentIndex;\n\n\t\t$types = array(\n\t\t\t'categories' => $this->l('Categories'),\n\t\t\t'manufacturers' => $this->l('Manufacturers'),\n\t\t\t'suppliers' => $this->l('Suppliers'),\n\t\t\t'scenes' => $this->l('Scenes'),\n\t\t\t'products' => $this->l('Products'),\n\t\t\t'stores' => $this->l('Stores')\n\t\t);\n\t\techo '\n\t\t<h2 class=\"space\">'.$this->l('Regenerate thumbnails').'</h2>\n\t\t'.$this->l('Regenerates thumbnails for all existing product images').'.<br /><br /><div class=\"width4\">';\n\t\t$this->displayWarning($this->l('Please be patient, as this can take several minutes').'<br />'.$this->l('Be careful! Manually generated thumbnails will be erased by automatically generated thumbnails.'));\n\t\techo '\n\t\t</div>\n\t\t<form action=\"'.$currentIndex.'&token='.$this->token.'\" method=\"post\">\n\t\t\t<fieldset class=\"width4\">\n\t\t\t\t<legend><img src=\"../img/admin/picture.gif\" /> '.$this->l('Regenerate thumbnails').'</legend><br />\n\t\t\t\t<label>'.$this->l('Select image').'</label>\n\t\t\t\t<div class=\"margin-form\">\n\t\t\t\t\t<select name=\"type\" onchange=\"changeFormat(this)\">\n\t\t\t\t\t\t<option value=\"all\">'.$this->l('All').'</option>';\n\t\t\t\tforeach ($types AS $k => $type)\n\t\t\t\t\techo '<option value=\"'.$k.'\">'.$type.'</option>';\n\t\t\t\techo '\n\t\t\t\t\t</select>\n\t\t\t\t</div>';\n\t\t\t\t\n\t\t\tforeach ($types AS $k => $type)\n\t\t\t{\n\t\t\t\t$formats = ImageType::getImagesTypes($k);\n\t\t\t\techo '\n\t\t\t\t<label class=\"second-select format_'.$k.'\" style=\"display:none;\">'.$this->l('Select format').'</label>\n\t\t\t\t<div class=\"second-select margin-form format_'.$k.'\" style=\"display:none;\">\n\t\t\t\t<select class=\"second-select format_'.$k.'\" name=\"format_'.$k.'\">\n\t\t\t\t\t<option value=\"all\">'.$this->l('All').'</option>';\n\t\t\t\tforeach ($formats AS $format)\n\t\t\t\t\techo '<option value=\"'.$format['id_image_type'].'\">'.$format['name'].'</option>';\n\t\t\t\techo '</select></div>';\n\t\t\t}\n\t\t\techo '\n\t\t\t\t<script>\n\t\t\t\t\tfunction changeFormat(elt)\n\t\t\t\t\t{\n\t\t\t\t\t\t$(\\'.second-select\\').hide();\n\t\t\t\t\t\t$(\\'.format_\\' + $(elt).val()).show();\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t\t<label>'.$this->l('Erase previous images').'</label>\n\t\t\t\t<div class=\"margin-form\">\n\t\t\t\t\t<input name=\"erase\" type=\"checkbox\" value=\"1\" checked=\"checked\" />\n\t\t\t\t\t<p>'.$this->l('Uncheck this checkbox only if your server timed out and you need to resume the regeneration.').'</p>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t<center><input type=\"Submit\" name=\"submitRegenerate'.$this->table.'\" value=\"'.$this->l('Regenerate thumbnails').'\" class=\"button space\" onclick=\"return confirm(\\''.$this->l('Are you sure?', __CLASS__, true, false).'\\');\" /></center>\n\t\t\t</fieldset>\n\t\t</form>';\n\t}", "function resize($src_file, $dest_file, $new_size, $img_meta) {\n // height/width\n $ratio = max($img_meta['width'], $img_meta['height']) / $new_size;\n $ratio = max($ratio, 1.0);\n $destWidth = (int)($img_meta['width'] / $ratio);\n $destHeight = (int)($img_meta['height'] / $ratio);\n \n $path = zmgNetpbmTool::getPath();\n if ($img_meta['extension'] == \"png\") {\n $cmd = $path . \"pngtopnm \" . $src_file . \" | \" . $path . \"pnmscale -xysize \"\n . $destWidth . \" \" . $destHeight . \" | \" . $path . \"pnmtopng > \" . $dest_file;\n } else if ($img_meta['extension'] == \"jpg\" || $img_meta['extension'] == \"jpeg\") {\n $cmd = $path . \"jpegtopnm \" . $src_file . \" | \" . $path . \"pnmscale -xysize \"\n . $destWidth . \" \" . $destHeight . \" | \" . $path . \"ppmtojpeg -quality=\"\n . $img_meta['jpeg_qty'] . \" > \" . $dest_file;\n } else if ($img_meta['extension'] == \"gif\") {\n $cmd = $path . \"giftopnm \" . $src_file . \" | \" . $path . \"pnmscale -xysize \"\n . $destWidth . \" \" . $destHeight . \" | \" . $path . \"ppmquant 256 | \"\n . $path . \"ppmtogif > \" . $dest_file;\n } else {\n return zmgToolboxPlugin::registerError($src_file, 'NetPBM: Source file is not an image or image type is not supported.');\n }\n\n $output = $retval = null;\n exec($cmd, $output, $retval);\n if ($retval) {\n return zmgToolboxPlugin::registerError($src_file, 'NetPBM: Could not convert image: ' . $output);\n }\n\n return true;\n }", "public static function scale($fname,$max_image_size=600,$flag='image',$quality=100,$max_image_side=600,$max_thumb_size=300,$max_thumb_height=120,$thumb_scale=1) // scale image/thumbnail\n\t{\n\t\tif(ini_get('memory_limit')<100)\n\t\t\tini_set('memory_limit','100M'); // fix for serevrs with low memory limit\n\n\t\tif($flag=='rescaleimage')\n\t\t{\n\t\t\t$full_fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\tif(file_exists($full_fname))\n\t\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($full_fname);\n\t\t\telse\n\t\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($fname);\n\t\t}\n\t\telse\n\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($fname);\n\n\t\t$thumb=$flag=='thumb'||$flag=='rescalethumb';\n\t\t$max_size_param=$thumb?$max_thumb_size:$max_image_size;\n\t\tif($orig_width>$max_size_param||$orig_height>$max_size_param)\n\t\t{\n\t\t\tif($flag=='image')\n\t\t\t{\n\t\t\t\t$new_fname=$fname;\n\t\t\t\t$fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\trename($new_fname,$fname);\n\t\t\t}\n\t\t\telseif($flag=='rescaleimage')\n\t\t\t{\n\t\t\t\t$final_name=$fname;\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_tempimg\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\tif(file_exists($full_fname))\n\t\t\t\t{\n\t\t\t\t\tcopy($full_fname,$fname);\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($flag=='rescalethumb')\n\t\t\t{\n\t\t\t\t$final_name=substr($fname,0,strrpos($fname,\".\")).\"_thumb\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_thumb_tempimg\".substr($fname,strrpos($fname,\".\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_thumb\".substr($fname,strrpos($fname,\".\"));\n\t\t\t}\n\n\t\t\t$ratio=$orig_width/$orig_height;\n\n\t\t\tif($thumb_scale==2)\n\t\t\t\t$scaling='crop';\n\t\t\telse\n\t\t\t\t$scaling='default';\n//scaling_mode\n\t\t\tif(!$thumb||$scaling=='default') //old scaling\n\t\t\t{\n\t\t\t\tif($orig_width>=$orig_height)\n\t\t\t\t{\n\t\t\t\t\t$new_width=$max_size_param;\n\t\t\t\t\t$new_height=intval($max_size_param/$ratio);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_width=intval($max_size_param*$ratio);\n\t\t\t\t\t$new_height=$max_size_param;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($orig_width>=$orig_height)\n\t\t\t\t{\n\t\t\t\t\t$new_height=$max_thumb_height;\n\t\t\t\t\t$new_width=intval($new_height*$ratio);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_width=$max_size_param;\n\t\t\t\t\t$new_height=intval($new_width/$ratio);\n\t\t\t\t}\n\t\t\t}\n// Resample\n\t\t\t$image_p=@imagecreatetruecolor($new_width,$new_height);\n\t\t\t$image=self::gdCreate($img_type,$fname);\n//transparency\n\t\t\tif($img_type==1||$img_type==3)\n\t\t\t{\n\t\t\t\t$trnprt_indx=imagecolortransparent($image);\n\t\t\t\tif($trnprt_indx>=0)\n\t\t\t\t{\n\t\t\t\t\t$trnprt_color=imagecolorsforindex($image,$trnprt_indx);\n\t\t\t\t\t$trnprt_indx=imagecolorallocate($image_p,$trnprt_color['red'],$trnprt_color['green'],$trnprt_color['blue']);\n\t\t\t\t\timagefill($image_p,0,0,$trnprt_indx);\n\t\t\t\t\timagecolortransparent($image_p,$trnprt_indx);\n\t\t\t\t}\n\t\t\t\telseif($img_type==3)\n\t\t\t\t{\n\t\t\t\t\timagealphablending($image_p,false);\n\t\t\t\t\t$color=imagecolorallocatealpha($image_p,0,0,0,127);\n\t\t\t\t\timagefill($image_p,0,0,$color);\n\t\t\t\t\timagesavealpha($image_p,true);\n\t\t\t\t}\n\t\t\t}\n//end transparency\n\t\t\tif($image!='')\n\t\t\t{\n\t\t\t\timagecopyresampled($image_p,$image,0,0,0,0,$new_width,$new_height,$orig_width,$orig_height);\n\n\t\t\t\tself::gdSave($image_p,$new_fname,$quality,$img_type); // Save image\n\t\t\t\timagedestroy($image_p);\n\t\t\t\timagedestroy($image);\n\t\t\t\tif($flag=='rescalethumb'||$flag=='rescaleimage')\n\t\t\t\t{\n\t\t\t\t\tunlink($final_name);\n\t\t\t\t\trename($new_fname,$final_name);\n\t\t\t\t}\n\t\t\t\treturn $new_fname;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telseif($flag=='image')\n\t\t{\n\t\t\t$full_fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\tcopy($fname,$full_fname);\n\t\t\treturn $fname;\n\t\t}\n\t\telse\n\t\t\treturn $fname;\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 create_medium($type, $image){\r\n\techo $source_path=DIR_FS_SITE.'upload/photo/'.$type.'/large/'.$image;\r\n\techo $destination_path=DIR_FS_SITE.'upload/photo/'.$type.'/medium/'.$image;\r\n\tlist($width, $height) = getimagesize($source_path);\r\n $xscale=$width/MEDIUM_WIDTH;\r\n $yscale=$height/MEDIUM_HEIGHT;\r\n \r\n // Recalculate new size with default ratio\r\n if ($yscale>$xscale){\r\n $new_width = round($width * (1/$yscale));\r\n $new_height = round($height * (1/$yscale));\r\n }\r\n else {\r\n $new_width = round($width * (1/$xscale));\r\n $new_height = round($height * (1/$xscale));\r\n }\r\n\r\n #check image format and create image\r\n if(strtolower(substr($source_path, -3))=='jpg'):\r\n $imageTmp = imagecreatefromjpeg ($source_path);\r\n elseif(strtolower(substr($source_path, -3))=='gif'):\r\n $imageTmp = imagecreatefromgif($source_path);\r\n elseif(strtolower(substr($source_path, -3))=='png'):\r\n $imageTmp = imagecreatefrompng($source_path);\r\n endif;\r\n\r\n // Resize the original image & output\r\n $imageResized = imagecreatetruecolor($new_width, $new_height);\r\n # $imageTmp = imagecreatefromjpeg ($source_path);\r\n imagecopyresampled($imageResized, $imageTmp, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\r\n output_img($imageResized, image_type_to_mime_type(getimagesize($source_path)), $destination_path);\r\n}", "protected function formatImage($file)\n {\n $img = Image::make($file->path());\n $img->resize(300, 300);\n $img->save();\n }", "public function getScaling() {}", "function smarty_modifier_imgGen(Photo $photo, $sizeName){\n\tif(empty($sizeName)){\n\t\treturn;\n\t}\n\t\n\t$resultingFilePath = Reg::get('photoCache')->generateImageCache($sizeName, $photo);\n\n\treturn SITE_PATH . $resultingFilePath;\n}", "function shoestrap_image_resize( $data ) {\n\n $defaults = array(\n \"url\" => \"\",\n \"width\" => \"\",\n \"height\" => \"\",\n \"crop\" => true,\n \"retina\" => \"\",\n \"resize\" => true,\n );\n\n $settings = wp_parse_args( $data, $defaults );\n\n if ( empty($settings['url']) )\n return;\n\n // Generate the @2x file if retina is enabled\n if ( shoestrap_getVariable( 'retina_toggle' ) == 1 && empty( $settings['retina'] ) )\n $results['retina'] = matthewruddy_image_resize( $settings['url'], $settings['width'], $settings['height'], $settings['crop'], true );\n\n return matthewruddy_image_resize( $settings['url'], $settings['width'], $settings['height'], $settings['crop'], false ); \n}", "protected function addImageSizeConfigs()\n {\n // TODO: add image size configs\n }", "protected function doActualConvert()\n {\n/*\n $im = \\Jcupitt\\Vips\\Image::newFromFile($this->source);\n //$im->writeToFile(__DIR__ . '/images/small-vips.webp', [\"Q\" => 10]);\n\n $im->webpsave($this->destination, [\n \"Q\" => 80,\n //'near_lossless' => true\n ]);\n return;*/\n\n $im = $this->createImageResource();\n $options = $this->createParamsForVipsWebPSave();\n $this->webpsave($im, $options);\n }", "public function run()\n {\n foreach ($this->getImages() as $image) {\n Image::create($image);\n }\n }", "protected function transform(sfImage $image)\n {\n $resource_w = $image->getWidth();\n $resource_h = $image->getHeight();\n\n $scale_w = $this->getWidth()/$resource_w;\n $scale_h = $this->getHeight()/$resource_h;\n switch ($this->getMethod())\n {\n case 'deflate':\n case 'inflate':\n\n return $image->resize($this->getWidth(), $this->getHeight());\n\n case 'left':\n $image->scale(max($scale_w, $scale_h));\n\n return $image->crop(0, (int)round(($image->getHeight() - $this->getHeight()) / 2), $this->getWidth(), $this->getHeight());\n\n case 'right':\n $image->scale(max($scale_w, $scale_h));\n\n return $image->crop(($image->getWidth() - $this->getWidth()), (int)round(($image->getHeight() - $this->getHeight()) / 2),$this->getWidth(), $this->getHeight());\n\n case 'top':\n $image->scale(max($scale_w, $scale_h));\n\n return $image->crop((int)round(($image->getWidth() - $this->getWidth()) / 2), 0, $this->getWidth(), $this->getHeight());\n\n case 'bottom':\n $image->scale(max($scale_w, $scale_h));\n\n return $image->crop((int)round(($image->getWidth() - $this->getWidth()) / 2), ($image->getHeight() - $this->getHeight()), $this->getWidth(), $this->getHeight());\n \n case 'center':\n $image->scale(max($scale_w, $scale_h));\n \n $left = (int)round(($image->getWidth() - $this->getWidth()) / 2);\n $top = (int)round(($image->getHeight() - $this->getHeight()) / 2);\n\n return $image->crop($left, $top, $this->getWidth(), $this->getHeight());\n case 'scale':\n return $image->scale(min($scale_w, $scale_h));\n\n case 'fit': \n default:\n $img = clone $image;\n\n $image->create($this->getWidth(), $this->getHeight());\n \n // Set a background color if specified\n if(!is_null($this->getBackground()) && $this->getBackground() != '')\n {\n $image->fill(0,0, $this->getBackground());\n }\n\n $img->scale(min($this->getWidth() / $img->getWidth(), $this->getHeight() / $img->getHeight()));\n \n $image->overlay($img, 'center');\n\n return $image;\n \n }\n }", "public function image_sizes() {\n add_image_size('careerfy-job-medium', 358, 204, true); // posts for team grid and medium\n add_image_size('careerfy-posts-msmal', 85, 58, true); // posts for team grid and medium\n add_image_size('careerfy-emp-msmal', 132, 47, true); //\n add_image_size('careerfy-candidate-2', 350, 450, true); // posts for team grid and medium\n add_image_size('careerfy-testimonial-thumb', 268, 268, true); // posts for team grid and medium\n add_image_size('careerfy-service', 247, 252, true); // posts for team grid and medium\n }", "function get_images($img_id, $image_sizes)\n{\n if ($image_sizes)\n foreach ($image_sizes as $size_name => $size) {\n $img = get_image($img_id, $size['w'], $size['h']);\n $image['url_' . $size_name] = $img['url'];\n $image['file_' . $size_name] = $img['filename'];\n }\n\n if (!$img)\n $img = get_image($img_id);\n \n $image['img_id'] = $img['id'];\n $image['name'] = $img['name'];\n $image['alt'] = $img['alt'];\n $image['title'] = $img['title'];\n $image['url'] = $img['url'];\n\n return $image;\n}", "public function responsiveImageProvider() {\n $image = 'http://www.example.com/test_image.png';\n $cloudinaryFetchUrl = $this->cloudinaryResourceBaseUrl . '/' . $this->cloudinaryCloudName . '/image/fetch';\n return [\n // Case 1. No config parameter sent.\n [\n 'image' => ['src' => $image, 'width' => 100, 'height' => 100],\n 'expected' => ['src' => $image, 'width' => 100, 'height' => 100]\n ],\n // Case 2. Only ask for a width (so just scale the image).\n [\n 'image' => ['src' => $image, 'width' => 1000, 'height' => 500],\n 'expected' => [\n 'width' => 600,\n 'height' => 300,\n 'src' => $cloudinaryFetchUrl . '/s--1SSv3TAe--/f_auto/q_auto/c_scale,w_600/' . $image,\n ],\n 'width' => 600,\n ],\n // Case 3. Ask for a width and height.\n [\n 'image' => ['src' => $image, 'width' => 1000, 'height' => 1000],\n 'expected' => [\n 'width' => 600,\n 'height' => 400,\n 'src' => $cloudinaryFetchUrl . '/s--oQnrp4QO--/f_auto/q_auto/c_fill,g_auto,h_400,w_600/' . $image,\n ],\n 'width' => 600,\n 'height' => 400,\n ],\n // Case 4. Ask for a custom transformation.\n [\n 'image' => ['src' => $image, 'width' => 1000, 'height' => 1000],\n 'expected' => [\n 'width' => 600,\n 'height' => 400,\n 'src' => $cloudinaryFetchUrl . '/s--iBYmBJnf--/f_auto/q_auto/c_fill,g_auto,h_400,w_600/c_lfill,h_150,w_150/' . $image\n ],\n 'width' => 600,\n 'height' => 400,\n 'sizes' => NULL,\n 'transform' => 'c_lfill,h_150,w_150',\n ],\n // Case 5. Ask for sizes.\n [\n 'image' => ['src' => $image, 'width' => 2000, 'height' => 1600],\n 'expected' => [\n 'src' => $cloudinaryFetchUrl . '/s--do7-bAD9--/f_auto/q_auto/c_scale,w_1600/' . $image,\n 'width' => 1600,\n 'height' => 1280,\n 'sizes' => '(max-width: 800px) 780px, (max-width: 1200px) 1100px, 1600px',\n 'srcset' => implode(', ', [\n $cloudinaryFetchUrl . '/s--MZkCHWuY--/f_auto/q_auto/c_scale,w_780/' . $image . ' 780w',\n $cloudinaryFetchUrl . '/s--xlf_u2mA--/f_auto/q_auto/c_scale,w_1100/' . $image . ' 1100w',\n ])\n ],\n 'width' => 1600,\n 'height' => NULL,\n 'sizes' => [\n [800, 780],\n [1200, 1100],\n ],\n ],\n // Case 6. A complete test, with height calculation, sizes and custom\n // transformations.\n [\n 'image' => ['src' => $image, 'width' => 2000, 'height' => 1600],\n 'expected' => [\n 'src' => $cloudinaryFetchUrl . '/s--PYehk6Pp--/f_auto/q_auto/c_fill,g_auto,h_1200,w_1600/co_rgb:000000,e_colorize:90/' . $image,\n 'width' => 1600,\n 'height' => 1200,\n 'sizes' => '(max-width: 800px) 780px, (max-width: 1200px) 1100px, 1600px',\n 'srcset' => implode(', ', [\n $cloudinaryFetchUrl . '/s--0q-v7sf8--/f_auto/q_auto/c_fill,g_auto,h_585,w_780/co_rgb:000000,e_colorize:90/' . $image . ' 780w',\n $cloudinaryFetchUrl . '/s--1PnC9sUX--/f_auto/q_auto/c_fill,g_auto,h_825,w_1100/co_rgb:000000,e_colorize:90/' . $image . ' 1100w',\n ]),\n ],\n 'width' => 1600,\n 'height' => 1200,\n 'sizes' => [\n [800, 780],\n [1200, 1100],\n ],\n 'transform' => 'co_rgb:000000,e_colorize:90',\n ],\n ];\n }", "protected function _createImage()\n {\n $this->_height = $this->scale * 60;\n $this->_width = 1.8 * $this->_height;\n $this->_image = imagecreate($this->_width, $this->_height);\n ImageColorAllocate($this->_image, 0xFF, 0xFF, 0xFF);\n }" ]
[ "0.66044223", "0.6390978", "0.58997625", "0.56699675", "0.56149465", "0.5528635", "0.55254173", "0.5508331", "0.5461542", "0.5457444", "0.54481876", "0.542875", "0.540939", "0.5381172", "0.529874", "0.5257415", "0.52499354", "0.5244108", "0.5212557", "0.52042365", "0.52016264", "0.51961786", "0.5194715", "0.51768464", "0.51665646", "0.5161011", "0.51500684", "0.5150027", "0.51490784", "0.5148142", "0.5146986", "0.5143898", "0.5143898", "0.51332235", "0.51271003", "0.5121303", "0.5120828", "0.5118199", "0.51154876", "0.5114241", "0.51117015", "0.5102893", "0.50930893", "0.5081076", "0.5077089", "0.50758433", "0.506618", "0.5065396", "0.505528", "0.5043438", "0.50402343", "0.50400645", "0.50389355", "0.50352114", "0.5034009", "0.50200844", "0.50188607", "0.5009755", "0.49934113", "0.49864316", "0.4982688", "0.49802148", "0.49685436", "0.4955186", "0.49219373", "0.49165943", "0.4908609", "0.49015483", "0.48958692", "0.48932436", "0.48874992", "0.48869932", "0.48850042", "0.48818198", "0.48805714", "0.4880429", "0.4878791", "0.48762065", "0.4867576", "0.48659414", "0.48595136", "0.48505625", "0.4844403", "0.48435372", "0.4840067", "0.48363516", "0.4831201", "0.48297557", "0.48261046", "0.48241863", "0.4821892", "0.4818166", "0.48144317", "0.48056555", "0.47993323", "0.47971383", "0.4785325", "0.47841898", "0.47819737", "0.47801512" ]
0.59019375
2
Scales an image according to an image template, and stores it.
public function scaleAndStore($filename, $id, $template = null, $overwrite = false) { $templates = !is_null($template) ? (array)$template : // template is left empty; scale source file along all configured templates $templates = $this->getTemplateNames() ; $file = new Garp_Image_File(Garp_File::FILE_VARIANT_UPLOAD); $sourceData = $file->fetch($filename); $imageType = $file->getImageType($filename); foreach ($templates as $template) { $this->_scaleAndStoreForTemplate($sourceData, $imageType, $id, $template, $overwrite); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function image_scale($src_abspath, $dest_abspath, $aspect, $width, $strategy)\n{\n $im = new \\Imagick($src_abspath);\n $im = image_scale_im_obj($im, $aspect, $width, $strategy);\n return image_return_write($im, $dest_abspath);\n}", "protected function scaleImages() {}", "function do_scaled() {\n $this->layout = FALSE;\n\n $status = $this->show_scaled_image(IMAGE_RESOLUTION, 'photos');\n if (TRUE !== $status) {\n $this->message($status);\n $this->redirect('/photo/index');\n }\n }", "protected function processImage()\n {\n // Start from the last scale (bigger image).\n $tier = (count($this->_scaleInfo) - 1);\n $row = 0;\n $ul_y = 0;\n $lr_y = 0;\n\n list($root, $ext) = $this->getRootAndDotExtension($this->_imageFilename);\n\n // Create a row from the original image and process it.\n while ($row * $this->tileSize < $this->_originalHeight) {\n $ul_y = $row * $this->tileSize;\n $lr_y = ($ul_y + $this->tileSize < $this->_originalHeight)\n ? $ul_y + $this->tileSize\n : $this->_originalHeight;\n $saveFilename = $root . '-' . $tier . '-' . $row . '.' . $ext;\n $width = $this->_originalWidth;\n $height = abs($lr_y - $ul_y);\n $crop = [];\n $crop['width'] = $width;\n $crop['height'] = $height;\n $crop['x'] = 0;\n $crop['y'] = $ul_y;\n $this->imageResizeCrop($this->_imageFilename, $saveFilename, [], $crop);\n\n $this->processRowImage($tier, $row);\n ++$row;\n }\n }", "function image_scale_blob($blob, $aspect, $width, $strategy)\n{\n $im = new \\Imagick();\n $im->readImageBlob($blob);\n $im = image_scale_im_obj($im, $aspect, $width, $strategy);\n return image_return_blob($im);\n}", "function resize_image($src, $width, $height){\n // initializing\n $save_path = Wordless::theme_temp_path();\n $img_filename = Wordless::join_paths($save_path, md5($width . 'x' . $height . '_' . basename($src)) . '.jpg');\n\n // if file doesn't exists, create it\n if (!file_exists($img_filename)) {\n $to_scale = 0;\n $to_crop = 0;\n\n // Get orig dimensions\n list ($width_orig, $height_orig, $type_orig) = getimagesize($src);\n\n // get original image ... to improve!\n switch($type_orig){\n case IMAGETYPE_JPEG: $image = imagecreatefromjpeg($src);\n break;\n case IMAGETYPE_PNG: $image = imagecreatefrompng($src);\n break;\n case IMAGETYPE_GIF: $image = imagecreatefromgif($src);\n break;\n default:\n return;\n }\n\n // which is the new smallest?\n if ($width < $height)\n $min_dim = $width;\n else\n $min_dim = $height;\n\n // which is the orig smallest?\n if ($width_orig < $height_orig)\n $min_orig = $width_orig;\n else\n $min_orig = $height_orig;\n\n // image of the right size\n if ($height_orig == $height && $width_orig == $width) ; // nothing to do\n // if something smaller => scale\n else if ($width_orig < $width) {\n $to_scale = 1;\n $ratio = $width / $width_orig;\n }\n else if ($height_orig < $height) {\n $to_scale = 1;\n $ratio = $height / $height_orig;\n }\n // if both bigger => scale\n else if ($height_orig > $height && $width_orig > $width) {\n $to_scale = 1;\n $ratio_dest = $width / $height;\n $ratio_orig = $width_orig / $height_orig;\n if ($ratio_dest > $ratio_orig)\n $ratio = $width / $width_orig;\n else\n $ratio = $height / $height_orig;\n }\n // one equal one bigger\n else if ( ($width == $width_orig && $height_orig > $height) || ($height == $height_orig && $width_orig > $width) )\n $to_crop = 1;\n // some problem...\n else\n echo \"ALARM\";\n\n // we need to zoom to get the right size\n if ($to_scale == 1) {\n $new_width = $width_orig * $ratio;\n $new_height = $height_orig * $ratio;\n $image_scaled = imagecreatetruecolor($new_width, $new_height);\n // scaling!\n imagecopyresampled($image_scaled, $image, 0, 0, 0, 0, $new_width, $new_height, $width_orig, $height_orig);\n $image = $image_scaled;\n\n if($new_width > $width || $new_height > $height)\n $to_crop = 1;\n }\n else {\n $new_width = $width_orig;\n $new_height = $height_orig;\n }\n\n // we need to crop the image\n if ($to_crop == 1) {\n $image_cropped = imagecreatetruecolor($width, $height);\n\n // find margins for images\n $margin_x = ($new_width - $width) / 2;\n $margin_y = ($new_height - $height) / 2;\n\n // cropping!\n imagecopy($image_cropped, $image, 0, 0, $margin_x, $margin_y, $width, $height);\n $image = $image_cropped;\n }\n\n // Save image\n imagejpeg($image, $img_filename, 95);\n }\n\n // Return image URL\n return Wordless::join_paths(Wordless::theme_temp_path(), basename($img_filename));\n }", "private function _scale()\n\t{\n\t\t//scale down the image by 55%\n\t\t$weaponImageSize = $this->weapon->getImageGeometry();\n\t\t$this->weaponScale['w'] = $weaponImageSize['width'] * 0.55;\n\t\t$this->weaponScale['h'] = $weaponImageSize['height'] * 0.55;\n\n\t\t$this->weapon->scaleImage($this->weaponScale['w'], $this->weaponScale['h']);\n\n\t\t//scale down the image by 30%\n\t\t$emblemImageSize = $this->emblem->getImageGeometry();\n\t\t$this->emblemScale['w'] = $emblemImageSize['width'] * 0.30;\n\t\t$this->emblemScale['h'] = $emblemImageSize['height'] * 0.30;\n\n\t\t$this->emblem->scaleImage($this->emblemScale['w'], $this->emblemScale['h']);\n\n\t\t//scale down the image by 70%\n\t\t$profileImageSize = $this->profile->getImageGeometry();\n\t\t$this->profileScale['w'] = $profileImageSize['width'] * 0.70;\n\t\t$this->profileScale['h'] = $profileImageSize['height'] * 0.70;\n\n\t\t$this->profile->scaleImage($this->profileScale['w'], $this->profileScale['h']);\n\t}", "private function resizeWithScaleExact($width, $height, $scale) {\n\t\t//$new_height = (int)($this->info['height'] * $scale);\n\t\t$new_width = $width * $scale;\n\t\t$new_height = $height * $scale;\n\t\t$xpos = 0;//(int)(($width - $new_width) / 2);\n\t\t$ypos = 0;//(int)(($height - $new_height) / 2);\n\n if (isset($this->info['mime']) && $this->info['mime'] == 'image/gif' && $this->isAnimated) {\n $this->imagick = new Imagick($this->file);\n $this->imagick = $this->imagick->coalesceImages();\n foreach ($this->imagick as $frame) {\n $frame->thumbnailImage($new_width, $new_height);\n $frame->setImagePage($new_width, $new_height, 0, 0);\n }\n } else {\n $image_old = $this->image;\n $this->image = imagecreatetruecolor($width, $height);\n $bcg = $this->backgroundColor;\n\n if (isset($this->info['mime']) && $this->info['mime'] == 'image/png') {\n imagealphablending($this->image, false);\n imagesavealpha($this->image, true);\n $background = imagecolorallocatealpha($this->image, $bcg[0], $bcg[1], $bcg[2], 127);\n imagecolortransparent($this->image, $background);\n } else {\n $background = imagecolorallocate($this->image, $bcg[0], $bcg[1], $bcg[2]);\n }\n\n imagefilledrectangle($this->image, 0, 0, $width, $height, $background);\n imagecopyresampled($this->image, $image_old, $xpos, $ypos, 0, 0, $new_width, $new_height, $this->info['width'], $this->info['height']);\n imagedestroy($image_old);\n }\n\n\t\t$this->info['width'] = $width;\n\t\t$this->info['height'] = $height;\n }", "private function resize() {\n\t\tswitch($this->type) {\n\t\t\tcase 'image/jpeg':\n\t\t\t\t$originalImage = imagecreatefromjpeg($this->tempName);\n\t\t\tbreak;\n\t\t\tcase 'image/png':\n\t\t\t\t$originalImage = imagecreatefrompng($this->tempName);\n\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\t$originalImage = imagecreatefromgif($this->tempName);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdie('FILE CANNOT BE RESIZED');\n\t\t\tbreak;\n\t\t}\n\n\t\t// Determine new height\n\t\t$this->newHeight = ($this->height / $this->width) * $this->newWidth;\n\n\t\t// Create new image\n\t\t$this->newImage = imagecreatetruecolor($this->newWidth, $this->newHeight);\n\n\t\t// Resample original image into new image\n\t\timagecopyresampled($this->newImage, $originalImage, 0, 0, 0, 0, $this->newWidth, $this->newHeight, $this->width, $this->height);\n\n\t\t// Switch based on image being resized\n\t\tswitch($this->type) {\n\t\t\tcase 'image/jpeg':\n\t\t\t\t// Source, Dest, Quality 0 to 100\n\t\t\t\timagejpeg($this->newImage, $this->destinationFolder.'/'.$this->newName, 80);\n\t\t\tbreak;\n\t\t\tcase 'image/png':\n\t\t\t\t// Source, Dest, Quality 0 (no compression) to 9\n\t\t\t\timagepng($this->newImage, $this->destinationFolder.'/'.$this->newName, 0);\n\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\timagegif($this->newImage, $this->destinationFolder.'/'.$this->newName);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdie('YOUR FILE CANNOT BE RESIZED');\n\t\t\tbreak;\n\t\t}\n\n\t\t// DESTROY NEW IMAGE TO SAVE SERVER SPACE\n\t\timagedestroy($this->newImage);\n\t\timagedestroy($originalImage);\n\n\t\t// SUCCESSFULLY UPLOADED\n\t\t$this->result = true;\n\t\t$this->message = 'Image uploaded and resized successfully';\n\t}", "public function parseUATemplate($strBuffer, $strTemplate)\n\t{\n\t\t//Need to auto-adjust images that are too wide\n\t\tif(stripos($strTemplate, 'fe_') !== false && $this->blnMobile)\n\t\t{\n\t\t\t // Include SimpleHtmlDom\n\t\t\tif (!function_exists('file_get_html'))\n\t\t\t\trequire_once(TL_ROOT . '/system/modules/mobilecore/simple_html_dom.php');\n\t\t\t\t\n \t\t$objDoc = str_get_html($strBuffer);\n \t\t\n \t\t$intMaxWidth = $GLOBALS['UA_TYPES'][$this->strAgent]['maxImageWidth'];\n \t\t\n\t\t foreach($objDoc->find('img') as $tag) \n\t\t {\n\t\t $fileSrc = $tag->getAttribute('src');\n\t\t $blnAddDomainPrefix = false;\n\t\t $blnAddSubdomainPrefix = false;\n\t\t $strDomain = '';\n\t\t \n\t\t //Check for subdomain settings\n\t\t if(stripos($fileSrc,TL_FILES_URL)!==false)\n\t\t {\n\t\t \t\t$blnAddSubdomainPrefix = true;\n\t\t \t\t$strURL = parse_url($fileSrc);\n\t\t \t\t$fileSrc = substr($strURL['path'],1);\n\t\t }\n\t\t //Check for external URL or one that we may not be able to resize\n\t\t elseif( stripos($fileSrc,'http')!==false )\n\t\t {\n\t\t\t \t$strURL = parse_url($fileSrc);\n\t\t\t \t//Check to see if it is on the same domain and file exists... If so we can resize it.\n\t\t\t \tif (file_exists(TL_ROOT . $strURL['path']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$fileSrc = substr($strURL['path'],1);\n\t\t\t\t\t\t$strDomain = $strURL['scheme'] . '//:' . $strURL['host'];\n\t\t\t\t\t}\n\t\t\t\t\t//Otherwise we have an external image\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//All we can do here with external images is reset and set the width attribute\n\t\t\t\t\t\t$tag->removeAttribute('width');\n\t\t\t\t\t\t$tag->removeAttribute('height');\n\t\t\t\t\t\t$tag->setAttribute('width', $intMaxWidth);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t }\n\t\t \n\t\t $objFile = new File($fileSrc);\n\t\t $blnResize = (($tag->hasAttribute('width') && $tag->getAttribute('width') > $intMaxWidth) || (!$tag->hasAttribute('width') && $objFile->width > $intMaxWidth)) ? true : false;\n\t\t \t\t \n\t\t if($blnResize)\n\t\t {\n\t\t \t \t$src = $this->urlEncode($fileSrc);\n\t\t \t \t$width = $intMaxWidth;\n\t\t \t \t$height = '';\n\t\t \t \t$mode = 'proportional'; //@todo - Make configurable in settings\n\t\t \t \t$strCacheName = 'system/html/' . $objFile->filename . '-'.$this->strAgent.'-' . substr(md5('-w' . $width . '-h' . $height . '-' . $tag->getAttribute('src') . '-' . $mode . '-' . $objFile->mtime), 0, 8) . '.' . $objFile->extension;\n\t\t \t \n\t\t\t\t\t// Return the path of the new image if it exists already\n\t\t\t\t\tif (file_exists(TL_ROOT . '/' . $strCacheName))\n\t\t\t\t\t{\n\t\t\t\t\t\t$newImage = $strCacheName;\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$newImage = $this->getUAImage($src, $width, $height, $mode, $strCacheName, $objFile);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$newImageSrc = $blnAddSubdomainPrefix ? TL_FILES_URL. '/' .$newImage : ( $blnAddDomainPrefix ? $strDomain . '/' . $newImage : $newImage);\n\t\t\t\t\t\n\t\t\t \t$tag->setAttribute('src', $newImageSrc);\n\t\t\t \t$tag->removeAttribute('width');\n\t\t\t \t$tag->removeAttribute('height');\n\t\t\t }\n\t\t }\n\t\t \n\t\t $strBuffer = $objDoc->save();;\n\t\t \t\t \t\t\n\t\t}\n\t\t//HOOK for other mobile parsing - will have more options for this later\n\t\tif (isset($GLOBALS['TL_HOOKS']['outputUATemplate']) && is_array($GLOBALS['TL_HOOKS']['outputUATemplate']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['outputUATemplate'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$strBuffer = $this->$callback[0]->$callback[1]($strBuffer, $strTemplate, $this);\n\t\t\t}\n\t\t}\n\t\t\t\n\t \treturn $strBuffer;\n\t}", "public function createImage()\n {\n if ($this->resize) {\n\n // get the resize dimensions\n $height = (int)array_get($this->resizeDimensions, 'new_height', 320);\n\n $width = (int)array_get($this->resizeDimensions, 'new_width', 240);\n\n if ($this->fit) {\n return Image::make($this->originalPath)->fit($width, $height)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n } else {\n return Image::make($this->originalPath)->resize($width, $height)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n }\n\n } else {\n\n return Image::make($this->originalPath)\n ->save(base_path() . $this->storageLocation . '/' . $this->uniqueName, $this->imgQuality);\n }\n }", "function create_medium($type, $image){\r\n\techo $source_path=DIR_FS_SITE.'upload/photo/'.$type.'/large/'.$image;\r\n\techo $destination_path=DIR_FS_SITE.'upload/photo/'.$type.'/medium/'.$image;\r\n\tlist($width, $height) = getimagesize($source_path);\r\n $xscale=$width/MEDIUM_WIDTH;\r\n $yscale=$height/MEDIUM_HEIGHT;\r\n \r\n // Recalculate new size with default ratio\r\n if ($yscale>$xscale){\r\n $new_width = round($width * (1/$yscale));\r\n $new_height = round($height * (1/$yscale));\r\n }\r\n else {\r\n $new_width = round($width * (1/$xscale));\r\n $new_height = round($height * (1/$xscale));\r\n }\r\n\r\n #check image format and create image\r\n if(strtolower(substr($source_path, -3))=='jpg'):\r\n $imageTmp = imagecreatefromjpeg ($source_path);\r\n elseif(strtolower(substr($source_path, -3))=='gif'):\r\n $imageTmp = imagecreatefromgif($source_path);\r\n elseif(strtolower(substr($source_path, -3))=='png'):\r\n $imageTmp = imagecreatefrompng($source_path);\r\n endif;\r\n\r\n // Resize the original image & output\r\n $imageResized = imagecreatetruecolor($new_width, $new_height);\r\n # $imageTmp = imagecreatefromjpeg ($source_path);\r\n imagecopyresampled($imageResized, $imageTmp, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\r\n output_img($imageResized, image_type_to_mime_type(getimagesize($source_path)), $destination_path);\r\n}", "public function generate($cache = true)\n {\n if ($cache)\n {\n $d = $this->cache_get();\n if ($d) return $d;\n }\n\n $src_img = $this->image->load();\n\n // get image info - TODO: error handling\n $size = getimagesize($this->image->file->path);\n $exif = $this->image->get_exif();\n\n $src_width = $size[0];\n $src_height = $size[1];\n $max_width = $this->max_width;\n $max_height = $this->max_height;\n\n // shall be rotated? switch width/height temporarily and rotate after image has been scaled\n $rotation = $exif->get_rotation();\n if ($rotation) {\n $t = $max_height;\n $max_height = $max_width;\n $max_width = $t;\n }\n\n // calculate new size\n if ($src_width / $src_height > $max_width / $max_height) {\n $new_width = $max_width;\n $new_height = round($max_width / $src_width * $src_height);\n } else {\n $new_height = $max_height;\n $new_width = round($max_height / $src_height * $src_width);\n }\n\n // create new image\n $new_img = imagecreatetruecolor($new_width, $new_height);\n\n // copy to new image\n imagecopyresampled($new_img, $src_img, 0, 0, 0, 0, $new_width, $new_height, $src_width, $src_height);\n imagedestroy($src_img);\n\n // rotate?\n if ($rotation) {\n $rotated = imagerotate($new_img, $rotation, 0);\n imagedestroy($new_img);\n $new_img = $rotated;\n\n // switch width/height back\n #$t = $new_height;\n #$new_height = $new_width;\n #$new_width = $t;\n }\n\n // catch output\n ob_start();\n ob_clean();\n imagejpeg($new_img, null, $this->quality);\n imagedestroy($new_img);\n\n $data = ob_get_contents();\n ob_clean();\n\n // save cache\n $this->cache_save($data);\n\n return $data;\n }", "protected function saveImage()\n {\n if ( $this->initialImage != $this->image )\n {\n $this->deleteOldImage();\n\n $imageHandler= new CImageHandler();\n $imageHandler->load( $this->getTempFolder( TRUE ) . $this->image );\n $imageHandler->save($this->getImagesFolder( TRUE ) . $imageHandler->getBaseFileName() );\n\n $settings = $this->getThumbsSettings();\n\n if ( !empty( $settings ) )\n {\n $imageHandler= new CImageHandler();\n $imageHandler->load( $this->getTempFolder( TRUE ) . $this->image );\n\n foreach( $settings as $prefix => $dimensions )\n {\n list( $width, $height ) = $dimensions;\n $imageHandler\n ->thumb( $width, $height )\n ->save( $this->getImagesFolder( TRUE ) . $prefix . $imageHandler->getBaseFileName() );\n }\n }\n\n @unlink( $this->getTempFolder( TRUE ) . $this->image );\n }\n }", "protected function _createImage()\n {\n $this->_height = $this->scale * 60;\n $this->_width = 1.8 * $this->_height;\n $this->_image = imagecreate($this->_width, $this->_height);\n ImageColorAllocate($this->_image, 0xFF, 0xFF, 0xFF);\n }", "public function scale_image($x, $y)\n\t{\n $newimage = imagecreatetruecolor($x, $y); // defaults to filled with black\n $image_size = $this->image_size();\n if ($image_size[0] > $image_size[1]) {\n // Wide image, we want to resize the image with a letterbox\n $width = $x;\n $height = ($image_size[1] * $x) / $image_size[0];\n $oldimage = $this->load_image();\n $y = ($y - $height) / 2;\n $x = 0;\n } else {\n // Tall image, we want to resize the image with a pillarbox\n $height = $y;\n $width = ($image_size[0] * $y) / $image_size[1];\n $oldimage = $this->load_image();\n $y = 0;\n $x = ($x - $width) / 2;\n }\n imagecopyresampled($newimage, $oldimage, $x, $y, 0, 0, $width, $height, $image_size[0], $image_size[1]);\n $filename = tempnam(sys_get_temp_dir(), 'img');\n if (preg_match('/jpeg/', $image_size['mime'])) {\n imagejpeg($newimage, $filename, 100);\n } elseif (preg_match('/gif/', $image_size['mime'])) {\n imagegif($newimage, $filename);\n } elseif (preg_match('/png/', $image_size['mime'])) {\n imagepng($newimage, $filename);\n }\n $this->delete_local_file();\n $this->local_file = $filename;\n\t}", "public function generateTemplateScaledImages($filename, $id, $overwrite = false) {\n\t\tif ($filename && $id) {\n\t\t\t$templates = $this->getTemplateNames();\n\n\t\t\tforeach ($templates as $t) {\n\t\t\t\ttry {\n\t\t\t\t\t$this->scaleAndStore($filename, $id, $t, $overwrite);\n\t\t\t\t} catch(Exception $e) {\n\t\t\t\t\tthrow new Exception(\"Error scaling \".$filename.\" (#\".$id.\"): \".$e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t} else throw new Exception('A filename and id were not provided. Filename ['.$filename.'] Id ['.$id.']');\n\t}", "abstract public function storeThumbnail(ImageFile $file, $x, $y);", "public function thumbnail($params, &$smarty) {\r\n\t\tif (!isset($params['image']) || empty($params['image']) || !file_exists($_SERVER['DOCUMENT_ROOT'].$params['image'])) return $params['image'];\r\n\t\t$image = trim($params['image']);\r\n\t\tunset($params['image']);\r\n\r\n\t\t$defaults = array('width' => 0, 'height' => 0, 'type' => 'fit', 'position' => 'center');\r\n\t\t$params = $params + $defaults;\r\n\t\tif (!in_array($params['type'], array('fit', 'crop', 'stretch', 'max'))) $params['type'] = 'fit';\r\n\t\tksort($params);\r\n\t\tif ($params['width'] == 0 && $params['height'] == 0) return $image;\r\n\r\n\t\t$pathinfo = pathinfo($_SERVER['DOCUMENT_ROOT'].$image);\r\n\t\t$directory = $pathinfo['dirname'].'/cache/';\r\n\t\t$filename = $pathinfo['filename'].'_'.implode('_', $params).'.png';\r\n\t\tif (!file_exists($directory.$filename) || filectime($_SERVER['DOCUMENT_ROOT'].$image) > filectime($directory.$filename)) {\r\n\t\t\tif (extension_loaded('imagick') && class_exists('Imagick')) {\r\n\t\t\t\t$im = new Imagick();\r\n\t\t\t\t$im->setResourceLimit( Imagick::RESOURCETYPE_MEMORY, 25 );\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$im->readImage($_SERVER['DOCUMENT_ROOT'].$image);\r\n\t\t\t\t} catch(ImagickException $e) {\r\n\t\t\t\t\treturn $image;\r\n\t\t\t\t}\r\n\t\t\t\t$canvas = $this->resizeImage($im, $params);\r\n\t\t\t\t$canvas->writeImage($directory.$filename);\r\n\t\t\t\t$im->destroy();\r\n\t\t\t\t$canvas->destroy();\r\n\t\t\t} else {\r\n\t\t\t\treturn $image;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn dirname($image).'/cache/'.$filename;\r\n\t}", "function resizeImage($image,$width,$height,$scale,$stype) {\n\t$newImageWidth = ceil($width * $scale);\n\t$newImageHeight = ceil($height * $scale);\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\tswitch($stype) {\n case 'gif':\n $source = imagecreatefromgif($image);\n break;\n case 'jpg':\n $source = imagecreatefromjpeg($image);\n break;\n case 'jpeg':\n $source = imagecreatefromjpeg($image);\n break;\n case 'png':\n $source = imagecreatefrompng($image);\n break;\n }\n\timagecopyresampled($newImage, $source,0,0,0,0, $newImageWidth, $newImageHeight, $width, $height);\n\timagejpeg($newImage,$image,90);\n\tchmod($image, 0777);\n\treturn $image;\n}", "private function generate()\n {\n $originalImages = Storage::files(env('PHOTO_PATH'));\n\n foreach ($originalImages as $originalImage) {\n $pieces = explode('/', $originalImage);\n\n $exp = explode('.', end($pieces));\n\n $extension = end($exp);\n\n array_pop($exp);\n\n $imageId = implode('.', $exp);\n\n $photos = [];\n\n foreach ($this->dimensions as $key => $dimension) {\n $fileName = env('PHOTO_PATH_RESIZE') . \"{$imageId}_{$key}.$extension\";\n\n if (! Storage::exists($fileName)) {\n $img = Image::make(Storage::get($originalImage));\n $img->resize($dimension['width'], $dimension['height']);\n\n Storage::put($fileName, (string)$img->encode(), 'public');\n\n if (Storage::exists($fileName)) {\n $photos[$key] = asset(Storage::url($fileName));\n }\n }\n }\n\n /**\n * Save on Storage\n */\n if (count($photos)) {\n $photo = new Photo();\n $photo->name = $imageId;\n $photo->photos = $photos;\n $photo->photos = $photos;\n $photo->save();\n }\n }\n }", "public function action_image()\n\t{\n\t\t//Image::load(DOCROOT.'/files/04_2021/79199dcc06baf4cc230262fcbb4d1094.jpg')->preset('mypreset', DOCROOT.'/files/04_2021/ea7e8ed4bc9d6f7c03f5f374e30b183b.png');\n\t\t$image = Image::forge();\n\n\t\t// Or with optional config\n\t\t$image = Image::forge(array(\n\t\t\t\t'quality' => 80\n\t\t));\n\t\t$image->load(DOCROOT.'/files/04_2021/79199dcc06baf4cc230262fcbb4d1094.jpg')\n\t\t\t\t\t->crop_resize(200, 200)\n\t\t\t\t\t->rounded(100)\n\t\t\t\t\t->output();\n\t\t// Upload an image and pass it directly into the Image::load method.\n\t\tUpload::process(array(\n\t\t\t'path' => DOCROOT.DS.'files'\n\t\t));\n\n\t\tif (Upload::is_valid())\n\t\t{\n\t\t\t$data = Upload::get_files(0);\n\n\t\t\t// Using the file upload data, we can force the image's extension\n\t\t\t// via $force_extension\n\t\t\tImage::load($data['file'], false, $data['extension'])\n\t\t\t\t\t->crop_resize(200, 200)\n\t\t\t\t\t->save('image');\n\t\t} \n\t}", "function resizeImage($image,$width,$height,$scale) {\n\t\t\t\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t\t\t\t$imageType = image_type_to_mime_type($imageType);\n\t\t\t\t$newImageWidth = ceil($width * $scale);\n\t\t\t\t$newImageHeight = ceil($height * $scale);\n\t\t\t\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\t\t\t\tswitch($imageType) {\n\t\t\t\t\tcase \"image/gif\":\n\t\t\t\t\t\t$source=imagecreatefromgif($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/pjpeg\":\n\t\t\t\t\tcase \"image/jpeg\":\n\t\t\t\t\tcase \"image/jpg\":\n\t\t\t\t\t\t$source=imagecreatefromjpeg($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/png\":\n\t\t\t\t\tcase \"image/x-png\":\n\t\t\t\t\t\t$source=imagecreatefrompng($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\timagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);\n\t\t\t\n\t\t\t\tswitch($imageType) {\n\t\t\t\t\tcase \"image/gif\":\n\t\t\t\t\t\timagegif($newImage,$image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/pjpeg\":\n\t\t\t\t\tcase \"image/jpeg\":\n\t\t\t\t\tcase \"image/jpg\":\n\t\t\t\t\t\timagejpeg($newImage,$image,90);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/png\":\n\t\t\t\t\tcase \"image/x-png\":\n\t\t\t\t\t\timagepng($newImage,$image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tchmod($image, 0777);\n\t\t\t\treturn $image;\n\t\t\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 }", "public function save(array $options = []) {\n/* if (preg_match('/image/', $this->mime_type)) {\n $this->isImage = true;\n $manager = new ImageManager(array('driver' => 'gd'));\n $image = Storage::disk('public')->get($this->myFile);\n $imageOrig = $manager->make($image); \n //Get width and height of the image\n $this->img_width = $imageOrig->width();\n $this->img_height = $imageOrig->height();\n }*/\n parent::save($options);\n $this->createThumbs();\n }", "function _createThumbnail()\r\n\t{\r\n\t\t$user=$this->auth(PNH_EMPLOYEE);\r\n\t\t$config['image_library']= 'gd';\r\n\t\t$config['source_image']= './resources/employee_assets/image/';\r\n\t\t$config['create_thumb']= TRUE;\r\n\t\t$config['maintain_ratio']= TRUE;\r\n\t\t$config['width']= 75;\r\n\t\t$config['height']=75;\r\n\r\n\t\t$this->image_lib->initialize($config);\r\n\r\n\t\t$this->image_lib->resize();\r\n\r\n\t\tif(!$this->image_lib->resize())\r\n\t\t\techo $this->image_lib->display_errors();\r\n\t}", "function resizeImage($image,$width,$height,$scale) {\n\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t$imageType = image_type_to_mime_type($imageType);\n\t$newImageWidth = ceil($width * $scale);\n\t$newImageHeight = ceil($height * $scale);\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t\t\t$source=imagecreatefromgif($image); \n\t\t\tbreak;\n\t case \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\tbreak;\n\t case \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\t$source=imagecreatefrompng($image); \n\t\t\tbreak;\n \t}\n\timagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);\n\t\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t \t\timagegif($newImage,$image); \n\t\t\tbreak;\n \tcase \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t \t\timagejpeg($newImage,$image,90); \n\t\t\tbreak;\n\t\tcase \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\timagepng($newImage,$image); \n\t\t\tbreak;\n }\n\t\n\tchmod($image, 0777);\n\treturn $image;\n}", "public function resizeImage($filepath) {\n if (is_file($filepath)) {\n \n $dir_name = $this->destinationDirectory;\n\n $drawable_dpi = array();\n $drawable_dpi['drawable-ldpi'] = 0.1875;\n $drawable_dpi['drawable-mdpi'] = 0.25;\n $drawable_dpi['drawable-hdpi'] = 0.375;\n $drawable_dpi['drawable-xhdpi'] = 0.5;\n $drawable_dpi['drawable-xxhdpi'] = 0.75;\n $drawable_dpi['drawable-xxxhdpi'] = 1.0;\n\n $mipmap_dpi = array();\n $mipmap_dpi['mipmap-ldpi'] = 0.1875;\n $mipmap_dpi['mipmap-mdpi'] = 0.25;\n $mipmap_dpi['mipmap-hdpi'] = 0.375;\n $mipmap_dpi['mipmap-xhdpi'] = 0.5;\n $mipmap_dpi['mipmap-xxhdpi'] = 0.75;\n $mipmap_dpi['mipmap-xxxhdpi'] = 1.0;\n\n $selected_dpi = array();\n if($this->folderCode == 0) {\n $selected_dpi = $drawable_dpi; \n }\n if($this->folderCode == 1) {\n $selected_dpi = $mipmap_dpi; \n }\n if($this->folderCode == 2) {\n $selected_dpi = array_merge($drawable_dpi, $mipmap_dpi); \n }\n\n\n // Content type\n $image_ext = \"png\";\n header('\"Content-Type: image/\"'.$image_ext);\n\n // Get new sizes\n $dir_path = $this->dirHelper($dir_name);\n $imageFileName = $this->extract_file_name($filepath);\n $final_dir_path = $dir_path.\"res/\"; \n if (!is_dir($final_dir_path)) {\n mkdir($final_dir_path);\n }\n foreach ($selected_dpi as $key => $value) {\n if (!is_dir($final_dir_path.$key)) {\n mkdir($final_dir_path.$key);\n }\n list($width, $height) = getimagesize($filepath);\n $newwidth = $width * $value;\n $newheight = $height * $value;\n\n // Load\n $thumb = imagecreatetruecolor($newwidth, $newheight);\n $source = imagecreatefrompng($filepath);\n\n // Resize\n imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n imagepng($thumb, $final_dir_path.$key.\"/\".$imageFileName);\n }\n echo \"<h1>$filepath has been resized into different sizes</h1>\";\n }\n elseif(!file_exists($filepath)) {\n echo \"<h1>Invalid File path</h1>\";\n }\n else {\n echo \"<h1>This is not a file</h1>\";\n }\n\n }", "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\n\t\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t\t$imageType = image_type_to_mime_type($imageType);\n\t\t\n\t\t$newImageWidth = ceil($width * $scale);\n\t\t$newImageHeight = ceil($height * $scale);\n\t\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\t\tswitch($imageType) {\n\t\t\tcase \"image/gif\":\n\t\t\t\t$source=imagecreatefromgif($image); \n\t\t\t\tbreak;\n\t\t\tcase \"image/pjpeg\":\n\t\t\tcase \"image/jpeg\":\n\t\t\tcase \"image/jpg\":\n\t\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\t\tbreak;\n\t\t\tcase \"image/png\":\n\t\t\tcase \"image/x-png\":\n\t\t\t\t$source=imagecreatefrompng($image); \n\t\t\t\tbreak;\n\t\t}\n\t\timagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n\t\tswitch($imageType) {\n\t\t\tcase \"image/gif\":\n\t\t\t\timagegif($newImage,$thumb_image_name); \n\t\t\t\tbreak;\n\t\t\tcase \"image/pjpeg\":\n\t\t\tcase \"image/jpeg\":\n\t\t\tcase \"image/jpg\":\n\t\t\t\timagejpeg($newImage,$thumb_image_name,90); \n\t\t\t\tbreak;\n\t\t\tcase \"image/png\":\n\t\t\tcase \"image/x-png\":\n\t\t\t\timagepng($newImage,$thumb_image_name); \n\t\t\t\tbreak;\n\t\t}\n\t\tchmod($thumb_image_name, 0777);\n\t\treturn $thumb_image_name;\n\t}", "function create_thumb($type, $image){\r\n\techo $source_path=DIR_FS_SITE.'upload/photo/'.$type.'/large/'.$image;\r\n\techo $destination_path=DIR_FS_SITE.'upload/photo/'.$type.'/thumb/'.$image;\r\n\tlist($width, $height) = getimagesize($source_path);\r\n $xscale=$width/THUMB_WIDTH;\r\n $yscale=$height/THUMB_HEIGHT;\r\n \r\n // Recalculate new size with default ratio\r\n if ($yscale>$xscale){\r\n $new_width = round($width * (1/$yscale));\r\n $new_height = round($height * (1/$yscale));\r\n }\r\n else {\r\n $new_width = round($width * (1/$xscale));\r\n $new_height = round($height * (1/$xscale));\r\n }\r\n\r\n // Resize the original image & output\r\n $imageResized = imagecreatetruecolor($new_width, $new_height);\r\n\r\n #check image format and create image\r\n if(strtolower(substr($source_path, -3))=='jpg'):\r\n $imageTmp = imagecreatefromjpeg ($source_path);\r\n elseif(strtolower(substr($source_path, -3))=='gif'):\r\n $imageTmp = imagecreatefromgif($source_path);\r\n elseif(strtolower(substr($source_path, -3))=='png'):\r\n $imageTmp = imagecreatefrompng($source_path);\r\n endif;\r\n\r\n imagecopyresampled($imageResized, $imageTmp, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\r\n output_img($imageResized, image_type_to_mime_type(getimagesize($source_path)), $destination_path);\r\n}", "public function save() {\n \n $checkError = $this->isError();\n if (!$checkError) {\n \n $ext = $this->getImageExt();\n $quality = $this->__imageQuality;\n $dirSavePath = dirname($this->__imageSavePath);\n \n if (empty($this->__imageSavePath) || !is_dir($dirSavePath)) {\n $this->setError(__d('cloggy','Image save path not configured or maybe not exists.'));\n } else { \n \n /*\n * create resized image\n */\n switch($ext) {\n \n case 'jpg':\n case 'jpeg':\n\n if (imagetypes() & IMG_JPG) {\n @imagejpeg($this->__imageResized,$this->__imageSavePath,$quality); \n }\n\n break;\n\n case 'gif':\n\n if (imagetypes() & IMG_GIF) {\n @imagegif($this->__imageResized,$this->__imageSavePath); \n }\n\n break;\n\n case 'png':\n\n $scaleQuality = round($this->__imageQuality/100) * 9;\n $invertScaleQuality = 9 - $scaleQuality;\n\n if (imagetypes() & IMG_PNG) {\n @imagepng($this->__imageResized,$this->__imageSavePath,$invertScaleQuality); \n }\n\n break;\n\n } \n \n } \n \n /*\n * destroy resized image\n */\n if ($this->__imageResized) {\n \n //destroy resized image\n imagedestroy($this->__imageResized);\n \n } \n \n }\n \n }", "abstract public function createImage($instance_id, ImageSchema $image_schema);", "protected function processImage() {}", "private function PrepareImageForCache()\n {\n if($this->verbose) { self::verbose(\"File extension is: {$this->fileExtension}\"); }\n\n switch($this->fileExtension) {\n case 'jpg':\n case 'jpeg':\n $image = imagecreatefromjpeg($this->pathToImage);\n if($this->verbose) { self::verbose(\"Opened the image as a JPEG image.\"); }\n break;\n\n case 'png':\n $image = imagecreatefrompng($this->pathToImage);\n if($this->verbose) { self::verbose(\"Opened the image as a PNG image.\"); }\n break;\n\n default: errorPage('No support for this file extension.');\n }\n return $image;\n }", "function _process_image($data){\n\t\t\n\t\t// Largest side dimensions for small and large thumbnails\n\t\t$px_sm = 320;\n\t\t$px_lg = 640;\n\t\t\n\t\t// Generate new base name for this image\n\t\t$new_name = uniqid(TRUE);\n\t\t\n\t\t// Initialise array for resizing errors\n\t\t$this->resize_errors = array();\n\t\t\n\t\t// Array to hold the new dimensions\n\t\t$dimensions = array();\n\t\t\n\t\t// Work out the dimensions of the image based on longest side, or set both to same if equal\n\t\tif ($data['image_width'] > $data['image_height']){\n\t\t\t$dimensions['sm']['w'] = $px_sm;\n\t\t\t$dimensions['lg']['w'] = $px_lg;\n\t\t\t$dimensions['sm']['h'] = $data['image_height'] * ($px_sm / $data['image_width']);\n\t\t\t$dimensions['lg']['h'] = $data['image_height'] * ($px_lg / $data['image_width']);\n\t\t} elseif($data['image_width'] < $data['image_height']){\n\t\t\t$dimensions['sm']['w'] = $data['image_width'] * ($px_sm / $data['image_height']);\n\t\t\t$dimensions['lg']['w'] = $data['image_width'] * ($px_lg / $data['image_height']);\n\t\t\t$dimensions['sm']['h'] = $px_sm;\n\t\t\t$dimensions['lg']['h'] = $px_lg;\n\t\t} elseif ($data['image_width'] == $data['image_height']){\n\t\t\t$dimensions['sm']['w'] = $px_sm;\n\t\t\t$dimensions['lg']['w'] = $px_lg;\n\t\t\t$dimensions['sm']['h'] = $px_sm;\n\t\t\t$dimensions['lg']['h'] = $px_lg;\n\t\t}\n\t\t\n\t\t// Global resize vars\n\t\t$config['image_library'] = 'gd2';\n\t\t$config['source_image']\t= $data['full_path'];\n\t\t$config['create_thumb'] = FALSE;\n\t\t$config['maintain_ratio'] = TRUE;\n\t\t$config['quality'] = 100;\n\t\t$this->load->library('image_lib', $config);\n\t\t\n\t\t// Create small image\n\t\t$config['width'] = $dimensions['sm']['w'];\n\t\t$config['height'] = $dimensions['sm']['h'];\n\t\t$config['new_image'] = sprintf('%s/%s.sm%s', realpath('web/upload/'), $new_name, $data['file_ext']);\n\t\t$this->image_lib->initialize($config);\n\t\t$result_sm = $this->image_lib->resize();\n\t\tif($result_sm == FALSE){\n\t\t\tarray_push($this->resize_errors, $this->image_lib->display_errors());\n\t\t}\n\t\t\n\t\t// Create larger image\n\t\t$config['width'] = $dimensions['lg']['w'];\n\t\t$config['height'] = $dimensions['lg']['h'];\n\t\t$config['new_image'] = sprintf('%s/%s.lg%s', realpath('web/upload/'), $new_name, $data['file_ext']);\n\t\t$this->image_lib->initialize($config);\n\t\t$result_lg = $this->image_lib->resize();\n\t\tif($result_lg == FALSE){\n\t\t\tarray_push($this->resize_errors, $this->image_lib->display_errors());\n\t\t}\n\t\t\n\t\t// Delete the original source file now we're finished with it\n\t\t@unlink($data['full_path']);\n\t\t\n\t\t// Finished resizing functions - test for errors and return\n\t\tif($this->resize_errors == NULL){\n\t\t\t// No errors encountered - delete original image\n\t\t\t$name = sprintf('%s.#%s', $new_name, $data['file_ext']);\n\t\t\treturn $name;\n\t\t} else {\n\t\t\t// One or more errors occured when resizing the images\n\t\t\t$this->lasterr = 'Failed to resize the images.';\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t}", "public function setImage($image, $type = 'image', $size = array(800, 600)) \n { \n if (file_exists($image) && is_readable($image)) {\n $info = $this->_getImageInfo($image);\n \n switch ($info['mime']) {\n case 'image/png':\n $img = imagecreatefrompng($image);\n break;\n case 'image/jpeg':\n $img = imagecreatefromjpeg($image);\n break;\n case 'image/gif':\n $old = imagecreatefromgif($image);\n $img = imagecreatetruecolor($info[0], $info[1]);\n imagecopy($image, $old, 0, 0, 0, 0, $info[0], $info[1]);\n break;\n default:\n break;\n }\n }\n\n switch ($type) {\n case 'image':\n if ($img) $this->images[] = $img;\n break;\n case 'layout':\n if ($img) {\n $this->layout = $img;\n $this->layoutInfo = $info;\n } else {\n $this->layout = imagecreatetruecolor($size[0], $size[1]);\n $gray = imagecolorallocate($this->layout, 128, 128, 128);\n imagefilledrectangle($this->layout, 0, 0, $size[0], $size[1], $gray);\n $this->layoutInfo = $this->_getImageInfo($this->layout);\n }\n break;\n default:\n break;\n }\n }", "public function storeImage($image_template,$save_image_template) {\n\n $table_name = 'user_postcard_images';\n // store image path and date in database\n $inserted = DB::table($table_name)->insert(\n [\n 'user_id' => Auth::id(),\n 'template_image_path' => $image_template,\n\t\t\t\t'save_image_template' =>$save_image_template\n ]\n );\n\t\tif($inserted){\n\t\t\t$id = DB::getPdo()->lastInsertId();\n\t\t\treturn $id;\n\t\t}\n\t\treturn \"0\";\n }", "public function makeThumbnail() {\n Image::make($this->filePath())->fit(200)->save($this->thumbnailPath());\n }", "function create_image($source,$sizes){\n // Tony Smith uploaded a big image once (7000x3000pixels) that was 1.1MB as a JPEG compressed,\n // but when inflated out using imagecreatefromjpeg used more memory than there was available!\n // So lets make this nice and large to handle Tony's massive bits\n ini_set('memory_limit', '256M');\n\n // Save parts of source image path\n $path_parts = pathinfo($source);\n\n // Load image and get image size.\n $img = imagecreatefromjpeg($source);\n $width = imagesx($img);\n $height = imagesy($img);\n\n foreach($sizes as $s){\n\n // Create new filename\n $new_name = $path_parts['dirname'].\"/\".$path_parts['filename'].\"_\".$s['suffix'].\".\".$path_parts['extension'];\n\n // Scale to fit the required width\n if ($width > $height) {\n $newwidth = $s['dim'];\n $divisor = $width / $s['dim'];\n $newheight = floor($height/$divisor);\n }else{\n $newheight = $s['dim'];\n $divisor = $height / $s['dim'];\n $newwidth = floor($width/$divisor);\n }\n\n // Create a new temporary image.\n $tmpimg = imagecreatetruecolor($newwidth,$newheight);\n \n // Copy and resize old image into new image.\n imagecopyresampled($tmpimg,$img,0,0,0,0,$newwidth,$newheight,$width,$height);\n\n // Save thumbnail into a file.\n imagejpeg($tmpimg,$new_name,$s['q']);\n\n // release the memory\n imagedestroy($tmpimg);\n\n }\n imagedestroy($img);\n}", "public function scaleImage($scale)\n {\n if ($scale == 1) {\n return;\n }\n\n $scaledSize = $this->getScaledImageSize($scale);\n\n $image = $this->createNewTransparentImage($scaledSize->width, $scaledSize->height);\n\n imagecopyresampled(\n $image,\n $this->image,\n 0,\n 0,\n 0,\n 0,\n $scaledSize->width,\n $scaledSize->height,\n $this->width,\n $this->height\n );\n\n imagedestroy($this->image);\n $this->image = $image;\n $this->width = $scaledSize->width;\n $this->height = $scaledSize->height;\n }", "protected function createImage(): void\n {\n // create image\n $this->image = @imagecreatetruecolor($this->width, $this->height);\n\n // set mime type\n $this->mimeType = 'image/png';\n\n // set modified date\n $this->modified = time();\n }", "function quota_new_image($image) {\n\tglobal $_zp_current_admin_obj;\n\tif (is_object($_zp_current_admin_obj)) {\n\t\t$image->set('owner',$_zp_current_admin_obj->getUser());\n\t}\n\t$image->set('filesize',filesize($image->localpath));\n\t$image->save();\n\treturn $image;\n}", "public function autoScale($img, $size) {\n\t// NOT YET IMPLEMENTED.\n}", "public function scale($scale = 1) {\n\t\tif(stristr($scale, '%') !== false) {\n\t\t\t$scale = (float) preg_replace('/[^0-9\\.]/', '', $scale);\n\t\t\t$scale = $scale/100;\n\t\t}\n\t\t$scale = (float) $scale;\n\t\t$new_width = ceil($this->width * $scale);\n\t\t$new_height = ceil($this->height * $scale);\n\n\t\t$working_image = imagecreatetruecolor($new_width, $new_height);\n\n\t\tif(imagecopyresampled($working_image, $this->image, 0, 0, 0, 0, $new_width, $new_height, $this->width, $this->height)) {\n\t\t\t$this->image = $working_image;\n\t\t\t$this->width = $new_width;\n\t\t\t$this->height = $new_height;\n\t\t\treturn true;\n\t\t} else {\n\t\t\ttrigger_error('Resize failed.', E_USER_WARNING);\n\t\t\treturn false;\n\t\t}\n\t}", "private function procEsfPic($url){\r\n $picurl = WEB_ROOT.$url;\r\n //计算图片缩放比例\r\n $imageInfo = @getimagesize($picurl);\r\n $arrParts = pathinfo($url);\r\n $sExtN = strtolower($arrParts['extension']);\r\n $newurl = $arrParts['dirname'] . '/' . date(\"YW\") . \"/\" . $arrParts['basename'];\r\n $targetSrc = WEB_ROOT.$newurl;\r\n\r\n $srcWidth = $imageInfo[0];\r\n $srcHeight = $imageInfo[1];\r\n\r\n $thumbscale = min(160 / $srcWidth, 160 / $srcHeight); // 计算缩放比例\r\n $smlscale = min(320 / $imageInfo[0], 320 / $imageInfo[1]); // 计算缩放比例\r\n $midscale = min(900 / $imageInfo[0], 900 / $imageInfo[1]); // 计算缩放比例\r\n // 图像小于缩放大小,安原始图像大小生成图片,即$scale值为1\r\n if (ceil($thumbscale) > 1) {\r\n $thumbscale = '100%';\r\n } else {\r\n $thumbscale = ($thumbscale * 100) . '%';\r\n }\r\n if (ceil($smlscale) > 1) {\r\n $smlscale = '100%';\r\n } else {\r\n $smlscale = ($smlscale * 100) . '%';\r\n }\r\n if (ceil($midscale) > 1) {\r\n $midscale = '100%';\r\n } else {\r\n $midscale = ($midscale * 100) . '%';\r\n }\r\n\r\n $thumb_x = substr($targetSrc, 0, strrpos($targetSrc, '.')) . '_x.' . $sExtN;\r\n $thumb_s = substr($targetSrc, 0, strrpos($targetSrc, '.')) . '_s.' . $sExtN;\r\n $thumb_m = substr($targetSrc, 0, strrpos($targetSrc, '.')) . '_m.' . $sExtN;\r\n\r\n //Image::open($this->disk_path)->resize($this->thumbWidth,$this->thumbHeight)->save($thumb_x, $sExtN);\r\n Image::open($picurl)->resize($thumbscale)->save($thumb_x, $sExtN);\r\n Image::open($picurl)->resize($smlscale)->save($thumb_s, $sExtN);\r\n Image::open($picurl)->resize($midscale)->save($thumb_m, $sExtN);\r\n\r\n $fsize = filesize($picurl);//ceil(filesize($picurl) / 1000) . \"k\"; //获取文件大小\r\n //移动原始图片\r\n $rlt = FileUtil::moveFile($picurl, $targetSrc);\r\n\r\n //返回处理图片信息\r\n $attachData=array();\r\n $attachData['rlt'] = $rlt;\r\n $attachData['name'] = $arrParts['basename'];\r\n $attachData['url'] = $newurl;\r\n $attachData['type'] = strtolower($arrParts['extension']);\r\n $attachData['size'] = $fsize;\r\n $attachData['update_at'] = time();\r\n return $attachData;\r\n }", "protected function transform(sfImage $image)\n {\n $resource_w = $image->getWidth();\n $resource_h = $image->getHeight();\n\n $scale_w = $this->getWidth()/$resource_w;\n $scale_h = $this->getHeight()/$resource_h;\n switch ($this->getMethod())\n {\n case 'deflate':\n case 'inflate':\n\n return $image->resize($this->getWidth(), $this->getHeight());\n\n case 'left':\n $image->scale(max($scale_w, $scale_h));\n\n return $image->crop(0, (int)round(($image->getHeight() - $this->getHeight()) / 2), $this->getWidth(), $this->getHeight());\n\n case 'right':\n $image->scale(max($scale_w, $scale_h));\n\n return $image->crop(($image->getWidth() - $this->getWidth()), (int)round(($image->getHeight() - $this->getHeight()) / 2),$this->getWidth(), $this->getHeight());\n\n case 'top':\n $image->scale(max($scale_w, $scale_h));\n\n return $image->crop((int)round(($image->getWidth() - $this->getWidth()) / 2), 0, $this->getWidth(), $this->getHeight());\n\n case 'bottom':\n $image->scale(max($scale_w, $scale_h));\n\n return $image->crop((int)round(($image->getWidth() - $this->getWidth()) / 2), ($image->getHeight() - $this->getHeight()), $this->getWidth(), $this->getHeight());\n \n case 'center':\n $image->scale(max($scale_w, $scale_h));\n \n $left = (int)round(($image->getWidth() - $this->getWidth()) / 2);\n $top = (int)round(($image->getHeight() - $this->getHeight()) / 2);\n\n return $image->crop($left, $top, $this->getWidth(), $this->getHeight());\n case 'scale':\n return $image->scale(min($scale_w, $scale_h));\n\n case 'fit': \n default:\n $img = clone $image;\n\n $image->create($this->getWidth(), $this->getHeight());\n \n // Set a background color if specified\n if(!is_null($this->getBackground()) && $this->getBackground() != '')\n {\n $image->fill(0,0, $this->getBackground());\n }\n\n $img->scale(min($this->getWidth() / $img->getWidth(), $this->getHeight() / $img->getHeight()));\n \n $image->overlay($img, 'center');\n\n return $image;\n \n }\n }", "protected function makeThumbnails()\n {\n $sizes = [\n 'image_211' => [\n 'width' => 211,\n 'mode' => ImageInterface::THUMBNAIL_OUTBOUND,\n ],\n ];\n $data = $this->image;\n if (!$data) {\n return;\n }\n\n if (is_string($data)) {\n $tempFile = tempnam('/tmp', 'temp_');\n file_put_contents($tempFile, $data);\n $data = fopen($tempFile, 'r+');\n }\n\n if (stream_get_contents($data) == '') {\n return;\n }\n\n fseek($data, 0);\n $sourceImage = @ImagineImage::getImagine()->read($data);\n foreach ($sizes as $sizeName => $size) {\n $thumbnailAttributeName = $sizeName;\n if (!empty($size['width'])) {\n $width = $size['width'];\n if ($width < 0) {\n $originalWidgth = $sourceImage->getSize()->getWidth();\n if (-$originalWidgth < $width * 4) {\n $width = $sourceImage->getSize()->getWidth() + $width;\n } else {\n $width = $originalWidgth;\n }\n }\n } else {\n $width = null;\n }\n\n if (!empty($size['height'])) {\n $height = $size['height'];\n if ($height < 0) {\n $originalHeight = $sourceImage->getSize()->getHeight();\n if (-$originalHeight < $height * 4) {\n $height = $sourceImage->getSize()->getHeight() + $height;\n } else {\n $height = $originalHeight;\n }\n }\n } else {\n $height = null;\n }\n\n if (!empty($size['mode'])) {\n $mode = $size['mode'];\n } else {\n $mode = ImageInterface::THUMBNAIL_INSET;\n }\n\n BaseImage::$thumbnailBackgroundAlpha = 0;\n $image = ImagineImage::thumbnail($sourceImage, $width, $height, $mode);\n\n if (!empty($size['watermark'])) {\n $watermark = fopen($size['watermark'], 'r+');\n $watermark = ImagineImage::thumbnail($watermark, $image->getSize()->getWidth(), $image->getSize()->getHeight(), ManipulatorInterface::THUMBNAIL_OUTBOUND);\n $watermark = ImagineImage::crop($watermark, $image->getSize()->getWidth(), $image->getSize()->getHeight());\n\n $image = ImagineImage::watermark($image, $watermark);\n }\n\n $fileName = tempnam(sys_get_temp_dir(), 'test');\n $image->save($fileName, [\n 'format' => $this->image_extension,\n ]);\n\n $thumbData = fopen($fileName, 'r+');\n $this->$thumbnailAttributeName = $thumbData;\n }\n\n fseek($data, 0);\n }", "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\n\t\t\t\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t\t\t\t$imageType = image_type_to_mime_type($imageType);\n\t\t\t\n\t\t\t\t$newImageWidth = ceil($width * $scale);\n\t\t\t\t$newImageHeight = ceil($height * $scale);\n\t\t\t\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\t\t\t\tswitch($imageType) {\n\t\t\t\t\tcase \"image/gif\":\n\t\t\t\t\t\t$source=imagecreatefromgif($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/pjpeg\":\n\t\t\t\t\tcase \"image/jpeg\":\n\t\t\t\t\tcase \"image/jpg\":\n\t\t\t\t\t\t$source=imagecreatefromjpeg($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/png\":\n\t\t\t\t\tcase \"image/x-png\":\n\t\t\t\t\t\t$source=imagecreatefrompng($image);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\timagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n\t\t\t\tswitch($imageType) {\n\t\t\t\t\tcase \"image/gif\":\n\t\t\t\t\t\timagegif($newImage,$thumb_image_name);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/pjpeg\":\n\t\t\t\t\tcase \"image/jpeg\":\n\t\t\t\t\tcase \"image/jpg\":\n\t\t\t\t\t\timagejpeg($newImage,$thumb_image_name,90);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/png\":\n\t\t\t\t\tcase \"image/x-png\":\n\t\t\t\t\t\timagepng($newImage,$thumb_image_name);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tchmod($thumb_image_name, 0777);\n\t\t\t\treturn $thumb_image_name;\n\t\t\t}", "function saveResizedImage($format,$imgData,$resizedFilename){\n \tswitch( $format ){\n\t\tcase 1:\n\t\timagegif($imgData, $resizedFilename);\n\t\tbreak;\n\t\tcase 2:\n\t\timagejpeg($imgData, $resizedFilename, 75);\n\t\tbreak;\n\t\tcase 3:\n\t\timagepng($imgData, $resizedFilename, 1);\n\t}\n}", "function saveImage()\n\t{\n\n\t\tif (!$this->ImageStream) {\n\t\t\t$this->printError('image not loaded');\n\t\t}\n\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\t/* store a interlaced gif image */\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagegif($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t/* store a progressive jpeg image (with default quality value)*/\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagejpeg($this->ImageStream, $this->sFileLocation, $this->jpegquality);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t/* store a png image */\n\t\t\t\timagepng($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\n\t\t\t\tif (!file_exists($this->sFileLocation)) {\n\t\t\t\t\t$this->printError('file not stored');\n\t\t\t\t}\n\t\t}\n\t}", "function spc_resizeImage( $file, $thumbpath, $max_side , $fixfor = NULL ) {\n\n\tif ( file_exists( $file ) ) {\n\t\t$type = getimagesize( $file );\n\n\t\tif (!function_exists( 'imagegif' ) && $type[2] == 1 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t}\n\t\telseif (!function_exists( 'imagejpeg' ) && $type[2] == 2 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t}\n\t\telseif (!function_exists( 'imagepng' ) && $type[2] == 3 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t} else {\n\n\t\t\t// create the initial copy from the original file\n\t\t\tif ( $type[2] == 1 ) {\n\t\t\t\t$image = imagecreatefromgif( $file );\n\t\t\t}\n\t\t\telseif ( $type[2] == 2 ) {\n\t\t\t\t$image = imagecreatefromjpeg( $file );\n\t\t\t}\n\t\t\telseif ( $type[2] == 3 ) {\n\t\t\t\t$image = imagecreatefrompng( $file );\n\t\t\t}\n\n\t\t\tif ( function_exists( 'imageantialias' ))\n\t\t\t\timageantialias( $image, TRUE );\n\n\t\t\t$image_attr = getimagesize( $file );\n\n\t\t\t// figure out the longest side\n if($fixfor){\n \t if($fixfor == 'width'){\n \t \t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_width = $max_side;\n\n\t\t\t\t$image_ratio = $image_width / $image_new_width;\n\t\t\t\t$image_new_height = $image_height / $image_ratio;\n \t }elseif($fixfor == 'height'){\n \t $image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_height = $max_side;\n\n\t\t\t\t$image_ratio = $image_height / $image_new_height;\n\t\t\t\t$image_new_width = $image_width / $image_ratio;\t\n \t }\n }else{\n\t\t\tif ( $image_attr[0] > $image_attr[1] ) {\n\t\t\t\t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_width = $max_side;\n\n\t\t\t\t$image_ratio = $image_width / $image_new_width;\n\t\t\t\t$image_new_height = $image_height / $image_ratio;\n\t\t\t\t//width is > height\n\t\t\t} else {\n\t\t\t\t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_height = $max_side;\n\n\t\t\t\t$image_ratio = $image_height / $image_new_height;\n\t\t\t\t$image_new_width = $image_width / $image_ratio;\n\t\t\t\t//height > width\n\t\t\t}\n }\t\n\n\t\t\t$thumbnail = imagecreatetruecolor( $image_new_width, $image_new_height);\n\t\t\t@ imagecopyresampled( $thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $image_attr[0], $image_attr[1] );\n\n\t\t\t// move the thumbnail to its final destination\n\t\t\tif ( $type[2] == 1 ) {\n\t\t\t\tif (!imagegif( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( $type[2] == 2 ) {\n\t\t\t\tif (!imagejpeg( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( $type[2] == 3 ) {\n\t\t\t\tif (!imagepng( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$error = 0;\n\t}\n\n\tif (!empty ( $error ) ) {\n\t\treturn $error;\n\t} else {\n\t\treturn $thumbpath;\n\t}\n}", "protected function _generateThumbnail() {\n if ( $this->attributes['width'] == $this->_original_image_info[0] && $this->attributes['height'] == $this->_original_image_info[1] ) {\n $this->_calculated_width = $this->attributes['width'];\n return $this->_calculated_height = $this->attributes['height'];\n }\n if ( $this->attributes['width'] == 0 || $this->attributes['height'] == 0 ) {\n $this->_calculated_width = $this->_original_image_info[0];\n return $this->_calculated_height = $this->_original_image_info[1]; \n }\n //make sure the thumbnail directory exists. \n if ( !is_writable ( $this->thumbs_dir_path ) ) { \n trigger_error ( 'Cannot detect a writable thumbs directory!', E_USER_NOTICE );\n }\n if ( is_readable ( $this->_thumb_src ) ) {\n $this->_calculated_width = (int)$this->attributes['width'];\n $this->_calculated_height = (int)$this->attributes['height'];\n return $this->src = $this->_thumb_src; \n }\n // resize image\n $image = new Image();\n $image->open( $this->src, $this->thumb_background_rgb )\n ->resize( (int)$this->attributes['width'], (int)$this->attributes['height'] )\n ->save( $this->_thumb_src, (int)$this->thumb_quality );\n $this->_thumbnail = $image;\n $this->_calculated_width = $this->_thumbnail->getWidth();\n $this->_calculated_height = $this->_thumbnail->getHeight();\n $this->src = $this->_thumb_src;\n }", "function make_thumb($src,$dest) {\n try {\n // Create a new SimpleImage object\n $image = new \\claviska\\SimpleImage();\n\n // load file\n $image->fromFile($src);\n // img getMimeType\n $mime = $image->getMimeType();\n $w = $image->getWidth();\n\n // Manipulate it\n // $image->bestFit(200, 300) // proportionally resize to fit inside a 250x400 box\n // $image->flip('x') // flip horizontally\n // $image->colorize('DarkGreen') // tint dark green\n // $image->sharpen()\n // $image->border('darkgray', 1) // add a 2 pixel black border\n // $image->overlay('flag.png', 'bottom right') // add a watermark image\n // $image->toScreen(); // output to the screen\n if ($w > 1000) {\n $image->autoOrient(); // adjust orientation based on exif data\n // $image->resize($resizeWidth); // 1365\n // $image->resize(1024); // 1365\n $image->resize(800); // 1067\n }\n $image->toFile($dest,$mime,$outIMGquality);\n // echo \"mime type: \".$mime;\n } catch(Exception $err) {\n // Handle errors\n echo $err->getMessage();\n }\n}", "function processNewImage($image_posted, $newImage)\n {\n ini_set('memory_limit', '1024M');\n list($postedWidth, $postedHeight, $type) = getimagesize($image_posted);\n if ( $type == IMAGETYPE_JPEG )\n $image_src = imagecreatefromjpeg($image_posted);\n else if ( $type == IMAGETYPE_PNG )\n $image_src = imagecreatefrompng($image_posted);\n else if ( $type == IMAGETYPE_GIF )\n $image_src = imagecreatefromgif($image_posted);\n if ( !$image_src)\n $this->reportError('cms/model/edit_input processNewImage. Problem opening source image: '. $image_posted);\n\n // STORE ORIGINAL IMAGE, as a jpg\n set_time_limit(120); // resets default time limit back to zero\n\n if ($this->config['image_resize_original']) {\n\t\t\t\t\t\tif ($postedWidth >= $postedHeight){\n\t\t\t\t\t\t $postedWidthResized = $this->config['image_maxside_original'];\n\t\t\t $postedHeightResized = floor (($this->config['image_maxside_original'] / $postedWidth) * $postedHeight);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t $postedHeightResized = $this->config['image_maxside_original'];\n\t\t\t $postedWidthResized = floor (($this->config['image_maxside_original'] / $postedHeight) * $postedWidth);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t $postedHeightResized = $postedHeight;\n\t\t\t\t\t $postedWidthResized = $postedWidth;\n\t\t\t\t}\n\n\t $image_dst = imagecreatetruecolor($postedWidthResized, $postedHeightResized)\n\t or $this->reportError('cms/model/edit_input processNewImage Store Original. Problem with imagecreatetruecolor');\n\n\t if ($type == IMAGETYPE_PNG) {\n\t $color = imagecolorallocatealpha($image_dst, 255, 255, 255, 127)\n\t or $this->reportError('cms/model/edit_input.php processNewImage. Store Original. Problem with imagecolorallocatealpha');\n\t imagefill($image_dst, 0, 0, $color)\n\t or $this->reportError('cms/model/edit_input.php processNewImage. Store Original. Problem with imagefill');\n\t }\n imagecopyresampled($image_dst, $image_src, 0, 0, 0, 0, $postedWidthResized, $postedHeightResized, $postedWidth, $postedHeight)\n or $this->reportError('cms/model/edit_input processNewImage Store Original. Problem with imagecopyresampled');\n imagejpeg($image_dst, CONFIG_DIR.'/content/images/original/'.$newImage , $this->config['image_quality_original'])\n or $this->reportError('cms/model/edit_input processNewImage Store Original. Problem with imagejpeg');\n imagedestroy($image_dst);\n\n // STORE RESIZED image with same aspect ratio as original (used for on screen cropping)\n set_time_limit(120);\n\n // set longest side to 600 and keep aspect ratio\n if ($postedWidthResized >= $postedHeightResized) {\n $uncroppedWidth = 600;\n $uncroppedHeight = floor ((600/ $postedWidthResized) * $postedHeightResized);\n }\n else{\n $uncroppedHeight = 600;\n $uncroppedWidth = floor ((600/ $postedHeightResized) * $postedWidthResized);\n }\n\n $image_from_src = imagecreatefromjpeg(CONFIG_DIR.'/content/images/original/'.$newImage)\n or $this->reportError('cms/model/edit_input processNewImage. Store Resized. Problem with imagecreatefromjpeg');\n\n $image_dst = imagecreatetruecolor($uncroppedWidth, $uncroppedHeight)\n or $this->reportError('cms/model/edit_input processNewImage Store Resized. Problem with imagecreatetruecolor');\n\n imagecopyresampled($image_dst, $image_from_src, 0, 0, 0, 0, $uncroppedWidth, $uncroppedHeight, $postedWidthResized, $postedHeightResized)\n or $this->reportError('cms/model/edit_input processNewImage Store Resized. Problem with imagecopyresampled');\n\n imagejpeg($image_dst, CONFIG_DIR.'/content/images/uncropped/'.$newImage , 80)\n or $this->reportError('cms/model/edit_input processNewImage Store Resized. Problem with imagejpeg');\n\n imagedestroy($image_dst);\n\n // calculate default cropping coordinates for a new image\n $srcRatio = $uncroppedWidth / $uncroppedHeight;\n $image_ratio_panorama = $this->convertConfigRatio($this->config['image_ratio_panorama']);\n $image_ratio_landscape = $this->convertConfigRatio($this->config['image_ratio_landscape']);\n $image_ratio_portrait = $this->convertConfigRatio($this->config['image_ratio_portrait']);\n $image_ratio_square = $this->convertConfigRatio($this->config['image_ratio_square']);\n\n // coordinates for Panorama image\n if ( $srcRatio > $image_ratio_panorama) {\n $w = floor ( $uncroppedHeight * $image_ratio_panorama);\n $m = floor (( $uncroppedWidth - $w) / 2) ;\n $mx1 = $m;\n $mx2 = $m + $w;\n $my1 = 0;\n $my2 = $uncroppedHeight;\n }\n else {\n $h = floor ( $uncroppedWidth / $image_ratio_panorama );\n $m = floor ( ($uncroppedHeight - $h) / 2);\n $mx1 = 0;\n $mx2 = $uncroppedWidth;\n $my1 = $m;\n $my2 = $m + $h;\n }\n // coordinates for landscape image\n if ( $srcRatio > $image_ratio_landscape) {\n $w = floor ( $uncroppedHeight * $image_ratio_landscape);\n $m = floor (( $uncroppedWidth - $w) / 2) ;\n $lx1 = $m;\n $lx2 = $m + $w;\n $ly1 = 0;\n $ly2 = $uncroppedHeight;\n }\n else {\n $h = floor ( $uncroppedWidth / $image_ratio_landscape);\n $m = floor (( $uncroppedHeight - $h) / 2);\n $lx1 = 0;\n $lx2 = $uncroppedWidth;\n $ly1 = $m;\n $ly2 = $m + $h;\n }\n\n // coordinates for portrait image\n if ($srcRatio > $image_ratio_portrait) {\n $w = floor ( $uncroppedHeight * $image_ratio_portrait);\n $m = floor (( $uncroppedWidth - $w) / 2) ;\n $px1 = $m;\n $px2 = $m + $w;\n $py1 = 0;\n $py2 = $uncroppedHeight;\n }\n else {\n $h = floor ( $uncroppedWidth / $image_ratio_portrait);\n $m = floor (( $uncroppedHeight - $h) / 2);\n $px1 = 0;\n $px2 = $uncroppedWidth;\n $py1 = $m;\n $py2 = $m + $h;\n }\n\n // coordinates for square image\n if ($srcRatio > $image_ratio_square) {\n $w = floor ( $uncroppedHeight * $image_ratio_square);\n $m = floor (( $uncroppedWidth - $w) / 2) ;\n $sx1 = $m;\n $sx2 = $m + $w;\n $sy1 = 0;\n $sy2 = $uncroppedHeight;\n }\n else {\n $h = floor ( $uncroppedWidth / $image_ratio_square);\n $m = floor (( $uncroppedHeight - $h) / 2);\n $sx1 = 0;\n $sx2 = $uncroppedWidth;\n $sy1 = $m;\n $sy2 = $m + $h;\n }\n\n // coordinates for fluid image\n\t\t\t\t$fx1 = 0;\n\t\t\t\t$fx2 = $uncroppedWidth;\n\t\t\t\t$fy1 = 0;\n\t\t\t\t$fy2 = $uncroppedHeight;\n\n\t\t\t// set width and height for fluid image, using original aspect ratio scaled to config maxside fluid.\n\t \t\t if ($postedWidth >= $postedHeight) {\n\t \t\t\t\t $fluidWidth = $this->config['image_maxside_fluid'];\n\t \t\t\t\t $fluidHeight = floor (($this->config['image_maxside_fluid']/ $postedWidth) * $postedHeight);\n\t \t\t }\n\t \t\t else{\n\t\t\t\t $fluidHeight = $this->config['image_maxside_fluid'];\n\t\t\t\t $fluidWidth = floor (($this->config['image_maxside_fluid']/ $postedHeight) * $postedWidth);\n\t \t\t }\n\n // add new image to session data\n $imageSeq = count($_SESSION['item']['images']);\n $image = array(\n\t\t 'src' => $newImage,\n\t\t 'seq' => $imageSeq,\n\t\t 'mx1' => $mx1, 'mx2' => $mx2, 'my1' => $my1, 'my2' => $my2,\n\t\t 'lx1' => $lx1, 'lx2' => $lx2, 'ly1' => $ly1, 'ly2' => $ly2,\n\t\t 'px1' => $px1, 'px2' => $px2, 'py1' => $py1, 'py2' => $py2,\n\t\t 'sx1' => $sx1, 'sx2' => $sx2, 'sy1' => $sy1, 'sy2' => $sy2,\n\t\t 'fx1' => $fx1, 'fx2' => $fx2, 'fy1' => $fy1, 'fy2' => $fy2,\n\t\t 'height' => $uncroppedHeight, 'width' => $uncroppedWidth,\n\t\t 'height_fluid' => $fluidHeight, 'width_fluid' => $fluidWidth,\n\t\t 'alt' => null, 'web_images' => true, 'prime_aspect_ratio' => 'landscape'\n );\n $_SESSION['item']['images'][] = $image;\n }", "function createThumbnail($image)\n {\n $width = $height = 200;\n ini_set('memory_limit', '1024M');\n set_time_limit(120);\n $image_src = imagecreatefromjpeg(CONFIG_DIR.'/content/images/uncropped/'.$image['src'])\n or $this->reportError('cms/model/edit_input createThumbnail. Problem with imagecreatefromjpeg');\n $image_dst = imagecreatetruecolor($width, $height)\n or $this->reportError('cms/model/edit_input createThumbnail. Problem with imagecreatetruecolor');\n imagecopyresampled ($image_dst, $image_src, 0, 0, $image['sx1'], $image['sy1'], $width, $height,($image['sx2'] - $image['sx1']), ($image['sy2'] - $image['sy1']))\n or $this->reportError('cms/model/edit_input createThumbnail. Problem with imagecopyresampled');\n imagejpeg($image_dst, CONFIG_DIR.'/content/images/thumbnail/'.$image['src'] , 90)\n or $this->reportError('cms/model/edit_input createThumbnail. Problem with imagejpeg');\n imagedestroy($image_dst);\n }", "public function do_profile_resize_image($data){\n\t\t//Your Image\n\t\t$imgSrc = 'public/upload/img/profile/' . $data['file'];\n\n\t\t//getting the image dimensions\n\t\tlist($width, $height) = getimagesize($imgSrc);\n\n\t\t//saving the image into memory (for manipulation with GD Library)\n\t\tif ($data['type'] == \"jpeg\" || $data['type'] == \"jpg\")\n\t\t\t$myImage = imagecreatefromjpeg($imgSrc);\n\t\telse if ($data['type'] == \"png\")\n\t\t\t$myImage = imagecreatefrompng($imgSrc);\n\t\telse if ($data['type'] == \"gij\")\n\t\t\t$myImage = imagecreatefromgif($imgSrc);\n\n\t\t// calculating the part of the image to use for thumbnail\n\t\tif ($width > $height) {\n\t\t $y = 0;\n\t\t $x = ($width - $height) / 2;\n\t\t $smallestSide = $height;\n\t\t} else {\n\t\t $x = 0;\n\t\t $y = ($height - $width) / 2;\n\t\t $smallestSide = $width;\n\t\t}\n\n\t\t// copying the part into thumbnail\n\t\t$thumbSize = 300;\n\t\t$thumb = imagecreatetruecolor($thumbSize, $thumbSize);\n\t\timagecopyresampled($thumb, $myImage, 0, 0, $x, $y, $thumbSize, $thumbSize, $smallestSide, $smallestSide);\n\n\t\t//final output\n\t\t$thumbnail_path = 'public/upload/img/profile/thumbnail_' . $data['file'];\n\t\tif ($data['type'] == \"jpeg\" || $data['type'] == \"jpg\") {\n\t\t\timagejpeg($thumb, $thumbnail_path);\n\t\t}\n\t\telse if ($data['type'] == \"png\") {\n\t\t\timagepng($thumb, $thumbnail_path);\n\t\t}\n\t\telse if ($data['type'] == \"gif\") {\n\t\t\timagegif($thumb, $thumbnail_path);\n\t\t}\n\n\t}", "private function generateThumbnailImagick(){\n\t}", "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\n\tlist($imagewidth, $imageheight, $imageType) = getimagesize($image);\n\t$imageType = image_type_to_mime_type($imageType);\n\t\n\t$newImageWidth = ceil($width * $scale);\n\t$newImageHeight = ceil($height * $scale);\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t\t\t$source=imagecreatefromgif($image); \n\t\t\tbreak;\n\t case \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t\t\t$source=imagecreatefromjpeg($image); \n\t\t\tbreak;\n\t case \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\t$source=imagecreatefrompng($image); \n\t\t\tbreak;\n \t}\n\timagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n\tswitch($imageType) {\n\t\tcase \"image/gif\":\n\t \t\timagegif($newImage,$thumb_image_name); \n\t\t\tbreak;\n \tcase \"image/pjpeg\":\n\t\tcase \"image/jpeg\":\n\t\tcase \"image/jpg\":\n\t \t\timagejpeg($newImage,$thumb_image_name,90); \n\t\t\tbreak;\n\t\tcase \"image/png\":\n\t\tcase \"image/x-png\":\n\t\t\timagepng($newImage,$thumb_image_name); \n\t\t\tbreak;\n }\n\tchmod($thumb_image_name, 0777);\n\treturn $thumb_image_name;\n}", "protected function _generateThumbnail() {\n if ( $this->attributes['width'] == $this->_original_image_info[0] && $this->attributes['height'] == $this->_original_image_info[1] ) {\n $this->_calculated_width = $this->attributes['width'];\n return $this->_calculated_height = $this->attributes['height'];\n }\n if ( $this->attributes['width'] == 0 || $this->attributes['height'] == 0 ) {\n $this->_calculated_width = $this->_original_image_info[0];\n return $this->_calculated_height = $this->_original_image_info[1]; \n }\n //make sure the thumbnail directory exists. \n if ( !is_writable ( $this->thumbs_dir_path ) ) { \n trigger_error ( 'Cannot detect a writable thumbs directory!', E_USER_NOTICE );\n }\n if ( is_readable ( $this->_thumb_src ) ) {\n $this->_calculated_width = (int)$this->attributes['width'];\n $this->_calculated_height = (int)$this->attributes['height'];\n return $this->src = $this->_thumb_src; \n }\n // resize image\n $image = new Image();\n $image->open( $this->src, $this->thumb_background_rgb )\n ->resize( (int)$this->attributes['width'], (int)$this->attributes['height'] )\n ->save( $this->_thumb_src, (int)$this->thumb_quality );\n $this->_thumbnail = $image;\n $this->_calculated_width = $this->_thumbnail->getWidth();\n $this->_calculated_height = $this->_thumbnail->getHeight();\n $this->src = $this->_thumb_src;\n }", "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 static function _prepare_image( $width, $height, $best_fit, $type, $quality ) {\r\n//error_log( __LINE__ . \" MLAImageProcessor::_prepare_image( {$width}, {$height}, {$best_fit}, {$type}, {$quality} )\", 0 );\r\n\t\tif ( 'WordPress' == $type ) {\r\n\t\t\t$default_width = 0;\r\n\t\t\t$type = 'image/jpeg';\r\n\t\t} else {\r\n\t\t\t$default_width = 150;\r\n\t\t}\r\n\t\t\r\n\t\tif ( is_callable( array( self::$image, 'scaleImage' ) ) ) {\r\n\t\t\tif ( 0 < $width && 0 < $height ) {\r\n\t\t\t\t// Both are set; use them as-is\r\n\t\t\t\tself::$image->scaleImage( $width, $height, $best_fit );\r\n\t\t\t} elseif ( 0 < $width || 0 < $height ) {\r\n\t\t\t\t// One is set; scale the other one proportionally if reducing\r\n\t\t\t\t$image_size = self::$image->getImageGeometry();\r\n\r\n\t\t\t\tif ( $width && isset( $image_size['width'] ) && $width < $image_size['width'] ) {\r\n\t\t\t\t\tself::$image->scaleImage( $width, 0 );\r\n\t\t\t\t} elseif ( $height && isset( $image_size['height'] ) && $height < $image_size['height'] ) {\r\n\t\t\t\t\tself::$image->scaleImage( 0, $height );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Neither is specified, apply defaults; ( 0, 0 ) is invalid.\r\n\t\t\t\tif ( $default_width ) {\r\n\t\t\t\t\tself::$image->scaleImage( $default_width, 0 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( 0 < $quality && 101 > $quality ) {\r\n\t\t\tif ( 'image/jpeg' == $type ) {\r\n\t\t\t\tself::$image->setImageCompressionQuality( $quality );\r\n\t\t\t\tself::$image->setImageCompression( imagick::COMPRESSION_JPEG );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tself::$image->setImageCompressionQuality( $quality );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( 'image/jpeg' == $type ) {\t\t\t\t\r\n\t\t\tif ( is_callable( array( self::$image, 'setImageBackgroundColor' ) ) ) {\t\t\t\t\r\n\t\t\t\tself::$image->setImageBackgroundColor('white');\r\n\t\t\t}\r\n\r\n\t\t\tif ( is_callable( array( self::$image, 'mergeImageLayers' ) ) ) {\r\n\t\t\t\tself::$image = self::$image->mergeImageLayers( imagick::LAYERMETHOD_FLATTEN );\r\n\t\t\t} elseif ( is_callable( array( self::$image, 'flattenImages' ) ) ) {\t\t\t\t\r\n\t\t\t\tself::$image = self::$image->flattenImages();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function testTransform()\n {\n $img = new P4Cms_Image();\n $data = file_get_contents(TEST_ASSETS_PATH . '/images/luigi.png');\n $img->setData($data);\n\n // test the behavior of scale with width and height\n $img->transform('scale', array(258, 355));\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 258, 'height' => 355),\n 'Expected image to be scaled to 258x355 pixels.'\n );\n\n // test the behavior of scale with width only\n // 516/710 = 400/h => h = 550\n $img->transform('scale', array(400));\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 400, 'height' => 550),\n 'Expected image to be scaled to 300x300 pixels.'\n );\n\n // test the behavior of crop\n $img->transform('crop', array(100, 100, 50, 50));\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 100, 'height' => 100),\n 'Expected image to be cropped to 100x100 pixels.'\n );\n\n // test the behavior of unsupported transform\n try {\n $img->transform('foo');\n $this->fail('Expected failure with an unsupported transform.');\n } catch (P4Cms_Image_Exception $e) {\n $this->assertSame($e->getMessage(), \"Transform \\\"foo\\\" is not supported.\");\n } catch (Exception $e) {\n $this->fail('Unexpected exception: '. $e->getMessage());\n }\n }", "private function doImageResize($img){\n\t\t//Determine the new dimensions\n\t\t$d=$this->getNewDims($img);\n\t\t\n\t\t//Determine which function to use\n\t\t$funcs=$this->getImageFunctions($img);\n\t\t\n\t\t//Determine the image type\n\t\t$src_img=$funcs[0]($img);\n\t\t\n\t\t//Determine the new image size\n\t\t$new_img=imagecreatetruecolor($d[0], $d[1]);\n\t\t\n\t\tif(imagecopyresampled\n\t\t\t\t($new_img, $src_img, 0, 0, 0, 0, $d[0],$d[1] , $d[2], $d[3])){\n\t\t\timagedestroy($src_img);\n\t\t\t//check if the new image has the same file type as the original one\n\t\t\tif($new_img && $funcs[1]($new_img,$img)){\n\t\t\t\timagedestroy($new_img);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthrow new Exception('Failed to save the new image!');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tthrow new Exception(\"Could not resample the image!\");\n\t\t}\n\t\t\n\t}", "protected function formatImage($file)\n {\n $img = Image::make($file->path());\n $img->resize(300, 300);\n $img->save();\n }", "function image_resize($filename){\n\t\t$width = 1000;\n\t\t$height = 500;\n\t\t$save_file_location = $filename;\n\t\t// File type\n\t\t//header('Content-Type: image/jpg');\n\t\t$source_properties = getimagesize($filename);\n\t\t$image_type = $source_properties[2];\n\n\t\t// Get new dimensions\n\t\tlist($width_orig, $height_orig) = getimagesize($filename);\n\n\t\t$ratio_orig = $width_orig/$height_orig;\n\t\tif ($width/$height > $ratio_orig) {\n\t\t\t$width = $height*$ratio_orig;\n\t\t} else {\n\t\t\t$height = $width/$ratio_orig;\n\t\t}\n\t\t// Resampling the image \n\t\t$image_p = imagecreatetruecolor($width, $height);\n\t\tif( $image_type == IMAGETYPE_JPEG ) {\n\t\t\t$image = imagecreatefromjpeg($filename);\n\t\t}else if($image_type == IMAGETYPE_GIF){\n\t\t\t$image = imagecreatefromgif($filename);\n\t\t}else if($image_type == IMAGETYPE_PNG){\n\t\t\t$image = imagecreatefrompng($filename);\n\t\t}\n\t\t$finalIMG = imagecopyresampled($image_p, $image, 0, 0, 0, 0,\n\t\t$width, $height, $width_orig, $height_orig);\n\t\t// Display of output image\n\n\t\tif( $image_type == IMAGETYPE_JPEG ) {\n\t\t\timagejpeg($image_p, $save_file_location);\n\t\t}else if($image_type == IMAGETYPE_GIF){\n\t\t\timagegif($image_p, $save_file_location);\n\t\t}else if($image_type == IMAGETYPE_PNG){\n\t\t\t$imagepng = imagepng($image_p, $save_file_location);\n\t\t}\n\t}", "private function create_thumbnail($s3, $key, $filename)\n {\n // Create Same Size Thumbnail\n $f = TMP . $filename;\n $src_image = imagecreatefromjpeg($f);\n\n // get size\n $width = ImageSx($src_image);\n $height = ImageSy($src_image);\n\n // Tatenaga...\n if ($height > $width * 0.75) {\n $src_y = (int) ($height - ($width * 0.75));\n $src_h = $height - $src_y;\n $src_x = 0;\n $src_w = $width;\n } else {\n // Yokonaga\n $src_y = 0;\n $src_h = $height;\n $src_x = 0;\n $src_w = $height / 0.75;\n }\n\n // get resized size\n $dst_w = 320;\n $dst_h = 240;\n\n // generate file\n $dst_image = ImageCreateTrueColor($dst_w, $dst_h);\n ImageCopyResampled($dst_image, $src_image, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);\n\n imagejpeg($dst_image, TMP . $key . '/thumbnail.jpg');\n\n // store thumbnail to S3\n $s3->putObject(array(\n 'Bucket' => Configure::read('image_bucket_name'),\n 'Key' => $key . '/thumbnail.jpg',\n 'SourceFile' => TMP . $key . '/thumbnail.jpg',\n 'ContentType' => 'image/jpeg',\n 'ACL' => 'public-read',\n 'StorageClass' => 'REDUCED_REDUNDANCY',\n ));\n }", "private function createImage($model)\n {\n\n if ($model->image){\n\t\t\t\t$f = pathinfo($model->image->getName());\t\n\t\t\t\n $path = $_SERVER['DOCUMENT_ROOT'].'/application/uploads/';\n\t\t\t\t$prefix= (string)time();\n\t\t\t\t$name = $prefix.'_'.$f['filename'].'.'.$f['extension'];\n\t\t\t\t\n\t\t\t\t$fileName = $path.$name;\n\t\t\t\t$thumbName = $path.'thumb_'.$name;\n\t\t\t\n $model->image->saveAs($fileName)\t;\n\t\t\t\t$model->image= $name;\n\t\t\t\t$model->save();\n\t\t\t\t$imagevariables=getimagesize($fileName);\n\t\t\t\t$width_ = '112'; $wratio = $imagevariables[0]/$width_;\n\t\t\t\t$height_ = '80'; $hratio = $imagevariables[1]/$height_;\n\t\t\t\t\n\t\t\t\t$new_width = $width_;\n\t\t\t\t$new_height = $height_;\n\t\t\t\tif ($wratio<$hratio)\n\t\t\t\t\t$new_height = NULL;\n\t\t\t\telse\n\t\t\t\t\t$new_width = NULL;\n\t\t\t\t\t\t\t\t\n\t\t\t\t$image = new EasyImage($fileName);\n\t\t\t\t$image->resize($new_width, $new_height);\n\t\t\t\t$image->crop($width_, $height_);\n\t\t\t\t$image->save($thumbName);\n\t\t\t}\n\n\n\n\n }", "public function output_image()\n {\n if (empty($this->tmp_img)) {\n if ( ! $this->SILENT_MODE) {\n trigger_error('No temporary image for resizing!', E_USER_WARNING);\n }\n return false;\n }\n header('Content-Type: image/' . $this->output_type);\n $this->_set_new_size_auto();\n if ($this->output_width != $this->source_width || $this->output_height != $this->source_height || $this->output_type != $this->source_type) {\n $this->tmp_resampled = imagecreatetruecolor($this->output_width, $this->output_height);\n imagecopyresampled($this->tmp_resampled, $this->tmp_img, 0, 0, 0, 0, $this->output_width, $this->output_height, $this->source_width, $this->source_height);\n }\n $func_name = 'image' . $this->output_type;\n strlen($this->output_type) ? $func_name($this->tmp_resampled) : null;\n return true;\n }", "public function scaleImage($width, $height, $file, $save_size, $save_size_square) {\n\t\t\n\t\t//Create CDNS @todo move to class object\n\t\t$storageProdiver = $this -> _storageService;\n\t\t$storage_service = new $storageProdiver;\n\t\t\n\t\t//Create The Image\n\t\t$image = \\Image::scaleImage(($file) ?:$this -> image_original_url , $width, $height, array('bestfit' => true, 'return' => 'image_object'));\n\t\t$content_type = 'image/' . strtolower($image->getImageFormat());\n\t\t$extension = $this -> getExtension($content_type);\n\t\t\n\t\t//Set Save Name\n\t\t$save_location = '';\n\t\t\t\n\t\tif($this -> _localStorage) {\n\t\t\t$save_location = SITE_PATH.'/public_html/img/uploads/'.$this -> image_id.'_' . $save_size.$extension;\n\t\t} else {\n\t\t\t$save_location = $this -> image_id.'_' . $save_size.$extension;\n\t\t}\n\t\t\t\n\t\t//Upload To CDN\n\t\t$uploaded_file = $storage_service ->upload( $save_location , $image -> getImageBlob() , $content_type);\n\t\t\n\t\tif($uploaded_file) {\n\t\t\t$this -> update(array(\n\t\t\t\t$save_size => $uploaded_file\n\t\t\t));\n\t\t}\n\t\t\n\t\t//Clear image save memory\n\t\t$image -> clear();\n\t\t\n\t\t//Create The Image\n\t\t$image = \\Image::scaleImage(($file) ?:$this -> image_original_url , $width, $height, array('bestfit' => false, 'return' => 'image_object'));\n\t\t\n\t\t//Set Save Name\n\t\t$save_location = '';\n\t\t\t\n\t\tif($this -> _localStorage) {\n\t\t\t$save_location = SITE_PATH.'/public_html/img/uploads/'.$this -> image_id.'_'. $save_size .'_sq'.$extension;\n\t\t} else {\n\t\t\t$save_location = $this -> image_id.'_'. $save_size .'_sq'.$extension;\n\t\t}\n\t\t\t\n\t\t//Upload To CDN\n\t\t$uploaded_file = $storage_service ->upload( $save_location , $image -> getImageBlob() ,$content_type);\n\t\t\n\t\tif($uploaded_file) {\n\t\t\t$this -> update(array(\n\t\t\t\t$save_size_square => $uploaded_file\n\t\t\t));\t\n\t\t}\n\t\t\n\t\t//Clear Image save memory\n\t\t$image -> clear();\n\t\t\n\t}", "public function image_resize()\n {\n $url = $this->input->get('pic');\n $width = $this->input->get('width');\n $height = $this->input->get('height');\n $bgcolor = $this->input->get('color');\n $type = $this->input->get('type');\n $loc = $this->input->get('loc');\n if (empty($type)) {\n $type = 'fit'; // fit, fill\n }\n if (empty($loc)) {\n $loc = 'Center'; // NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast\n }\n $strict = FALSE;\n if (substr($width, -1) == \"*\" && substr($height, -1) == \"*\") {\n $width = substr($width, 0, -1);\n $height = substr($height, 0, -1);\n $strict = TRUE;\n }\n\n// $bgcolor = (trim($bgcolor) == \"\") ? \"FFFFFF\" : $bgcolor;\n// $props = array(\n// 'picture' => $url,\n// 'resize_width' => $width,\n// 'resize_height' => $height,\n// 'bg_color' => $bgcolor\n// );\n//\n// $this->load->library('Image_resize', $props);\n// $this->skip_template_view();\n\n $dest_folder = APPPATH . 'cache' . DS . 'temp' . DS;\n $this->general->createFolder($dest_folder);\n\n $pic = trim($url);\n $pic = base64_decode($pic);\n $pic = str_replace(\" \", \"%20\", $pic);\n $url = $pic;\n $url = str_replace(\" \", \"%20\", $url);\n $props = array(\n 'picture' => $url,\n 'resize_width' => $width,\n 'resize_height' => $height,\n 'bg_color' => $bgcolor\n );\n $md5_url = md5($url . serialize($props));\n $tmp_path = $tmp_file = $dest_folder . $md5_url;\n\n if (strpos($url, $this->config->item('site_url')) === FALSE && strpos($url, 's3.amazonaws') === FALSE) {\n $this->output->set_status_header(400);\n exit;\n }\n \n if (!is_file($tmp_path)) {\n $image_data = file_get_contents($url);\n if ($image_data == FALSE) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);\n curl_setopt($curl, CURLOPT_TIMEOUT, 600);\n curl_setopt($curl, CURLOPT_COOKIEJAR, \"cookie.txt\");\n curl_setopt($curl, CURLOPT_COOKIEFILE, \"cookie.txt\");\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($curl, CURLOPT_VERBOSE, TRUE);\n //curl_setopt($curl, CURLOPT_HEADER, TRUE);\n $image_data = curl_exec($curl);\n\n if ($image_data == FALSE) {\n \t\n $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n if ($httpCode != 200) {\n $this->output->set_status_header($httpCode);\n exit;\n }\n }\n curl_close($curl);\n// $headers = parse_response_header($http_response_header);\n// if ($headers['reponse_code'] != 200) {\n// $this->output->set_status_header($headers['reponse_code']);\n// exit;\n// }\n }\n $handle = fopen($tmp_path, 'w+');\n fwrite($handle, $image_data);\n fclose($handle);\n\n $img_info = getimagesize($tmp_path);\n $img_ext = end(explode(\"/\", $img_info['mime']));\n if ($img_ext == 'jpeg' || $img_ext == \"pjpeg\") {\n $img_ext = 'jpg';\n }\n if ($strict == TRUE && $img_info[0] < $width && $img_info[1] < $height) {\n $tmp_file = $tmp_path;\n } else {\n\n $this->load->library('image_lib');\n\n $image_process_tool = $this->config->item('imageprocesstool');\n $config['image_library'] = $image_process_tool;\n if ($image_process_tool == \"imagemagick\") {\n $config['library_path'] = $this->config->item('imagemagickinstalldir');\n }\n// if ($img_ext == \"jpg\") {\n// $png_convert = $this->image_lib->convet_jpg_png($tmp_path, $tmp_path . \".png\", $config['library_path']);\n// if ($png_convert) {\n// unlink($tmp_path);\n// rename($tmp_path . \".png\", $tmp_path);\n// }\n// }\n\n if ($type == 'fill') {\n $img_info = getimagesize($tmp_path);\n $org_width = $img_info[0];\n $org_height = $img_info[1];\n\n $width_ratio = $width / $org_width;\n $height_ratio = $height / $org_height;\n if ($width_ratio > $height_ratio) {\n $resize_width = $org_width * $width_ratio;\n $resize_height = $org_height * $width_ratio;\n } else {\n $resize_width = $org_width * $height_ratio;\n $resize_height = $org_height * $height_ratio;\n }\n\n $crop_width = $width;\n $crop_height = $height;\n\n $width = $resize_width;\n $height = $resize_height;\n }\n\n $config['source_image'] = $tmp_path;\n $config['width'] = $width;\n $config['height'] = $height;\n $config['gravity'] = $loc; //center/West/East\n $config['bgcolor'] = (trim($bgcolor) != \"\") ? trim($bgcolor) : $this->config->item('imageresizebgcolor');\n $this->image_lib->initialize($config);\n $this->image_lib->resize();\n\n if ($type == 'fill') {\n $config['source_image'] = $tmp_path;\n $config['width'] = $crop_width;\n $config['height'] = $crop_height;\n $config['gravity'] = 'center';\n $config['maintain_ratio'] = FALSE;\n\n $this->image_lib->initialize($config);\n $this->image_lib->crop();\n }\n }\n }\n\n $this->image_display($tmp_file);\n }", "private function updateImgThumbnail()\n {\n //====================================================================//\n // Load Object Images List\n foreach (Image::getImages(SLM::getDefaultLangId(), $this->ProductId) as $image) {\n $imageObj = new Image($image['id_image']);\n $imagePath = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n if (!file_exists($imagePath.'.jpg')) {\n continue;\n }\n foreach (ImageType::getImagesTypes(\"products\") as $imageType) {\n $imgThumb = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n $imgThumb .= '-'.Tools::stripslashes($imageType['name']).'.jpg';\n if (!file_exists($imgThumb)) {\n ImageManager::resize(\n $imagePath.'.jpg',\n $imgThumb,\n (int)($imageType['width']),\n (int)($imageType['height'])\n );\n }\n }\n }\n }", "function thumbnail($file,$width='120'){\n $name=$this->_dir.DS.$file.'[0]';\n $im = new imagick($name);\n $im->setImageFormat('jpg');\n $im->scaleImage($width,0);\n header('Content-Type: image/jpeg');\n echo $im;\n }", "function save($show = false)\n {\n if ($show)\n {\n @header('Content-Type: image/' . $this->type);\n }\n \n if (!$this->width && !$this->height) \n {\n $this->width = $this->image_width;\n $this->height = $this->image_height;\n } elseif (is_numeric($this->width) && empty($this->height)) {\n $this->height = round($this->width / ($this->image_width / $this->image_height));\n \n } elseif (is_numeric($this->height) && empty($this->width)) {\n $this->width = round($this->height / ($this->image_height / $this->image_width));\n \n } else {\n if ($this->width <= $this->height) \n {\n $height = round($this->width / ($this->image_width / $this->image_height));\n if ($height != $this->height)\n {\n $percentage = ($this->image_height * 100) / $height;\n $this->image_height = round($this->height * ($percentage / 100));\n }\n } else {\n $width = round($this->height / ($this->image_height / $this->image_width));\n if ($width != $this->width)\n {\n $percentage = ($this->image_width * 100) / $width;\n $this->image_width = round($this->width * ($percentage / 100));\n }\n }\n }\n\n if ($this->crop)\n {\n $this->image_width = $this->width;\n $this->image_height = $this->height;\n }\n\n if ($this->type == 'jpeg')\n {\n $image = imagecreatefromjpeg($this->file);\n }\n \n if ($this->type == 'png')\n {\n $image = imagecreatefrompng($this->file);\n }\n \n if ($this->type == 'gif')\n {\n $image = imagecreatefromgif($this->file);\n }\n \n $new_image = imagecreatetruecolor($this->width, $this->height);\n imagecopyresampled($new_image, $image, 0, 0, \n $this->top, \n $this->left,\n $this->width, \n $this->height, \n $this->image_width,\n $this->image_height);\n\n $name = $show ? null : $this->dir . DIRECTORY_SEPARATOR . $this->name . '.' . $this->ext;\n \n if ($this->type == 'jpeg')\n {\n imagejpeg($new_image, $name, $this->quality);\n }\n \n if ($this->type == 'png')\n {\n imagepng($new_image, $name);\n }\n \n if ($this->type == 'gif')\n {\n imagegif($new_image, $name);\n }\n \n imagedestroy($image);\n imagedestroy($new_image);\n }", "public function generate($config)\n {\n // phpcs:disable Magento2.Functions.DiscouragedFunction\n $binaryData = '';\n $data = str_split(sha1($config['image-name']), 2);\n foreach ($data as $item) {\n $binaryData .= base_convert($item, 16, 2);\n }\n $binaryData = str_split($binaryData, 1);\n\n $image = imagecreate($config['image-width'], $config['image-height']);\n $bgColor = imagecolorallocate($image, 240, 240, 240);\n // mt_rand() here is not for cryptographic use.\n // phpcs:ignore Magento2.Security.InsecureFunction\n $fgColor = imagecolorallocate($image, mt_rand(0, 230), mt_rand(0, 230), mt_rand(0, 230));\n $colors = [$fgColor, $bgColor];\n imagefilledrectangle($image, 0, 0, $config['image-width'], $config['image-height'], $bgColor);\n\n for ($row = 10; $row < ($config['image-height'] - 10); $row += 10) {\n for ($col = 10; $col < ($config['image-width'] - 10); $col += 10) {\n if (next($binaryData) === false) {\n reset($binaryData);\n }\n\n imagefilledrectangle($image, $row, $col, $row + 10, $col + 10, $colors[current($binaryData)]);\n }\n }\n\n $mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA);\n $relativePathToMedia = $mediaDirectory->getRelativePath($this->mediaConfig->getBaseTmpMediaPath());\n $mediaDirectory->create($relativePathToMedia);\n\n $imagePath = $relativePathToMedia . DIRECTORY_SEPARATOR . $config['image-name'];\n $imagePath = preg_replace('|/{2,}|', '/', $imagePath);\n $memory = fopen('php://memory', 'r+');\n if(!imagejpeg($image, $memory)) {\n throw new \\Exception('Could not create picture ' . $imagePath);\n }\n $mediaDirectory->writeFile($imagePath, stream_get_contents($memory, -1, 0));\n fclose($memory);\n imagedestroy($image);\n // phpcs:enable\n\n return $imagePath;\n }", "function processImage($dir, $filename)\n{\n // Set up the variables\n $dir = $dir . '/';\n\n // Set up the image path\n $image_path = $dir . $filename;\n\n // Set up the thumbnail image path\n $image_path_tn = $dir . makeThumbnailName($filename);\n\n // Create a thumbnail image that's a maximum of 200 pixels square\n resizeImage($image_path, $image_path_tn, 200, 200);\n\n // Resize original to a maximum of 500 pixels square\n resizeImage($image_path, $image_path, 500, 500);\n}", "private function createImageResource()\n {\n // In case of failure, image will be false\n\n $mimeType = $this->getMimeTypeOfSource();\n\n if ($mimeType == 'image/png') {\n $image = imagecreatefrompng($this->source);\n if ($image === false) {\n throw new ConversionFailedException(\n 'Gd failed when trying to load/create image (imagecreatefrompng() failed)'\n );\n }\n return $image;\n }\n\n if ($mimeType == 'image/jpeg') {\n $image = imagecreatefromjpeg($this->source);\n if ($image === false) {\n throw new ConversionFailedException(\n 'Gd failed when trying to load/create image (imagecreatefromjpeg() failed)'\n );\n }\n return $image;\n }\n\n /*\n throw new InvalidInputException(\n 'Unsupported mime type:' . $mimeType\n );*/\n }", "private function resizeImage($i,$source)\n\t{\n\t\t$mime = $this->mimeType($source);\n \n\t\t$t = imagecreatetruecolor(8, 8);\n\t\t\n\t\t$source = $this->createImage($source);\n\t\t\n\t\timagecopyresized($t, $source, 0, 0, 0, 0, 8, 8, $mime[0], $mime[1]);\n\t\t\n\t\treturn $t;\n\t}", "function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}", "public function addPictureScaled($row, $column, $picture_id, $scale) {\n\t}", "public static function mla_handle_thumbnail_sideload( $input_file, $args ) {\r\n\t\tif ( ! class_exists( 'Imagick' ) ) {\r\n\t\t\treturn self::_mla_error_return( 'Imagick not installed', __LINE__ );\r\n\t\t}\r\n\r\n\t\tif( ini_get( 'zlib.output_compression' ) ) { \r\n\t\t\tini_set( 'zlib.output_compression', 'Off' );\r\n\t\t}\r\n\r\n\t\tif ( ! is_file( $input_file ) ) {\r\n\t\t\treturn self::_mla_error_return( 'File not found: ' . $input_file, __LINE__ );\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Process generation parameters and supply defaults\r\n\t\t */\r\n\t\t$width = isset( $args['width'] ) ? abs( intval( $args['width'] ) ) : 0;\r\n\t\t$height = isset( $args['height'] ) ? abs( intval( $args['height'] ) ) : 0;\r\n\t\t$type = isset( $args['type'] ) ? $args['type'] : 'image/jpeg';\r\n\t\t$quality = isset( $args['quality'] ) ? abs( intval( $args['quality'] ) ) : 0;\r\n\t\t$frame = isset( $args['frame'] ) ? abs( intval( $args['frame'] ) ) : 0;\r\n\t\t$resolution = isset( $args['resolution'] ) ? abs( intval( $args['resolution'] ) ) : 72;\r\n\t\t$best_fit = isset( $args['best_fit'] ) ? (boolean) $args['best_fit'] : false;\r\n\t\t$ghostscript_path = isset( $args['ghostscript_path'] ) ? $args['ghostscript_path'] : '';\r\n\r\n\t\t// Retain WordPress type for _prepare_image and adjust defaults\r\n\t\tif ( 'WordPress' === $type ) {\r\n\t\t\t$mime_type = 'image/jpeg';\r\n\t\t\t$resolution = isset( $args['resolution'] ) ? abs( intval( $args['resolution'] ) ) : 128;\r\n\t\t} else {\r\n\t\t\t$mime_type = $type;\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Convert the file to an image format and load it\r\n\t\t */\r\n\t\ttry {\r\n\t\t\tself::$image = new Imagick();\r\n\r\n\t\t\t/*\r\n\t\t\t * this must be called before reading the image, otherwise has no effect - \r\n\t\t\t * \"-density {$x_resolution}x{$y_resolution}\"\r\n\t\t\t * this is important to give good quality output, otherwise text might be unclear\r\n\t\t\t * default resolution is 72,72 or 128,128 for WordPress thumbnails\r\n\t\t\t */\r\n\t\t\tself::$image->setResolution( $resolution, $resolution );\r\n\r\n\t\t\t$result = self::_ghostscript_convert( $input_file, $frame, $resolution, $mime_type, $ghostscript_path );\r\n\r\n\t\t\tif ( false === $result ) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tself::$image->readImage( $input_file . '[' . $frame . ']' );\r\n\t\t\t\t}\r\n\t\t\t\tcatch ( Exception $e ) {\r\n\t\t\t\t\tself::$image->readImage( $input_file . '[0]' );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( 'image/jpeg' == $mime_type ) {\r\n\t\t\t\t\t$extension = 'JPG';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$extension = 'PNG';\r\n\t\t\t\t}\r\n\r\n\t\t\t\tself::$image->setImageFormat( $extension );\r\n\t\t\t}\r\n\r\n\t\t\tif ( ! self::$image->valid() ) {\r\n\t\t\t\tself::_mla_die( 'File not loaded', __LINE__, 404 );\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch ( Exception $e ) {\r\n\t\t\treturn self::_mla_error_return( 'Image load exception: ' . $e->getMessage(), __LINE__ );\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Prepare the output image; resize and flatten, if necessary.\r\n\t\t * $type retains \"WordPress\" selection\r\n\t\t */\r\n\t\ttry {\r\n\t\t\tself::_prepare_image( $width, $height, $best_fit, $type, $quality );\r\n\t\t\t}\r\n\t\tcatch ( Exception $e ) {\r\n\t\t\treturn self::_mla_error_return( '_prepare_image exception: ' . $e->getMessage(), __LINE__ );\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Write the image to an appropriately-named file\r\n\t\t */\r\n\t\ttry {\r\n\t\t\t$output_file = wp_tempnam( $input_file );\r\n\t\t\tself::$image->writeImage( $output_file );\r\n\t\t\t$dimensions = self::$image->getImageGeometry();\r\n\t\t}\r\n\t\tcatch ( Exception $e ) {\r\n\t\t\t@unlink( $output_file );\r\n\t\t\treturn self::_mla_error_return( 'Image write exception: ' . $e->getMessage(), __LINE__ );\r\n\t\t}\r\n\r\n\t\t// array based on $_FILE as seen in PHP file uploads\r\n\t\t$results = array(\r\n\t\t\t'name' => basename( $input_file ),\r\n\t\t\t'type' => $mime_type,\r\n\t\t\t'tmp_name' => $output_file,\r\n\t\t\t'error' => 0,\r\n\t\t\t'size' => filesize( $output_file ),\r\n\t\t\t'width' => $dimensions['width'],\r\n\t\t\t'height' => $dimensions['height'],\r\n\t\t);\t\t\r\n\r\n\t\treturn\t$results;\r\n\t}", "protected function save()\n {\n switch ($this->image_info['mime']) {\n \n case 'image/gif':\n imagegif($this->image, $this->getPath(true));\n break;\n \n case 'image/jpeg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/jpg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/png':\n imagepng($this->image, $this->getPath(true), round($this->quality / 10));\n break;\n \n default:\n $_errors[] = $this->image_info['mime'] . ' images are not supported';\n return $this->errorHandler();\n break;\n }\n \n chmod($this->getPath(true), 0777);\n }", "public static function scale($fname,$max_image_size=600,$flag='image',$quality=100,$max_image_side=600,$max_thumb_size=300,$max_thumb_height=120,$thumb_scale=1) // scale image/thumbnail\n\t{\n\t\tif(ini_get('memory_limit')<100)\n\t\t\tini_set('memory_limit','100M'); // fix for serevrs with low memory limit\n\n\t\tif($flag=='rescaleimage')\n\t\t{\n\t\t\t$full_fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\tif(file_exists($full_fname))\n\t\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($full_fname);\n\t\t\telse\n\t\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($fname);\n\t\t}\n\t\telse\n\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($fname);\n\n\t\t$thumb=$flag=='thumb'||$flag=='rescalethumb';\n\t\t$max_size_param=$thumb?$max_thumb_size:$max_image_size;\n\t\tif($orig_width>$max_size_param||$orig_height>$max_size_param)\n\t\t{\n\t\t\tif($flag=='image')\n\t\t\t{\n\t\t\t\t$new_fname=$fname;\n\t\t\t\t$fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\trename($new_fname,$fname);\n\t\t\t}\n\t\t\telseif($flag=='rescaleimage')\n\t\t\t{\n\t\t\t\t$final_name=$fname;\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_tempimg\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\tif(file_exists($full_fname))\n\t\t\t\t{\n\t\t\t\t\tcopy($full_fname,$fname);\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($flag=='rescalethumb')\n\t\t\t{\n\t\t\t\t$final_name=substr($fname,0,strrpos($fname,\".\")).\"_thumb\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_thumb_tempimg\".substr($fname,strrpos($fname,\".\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_thumb\".substr($fname,strrpos($fname,\".\"));\n\t\t\t}\n\n\t\t\t$ratio=$orig_width/$orig_height;\n\n\t\t\tif($thumb_scale==2)\n\t\t\t\t$scaling='crop';\n\t\t\telse\n\t\t\t\t$scaling='default';\n//scaling_mode\n\t\t\tif(!$thumb||$scaling=='default') //old scaling\n\t\t\t{\n\t\t\t\tif($orig_width>=$orig_height)\n\t\t\t\t{\n\t\t\t\t\t$new_width=$max_size_param;\n\t\t\t\t\t$new_height=intval($max_size_param/$ratio);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_width=intval($max_size_param*$ratio);\n\t\t\t\t\t$new_height=$max_size_param;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($orig_width>=$orig_height)\n\t\t\t\t{\n\t\t\t\t\t$new_height=$max_thumb_height;\n\t\t\t\t\t$new_width=intval($new_height*$ratio);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_width=$max_size_param;\n\t\t\t\t\t$new_height=intval($new_width/$ratio);\n\t\t\t\t}\n\t\t\t}\n// Resample\n\t\t\t$image_p=@imagecreatetruecolor($new_width,$new_height);\n\t\t\t$image=self::gdCreate($img_type,$fname);\n//transparency\n\t\t\tif($img_type==1||$img_type==3)\n\t\t\t{\n\t\t\t\t$trnprt_indx=imagecolortransparent($image);\n\t\t\t\tif($trnprt_indx>=0)\n\t\t\t\t{\n\t\t\t\t\t$trnprt_color=imagecolorsforindex($image,$trnprt_indx);\n\t\t\t\t\t$trnprt_indx=imagecolorallocate($image_p,$trnprt_color['red'],$trnprt_color['green'],$trnprt_color['blue']);\n\t\t\t\t\timagefill($image_p,0,0,$trnprt_indx);\n\t\t\t\t\timagecolortransparent($image_p,$trnprt_indx);\n\t\t\t\t}\n\t\t\t\telseif($img_type==3)\n\t\t\t\t{\n\t\t\t\t\timagealphablending($image_p,false);\n\t\t\t\t\t$color=imagecolorallocatealpha($image_p,0,0,0,127);\n\t\t\t\t\timagefill($image_p,0,0,$color);\n\t\t\t\t\timagesavealpha($image_p,true);\n\t\t\t\t}\n\t\t\t}\n//end transparency\n\t\t\tif($image!='')\n\t\t\t{\n\t\t\t\timagecopyresampled($image_p,$image,0,0,0,0,$new_width,$new_height,$orig_width,$orig_height);\n\n\t\t\t\tself::gdSave($image_p,$new_fname,$quality,$img_type); // Save image\n\t\t\t\timagedestroy($image_p);\n\t\t\t\timagedestroy($image);\n\t\t\t\tif($flag=='rescalethumb'||$flag=='rescaleimage')\n\t\t\t\t{\n\t\t\t\t\tunlink($final_name);\n\t\t\t\t\trename($new_fname,$final_name);\n\t\t\t\t}\n\t\t\t\treturn $new_fname;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telseif($flag=='image')\n\t\t{\n\t\t\t$full_fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\tcopy($fname,$full_fname);\n\t\t\treturn $fname;\n\t\t}\n\t\telse\n\t\t\treturn $fname;\n\t}", "function upload_passport($path, $ext, $sn) {\n $img_url = 'passport' . $sn . '-' . date('mdYHis.') . $ext;\n move_uploaded_file($path, \"temp_img/\" . $img_url);\n $resizeObj = new resize(\"temp_img/\" . $img_url);\n $resizeObj->resizeImage(280, 350, 'crop');\n $resizeObj->saveImage(\"pics/\" . $img_url, 100);\n unlink(\"temp_img/\" . $img_url);\n return $img_url;\n}", "public function updateTemplateImage( VIRTUALGIFTS_BOL_Template $template, $file )\n {\n $time = time();\n $ext = UTIL_File::getExtension($file['name']);\n \n $pluginFilesPath = $this->getGiftPluginFilesPath($template->id, $time, $ext);\n \n if ( move_uploaded_file($file['tmp_name'], $pluginFilesPath) )\n {\n $filePath = $this->getGiftFilePath($template->id, $time, $ext);\n \n $storage = OW::getStorage();\n $storage->copyFile($pluginFilesPath, $filePath);\n @unlink($pluginFilesPath);\n \n // remove old image\n $filePath = $this->getGiftFilePath($template->id, $template->uploadTimestamp, $template->extension);\n $storage->removeFile($filePath);\n \n // update template dto\n $template->extension = $ext;\n $template->uploadTimestamp = $time;\n $this->templateDao->save($template);\n \n return true;\n }\n \n return false;\n }", "public function store(CreateImageRequest $request)\n {\n // uploaded vinyl cover or URL\n if($request->hasFile('imageFile')){\n $path = public_path() . '/uploads';\n $file = $request->file('imageFile');\n $fileName = time(). '_' .$file->getClientOriginalName();\n $file->move($path,$fileName);\n $image = $fileName;\n }\n $image = Image::create([\n 'project_id' => $request->input('project_id'),\n 'position' => 1,\n 'filename' => $image\n ]);\n if($image){\n $filename = substr($image->filename, 0, -4);\n // Resize image\n $img640 = Resizer::make('uploads/'.$image->filename)->widen(640);\n $img1280 = Resizer::make('uploads/'.$image->filename)->widen(1280);\n $img1920 = Resizer::make('uploads/'.$image->filename)->widen(1920);\n $img2560 = Resizer::make('uploads/'.$image->filename)->widen(2560);\n // Save images\n $img640->save('uploads/'.$filename.'_640.png');\n $img1280->save('uploads/'.$filename.'_1280.png');\n $img1920->save('uploads/'.$filename.'_1920.png');\n $img2560->save('uploads/'.$filename.'_2560.png');\n flash()->success('Image uploaded successfully!');\n }\n else{\n flash()->error('Oops! Something went wrong.');\n }\n return redirect(route('backend'));\n }", "function Utilities_Image(){\n\t\t// $this->$imageAsset = $img;\t\t\n\t}", "private function _resizeThumbnailImage($thumb_image_name, $image, $width, $height, $src_width, $src_height, $scale){\n\t\t$newImageWidth = ceil($width * $scale);\n\t\t$newImageHeight = ceil($height * $scale);\n\t\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\t\t$source = imagecreatefromjpeg($image);\n\t\timagecopyresampled($newImage,$source,0,0,0,0,$width,$height,$src_width,$src_height);\n\t\timagejpeg($newImage,$thumb_image_name,90);\n\t\tchmod($thumb_image_name, 0777);\n\t\t//return $thumb_image_name;\n\t}", "public function storeToStorage(\n StringRuleParameter $filename,\n StringRuleParameter $path,\n ImageRatioParameter $width,\n ImageRatioParameter $height,\n mixed $new_image_file,\n mixed $old_image_file)\n {\n if (!in_array($new_image_file->getClientOriginalExtension(), ['jpg', 'jpeg', 'png'])) {\n throw new InvalidArgumentException(\"InvalidArgumentException: please input a valid image format, `.jpg, .jpeg, .png`\");\n }\n\n $formatted_picture = $filename->string.'-'.time().'.'.$new_image_file->getClientOriginalExtension();\n\n if (!file_exists(storage_path(\"app/public/\".$path->string.\"/\"))) {\n mkdir(storage_path(\"app/public/\".$path->string.\"/\"), 0775, true);\n }\n\n if ((!is_null($old_image_file)) && Storage::exists(\"/public/\".$path->string.\"/\".StupImageFunctions::getFileName($old_image_file))) {\n Storage::delete(\"/public/\".$path->string.\"/\".StupImageFunctions::getFileName($old_image_file));\n }\n\n ImageIntervention::make($new_image_file)->resize($width->ratio, $height->ratio)->save(storage_path(\"app/public/\".$path->string.\"/\".$formatted_picture));\n\n return url(\"storage/\".$path->string.\"/$formatted_picture\");\n }", "function imageResize($width, $height, $target){\n //formula accordingly...this is so this script will work\n //dynamically with any size image\n\n if ($width > $height) {\n $percentage = ($target / $width);\n } else {\n $percentage = ($target / $height);\n }\n\n //gets the new value and applies the percentage, then rounds the value\n $width = round($width * $percentage);\n $height = round($height * $percentage);\n\n //returns the new sizes in html image tag format...this is so you\n //\tcan plug this function inside an image tag and just get the\n\n return \"width=\".$width.\" height=\".$height.\"\";\n\n }", "public function store(Request $request)\n {\n $request->validate([\n 'title' => 'required',\n 'detail' => 'required',\n 'photo'=>'required|mimes:jpg,png,jpeg|max:2048',\n ]);\n\n\n if($request->hasFile('photo')) {\n\n $newImageName=uniqid().'_'. $request->_token.'.'.$request->photo->extension();\n\n\n $file = $request->file('photo');\n $file_name =$newImageName;\n $destinationPath = 'images/package/';\n $new_img = Image::make($file->getRealPath())->resize(true, true);\n\n// save file with medium quality\n $new_img->save($destinationPath . $file_name, 100);\n $new_img->save($destinationPath.'thumbnails/' . $file_name, 15);\n\n $request->photo->move(public_path('images/package'),$newImageName);\n\n }\n\n\n\n $insert = [\n 'slug' => SlugService::createSlug(Product::class, 'slug', $request->title.'-'.$request->_token),\n 'title' => $request->title,\n 'detail' => $request->detail,\n 'offer' => $request->offer,\n 'length' => $request->length,\n 'tags' => $request->tags,\n 'photo'=>'/images/package/'.$newImageName,\n 'thumb'=>'/images/package/thumbnails/'.$newImageName,\n ];\n\n Product::insertGetId($insert);\n\n return redirect()->back()->with('success','Greate! Package created successfully.');\n }", "function generateImage($source_file, $cache_file, $resolution_req) {\t/* Renamed $resolution to $resolution_req(ested), to not confuse this with the global variable! */\n \n global $sharpen, $sharpen_amount, $sharpen_progressive;\n\t\tglobal $jpg_quality, $jpg_quality_retina, $jpg_quality_progressive;\n\t\tglobal $setup_ratio, $wp_setup_ratio;\n global $is_highppi;\n\t\t\n\n\t\t// Double-check, if path exists and is writable\n $cache_dir = dirname($cache_file);\n\n /* does the directory exist already? */\n if (!is_dir($cache_dir)) { \n if (!mkdir($cache_dir, 0755, true)) {\n /* check again if it really doesn't exist to protect against race conditions */\n if (!is_dir($cache_dir)) {\n sendErrorImage(\"Failed to create cache directory: $cache_dir\");\n \t}\n \t}\n \t}\n\n if (!is_writable($cache_dir)) {\n sendErrorImage(\"The cache directory is not writable: $cache_dir\");\n \t}\n\t\t\n\t\t\n $extension = strtolower(pathinfo($source_file, PATHINFO_EXTENSION));\n\n /* Check the image dimensions */\n $dimensions = GetImageSize($source_file);\n $width = $dimensions[0];\n $height = $dimensions[1];\n\t\t\n\n /* Do we need to downscale the image? */\n /* because of cropping, we need to prozess the image\n if ($width <= $resolution) { // no, because the width of the source image is already less than the client width\n return $source_file;\n }\n */\n \n // General quality setting\n $jpg_quality_high = $jpg_quality;\n\t\tif ($is_highppi) $jpg_quality = $jpg_quality_retina;\n\t\t\n\n\t\t \n\t\t// TODO! ################\n\t\t// When jpg_quality_progressive \n\t\t// Do some clever stuff to only scale and compress when necessary\n\t\t// Or maybe even serve the original file\n\t\t\n\t\tif ($jpg_quality_progressive) {\n\t\t\t\n\t\t\t\t// Give slighly higher quality, when requested image is already very small\n\t\t\t\t$threshold_min = 320; /* px */\n\t\t\t\tif ($resolution_req <= $threshold_min and !$is_highppi) $jpg_quality = ($jpg_quality+1 > 100) ? 100 : $jpg_quality + 1;\n\t\t\t\tif ($resolution_req <= $threshold_min*1.5 and $is_highppi) $jpg_quality = ($jpg_quality+2 > 99) ? 99 : $jpg_quality + 2;\n\t\t\t\t\n\t\t\t\t// Lower quality just a bit more, when image should become relatively huge\n\t\t\t\t$threshold_max = 1280; /* px */\n\t\t\t\tif ( $resolution_req > $threshold_max and !$is_highppi) $jpg_quality = $jpg_quality - 3;\n\t\t\t\tif ( $resolution_req > $threshold_max*1.5 and $is_highppi) $jpg_quality = $jpg_quality - 2;\n\n\t\t\t\t// In case no cropping needs to be done and no high-ppi compression, and no resizing at all: we can serve the source file\n\t\t\t\tif (!$setup_ratio and $width <= $resolution_req and !$is_highppi) return $source_file;\n\t\t\t\tif (!$wp_setup_ratio and $width <= $resolution_req and !$is_highppi) return $source_file;\n\t\t\n\t\t\t\t}\n\n\n\n\t\t// Progressive Sharpening\n\t\tif ( $sharpen_progressive ) {\n\t\t\t$factor = $resolution_req / $width;\n\t\t\t$sharpen_amount = $sharpen_amount * ( 1 - pow($factor,3) );\n\t\t\t$sharpen_amount = ($sharpen_amount > 0) ? floor($sharpen_amount) : 0;\n\t\t\t}\n\t\t\n\n \n /* We need to resize the source image to the width of the resolution breakpoint we're working with */\n $ratio = $height / $width;\n if ($width <= $resolution_req) {\n \t\t$new_width = $width;\n }\n else {\n \t$new_width = $resolution_req;\n }\n \n $new_height = ceil($new_width * $ratio);\n \n $debug_width = $new_width;\n $debug_height = $new_height;\n \n $start_x = 0;\n $start_y = 0;\n \n\t\t\n\t\t// In case something about cropping is to be done\n if ( $setup_ratio or $wp_setup_ratio) {\n\n /* set height for new image */ \n $orig_ratio = $new_width / $new_height;\n \n\t\t\t// Set crop ration, but priorize the one of the size terms\n $crop_ratio = ($setup_ratio) ? $setup_ratio : $wp_setup_ratio;\n\t\t\t\n $ratio_diff = $orig_ratio / $crop_ratio;\n $ini_new_height = ceil($new_height * $ratio_diff);\n \n $dst = ImageCreateTrueColor($new_width, $ini_new_height); /* re-sized image */\n \n $debug_width = $new_width;\n $debug_height = $ini_new_height;\n \n /* set new width and height for skaleing image to fit new height */\n \n if($ini_new_height > $new_height) {\n $crop_factor = $ini_new_height / $new_height;\n $temp_new_width = ceil($new_width * $crop_factor);\n $new_height = ceil($new_height * $crop_factor);\n $start_x = ($new_width - $temp_new_width) / 2;\n $new_width = $temp_new_width;\n }\n else {\n $start_y = -($new_height - $ini_new_height) / 2;\n }\n }\n else {\n $dst = ImageCreateTrueColor($new_width, $new_height); /* re-sized image */\n }\n \n switch ($extension) {\n case 'png':\n $src = @ImageCreateFromPng($source_file); \t/* original image */\n break;\n case 'gif':\n $src = @ImageCreateFromGif($source_file); \t/* original image */\n break;\n default:\n $src = @ImageCreateFromJpeg($source_file); \t/* original image */\n ImageInterlace($dst, true); \t\t\t\t/* Enable interlancing (progressive JPG, smaller size file) */\n break;\n }\n if($extension=='png') {\n imagealphablending($dst, false);\n imagesavealpha($dst,true);\n $transparent = imagecolorallocatealpha($dst, 255, 255, 255, 127);\n imagefilledrectangle($dst, 0, 0, $new_width, $new_height, $transparent);\n }\n \n ImageCopyResampled($dst, $src, $start_x, $start_y, 0, 0, $new_width, $new_height, $width, $height); /* do the resize in memory */\n \n /* debug mode */\n global $debug_mode;\n\t\tglobal $wp, $wp_width, $wp_height, $fallback;\n\t\t\n if($debug_mode) {\n \t\n\t\t\t$color = imagecolorallocate($dst, 255, 0, 255); // Use fresh magenta\n\t\t\t\n // first debug line: write a textstring with dimensions etc.\n $cookie_data = explode(',', $_COOKIE['resolution']);\n $debug_ratio = false;\n\t \tif( $setup_ratio ) $debug_ratio = $setup_ratio . ':1';\n imagestring( $dst, 5, 10, 5, $debug_width.\" x \".$debug_height . ' ' . $debug_ratio . ' device:' . $cookie_data[0] . '*' . $cookie_data[1] . '=' . ceil($cookie_data[0] * $cookie_data[1]) . $addonstring, $color);\n\t \n\t \t// second debug line: show size term if provided\n\t \t$secondline = $_GET['size'];\n\t \timagestring( $dst, 5, 10, 20, $secondline, $color);\n\n\t\t\t// Third line: Wpordpress detection active\n\t\t\tif ( $wp ) $thirdline = \"Wordpress detection is active!\";\n\t\t\timagestring( $dst, 5, 10, 35, $thirdline, $color);\n\t\t\t\n\t\t\t// Fourth debug line: is fallback active?\n\t\t \tif ( $fallback ) $fourthline = \"Fallback active!\";\n\t\t \timagestring( $dst, 5, 10, 50, $fourthline, $color);\n\t\t\t\n\t\t\t$fifthline = \"Sharpen Amount: \" . $sharpen_amount;\n\t\t\timagestring( $dst, 5, 10, 65, $fifthline, $color);\n\t\t\t\n }\n\n \n ImageDestroy($src);\n\n\n\n /* sharpen the image */\n if($sharpen == TRUE) {\n $amount = $sharpen_amount; /* max 500 */\n $radius = '1'; /* 50 */\n $threshold = '0'; /* max 255 */\n \n if ( strtolower($extension) == 'jpg' OR strtolower($extension) == 'jpeg') {\n if($amount !== '0') $dst = UnsharpMask($dst, $amount, $radius, $threshold);\n }\n }\n\n\n\n /* save the new file in the appropriate path, and send a version to the browser */\n switch ($extension) {\n case 'png':\n $gotSaved = ImagePng($dst, $cache_file);\n break;\n case 'gif':\n $gotSaved = ImageGif($dst, $cache_file);\n break;\n default:\n $gotSaved = ImageJpeg($dst, $cache_file, $jpg_quality);\n break;\n }\n ImageDestroy($dst);\n\n if (!$gotSaved && !file_exists($cache_file)) {\n sendErrorImage(\"Failed to create image: $cache_file\");\n }\n\n return $cache_file;\n\t\t\n }", "private function saveImage($file, $var_image){\n\n //create instance of image from temp upload\n $image = \\Image::make($file->getRealPath());\n\n //save image with thumbnail\n $image->save(public_path() . '/imgs/library/' . $var_image) \n ->resize(200, 200)\n ->save(public_path() . '/imgs/library/thumbnails/thumb-' . $var_image);\n }", "function wp_create_image_subsizes($file, $attachment_id)\n {\n }", "public function setImage() {\n\t\t$target_dir = UPROOT;\n\t\t$target_name = basename($_FILES['image']['name']);\n\t\t$tmp_name = $_FILES['image']['tmp_name'];\n\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\t\t//just in case file already exist ill append time and date\n\t\t$timeStamp = date(\"Y-m-d_H:i:s\");\n\t\t//checking if file with the same name already exists\n\t\t$append = $this->clean($timeStamp);\n\t\tif (file_exists($target_file)) {\n\t\t\t//renaming the new file by exploding it\n\t\t\t$fileName = explode('.', $target_name);\n\t\t\t$target_name = $fileName[0] . '.' . $append . '.' . $fileName[1];\n\t\t\t//reassign the folder path\n\t\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\n\t\t}\n\t\t$imageFileType = strtolower(pathinfo($target_file, PATHINFO_EXTENSION));\n\t\t$check = getimagesize($tmp_name);\n\t\t$size = $_FILES[\"image\"][\"size\"];\n\t\t$img = [\n\t\t\t'name' => $target_name,\n\t\t\t'fileType' => $imageFileType,\n\t\t\t'tmp_name' => $tmp_name,\n\t\t\t'target_file' => $target_file,\n\t\t\t'check' => $check,\n\t\t\t'size' => $size,\n\t\t];\n\t\treturn $img;\n\t}", "public function createThumbnail($imageName,$newWidth,$newHeight) {\n $path = $this->img_dir . '/' . $imageName;\n $mime_info = getimagesize($path);\n $mime = $mime_info['mime'];\n\n $src_img = $this->image_data($path, $mime);\n if($src_img===false) return false;\n\n $old_w = imageSX($src_img);\n $old_h = imageSY($src_img);\n\n $source_aspect_ratio = $old_w / $old_h;\n $desired_aspect_ratio = $newWidth / $newHeight;\n\n if ($source_aspect_ratio > $desired_aspect_ratio) {\n /*\n * Triggered when source image is wider\n */\n $thumb_h = $newHeight;\n $thumb_w = ( int ) ($newHeight * $source_aspect_ratio);\n } else {\n /*\n * Triggered otherwise (i.e. source image is similar or taller)\n */\n $thumb_w = $newWidth;\n $thumb_h = ( int ) ($newWidth / $source_aspect_ratio);\n }\n\n $dst_img = ImageCreateTrueColor($thumb_w,$thumb_h);\n\n $color = imagecolorallocatealpha($dst_img, 0, 0, 0, 127);\n imagefill($dst_img,0,0,$color);\n imagesavealpha($dst_img, true);\n\n imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $thumb_w, $thumb_h, $old_w, $old_h);\n\n if($this->is_crop_hard) {\n $x = ($thumb_w - $newWidth) / 2;\n $y = ($thumb_h - $newHeight) / 2;\n\n $tmp_img = imagecreatetruecolor($newWidth, $newHeight);\n $color = imagecolorallocatealpha($tmp_img, 0, 0, 0, 127);\n imagefill($tmp_img,0,0,$color);\n imagesavealpha($tmp_img, true);\n\n imagecopy($tmp_img, $dst_img, 0, 0, $x, $y, $newWidth, $newHeight);\n $dst_img = $tmp_img;\n }\n\n $new_thumb_loc = $this->thumb_dir . $imageName;\n $result = $this->save($dst_img, $new_thumb_loc, $mime);\n\n imagedestroy($dst_img);\n imagedestroy($src_img);\n return $result;\n }", "function reg_image_sizes() {\n add_image_size( 'medium', 480, 0, false );\n add_image_size( 'medium-large', 500, 0, false );\n add_image_size( 'large', 600, 0, false );\n}", "function img_resize( $tmpname, $size, $save_dir, $save_name )\r\n {\r\n $save_dir .= ( substr($save_dir,-1) != \"/\") ? \"/\" : \"\";\r\n $gis = GetImageSize($tmpname);\r\n $type = $gis[2];\r\n switch($type)\r\n {\r\n case \"1\": $imorig = imagecreatefromgif($tmpname); break;\r\n case \"2\": $imorig = imagecreatefromjpeg($tmpname);break;\r\n case \"3\": $imorig = imagecreatefrompng($tmpname); break;\r\n default: $imorig = imagecreatefromjpeg($tmpname);\r\n }\r\n\r\n $x = imageSX($imorig);\r\n $y = imageSY($imorig);\r\n if($gis[0] <= $size)\r\n {\r\n $av = $x;\r\n $ah = $y;\r\n }\r\n else\r\n {\r\n $yc = $y*1.3333333;\r\n $d = $x>$yc?$x:$yc;\r\n $c = $d>$size ? $size/$d : $size;\r\n $av = $x*$c; \r\n $ah = $y*$c; \r\n } \r\n $im = imagecreate($av, $ah);\r\n $im = imagecreatetruecolor($av,$ah);\r\n if (imagecopyresampled($im,$imorig , 0,0,0,0,$av,$ah,$x,$y))\r\n if (imagejpeg($im, $save_dir.$save_name))\r\n\t\t return true;\r\n else\r\n return false;\r\n }", "public function save() {\n// is there an image resource and file location to work with?\n if (isset($this->_resource, $this->_file_location)) {\n switch ($this->_mimetype) {\n case \"image/jpeg\":\n imagejpeg($this->_resource, $this->_file_location);\n break;\n case \"image/png\":\n imagepng($this->_resource, $this->_file_location);\n break;\n case \"image/gif\":\n imagegif($this->_resource, $this->_file_location);\n break;\n }\n } else {\n trigger_error(\"CAMEMISResizeImage::save() attempting to access a non-existent resource (check if the image was loaded by CAMEMISResizeImage::__construct())\", E_USER_WARNING);\n }\n\n return $this;\n }", "function themify_make_image_size( $attachment_id, $width, $height, $meta, $img_url ) {\r\n\t\tsetlocale( LC_CTYPE, get_locale() . '.UTF-8' );\r\n\t\t$attached_file = get_attached_file( $attachment_id );\r\n\r\n\t\t$source_size = apply_filters( 'themify_image_script_source_size', 'large' );\r\n\t\tif ( $source_size !== 'full' && isset( $meta['sizes'][ $source_size ]['file'] ) )\r\n\t\t\t$attached_file = str_replace( $meta['file'], trailingslashit( dirname( $meta['file'] ) ) . $meta['sizes'][ $source_size ]['file'], $attached_file );\r\n\r\n\t\t$resized = image_make_intermediate_size( $attached_file, $width, $height, true );\r\n\t\tif ( $resized && ! is_wp_error( $resized ) ) {\r\n\r\n\t\t\t// Save the new size in meta data\r\n\t\t\t$key = sprintf( 'resized-%dx%d', $width, $height );\r\n\t\t\t$meta['sizes'][$key] = $resized;\r\n\t\t\t$img_url = str_replace( basename( $img_url ), $resized['file'], $img_url );\r\n\r\n\t\t\twp_update_attachment_metadata( $attachment_id, $meta );\r\n\r\n\t\t\t// Save size in backup sizes so it's deleted when original attachment is deleted.\r\n\t\t\t$backup_sizes = get_post_meta( $attachment_id, '_wp_attachment_backup_sizes', true );\r\n\t\t\tif ( ! is_array( $backup_sizes ) ) $backup_sizes = array();\r\n\t\t\t$backup_sizes[$key] = $resized;\r\n\t\t\tupdate_post_meta( $attachment_id, '_wp_attachment_backup_sizes', $backup_sizes );\r\n\r\n\t\t\t// Return resized image url, width and height.\r\n\t\t\treturn array(\r\n\t\t\t\t'url' => esc_url( $img_url ),\r\n\t\t\t\t'width' => $width,\r\n\t\t\t\t'height' => $height,\r\n\t\t\t);\r\n\t\t}\r\n\t\t// Return original image url, width and height.\r\n\t\treturn array(\r\n\t\t\t'url' => $img_url,\r\n\t\t\t'width' => $width,\r\n\t\t\t'height' => $height,\r\n\t\t);\r\n\t}", "function resize_image($filename)\n {\n $img_source = 'assets/images/products/'. $filename;\n $img_target = 'assets/images/thumb/';\n\n // image lib settings\n $config = array(\n 'image_library' => 'gd2',\n 'source_image' => $img_source,\n 'new_image' => $img_target,\n 'maintain_ratio' => FALSE,\n 'width' => 128,\n 'height' => 128\n );\n // load image library\n $this->load->library('image_lib', $config);\n\n // resize image\n if(!$this->image_lib->resize())\n echo $this->image_lib->display_errors();\n $this->image_lib->clear();\n }" ]
[ "0.65270466", "0.64864707", "0.6107725", "0.6106328", "0.6074078", "0.5992324", "0.58887035", "0.58242536", "0.582168", "0.58132875", "0.5789498", "0.57548535", "0.57490224", "0.57387966", "0.5704424", "0.5661739", "0.5659689", "0.5622696", "0.56223285", "0.5608702", "0.5559421", "0.5556174", "0.5550665", "0.5517502", "0.5478296", "0.5477829", "0.5477583", "0.54640096", "0.5443708", "0.54351574", "0.54308045", "0.5429265", "0.5405753", "0.53919804", "0.5391068", "0.53629816", "0.53575474", "0.53489596", "0.53482175", "0.5340443", "0.5336908", "0.5331162", "0.53302544", "0.5323302", "0.5313082", "0.5306424", "0.5301314", "0.52907145", "0.52873755", "0.5274002", "0.5260207", "0.52583486", "0.5240431", "0.52343285", "0.52231026", "0.52176106", "0.52165794", "0.52143943", "0.5212637", "0.52113605", "0.52003604", "0.5197429", "0.5191609", "0.51860964", "0.5185629", "0.5183852", "0.51714057", "0.5171094", "0.51688224", "0.51681095", "0.5159569", "0.5153872", "0.51525325", "0.51461947", "0.51435286", "0.51403165", "0.51340383", "0.51314926", "0.51297057", "0.5126203", "0.51241606", "0.5123733", "0.5122723", "0.5113486", "0.5112615", "0.51117456", "0.51067615", "0.510123", "0.51002693", "0.5095182", "0.50845057", "0.50843716", "0.50830084", "0.50775063", "0.50655466", "0.5062489", "0.50547826", "0.50542766", "0.5045305", "0.50382316" ]
0.69095236
0
Makes sure only allowed parameters are accepted, and merges them with the $params property.
protected function _setInputParams(Array &$params) { foreach ($params as $paramKey => $paramValue) { if ( in_array($paramKey, $this->args, true) && !is_null($paramValue) ) { $this->inputParams[$paramKey] = $paramValue; } } $this->params = array_merge($this->params, $this->inputParams); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function filterParams()\n {\n }", "public function allowedParams(): array\n {\n return [\n 'title',\n 'year'\n ];\n }", "public function parseParams($allowedParams)\n {\n $this->allowedParams = $allowedParams;\n $this->setDefaultParams();\n\n foreach ($this->rawParams as $checkParam => $value) {\n if (! $paramOptions = $this->getParamOptions($checkParam)) {\n continue;\n }\n\n $param = $paramOptions['param'];\n $options = $paramOptions['options'];\n\n $paramValue = $this->getParamValue($param, $options, $value);\n if (isset($this->params[$param]) && is_array($this->params[$param])) {\n $this->params[$param] = array_merge($this->params[$param], $paramValue);\n } else {\n $this->params[$param] = $paramValue;\n }\n }\n }", "public static function validateParameters(array $params) {\n $allowed = self::ALLOWED_PARAMETERS;\n $prepared = [];\n foreach($params as $key => $value) {\n if(in_array($key, $allowed)) {\n $prepared[$key] = $value;\n }\n }\n return $prepared;\n }", "public function getAllowedParams() {\n return array(\n 'id' => array (\n ApiBase::PARAM_TYPE => 'integer',\n ApiBase::PARAM_REQUIRED => true\n ),\n 'comment'=>array(\n ApiBase::PARAM_TYPE => 'text',\n ApiBase::PARAM_REQUIRED => true\n )\n );\n }", "protected function validateParameters($params) {\n return true;\n }", "protected function setDefaultParams()\n {\n foreach ($this->allowedParams as $param => $options) {\n $this->params[$param] = null;\n if (! empty($options['arguments'])) {\n $this->params[$param] = array();\n foreach ($options['arguments'] as $arg => $opts) {\n if (! empty($opts['default'])) {\n $cast = ! empty($opts['cast']) ? $opts['cast'] : 'string';\n $this->params[$param][$arg] = $this->castValue($cast, $opts['default']);\n }\n }\n } elseif (! empty($options['default'])) {\n $cast = ! empty($options['cast']) ? $options['cast'] : 'string';\n $this->params[$param] = $this->castValue($cast, $options['default']);\n }\n }\n }", "protected function clean_params($params)\n\t{\n\t\tif(!self::$blacklist) return $params;\n\n\t\tforeach ($params as $key => $value) {\n\t\t\tif(preg_match(\"/(\" . implode(\")|(\", self::$blacklist) . \")/i\", $key)) {\n\t\t\t\t$params[$key] = '[FILTERED]';\n\t\t\t}else if(is_array($value)){\n\t\t\t\t$params[$key] = $this->clean_params($value);\n\t\t\t}\n\t\t}\n\n\t\treturn $params;\n\t}", "function handle_request_body_params() {\n // Merges HTTP Request body with the instance parameters,\n // instance params have priority for security reasons\n $body = $this->get_request_body();\n $params = $body ? $this->decode($body) : null;\n $this->params = xUtil::array_merge(xUtil::arrize($params), $this->params);\n }", "function allowed_get_params($allowed_params = []){\r\n //$allowed_array will contain only allowed url parameters\r\n $allowed_array = [];\r\n foreach($allowed_params as $param){\r\n if(isset($_GET[$param])){\r\n $allowed_array[$param] = $_GET[$param];\r\n }else{\r\n $allowed_array[$param] = NULL;\r\n }\r\n }\r\n return $allowed_array;\r\n\r\n}", "private function _setParams()\n\t{\n\t\tforeach ($_GET as $key => $value) {\n\t\t\t$this->_params[$key] = $this->_sanitize($value);\n\t\t}\n\n\t\tforeach ($_POST as $key => $value) {\n\t\t\t$_POST[$key] = $this->_sanitize($value);\n\t\t}\n\n\t\t$nbElements = count($this->_requestVars);\n\t\tif ($nbElements > 3) {\n\t\t\t$i = 2;\n\t\t\twhile ($i < $nbElements and $i + 1 < $nbElements) {\n\t\t\t\tif (ctype_digit($this->_requestVars[$i])) {\n\t\t\t\t\t$i += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$this->_params[$this->_requestVars[$i]] = $this->_sanitize($this->_requestVars[$i + 1]);\n\t\t\t\t$i += 2;\n\t\t\t}\n\t\t}\n\n\t\tif ($nbElements > 2) {\n\t\t\t$i = 2;\n\t\t\twhile ($i < $nbElements) {\n\t\t\t\t$this->_params[$i - 2] = $this->_sanitize($this->_requestVars[$i]);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "function set_allowed_uri_params_list()\r\n{\r\n //allowed params disabled. All allowed\r\n//\tif ($ar_params = func_get_args())\r\n//\t{\r\n//\t\tglobal $tpl_allowed_uri_params_list;\r\n//\r\n//\t\tif (is_array($tpl_allowed_uri_params_list))\r\n//\t\t{\r\n//\t\t\tforeach ($ar_params as $val)\r\n//\t\t\t{\r\n//\t\t\t\t$tpl_allowed_uri_params_list[] = $val;\r\n//\t\t\t}\r\n//\t\t}\r\n//\t\telse\r\n//\t\t{\r\n//\t\t\t$tpl_allowed_uri_params_list = $ar_params;\r\n//\t\t}\r\n//\t}\r\n}", "public function _clean_by_params($params = [])\n {\n }", "public function prepareRequest(&$params) {\n $attributeas = (array) $this->getParams();\n foreach ($attributeas as $key => $value) {\n $params[$key] = $value;\n }\n return true;\n }", "public function getValidParameters()\n {\n return null;\n }", "public function overwriteRequest($params, $force = false)\n {\n if(!is_array($this->params) || count($this->params) == 0 || $force){\n $this->setParams($params);\n }\n }", "protected function validateParameters($params) {\n\t\t$this->validateFields($params);\n\t\t$this->validateNoExtraFields($params);\n\t\t$this->validateCardNumber($params);\n\t}", "private function collectRequiredParams() {\n $dst = array();\n foreach ($this->getAllOptions() as $param) \n {\n if ($this->paramIsRequired($param) === true) \n {\n $dst[] = $this->clearParam($param); \n }\n \n }\n\n return $dst;\n }", "public function getValidParams()\n {\n if ($this->isModuleActive() && empty($this->scriptRan)) {\n $userIdKey = Mage::helper('kproject_sas')->getAffiliateIdentifierKey();\n if (!empty($userIdKey) && !isset($this->validParams[$userIdKey])) {\n $this->validParams[$userIdKey] = false;\n unset($this->validParams['userID']);\n }\n\n $clickIdKey = Mage::helper('kproject_sas')->getClickIdentifierKey();\n if (!empty($clickIdKey) && !isset($this->validParams[$clickIdKey])) {\n $this->validParams[$clickIdKey] = false;\n unset($this->validParams['sscid']);\n }\n $this->scriptRan = true;\n }\n\n return parent::getValidParams();\n }", "function _cleanup_input_params($params = array()) {\n\t\tif (empty($params)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (is_numeric($params)) {\n\t\t\treturn false;\n\t\t}\n\t\t// Allows params as comma-separated pairs (\"active = 1, `group` = 2\")\n\t\t// Allowed symbols: \"=\" \"!=\" \">\" \"<\"\n\t\tif (is_string($params)) {\n\t\t\t$_tmp = array();\n\t\t\tforeach (explode(\",\", $params) as $item) {\n\t\t\t\t$k = \"\";\n\t\t\t\t$v = \"\";\n\t\t\t\tif (false !== strpos($item, \"=\")) {\n\t\t\t\t\tlist($k, $v) = explode(\"=\", $item);\n\t\t\t\t}\n\t\t\t\t$k = trim($k);\n\t\t\t\t$v = trim($v);\n\t\t\t\tif (!strlen($k)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$_tmp[$k] = $v;\n\t\t\t}\n\t\t\t$params = array(\"WHERE\" => $_tmp);\n\t\t}\n\t\tif (!is_array($params)) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ((array)$params as $sql_param => $sql_value) {\n\t\t\t// Check values\n\t\t\tif (is_array($sql_value)) {\n\t\t\t\tforeach ((array)$sql_value as $k => $v) {\n\t\t\t\t\tif (empty($k)) {\n\t\t\t\t\t\tif (isset($params[$sql_param][$k])) {\n\t\t\t\t\t\t\tunset($params[$sql_param][$k]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif (is_string($sql_value) || is_numeric($sql_value) || is_float($sql_value)) {\n\t\t\t\t// nothing yet\n\t\t\t}\n\t\t\t$sql_value = $params[$sql_param];\n\t\t\tif (empty($sql_param) || !in_array($sql_param, $this->_allowed_sql_params) || empty($sql_value)) {\n\t\t\t\tunset($params[$sql_param]);\n\t\t\t}\n\t\t}\n\t\tif (!$params[\"LIMIT\"] && !$params[\"OFFSET\"] && $params[\"LIMIT\"] != -1) {\n\t\t\t$params[\"LIMIT\"]\t= $this->DEF_RECORDS_LIMIT;\n\t\t\t$params[\"OFFSET\"]\t= 0;\n\t\t}\n\t\treturn $params;\n\t}", "function _checkParams($controller){\n \tif (empty($controller->params['named'])){\n \t\t$filter = array();\n \t}\n \t\n App::import('Sanitize');\n $sanit = new Sanitize();\n $controller->params['named'] = $sanit->clean($controller->params['named']);\n\n \n \tforeach($controller->params['named'] as $field => $value){\n \t\t\n \t\tif(!in_array($field, $this->paginatorParams)){\n\t\t\t\t$fields = explode('.',$field);\n\t\t\t\tif (sizeof($fields) == 1)\n\t \t\t\t$filter[$controller->modelClass][$field] = $value;\n\t \t\telse\n\t \t\t\t$filter[$fields[0]][$fields[1]] = $value; \t\t\t\n \t\t}\n \t}\n \t\t\n \tif (!empty($filter))\n \t\treturn $filter;\n \telse\n \t\treturn array(); \t\n }", "protected function populateParams()\n\t{\n\t\tparent::populateParams();\n\t\t$acl = ZefaniabibleHelper::getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\t\t}\n\t}", "public function getAcceptedParameters();", "private function cleanParams(){\n $brokenUrl = explode(\"&\", iWeb::currentUrl());\n unset($brokenUrl[0]);\n $brokenUrl = array_values($brokenUrl);\n foreach ($brokenUrl as $param){\n $paramaters = explode(\"=\",$param);\n $this->params[$paramaters[0]] = $paramaters[1];\n }\n\n }", "private function validate_params( & $params )\n {\n if (!isset($params['search'])) {\n throw new \\Exception('search field isnt defined');\n } else {\n $this->search = $params['search'];\n }\n\n if (isset($params['default_display'])) {\n if (false === is_bool($params['default_display'])) {\n throw new \\Exception('default_display isnt from type boolean');\n }\n }\n\n if (isset($params['no_transform_attributes'])) {\n if (false === is_bool($params['no_transform_attributes'])) {\n throw new \\Exception('no_transform_attributes isnt from type boolean');\n }\n }\n\n\n }", "protected function addNecessaryParams($params)\n {\n // For authenticating with Login Credentials\n\n //$params['username'] = $this->username;\n //$params['password'] = md5($this->password);\n\n // For Authenticating with API Credentials\n\n $params['identifier'] = $this->api_identifier;\n $params['secret'] = $this->api_secret;\n\n $params['responsetype'] = $this->response_type;\n \n if (!empty($this->api_access_key)) {\n $params['accesskey'] = $this->api_access_key;\n }\n \n return $params;\n }", "abstract protected function getRequiredRequestParameters();", "protected function verifyParams() {\n\t\t\treturn true;\n\t\t}", "public function validateParameters(&$parameters);", "protected function filterParams($params)\n\t{\n\t\treturn $params;\n\t}", "public static function getRequiredParams();", "public static function requireParamsArray() {\n\t\tswitch($_SERVER['REQUEST_METHOD']) {\n\t\t\tcase 'GET': $parameters = $_GET; break;\n\t\t\tcase 'POST': $parameters = $_POST; break;\n\t\t\tcase 'PUT':\n\t\t\tcase 'DELETE': $parameters = static::getInputVars(); break;\n\t\t}\n\n\t\t$params = func_get_args();\n\t\t$a = array();\n\t\tforeach ($params as $param) {\n\t\t\tif (!isset($parameters[$param])) {\n\t\t\t\tif (Application::inDevelopment()) {\n\t\t\t\t\t$passedParams = implode(',', array_keys($parameters));\n\t\t\t\t\tLog::debug(\"Missing {$_SERVER['REQUEST_METHOD']} parameter '{$param}', only got \" . (strlen($passedParams) > 0 ? $passedParams : '[nothing]'));\n\t\t\t\t}\n\t\t\t\tApplication::error(400, 'Missing one of the parameters');\n\t\t\t}\n\n\t\t\t$a[$param] = $parameters[$param];\n\t\t}\n\n\t\treturn $a;\n\t}", "protected function populateParams()\n\t{\n\n\t\tparent::populateParams();\n\t\t//$acl = ZefaniabibleHelper::getAcl();\n\t\t$mdl_acl = new ZefaniabibleHelper;\n\t\t$acl = $mdl_acl->getAcl();\n\t\tif (!isset($this->_data))\n\t\t\treturn;\n\n\t\t// Convert the parameter fields into objects.\n\t\tforeach ($this->_data as &$item)\n\t\t{\n\n\t\t\tif ($acl->get('core.edit.state')\n\t\t\t\t|| (bool)$item->publish)\n\t\t\t\t$item->params->set('access-view', true);\n\n\t\t\tif ($acl->get('core.edit'))\n\t\t\t\t$item->params->set('access-edit', true);\n\n\t\t\tif ($acl->get('core.delete'))\n\t\t\t\t$item->params->set('access-delete', true);\n\n\n\t\t}\n\n\t}", "public function getRequiredParameters();", "public function getRequiredParameters();", "protected function validParams($overrides = [])\n {\n return array_merge($this->valid_params, $overrides);\n }", "protected function CheckAuthRequestParams(array $_params)\r\n\t{\r\n\t\treturn $_params;\r\n\t}", "public function checkRequiredParamsAreSet()\n {\n $validator = new Validator($this->params);\n $validator->rule('required', $this->requiredParams, true);\n\n if (!$validator->validate()) {\n throw new ParamNotSetException(key($validator->errors()));\n }\n }", "protected function parse_body_params()\n {\n }", "protected function initParametersRequired()\n {\n $this->parametersRequired = [\n //Ingresa aquí el identificador del pagador.\n PayUParameters::PAYER_ID,\n //Ingresa aquí el identificador del token.\n PayUParameters::TOKEN_ID\n ];\n\n $this->parametersMissing = $this->parametersRequired;\n }", "private function sanitizeParams(&$params)\n {\n unset($params['ajax']);\n unset($params['json']);\n\n return $this;\n }", "protected function validateNoExtraFields($params) {\n\t\t$allowedFields = array();\n\t\tforeach ($this->transactionFields as $field) {\n\t\t\t$allowedFields[] = $field['name'];\n\t\t}\n\t\tforeach ($params as $key => $value) {\n\t\t\tif (!in_array($key, $allowedFields)) {\n\t\t\t\tthrow new InternalException(\"Field [$key] is not supported\");\n\t\t\t}\n\t\t}\n\t}", "public function setParameters(array $params)\n {\n $this->params = array_filter($params);\n $this->processFilters();\n }", "protected function processRequestParams(): void\n {\n $this->processLimit();\n $this->processLocale();\n }", "function prepare_parameters($orig_params, $add_params) {\n if(!$orig_params || !is_array($orig_params)) {\n $orig_params = array();\n }\n\n if($add_params && is_array($add_params)) {\n foreach ($add_params as $key => &$val) {\n $orig_params[$key] = $val;\n }\n }\n\n return $orig_params;\n}", "public static function requireParams() {\n\t\tswitch($_SERVER['REQUEST_METHOD']) {\n\t\t\tcase 'GET': $parameters = $_GET; break;\n\t\t\tcase 'POST': $parameters = $_POST; break;\n\t\t\tcase 'PUT':\n\t\t\tcase 'DELETE': $parameters = static::getInputVars(); break;\n\t\t}\n\n\t\t$params = func_get_args();\n\t\t$class = new \\stdClass;\n\t\tforeach ($params as $param) {\n\t\t\tif (!isset($parameters[$param])) {\n\t\t\t\tif (Application::inDevelopment()) {\n\t\t\t\t\t$passedParams = implode(',', array_keys($parameters));\n\t\t\t\t\tLog::debug(\"Missing {$_SERVER['REQUEST_METHOD']} parameter '{$param}', only got \" . (strlen($passedParams) > 0 ? $passedParams : '[nothing]'));\n\t\t\t\t}\n\t\t\t\tApplication::error(400, 'Missing one of the parameters');\n\t\t\t}\n\n\t\t\t$class->$param = $parameters[$param];\n\t\t}\n\n\t\treturn $class;\n\t}", "protected function prepareForValidation()\n {\n $this->merge([\n self::ATTRIBUTE_REFERER => $this->prepareArray($this->input(self::ATTRIBUTE_REFERER)),\n self::ATTRIBUTE_IP => $this->prepareArray($this->input(self::ATTRIBUTE_IP)),\n ]);\n }", "public function validParams($params)\n {\n // listing my Table fields\n $logFields = $this->em->getClassMetadata('anisM\\ApiBundle\\Entity\\Log')->getFieldNames();\n\n // preparing my params : we take only correct Log fields from\n // sent params to the Factory.\n $this->params = array_intersect_key($params, array_flip($logFields));\n\n // adding a new field in the database type : tech or func\n //$this->type = $this->params;\n return $this;\n }", "public function setOauthParams($params = []): bool\n\t{\n\t\treturn false;\n\t}", "protected function setParamsFilters()\n {\n if ($this->arParams['IBLOCK_TYPE'])\n {\n $this->filterParams['IBLOCK_TYPE'] = $this->arParams['IBLOCK_TYPE'];\n }\n\n if ($this->arParams['IBLOCK_ID'])\n {\n $this->filterParams['IBLOCK_ID'] = $this->arParams['IBLOCK_ID'];\n }\n\n if ($this->arParams['SECTION_CODE'])\n {\n $this->filterParams['SECTION_CODE'] = $this->arParams['SECTION_CODE'];\n }\n elseif ($this->arParams['SECTION_ID'])\n {\n $this->filterParams['SECTION_ID'] = $this->arParams['SECTION_ID'];\n }\n\n if ($this->arParams['INCLUDE_SUBSECTIONS'] === 'Y')\n {\n $this->filterParams['INCLUDE_SUBSECTIONS'] = 'Y';\n }\n\n if ($this->arParams['ELEMENT_CODE'])\n {\n $this->filterParams['CODE'] = $this->arParams['ELEMENT_CODE'];\n }\n elseif ($this->arParams['ELEMENT_ID'])\n {\n $this->filterParams['ID'] = $this->arParams['ELEMENT_ID'];\n }\n\n if ($this->arParams['CHECK_PERMISSIONS'])\n {\n $this->filterParams['CHECK_PERMISSIONS'] = $this->arParams['CHECK_PERMISSIONS'];\n }\n\n if (!isset($this->filterParams['ACTIVE']))\n {\n $this->filterParams['ACTIVE'] = 'Y';\n }\n\n if (strlen($this->arParams['EX_FILTER_NAME']) > 0\n && preg_match(\"/^[A-Za-z_][A-Za-z01-9_]*$/\", $this->arParams['EX_FILTER_NAME'])\n && is_array($GLOBALS[$this->arParams['EX_FILTER_NAME']])\n )\n {\n $this->filterParams = array_merge_recursive($this->filterParams, $GLOBALS[$this->arParams['EX_FILTER_NAME']]);\n\n $this->addCacheAdditionalId($GLOBALS[$this->arParams['EX_FILTER_NAME']]);\n }\n }", "public function getUnfilteredParameters()\n {\n return array_merge($this->get('postData'), $this->get('getData'));\n }", "protected function prepareForValidation()\n {\n \n //Filling uncaught parameters to blank default value\n foreach($this->columns_rules as $column => $rules){\n if(empty($this->get($column))) {\n $this->request->add([$column => '']); \n }\n }\n\n }", "private function clearParams()\n {\n $this->params = new \\StdClass();\n }", "public function setParams($params);", "public function setParams($params);", "private function __get_request_validate_params()\n {\n $this->__validation_params = __get_array_key2column(\n $this->__all_form_validation_params,\n $this->__route_uri_array\n );\n }", "private function populate_request($params) {\n\t\tif (!empty($params)) {\n\t\t\tforeach ($params as $key => $value) {\n\t\t\t\t$_REQUEST[$key] = $value;\n\t\t\t}\n\t\t}\n\t}", "public function setParameters($params) {\n\t\t$defaultParams = $this->params;\n\t\t$allParams = array_merge($defaultParams, $params);\n\n\t\t$this->validateParameters($allParams);\n\n\t\t// Save parameters as they were\n\t\t$this->params = $allParams;\n\n\t\t// Update request URLs from the new parameters\n\t\t$this->urlRaw = $this->build();\n\t\t$this->url = $this->build(true);\n\t}", "public function allowAllProperties() {}", "private function checkRequiredParameters()\n {\n $missingParameters = array();\n\n foreach ($this->parameters as $name => $properties) {\n $required = $properties['required'];\n $value = $properties['value'];\n if ($required && is_null($value)) {\n $missingParameters[] = $name;\n }\n }\n\n if (count($missingParameters) > 0) {\n $missingParametersList = implode(', ', $missingParameters);\n throw new IndexParameterException('The following required\n parameters were not set: '.$missingParametersList.'.');\n }\n }", "private function setParams()\n\t\t{\n\t\t\t/**\n\t\t\t* Remove do $this->_separetor os dois primeiros valores\n\t\t\t* referentes ao controller e action, deixando os demais valores\n\t\t\t* que serão usados para formarem os parametros, indices e valores\n\t\t\t*/\n\t\t\tunset($this->_separetor[1], $this->_separetor[2]);\n\t\t\t\n\t\t\t/**\n\t\t\t* Caso o ultimo item do $this->_separetor seja vazio\n\t\t\t* o mesmo é removido\n\t\t\t*/\n\t\t\tif ( end($this->_separetor) == null ) {\n\t\t\t\tarray_pop($this->_separetor);\n\t\t\t}\n\n\t\t\t\n\t\t\t/**\n\t\t\t* Se a $this->_separetor estivar vazia,\n\t\t\t* então os parametros serão definidos como vazios\n\t\t\t*/\n\t\t\tif ( !empty($this->_separetor) ) {\n\t\t\t\t/**\n\t\t\t\t* Percorre o array $this->_separetor, verificando os indices\n\t\t\t\t* se for impar, então seu valor será o indice do parametro.\n\t\t\t\t* Se for par, seu valor será o valor do paremetro\n\t\t\t\t*/\n\t\t\t\tforeach ($this->_separetor as $key => $value) {\n\t\t\t\t\tif ($key % 2 == 0) {\n\t\t\t\t\t\t$param_value[] = $value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$param_indice[] = $value;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$param_value = array();\n\t\t\t\t$param_indice = array();\n\t\t\t}\n\n\n\t\t\t/**\n\t\t\t* Verifica se os indices e valores dos parametros\n\t\t\t* não são vazios e possuem a mesma quantidade\n\t\t\t* Então vaz um \"array_combine\" para juntar os dois arrays\n\t\t\t* formando um indice->valor para o parametro\n\t\t\t*/\n\t\t\tif ( !empty($param_indice) \n\t\t\t\t&& !empty($param_value)\n\t\t\t\t&& count($param_indice)\n\t\t\t\t== count($param_value)\n\t\t\t) {\n\t\t\t\t$this->_params = array_combine($param_indice, $param_value);\n\t\t\t} else {\n\t\t\t\t$this->_params = array();\n\t\t\t}\n\t\t}", "public function setParams($params = null)\n {\n self::clearParams();\n if($params && is_array($params)){\n foreach($params as $key => $value){\n if(!$key || trim($key) == ''){\n continue;\n }\n\n $this->params[$key] = $value;\n }\n }\n }", "protected function CheckTokenRequestParams(array $_params)\r\n\t{\r\n\t\treturn $_params;\r\n\t}", "public function isAllowed(array $params = array())\n {\n return false;\n }", "public function __construct($params){\n \n $i = 2; //Skip the controller/action stuff.\n while (isset($params[$i])){\n $this->_requestParams[$params[$i]] = $params[$i+1];\n $i = $i + 2;\n }\n\n if (count($_POST) > 0){\n $this->_requestParams = array_merge($this->_requestParams,$_POST);\n }\n }", "protected function getParams($params = array()) {\n $params = parent::getParams($params);\n unset($params['custom_property']);\n return $params;\n }", "function set_params($params)\r\n\t{\r\n\t\t$this->parameters = $params;\r\n\t}", "public function checkRequiredParamsSet() : bool {\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 }", "private function _setParams ()\n {\n $endpoint = $this->_endpoint->getData();\n if (count($endpoint) > 0) {\n \n $method = $this->_endpoint->getUrl();\n $methodname = 'setParameter' . ucfirst($method['method']);\n \n $this->_httpclient->{$methodname}('access_token', \n $this->_accesstoken);\n $this->_httpclient->{$methodname}('api_secret', $this->_apisecret);\n \n foreach ($endpoint as $param => $value) {\n $this->_httpclient->{$methodname}($param, $value);\n }\n }\n }", "public function getOtherAuthorizationRequestParams() {\n }", "public static function UnwantedParameters($chars = array())\n {\n global $application_unwanted_params;\n $application_unwanted_params = $chars;\n }", "public function setParams(array $params){\n \tif(is_array($params)){\n $this->_params = $this->filterParams($params);\n \treturn $this->_params;\n \t}\n\n }", "public function processParams($params = []): array\n {\n if (isset($params['group_id']) && (!Auth::isLoggedIn() || !Auth::getUser()->isSuperAdmin())) {\n unset($params['group_id']);\n }\n\n return $params;\n }", "public function setParameters(array $params)\n\t {\n\t \t foreach ($params as $key => $value)\n\t \t {\n\t \t\tswitch ($key)\n\t \t\t{\n\t \t\t\tcase \"identification\":\n\t \t\t\t\tforeach($value as $key => $value) {\n\t \t\t\t\t\t// validate section fields name\n\t \t\t\t\t\tif(!array_key_exists($key, $this->json['params']['identification'])) {\n\t \t\t\t\t\t\tthrow new InvalidArgumentException(\"$key is not valid for identification section\");\n\t \t\t\t\t\t}\n\t \t\t\t\t\t// if referenceId parameter is not set in the constructor\n\t \t\t\t\t\tif('' === $this->json['params']['identification']['referenceid'])\n\t \t\t\t\t\t\t$this->json['params']['identification'][$key] = $value; \n\t \t\t\t\t}\n\t \t\t\t\tbreak;\n\t \t\t\tdefault:\n\t \t\t\t\tthrow new OutOfBoundsException(\"You should set predefined parameter group!\");\n\t \t\t}\n\t \t }\t \t \n\t }", "protected function validationData() {\n if (method_exists($this->route(), 'parameters')) {\n $this->request->add($this->route()->parameters());\n $this->query->add($this->route()->parameters());\n \n return array_merge($this->route()->parameters(), $this->all());\n }\n \n return $this->all();\n }", "protected final function setParams ($params)\n\t{\n\t\t/// This method is restricted (cannot be used by descendants).\n\t}", "private function compileParameters()\n {\n $params = [\n 'queueName' => property_exists($this, 'queueName') ? $this->queueName : null,\n 'exchangeName' => property_exists($this, 'exchangeName') ? $this->exchangeName : null,\n 'exchangeType' => property_exists($this, 'exchangeType') ? $this->exchangeType : null,\n 'passive' => property_exists($this, 'passive') ? $this->passive : null,\n 'durable' => property_exists($this, 'durable') ? $this->durable : null,\n 'autoDelete' => property_exists($this, 'autoDelete') ? $this->autoDelete : null,\n 'deliveryMode' => property_exists($this, 'deliveryMode') ? $this->deliveryMode : null,\n ];\n\n return array_filter($params);\n }", "private function checkParams( $real, $sent ) {\n\t\t$new = array();\n\n\t\t$is_obj = is_object( $sent );\n\t\t$is_assoc = is_array( $sent ) && jsonrpc2::isAssoc( $sent );\n\n\t\t// check every parameter\n\t\tforeach ( $real as $i => $param ) {\n\t\t\t$name = $param->getName();\n\t\t\tif ( $is_obj && isset( $sent->{$name} ) ) {\n\t\t\t\t$new[$i] = $sent->{$name};\n\t\t\t} elseif ( $is_assoc && $sent[$name] ) {\n\t\t\t\t$new[$i] = $sent[$name];\n\t\t\t} elseif ( isset( $sent[$i] ) ) {\n\t\t\t\t$new[$i] = $sent[$i];\n\t\t\t} elseif ( !$param->isOptional() ) {\n\t\t\t\tthrow new Exception( -32602 );\n\t\t\t}\n\t\t}\n\n\t\t// return the list of matching params\n\t\treturn $new;\n\t}", "function process_request_vars($params) {\n\t\tif (array_key_exists('CONTENT_LENGTH', $_SERVER) && !empty($_POST)) {\n\t\t\t$pms = ini_get('post_max_size');\n\t\t\t$mul = substr($pms, -1);\n\t\t\t$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));\n\t\t\tif ($_SERVER['CONTENT_LENGTH'] > $mul*(int)$pms && $pms) {\n\t\t\t\tthrow new MaxPostSizeExceeded(\"The posted data was too large. The maximum post size is: $pms.\");\n\t\t\t}\n\t\t}\n\n\n\n\t\t# add request to params and make sure magic quotes are dealt with\n\t\tunset($_POST['MAX_FILE_SIZE']);\n\t\tunset($_GET['MAX_FILE_SIZE']);\n\t\t$gpc = (get_magic_quotes_gpc() == 1);\n\n\t\tforeach(array($_GET, $_POST) as $R) {\n\t\t\tforeach($R as $k => $v) {\n\t\t\t\tif (!isset($params[$k])) {\n\t\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t\t$params[$k] = array();\n\t\t\t\t\t\tforeach($v as $k2 => $v2) {\n\t\t\t\t\t\t\t$params[$k][$k2] = ($gpc && !is_array($v2))?stripslashes($v2):$v2;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$params[$k] = ($gpc)?stripslashes($v):$v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t# add files to params\n\t\tforeach($_FILES as $k => $v) {\n\t\t\tif (!isset($params[$k])) {\n\t\t\t\ttry {\n\t\t\t\t\t$uploaded_file = UploadedFile::create($v);\n\t\t\t\t} catch (UpoadedFileException $e) {\n\t\t\t\t\t$uploaded_file = false;\n\t\t\t\t}\n\t\t\t\t$params[$k] = $uploaded_file;\n\t\t\t}\n\t\t}\n\n\n\n\t\treturn $params;\n\t}", "protected function prepareForValidation()\n {\n $this->merge(['userId' => $this->route('userId')]);\n }", "public function validateArguments() {}", "public function allowAllPropertiesExcept() {}", "public function setRequestParams($params = array())\r\n \t{\r\n \t\t$this->_requestParams = array();\r\n \t\tif (!is_array($params))\r\n \t\t{\r\n \t\t\treturn false;\r\n \t\t}\r\n\r\n \t\t$this->_requestParams = $params;\r\n \t\treturn true;\r\n \t}", "public function getAllowedValues();", "public function getAllowedValues();", "abstract public function sanatizeParameters(array $params);", "protected function prepareForValidation()\n {\n if($this->name != null) {\n $this->merge([\n 'name' => filter_var($this->name, FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->email != null) {\n $this->merge([\n 'email' => filter_var(trim($this->email), FILTER_SANITIZE_EMAIL),\n ]);\n }\n\n if($this->leader != null) {\n $this->merge([\n 'leader' => filter_var($this->leader, FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->gruplac != null) {\n $this->merge([\n 'gruplac' => filter_var(trim($this->gruplac), FILTER_SANITIZE_URL),\n ]);\n }\n\n if($this->minciencias_code != null) {\n $this->merge([\n 'minciencias_code' => filter_var(trim($this->minciencias_code), FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->minciencias_category != null) {\n $this->merge([\n 'minciencias_category' => filter_var($this->minciencias_category, FILTER_SANITIZE_STRING),\n ]);\n }\n\n if($this->website != null) {\n $this->merge([\n 'website' => filter_var(trim($this->website), FILTER_SANITIZE_URL),\n ]);\n }\n\n if($this->educational_institution_id != null) {\n $this->merge([\n 'educational_institution_id' => (integer) filter_var($this->educational_institution_id, FILTER_SANITIZE_NUMBER_INT),\n ]);\n }\n }", "protected function setParams($params)\n {\n // endpoint\n if (isset($params['Endpoint'])) {\n $this->setEndPoint($params['Endpoint']);\n unset($params['Endpoint']);\n } else {\n $this->setEndPoint();\n }\n\n // service\n if (isset($params['Service'])) {\n $this->setService($params['Service']);\n unset($params['Service']);\n } else {\n $this->setService();\n }\n\n // remaining\n if (is_array($params)) {\n $this->params = array_merge($this->params, $params);\n }\n }", "function isTheseParametersAvailable($params){\n //assuming all parameters are available \n $available = true; \n $missingparams = \"\"; \n \n foreach($params as $param){\n if(!isset($_POST[$param]) || strlen($_POST[$param])<=0){\n $available = false; \n $missingparams = $missingparams . \", \" . $param; \n }\n }\n \n //if parameters are missing \n if(!$available){\n $response = array(); \n $response['error'] = true; \n $response['message'] = 'Parameters ' . substr($missingparams, 1, strlen($missingparams)) . ' missing';\n \n //displaying error\n echo json_encode($response);\n \n //stopping further execution\n die();\n }\n }", "function checkAllParams(){\n\t\tif(isset($_REQUEST['appid'][100]) || isset($ref[1000]) || isset($_REQUEST['uid'][200]) ){\n\t\t\tthrow new Exception('paramater length error',10001);\n\t\t}\n\t\tif(isset($_REQUEST['ref']))$_REQUEST['ref']=substr($_REQUEST['ref'], 0,990);\n\t\t\n\t\tif(!$this->check(\"appid\",$_REQUEST['appid']) && !isset($_REQUEST['json'])){\n\t\t\t//ea_write_log(APP_ROOT.\"/error_log/\".date('Y-m-d').\".log\", \"error_appid=\".$_REQUEST['appid'].\" \".$_REQUEST['event'].\" \".$_REQUEST['logs'].\" \\n\");\n\t\t\tthrow new Exception('appid error',10001);\n\t\t}\n\t\t\n\t\t$_REQUEST['appid']=strtolower($_REQUEST['appid']);\n\t\t$this->appidmap();\n\t}", "private function setParams(array $params) : array\n {\n if (count($params) === 1) {\n array_unshift($params, 'is');\n }\n\n return $params;\n }", "protected function setRequired($params)\n {\n $this->required = $params;\n }", "public function validateAndPrepare(){\n if (!isset($this->extras['copyconf-parameters'])) {\n throw new \\InvalidArgumentException('The parameter handler needs to be configured through the extra.copyconf-parameters setting.');\n }\n\n $this->configs = $this->extras['copyconf-parameters'];\n\n if (!is_array($this->configs)) {\n throw new \\InvalidArgumentException('The extra.copyconf-parameters setting must be an array or a configuration object.');\n }\n\n foreach (array('dist_ext', 'reg_exp', 'backup_mode', 'backup_dir') as $var){\n if (isset($this->configs[$var]) && !empty($this->configs[$var])){\n $this->$var = $this->configs[$var];\n }\n }\n }", "protected function prepareForValidation()\n {\n $request = $this->request->all();\n if(!empty($request['country']) && $request['country']=='All'){\n unset($request['country']);\n }\n $this->replace($request);\n }", "public function get_params()\n {\n }", "public function get_params()\n {\n }", "protected function getValidParamRules()\n {\n return $this->validParamRules;\n }", "protected function _loadParameters(array $params = null) \n {\n return $params ?\n merge_array(\n $this->getRequest()->getParameters(), $params\n ) :\n $this->getRequest()->getParameters()\n ;\n }", "function isTheseParametersAvailable($params){\n\t\t\n\t\t//traversing through all the parameters \n\t\tforeach($params as $param){\n\t\t\t//if the paramter is not available\n\t\t\tif(!isset($_POST[$param])){\n\t\t\t\t//return false \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\t//return true if every param is available \n\t\treturn true; \n\t}" ]
[ "0.6638132", "0.66371006", "0.654541", "0.6511516", "0.64072305", "0.63158184", "0.630814", "0.63059324", "0.62569207", "0.6131477", "0.6130842", "0.610695", "0.61018234", "0.6096074", "0.6065725", "0.605872", "0.6033281", "0.6007678", "0.59817755", "0.5981284", "0.5962096", "0.5960121", "0.5935189", "0.59024006", "0.5885302", "0.5872774", "0.58478457", "0.5840093", "0.5826958", "0.5815799", "0.58143663", "0.58109456", "0.57890767", "0.57821155", "0.57821155", "0.5773347", "0.57471406", "0.5737632", "0.5736752", "0.57365817", "0.57347214", "0.57178307", "0.5678267", "0.56714386", "0.56626356", "0.565621", "0.5653535", "0.56257975", "0.5569376", "0.5564788", "0.5561042", "0.55604625", "0.555576", "0.5551476", "0.5551476", "0.5545259", "0.554508", "0.55442196", "0.5543304", "0.553565", "0.55353385", "0.5533242", "0.55330867", "0.55196595", "0.55075663", "0.5505866", "0.5492325", "0.549033", "0.548443", "0.54814327", "0.5475961", "0.547219", "0.5469462", "0.54676706", "0.54625416", "0.54557025", "0.5452637", "0.54482234", "0.54480433", "0.54467684", "0.54453784", "0.54330605", "0.5420733", "0.54187465", "0.5417367", "0.5417367", "0.5405627", "0.5403654", "0.5403316", "0.53931653", "0.53926927", "0.53905797", "0.5387477", "0.53779215", "0.5366997", "0.5360976", "0.5360976", "0.53558075", "0.5354873", "0.5352279" ]
0.58646905
26
Analyzes the source image and stores gained information like mime type / image type, width and height.
protected function _analyzeSourceImage($imageResource, $imageType) { $this->params['sourceWidth'] = imagesx($imageResource); $this->params['sourceHeight'] = imagesy($imageResource); $this->params['mime'] = image_type_to_mime_type($imageType); $this->params['type'] = $imageType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _get_img_info()\n {\n if ( ! file_exists($this->source_file) || ! filesize($this->source_file)) {\n return false;\n }\n list($this->source_width, $this->source_height, $type, $this->source_atts) = getimagesize($this->source_file);\n return isset($this->_avail_types[$type]) ? ($this->source_type = $this->_avail_types[$type]) : false;\n }", "public function getImageDetails($image) {\r\n\r\n$temp = getimagesize($this->src);\r\nif(null == $temp)\r\nthrow new Exception('Error while extracting the source image information');\r\n\r\n$this->width = $temp[0];\r\n$this->height = $temp[1];\r\n$this->type = $temp[2];\r\n}", "protected function processImage() {}", "function image_info($image)\n{\n // http://stackoverflow.com/a/2756441/1459873\n $is_path = preg_match('#^(\\w+/){1,2}\\w+\\.\\w+$#', $image);\n if ($is_path && false !== ($info = getimagesize($image))) {\n return array(\n 'width' => $info[0],\n 'height' => $info[1],\n 'mime' => $info['mime'],\n 'type' => 'file',\n );\n }\n $im = new \\Imagick();\n if ($im->readImageBlob($image)) {\n return array(\n 'width' => $im->getImageWidth(),\n 'height' => $im->getImageHeight(),\n 'mime' => $im->getImageMimeType(),\n 'type' => 'blob',\n );\n }\n return array('width' => 0, 'height' => 0, 'mime'=>'', 'type' => '');\n\n}", "function ImageInfo($file){\n $ret=array('width'=>0,'height'=>0,'ImageExt'=>'');\n $size = getimagesize($file);\nif($size==FALSE){\n\n\n}else{\n $ext=explode(\"/\", $size['mime']);\n $ret['ImageExt']=$ext[1]; \n $ret['width']=$size[0]; \n $ret['height']=$size[1];\n}\nreturn $ret;\n}", "abstract public static function process(File $file, int $imageType, int $width, int $height): string;", "public function process() {\n\n\t\t$this->out = array();\n\n\t\tif ($inputFile = $this->getInputFile()) {\n\n\t\t\t// Read basic metadata from file, write additional metadata to $info\n\t\t\t$imageSize = getimagesize($inputFile, $info);\n\n\t\t\t// Parse metadata from getimagesize\n\t\t\t$this->out['unit'] = 'px';\n\n\t\t\tif (isset($imageSize['channels'])) {\n\t\t\t\t$this->out['color_space'] = $this->getColorSpace($imageSize['channels']);\n\t\t\t}\n\n\t\t\t// Makes sure the function exists otherwise generates a log entry\n\t\t\tif (function_exists('exif_imagetype') && function_exists('exif_read_data')) {\n\n\t\t\t\t// Determine image type\n\t\t\t\t$imageType = exif_imagetype($inputFile);\n\n\t\t\t\t// Only try to read exif data for supported types\n\t\t\t\tif (in_array($imageType, $this->allowedImageTypes)) {\n\n\t\t\t\t\t$exif = @exif_read_data($inputFile, 0, TRUE);\n\n\t\t\t\t\t// Parse metadata from EXIF GPS block\n\t\t\t\t\tif (is_array($exif['GPS'])) {\n\t\t\t\t\t\t$this->out['latitude'] = $this->parseGPSCoordinate($exif['GPS']['GPSLatitude'], $exif['GPS']['GPSLatitudeRef']);\n\t\t\t\t\t\t$this->out['longitude'] = $this->parseGPSCoordinate($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Parse metadata from EXIF EXIF block\n\t\t\t\t\tif (is_array($exif['EXIF'])) {\n\t\t\t\t\t\t$this->out['creation_date'] = strtotime($exif['EXIF']['DateTimeOriginal']);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Parse metadata from EXIF IFD0 block\n\t\t\t\t\tif (is_array($exif['IFD0'])) {\n\n\t\t\t\t\t\tforeach ($exif['IFD0'] as $exifAttribute => $value) {\n\n\t\t\t\t\t\t\tswitch ($exifAttribute) {\n\n\t\t\t\t\t\t\t\tcase 'ApertureValue':\n\t\t\t\t\t\t\t\t\t$parts = explode('/', $value);\n\t\t\t\t\t\t\t\t\t$this->out['aperture_value'] = round(exp(($parts[0] / $parts[1]) * 0.51 * log(2)), 1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ShutterSpeedValue':\n\t\t\t\t\t\t\t\t\t$parts = explode('/', $value);\n\t\t\t\t\t\t\t\t\t$this->out['shutter_speed_value'] = (int) pow(2, $parts[0] / $parts[1]);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ISOSpeedRatings':\n\t\t\t\t\t\t\t\t\t$this->out['iso_speed_ratings'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Model':\n\t\t\t\t\t\t\t\t\t$this->out['camera_model'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ExposureTime':\n\t\t\t\t\t\t\t\t\t$this->out['exposure_time'] = strtotime($value);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Flash':\n\t\t\t\t\t\t\t\t\t$this->out['flash'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'MeteringMode':\n\t\t\t\t\t\t\t\t\t$this->out['metering_mode'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ColorSpace':\n\t\t\t\t\t\t\t\t\t$this->out['color_space'] = $this->getColorSpace($value);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'XResolution':\n\t\t\t\t\t\t\t\t\t$this->out['horizontal_resolution'] = $this->fractionToInt($value);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'YResolution':\n\t\t\t\t\t\t\t\t\t$this->out['vertical_resolution'] = $this->fractionToInt($value);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Subject':\n\t\t\t\t\t\t\t\t\t$this->out['description'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'DateTime':\n\t\t\t\t\t\t\t\t\t$this->out['modification_date'] = strtotime($value);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Software':\n\t\t\t\t\t\t\t\t\t$this->out['creator_tool'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::devLog('Function exif_imagetype() and exif_read_data() are not available. Make sure Mbstring and Exif module are loaded.', 2);\n\t\t\t}\n\n\t\t\t// Check if IPTC metadata exists\n\t\t\tif (isset($info['APP13'])) {\n\t\t\t\t$iptc = iptcparse($info['APP13']);\n\t\t\t}\n\n\t\t\t// Parse metadata from IPTC APP13\n\t\t\tif (is_array($iptc)) {\n\n\t\t\t\t$iptcAttributes = array(\n\t\t\t\t\t'2#005' => 'title',\n\t\t\t\t\t'2#120' => 'caption',\n\t\t\t\t\t'2#025' => 'keywords',\n\t\t\t\t\t'2#085' => 'author',\n\t\t\t\t\t'2#115' => 'publisher',\n\t\t\t\t\t'2#080' => 'creator',\n\t\t\t\t\t'2#116' => 'copyright_notice',\n\t\t\t\t\t'2#100' => 'location_country',\n\t\t\t\t\t'2#090' => 'location_city',\n\t\t\t\t\t'2#055' => 'creation_date',\n\t\t\t\t);\n\n\t\t\t\tforeach ($iptcAttributes as $iptcAttribute => $mediaField) {\n\t\t\t\t\tif (isset($iptc[$iptcAttribute])) {\n\t\t\t\t\t\t$this->out[$mediaField] = $iptc[$iptcAttribute][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Convert each metadata value from its encoding to utf-8\n\t\t\t$this->out = \\TYPO3\\CMS\\Metadata\\Utility\\Unicode::convert($this->out);\n\n\t\t} else {\n\t\t\t$this->errorPush(T3_ERR_SV_NO_INPUT, 'No or empty input.');\n\t\t}\n\n\t\treturn $this->getLastError();\n\t}", "abstract protected function processImage (string $src): string;", "function afterImport(){\n\n\t\t$f=$this->getPath();\n\t\t\n\t\t$gd_info=getimagesize($f);\n\t}", "public function Information()\n {\n $this->imgInfo = list($width, $height, $type, $attr) = getimagesize($this->pathToImage);\n !empty($this->imgInfo) or self::errorMessage(\"The file doesn't seem to be an image.\");\n $mime = $this->imgInfo['mime'];\n\n if($this->verbose) {\n $this->imgInfo['filesize'] = $filesize = filesize($this->pathToImage);\n self::verbose(\"Image file: {$this->pathToImage}\");\n self::verbose(\"Image information: \" . print_r($this->imgInfo, true));\n self::verbose(\"Image width x height (type): {$width} x {$height} ({$type}).\");\n self::verbose(\"Image file size: {$filesize} bytes.\");\n self::verbose(\"Image mime type: {$mime}.\");\n }\n }", "function get_intermediate_image_sizes()\n {\n }", "protected function _checkImage() {\n if ( !is_file ( $this->src ) ) {\n $this->src = $this->default_missing_image; \n }\n $image_path_parts = pathinfo ( $this->src );\n $this->_image_name = $image_path_parts['basename'];\n $this->_thumb_filename = $this->attributes['width'] . 'x' . $this->attributes['height'] . '_' . $this->_image_name;\n $this->_thumb_src = $this->thumbs_dir_path . $this->_thumb_filename;\n if ( is_readable ( $this->_thumb_src ) ) {\n $this->_calculated_width = $this->attributes['width'];\n $this->_calculated_height = $this->attributes['height'];\n $this->src = $this->_thumb_src;\n return 'no_thumb_required';\n }\n if ( KISSIT_MAIN_PRODUCT_WATERMARK_SIZE == 0 ) {\n \tif ( !$this->_original_image_info = getimagesize ( $this->src ) ) {\n \t\treturn 'abort';\n \t} \n \tif (!in_array ( $this->_original_image_info['mime'], $this->_valid_mime ) ) {\n \t\treturn 'abort';\n \t}\n }\n }", "function check_image_type($source_pic)\n{\n $image_info = check_mime_type($source_pic);\n\n switch ($image_info) {\n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}", "protected function _checkImage() {\n if ( !is_file ( $this->src ) ) {\n $this->src = $this->default_missing_image; \n }\n $image_path_parts = pathinfo ( $this->src );\n $this->_image_name = $image_path_parts['basename'];\n $this->_thumb_filename = $this->attributes['width'] . 'x' . $this->attributes['height'] . '_' . $this->_image_name;\n $this->_thumb_src = $this->thumbs_dir_path . $this->_thumb_filename;\n if ( is_readable ( $this->_thumb_src ) ) {\n $this->_calculated_width = $this->attributes['width'];\n $this->_calculated_height = $this->attributes['height'];\n $this->src = $this->_thumb_src;\n return 'no_thumb_required';\n }\n if ( !$this->_original_image_info = getimagesize ( $this->src ) ) {\n return 'abort';\n } \n if (!in_array ( $this->_original_image_info['mime'], $this->_valid_mime ) ) {\n return 'abort';\n }\n }", "function pwg_image_infos($path)\n{\n list($width, $height) = getimagesize($path);\n $filesize = floor(filesize($path)/1024);\n\n return array(\n 'width' => $width,\n 'height' => $height,\n 'filesize' => $filesize,\n );\n}", "function guy_imagedims($src) {\n\tif (substr($src,0,1)=='/') $src = \nsubstr_replace($src,$_SERVER['DOCUMENT_ROOT'].'/',0,1);\n\tif (is_file($src)) {\n\t\t$wh = @GetImageSize($src);\n\t\treturn $wh[3];\n\t}\n\treturn '';\n}", "public function getImageDetails() {\n\t\t$details = getimagesize($this->file);\n\n\t\tif(!$details) throw new Exception('Falha na busca dos parametros da imagem!');\n\n\t\tlist($width, $height, $type, $attr, $mime) = $details;\n\t\t$aspect = ($width > $height)?'landscape':'portrait';\n\t\t$ration = $width / $height;\n\n\t\treturn array('width' => $width,'height' => $height,'aspect' => $aspect,'ratio' => $ratio,'mime' => $mime,'type' => $type);\n\t}", "private function checkSourceMimeType()\n {\n $fileMimeType = $this->getMimeTypeOfSource();\n if (is_null($fileMimeType)) {\n throw new InvalidImageTypeException('Image type could not be detected');\n } elseif ($fileMimeType === false) {\n throw new InvalidImageTypeException('File seems not to be an image.');\n } elseif (!in_array($fileMimeType, self::$allowedMimeTypes)) {\n throw new InvalidImageTypeException('Unsupported mime type: ' . $fileMimeType);\n }\n }", "function exif_imagetype ( $image_location ) {\r\n\t\t$image_size = getimagesize($image_location);\r\n\t\tif ( !$image_size )\r\n\t\t\treturn $image_size;\r\n\t\t$image_type = $image_size[2];\r\n\t\treturn $image_type;\r\n\t}", "function refreshImageSize() {\n\t\tif($this->intTableKeyValue != \"\") {\n\t\t\tif ( $this->arrObjInfo['imageurl'] ) {\n\t\t\t\tif($this->arrObjInfo['imagewidth'] == 0) {\n\t\t\t\t\t$imageURL = $this->getLocalImageURL();\n\t\t\t\t\t\n\t\t\t\t\t$imageSize = getimagesize($imageURL);\n\t\t\t\t\t$this->arrObjInfo['imagewidth'] = $imageSize[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->arrObjInfo['imageheight'] == 0) {\n\t\t\t\t\t$imageURL = $this->getLocalImageURL();\n\t\t\t\t\n\t\t\t\t\t$imageSize = getimagesize($imageURL);\n\t\t\t\t\t$this->arrObjInfo['imageheight'] = $imageSize[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function _getImageInfo($image)\n {\n return getimagesize($image); // This function doesn't only return the image size but some essential information as well.\n }", "public function image_size()\n\t{\n if (!$this->local_file) {\n $this->get_local_file();\n }\n $image_size = getimagesize($this->local_file);\n $this->mime = $image_size['mime'];\n return $image_size;\n\t}", "function logonscreener_image_info($file) {\n if (!is_file($file)) {\n logonscreener_log(\"$file is not a file.\");\n return FALSE;\n }\n\n $data = getimagesize($file);\n\n if (!is_array($data)) {\n logonscreener_log(\"No details for $file\");\n return FALSE;\n }\n\n $extensions = array('1' => 'gif', '2' => 'jpeg', '3' => 'png');\n $extension = isset($extensions[$data[2]]) ? $extensions[$data[2]] : '';\n $info = array(\n 'width' => $data[0],\n 'height' => $data[1],\n 'extension' => $extension,\n 'file_size' => filesize($file),\n );\n\n logonscreener_log(\"$file details:\", $info);\n return $info;\n}", "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 }", "public function ajax_check_banner_image_size() {\n \n $path = $_FILES['banner_image']['name'];\n $ext = pathinfo($path, PATHINFO_EXTENSION); \n \n $allowTypes = array('jpg','jpeg','gif','png');\n if(in_array(strtolower($ext),$allowTypes)){\n list($w, $h) = getimagesize($_FILES[\"banner_image\"][\"tmp_name\"]);\n if ($w == 1346 && $h == 660) echo 'Success'; else echo 'Error';\n } else {\n echo 'File_Ext_Err';\n }\n }", "private function setDimensions(){\r\n list($width, $height) = getimagesize($this->fileName);\r\n $this->imageDimensions = array('width'=>$width,\r\n 'height'=>$height);\r\n \r\n }", "private function get_type_img()\n {\n $this->multi_byte_string_to_array();\n foreach($this->strings as $char)\n {\n $this->init_img();\n $this->create_img($char);\n }\n }", "function check_image_type_array($source_pic)\n{\n switch ($source_pic) {\n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}", "public function getImgSize() {\n\t\t$this->imgSize = getimagesize($this->imgUri);\n\t}", "public function testGetImageInfoFromBlob()\n {\n $imgBlob = file_get_contents($this->_testImagePath);\n $imgInfo = Tinebase_ImageHelper::getImageInfoFromBlob($imgBlob);\n \n $this->assertEquals($this->_testImageData['width'], $imgInfo['width']);\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 acf_get_image_sizes()\n{\n}", "abstract public function describeImages(ImageFilter $images);", "private function loadFileInfo()\n\t{\n\t\t$this->loadBasicData();\n\t\tswitch ($this->data['mimetypeType']) \n\t\t{\n\n\t\t\tcase 'image':\n\t\t\t\tlist($this->data['width'], $this->data['height']) = getimagesize ( $this->filepath );\n\t\t\t\t$this->data['resolution'] = $this->data['width'].'x'.$this->data['height'];\n\n\t\t\t\tswitch ($this->data['mimetype']) \n\t\t\t\t{\n\t\t\t\t\tcase 'image/jpeg':\n\t\t\t\t\tcase 'image/pjpeg':\n\t\t\t\t\tcase 'image/tiff':\n\t\t\t\t\tcase 'image/x-tiff':\n\n\t\t\t\t\t\t$this->loadExfiData();\n\t\t\t\t\t\t$this->loadIPTCKeywords();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'image/png':\n\t\t\t\t\tcase 'image/jp2':\n\t\t\t\t\tcase 'image/jpx':\n\t\t\t\t\tcase 'image/jpm':\n\t\t\t\t\tcase 'image/mj2':\n\t\t\t\t\t\t$this->loadIPTCKeywords();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t# code...\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\t\t}\n\t}", "protected function determineFormat()\n {\n if ($this->isDataStream === true) {\n $this->format = 'STRING';\n\n return;\n }\n $formatInfo = getimagesize($this->filename);\n\n // non-image files will return false\n if ($formatInfo === false) {\n if ($this->remoteImage) {\n $this->setError('Could not determine format of remote image: ' . $this->filename);\n }\n else {\n $this->setError(sprintf('File \"%s\" is not a valid image!', $this->filename));\n }\n\n return;\n }\n\n $mimeType = isset($formatInfo['mime']) ? $formatInfo['mime'] : null;\n\n if (!empty($mimeType)) {\n $tmp = explode('/', $mimeType);\n $format = strtoupper(end($tmp));\n }\n else {\n $this->setError('Image format is not supported: ' . $mimeType);\n\n return;\n }\n\n if ($format == 'JPG' || $format == 'JPEG') {\n $this->format = 'JPEG';\n }\n else {\n $this->format = $format;\n }\n }", "public function process_image( $file ) {\n\n $type = explode( '/', $file['type'] );\n\n if ( $file['type']\n && 0 === strpos( $file['type'], 'image/' )\n && 'image/svg+xml' !== $file['type']\n && function_exists( 'getimagesize' )\n ) {\n $imageinfo = getimagesize( $file['tmp_name'] );\n $result = $this->image_problems( $file, $imageinfo );\n if ( is_string( $result ) ) {\n // We have a problem\n $file['error'] = $result;\n } else {\n // Don't use underscores in file names\n $file['name'] = str_replace( '_', '-', $file['name'] );\n }\n }\n\n return $file;\n }", "function get_image_size($image) {\n if($image = getimagesize($image)) {\n $image[2] = image_type_to_extension($image[2],false);\n if($image[2] == 'jpeg') {\n $image[2] = 'jpg';\n }\n return $image;\n } else {\n return false;\n }\n}", "public static function isImage($source)\n {\n return getimagesize($source);\n }", "function initializeImageProperties()\n\t{\n\t\tlist($this->width, $this->height, $iType, $this->htmlattributes) = getimagesize($this->sFileLocation);\n\n\t\tif (($this->width < 1) || ($this->height < 1)) {\n\t\t\t$this->printError('invalid imagesize');\n\t\t}\n\n\t\t$this->setImageOrientation();\n\t\t$this->setImageType($iType);\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 getInfo($source)\n {\n $image_obj = $this->_getInstance('utility');\n return $image_obj->getInfo($source);\n }", "function metadata_image($metadata_conf) \r\n {\r\n if(is_array($metadata_conf) && count($metadata_conf)>0)\r\n {\r\n include_once 'metadata/Toolkit_Version.php';\r\n error_reporting(0);\r\n include_once 'metadata/JPEG.php';\r\n include_once 'metadata/XMP.php';\r\n include_once 'metadata/Photoshop_IRB.php';\r\n include_once 'metadata/EXIF.php';\r\n include_once 'metadata/Photoshop_File_Info.php';\r\n \r\n \r\n // Copy all of the HTML Posted variables into an array\r\n //$new_ps_file_info_array = $GLOBALS['HTTP_POST_VARS'];\r\n $new_ps_file_info_array = $metadata_conf;\r\n \r\n $filename = $new_ps_file_info_array['filename'];\r\n //echo $filename;\r\n // Protect against hackers editing other files\r\n \r\n $path_parts = pathinfo($filename);\r\n $array_extention = array('png', 'jpg');\r\n if (strcasecmp($path_parts[\"extension\"], \"jpg\") != 0) {\r\n //if (!in_array($path_parts[\"extension\"], $array_extention)) \r\n #echo \"Incorrect File Type - JPEG Only\\n\";\r\n return array('status' => 'failed', 'message' => 'Incorrect File Type - JPEG Only');\r\n exit();\r\n }\r\n // Change: removed limitation on file being in current directory - as of version 1.11\r\n // Retrieve the header information\r\n $jpeg_header_data = get_jpeg_header_data($filename);\r\n \r\n // Retreive the EXIF, XMP and Photoshop IRB information from\r\n // the existing file, so that it can be updated\r\n $Exif_array = get_EXIF_JPEG($filename);\r\n $XMP_array = read_XMP_array_from_text(get_XMP_text($jpeg_header_data));\r\n $IRB_array = get_Photoshop_IRB($jpeg_header_data);\r\n \r\n // Update the JPEG header information with the new Photoshop File Info\r\n $jpeg_header_data = put_photoshop_file_info($jpeg_header_data, $new_ps_file_info_array, $Exif_array, $XMP_array, $IRB_array);\r\n \r\n // Check if the Update worked\r\n if ($jpeg_header_data == FALSE) {\r\n //echo '$jpeg_header_data false';\r\n return array('status' => 'failed', 'message' => 'Error - Failure update Photoshop File Info : ' . $filename);\r\n // Abort processing\r\n exit();\r\n }\r\n \r\n // Attempt to write the new JPEG file\r\n if (FALSE == put_jpeg_header_data($filename, $filename, $jpeg_header_data)) {\r\n //echo 'put_jpeg_header_data false';\r\n return array('status' => 'failed', 'message' => 'Error - Failure to write new JPEG : ' . $filename);\r\n // Abort processing\r\n exit();\r\n }\r\n return array('status' => 'succes', 'message' => $filename . ' updated');\r\n }\r\n }", "public function getOriginalImageFileInfo($original_image_url);", "function getImageInfo ( $imagesize, $item_result = null )\n\t{\n\t\t$imageurl = $this->info['graphics_url'];\n\t\t$imageset = null;\n\t\tif ( null != $item_result ) {\n\t\t\tif ( is_array( $item_result['Items']['Item']['ImageSets']['ImageSet'] ) ) {\n\t\t\t\tif ( isset( $item_result['Items']['Item']['ImageSets']['ImageSet'][0] ) && is_array( $item_result['Items']['Item']['ImageSets']['ImageSet'][0] ) ) {\n\t\t\t\t\t$imageset = $item_result['Items']['Item']['ImageSets']['ImageSet'][0];\n\t\t\t\t} else {\n\t\t\t\t\t$imageset = $item_result['Items']['Item']['ImageSets']['ImageSet'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$imageset = $item_result['Items']['Item'];\n\t\t\t}\n\t\t}\n\n\t\tswitch ( strtolower( $imagesize ) )\n\t\t{\n\t\t\tcase 'medium' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['MediumImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['MediumImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['MediumImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-160.gif';\n\t\t\t\t\t$img['h'] = 160;\n\t\t\t\t\t$img['w'] = 160;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'small' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['SmallImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['SmallImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['SmallImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-75.gif';\n\t\t\t\t\t$img['h'] = 75;\n\t\t\t\t\t$img['w'] = 75;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'large' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['LargeImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['LargeImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['LargeImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-500.gif';\n\t\t\t\t\t$img['h'] = 500;\n\t\t\t\t\t$img['w'] = 500;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'swatch' :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['SwatchImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['SwatchImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['SwatchImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = '';\n\t\t\t\t\t$img['h'] = 0;\n\t\t\t\t\t$img['w'] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tif ( NULL === $imageset ) {\n\t\t\t\t\t$img['url']='';\n\t\t\t\t} else {\n\t\t\t\t\t$img['url'] = $imageset['MediumImage']['URL'];\n\t\t\t\t\t$img['h'] = $imageset['MediumImage']['Height'];\n\t\t\t\t\t$img['w'] = $imageset['MediumImage']['Width'];\n\t\t\t\t}\n\t\t\t\tif ( empty( $img['url'] ) ) {\n\t\t\t\t\t$img['url'] = $imageurl . '/no-image-160.gif';\n\t\t\t\t\t$img['h'] = 160;\n\t\t\t\t\t$img['w'] = 160;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn ($img);\n\t}", "function register_image_sizes() {\n\t}", "public function getMimeTypeOfSource()\n {\n if (!isset($this->sourceMimeType)) {\n $this->sourceMimeType = ImageMimeTypeGuesser::lenientGuess($this->source);\n }\n return $this->sourceMimeType;\n }", "function loadFile ($image) {\r\n if ( !$dims=@GetImageSize($image) ) {\r\n trigger_error('Could not find image '.$image);\r\n return false;\r\n }\r\n if ( in_array($dims['mime'],$this->types) ) {\r\n $loader=$this->imgLoaders[$dims['mime']];\r\n $this->source=$loader($image);\r\n $this->sourceWidth=$dims[0];\r\n $this->sourceHeight=$dims[1];\r\n $this->sourceMime=$dims['mime'];\r\n $this->initThumb();\r\n return true;\r\n } else {\r\n trigger_error('Image MIME type '.$dims['mime'].' not supported');\r\n return false;\r\n }\r\n }", "function loadImage()\n\t{\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\t$this->ImageStream = @imagecreatefromgif($this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->ImageStream = @imagecreatefromjpeg($this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->ImageStream = @imagecreatefrompng($this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\t\t}\n\n\t\tif (!$this->ImageStream) {\n\t\t\t$this->printError('image not loaded');\n\t\t}\n\t}", "function store_images($source_id, $type) {\n\t\t$image = File::where('type', $type)->where('source_id', $source_id)->first();\n\n\t\tif ($image) {\n\t\t\treturn $image->image_name;\n\t\t}\n\t\treturn getEmptyStoreImage();\n\t}", "function _process_image($data){\n\t\t\n\t\t// Largest side dimensions for small and large thumbnails\n\t\t$px_sm = 320;\n\t\t$px_lg = 640;\n\t\t\n\t\t// Generate new base name for this image\n\t\t$new_name = uniqid(TRUE);\n\t\t\n\t\t// Initialise array for resizing errors\n\t\t$this->resize_errors = array();\n\t\t\n\t\t// Array to hold the new dimensions\n\t\t$dimensions = array();\n\t\t\n\t\t// Work out the dimensions of the image based on longest side, or set both to same if equal\n\t\tif ($data['image_width'] > $data['image_height']){\n\t\t\t$dimensions['sm']['w'] = $px_sm;\n\t\t\t$dimensions['lg']['w'] = $px_lg;\n\t\t\t$dimensions['sm']['h'] = $data['image_height'] * ($px_sm / $data['image_width']);\n\t\t\t$dimensions['lg']['h'] = $data['image_height'] * ($px_lg / $data['image_width']);\n\t\t} elseif($data['image_width'] < $data['image_height']){\n\t\t\t$dimensions['sm']['w'] = $data['image_width'] * ($px_sm / $data['image_height']);\n\t\t\t$dimensions['lg']['w'] = $data['image_width'] * ($px_lg / $data['image_height']);\n\t\t\t$dimensions['sm']['h'] = $px_sm;\n\t\t\t$dimensions['lg']['h'] = $px_lg;\n\t\t} elseif ($data['image_width'] == $data['image_height']){\n\t\t\t$dimensions['sm']['w'] = $px_sm;\n\t\t\t$dimensions['lg']['w'] = $px_lg;\n\t\t\t$dimensions['sm']['h'] = $px_sm;\n\t\t\t$dimensions['lg']['h'] = $px_lg;\n\t\t}\n\t\t\n\t\t// Global resize vars\n\t\t$config['image_library'] = 'gd2';\n\t\t$config['source_image']\t= $data['full_path'];\n\t\t$config['create_thumb'] = FALSE;\n\t\t$config['maintain_ratio'] = TRUE;\n\t\t$config['quality'] = 100;\n\t\t$this->load->library('image_lib', $config);\n\t\t\n\t\t// Create small image\n\t\t$config['width'] = $dimensions['sm']['w'];\n\t\t$config['height'] = $dimensions['sm']['h'];\n\t\t$config['new_image'] = sprintf('%s/%s.sm%s', realpath('web/upload/'), $new_name, $data['file_ext']);\n\t\t$this->image_lib->initialize($config);\n\t\t$result_sm = $this->image_lib->resize();\n\t\tif($result_sm == FALSE){\n\t\t\tarray_push($this->resize_errors, $this->image_lib->display_errors());\n\t\t}\n\t\t\n\t\t// Create larger image\n\t\t$config['width'] = $dimensions['lg']['w'];\n\t\t$config['height'] = $dimensions['lg']['h'];\n\t\t$config['new_image'] = sprintf('%s/%s.lg%s', realpath('web/upload/'), $new_name, $data['file_ext']);\n\t\t$this->image_lib->initialize($config);\n\t\t$result_lg = $this->image_lib->resize();\n\t\tif($result_lg == FALSE){\n\t\t\tarray_push($this->resize_errors, $this->image_lib->display_errors());\n\t\t}\n\t\t\n\t\t// Delete the original source file now we're finished with it\n\t\t@unlink($data['full_path']);\n\t\t\n\t\t// Finished resizing functions - test for errors and return\n\t\tif($this->resize_errors == NULL){\n\t\t\t// No errors encountered - delete original image\n\t\t\t$name = sprintf('%s.#%s', $new_name, $data['file_ext']);\n\t\t\treturn $name;\n\t\t} else {\n\t\t\t// One or more errors occured when resizing the images\n\t\t\t$this->lasterr = 'Failed to resize the images.';\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t}", "public function register_image_sizes() {\n\n }", "private function parse_image_info($url)\n {\n $final = array();\n $final['source_url'] = $url;\n // <div class=\"field field-name-field-taxonomic-name field-type-taxonomy-term-reference field-label-above\">\n // <div class=\"field field-name-field-description field-type-text-long field-label-none\">\n // <div class=\"field field-name-field-imaging-technique field-type-taxonomy-term-reference field-label-above\">\n // <div class=\"field field-name-field-cc-licence field-type-creative-commons field-label-above\">\n // <div class=\"field field-name-field-creator field-type-text field-label-above\">\n if($html = Functions::lookup_with_cache($url, $this->download_options)) {\n // if(preg_match(\"/<div class=\\\"field field-name-field-taxonomic-name field-type-taxonomy-term-reference field-label-above\\\">(.*?)<div class=\\\"field field-name-field/ims\", $html, $arr)) {\n if(preg_match(\"/<div class=\\\"field field-name-field-taxonomic-name field-type-taxonomy-term-reference field-label-above\\\">(.*?)Download the original/ims\", $html, $arr)) {\n $str = $arr[1];\n if(preg_match(\"/<div class=\\\"field-item even\\\">(.*?)<\\/div>/ims\", $str, $arr)) {\n $str = trim($arr[1]);\n $final['sciname'] = $str;\n }\n }\n if(preg_match(\"/<div class=\\\"field field-name-field-description field-type-text-long field-label-none\\\">(.*?)Download the original/ims\", $html, $arr)) {\n $str = $arr[1];\n if(preg_match(\"/<div class=\\\"field-item even\\\">(.*?)<\\/div>/ims\", $str, $arr)) {\n $str = trim($arr[1]);\n $final['description'] = $str;\n }\n }\n if(preg_match(\"/<div class=\\\"field field-name-field-imaging-technique field-type-taxonomy-term-reference field-label-above\\\">(.*?)Download the original/ims\", $html, $arr)) {\n $str = $arr[1];\n if(preg_match(\"/<div class=\\\"field-item even\\\">(.*?)<\\/div>/ims\", $str, $arr)) {\n $str = trim($arr[1]);\n $final['imaging technique'] = $str;\n }\n }\n if(preg_match(\"/<div class=\\\"field field-name-field-cc-licence field-type-creative-commons field-label-above\\\">(.*?)Download the original/ims\", $html, $arr)) {\n $str = $arr[1];\n if(preg_match(\"/<div class=\\\"field-item even\\\">(.*?)<\\/div>/ims\", $str, $arr)) {\n $str = trim($arr[1]);\n if(preg_match(\"/href=\\\"(.*?)\\\"/ims\", $str, $arr)) {\n $license = $arr[1];\n if(substr($license,0,2) == \"//\") $final['license'] = \"http:\".$license;\n else $final['license'] = $license;\n }\n else $final['license'] = $str;\n }\n if($final['license'] == \"All rights reserved.\") $final['license'] = \"all rights reserved\";\n // $final['license'] = \"http://creativecommons.org/licenses/by-nc-sa/3.0/\"; //debug force\n }\n if(preg_match(\"/<div class=\\\"field field-name-field-creator field-type-text field-label-above\\\">(.*?)Download the original/ims\", $html, $arr)) {\n $str = $arr[1];\n if(preg_match(\"/<div class=\\\"field-item even\\\">(.*?)<\\/div>/ims\", $str, $arr)) {\n $str = trim($arr[1]);\n $final['creator'] = $str;\n }\n }\n //<h2 class=\"element-invisible\"><a href=\"http://cephbase.eol.org/sites/cephbase.eol.org/files/cb0001.jpg\">cb0001.jpg</a></h2>\n if(preg_match(\"/<h2 class=\\\"element-invisible\\\">(.*?)<\\/h2>/ims\", $html, $arr)) {\n if(preg_match(\"/href=\\\"(.*?)\\\"/ims\", $arr[1], $arr2)) $final['media_url'] = $arr2[1];\n }\n }\n // print_r($final); exit;\n return $final;\n }", "function getImagePathInfo() \n { \n return $this->_imagePathInfo; \n }", "function wp_get_additional_image_sizes()\n {\n }", "protected function extractSvgImageSizes() {}", "public function getImageSize()\n\t{\n\t\tlist($width, $height) = getimagesize($this->getFullpath());\n\n\t\treturn compact('width', 'height');\n\t}", "function processFile($filepath) {\n\t$output = [];\n\n\t// Retrieve the image information.\n\t$data = file_get_contents($filepath);\n\t$output['base64'] = base64_encode($data);\n\t$output['type'] = pathinfo($filepath, PATHINFO_EXTENSION);\n\n\t// Check for if the image contains a hot dog.\n\t$properties = checkHotDog($filepath);\n\tif ($properties['ishotdog']) {\n\t\t$output['hotdog'] = true;\n\t\t$output['title'] = 'Hot Dog';\n\t\t$output['description'] = $properties['description'];\n\t}\n\telse {\n\t\t$output['hotdog'] = false;\n\t\t$output['title'] = 'Not a Hot Dog';\n\t\t$output['description'] = $properties['description'];\n\t}\n\n\tif (isset($properties['error'])) {\n\t\t$output['error'] = $properties['error'];\n\t}\n\n\treturn $output;\n}", "function wp_image_src_get_dimensions($image_src, $image_meta, $attachment_id = 0)\n {\n }", "function exif_imagetype( $filename ) {\n\t\tif ( ! is_dir( $filename ) && ( list( $width, $height, $type, $attr ) = getimagesize( $filename ) ) !== false ) {\n\t\t\treturn $type;\n\t\t}\n\n\t\treturn false;\n\t}", "function loadData ($image,$mime) {\r\n if ( in_array($mime,$this->types) ) {\r\n $this->source=imagecreatefromstring($image);\r\n $this->sourceWidth=imagesx($this->source);\r\n $this->sourceHeight=imagesy($this->source);\r\n $this->sourceMime=$mime;\r\n $this->initThumb();\r\n return true;\r\n } else {\r\n trigger_error('Image MIME type '.$mime.' not supported');\r\n return false;\r\n }\r\n }", "function wp_getimagesize($filename, array &$image_info = \\null)\n {\n }", "public function save(array $options = []) {\n/* if (preg_match('/image/', $this->mime_type)) {\n $this->isImage = true;\n $manager = new ImageManager(array('driver' => 'gd'));\n $image = Storage::disk('public')->get($this->myFile);\n $imageOrig = $manager->make($image); \n //Get width and height of the image\n $this->img_width = $imageOrig->width();\n $this->img_height = $imageOrig->height();\n }*/\n parent::save($options);\n $this->createThumbs();\n }", "public function getImageMimeType(): string\n {\n return $this->imageMimeType;\n }", "public function getMimeType() {\r\n\t\t// hard coding\r\n\t\treturn \"image/jpeg\";\r\n\t}", "public function IncorrectImagePixelSize()\n\t{\n\t\tglobal $ft_dom;\n\t\t$code = array('');\t\t\t\n\t\t$elements = $ft_dom->getElementsByTagName('img');\n\t\t$img_array = array();\n\t\t$badimg = array();\n\t\t$code[1] = 0;\n\t\t$code[2] = '';\n\t\t$max_resource_tests = 50;\n\n\t foreach ($elements as $element) { \n\t\t\t//don't try to do too many.\n\t\t\tif(count($img_array) > $max_resource_tests) { continue; }\n\t\t\tif(Helper::likelyPixel($element)) { continue; }\n\t\t\tif($element->hasAttribute('src')) {\n\t\t\t\t//if((!$element->hasAttribute('width') && $element->hasAttribute('style')) && Helper::hasInlineStyleAttribute($element->getAttribute('style'),'width')) { echo \"width set inline.\"; }\n\t\t\t\tif(in_array($element->getAttribute('src'),$img_array)) { continue; }\n\t\t\t\t\n\t\t\t\tif ($element->hasAttribute('width') || $element->hasAttribute('height')) {\n\t\t\t\t\t$link = Helper::getAbsoluteResourceLink($element->getAttribute('src'));\n\t\t\t\t\t\n\t\t\t\t\tif(Helper::http200Test($link)) { \n\t\t\t\t\t\t\n\t\t\t\t\t\tlist($width, $height) = getimagesize($link);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($element->hasAttribute('width')) {\n\t\t\t\t\t\t\t//echo \"\\n\\nwidth:\" . $element->getAttribute('width') . \"\\n\";\n\n\t\t\t\t\t\t\tif($element->getAttribute('width') != $width) {\n\t\t\t\t\t\t\t\tif($code[1] <= Helper::$max_disp_threshold) { $code[0] .= Helper::printCodeWithLineNumber($element) . \"\\nshould be width=\\\"$width\\\"\"; }\n\t\t\t\t\t\t\t\t$badimg[] = $element;\n\t\t\t\t\t\t\t\t$code[1]++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($element->hasAttribute('height')) {\n\n\t\t\t\t\t\t\tif($element->getAttribute('height') != $height) {\n\t\t\t\t\t\t\t\tif($code[1] <= Helper::$max_disp_threshold) {\n\t\t\t\t\t\t\t\t\tif(in_array($element, $badimg)) {\n\t\t\t\t\t\t\t\t\t\t$code[0] .= \"\\n and height=\\\"$height\\\"(\" .$element->getAttribute('src') . \")\";\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$code[0] .= Helper::printCodeWithLineNumber($element) . \"\\nshould be height=\\\"$height\\\"\";\n\t\t\t\t\t\t\t\t\t\t$code[1]++;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(in_array($element, $badimg)) { $code[0] .= \"\\n\\n\"; }\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$img_array[] = $element->getAttribute('src');\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\tif($code[0] != '') {\n\t\t\tif($code[1] > Helper::$max_disp_threshold) { $code[0] .= '...'; }\n\t\t\tif($code[1] > 1) { $code[2] = 's'; }\t\t\t\n\t\t\treturn $code;\n\t\t}\n\t return false;\n\t}", "public function image_sizes() {\n add_image_size('careerfy-job-medium', 358, 204, true); // posts for team grid and medium\n add_image_size('careerfy-posts-msmal', 85, 58, true); // posts for team grid and medium\n add_image_size('careerfy-emp-msmal', 132, 47, true); //\n add_image_size('careerfy-candidate-2', 350, 450, true); // posts for team grid and medium\n add_image_size('careerfy-testimonial-thumb', 268, 268, true); // posts for team grid and medium\n add_image_size('careerfy-service', 247, 252, true); // posts for team grid and medium\n }", "public function getImage();", "public function getImage();", "public function getImage();", "public function getImage();", "function getFileType()\n {\n try\n {\n list($this->m_Width, $this->m_height, $this->m_type, $this->m_attr) = getimagesize($this->m_ImagePath);\n return $this->m_type;\n }\n catch (Exception $ex)\n {\n return 0;\n }\n }", "function __checkImgParams() {\n\t\t/* check file type */\n\t\t$this->__checkType($this->request->data['Upload']['file']['type']);\n\t\t\n\t\n\t\t\n\t\t/* check file size */\n\t\t$this->__checkSize($this->request->data['Upload']['file']['size']);\n\t\t\n\t\t\n\t\t\n\t\t/* check image dimensions */\n\t\t$this->__checkDimensions($this->request->data['Upload']['file']['tmp_name']);\n\t\t\n\t\t\t\n\t}", "function get_info($file) {\n\t$info = getimagesize($file);\n\t$filesize = filesize($file);\n\treturn array(\n\t\t'width'\t\t=> intval($info[0]),\n\t\t'height'\t=> intval($info[1]),\n\t\t'bytes'\t\t=> intval($filesize),\n\t\t'size'\t\t=> format_bytes($filesize),\n\t\t'mime'\t\t=> strtolower($info['mime']),\n\t\t'html'\t\t=> 'width=\"'.$info[0].'\" height=\"'.$info[1].'\"'\n\t\t//'bits' => $info['bits'],\n\t\t//'channels' => $info['channels'],\n\t);\n}", "public function parse(): void\n {\n $compression = $this->file->readShort();\n $this->parseImageData($compression);\n }", "public function isImage()\n {\n return str_contains($this->mimetype, 'image/');\n }", "protected function addImageSizeConfigs()\n {\n // TODO: add image size configs\n }", "public function correctImage(){\n parent::isImage();\n parent::exist();\n parent::sizeFile();\n return $this->uploadOk;\n }", "public function isImage()\n {\n $mime_type = $this->getMimeType() ?: $this->detectMimeType();\n\n return (strpos($mime_type, 'image') === 0);\n }", "function url_image_size($url)\n{\n\t// Can we pull this from the cache... please please?\n\t$temp = array();\n\tif (Cache::instance()->getVar($temp, 'url_image_size-' . md5($url), 3600))\n\t{\n\t\treturn $temp;\n\t}\n\n\t$url_path = parse_url($url, PHP_URL_PATH);\n\t$extension = pathinfo($url_path, PATHINFO_EXTENSION);\n\n\t// Set a RANGE to read\n\tswitch ($extension)\n\t{\n\t\tcase 'jpg':\n\t\tcase 'jpeg':\n\t\t\t// Size location block is variable, so we fetch a meaningful chunk\n\t\t\t$range = 32768;\n\t\t\tbreak;\n\t\tcase 'png':\n\t\t\t// Size will be in the first 24 bytes\n\t\t\t$range = 1024;\n\t\t\tbreak;\n\t\tcase 'gif':\n\t\t\t// Size will be in the first 10 bytes\n\t\t\t$range = 1024;\n\t\t\tbreak;\n\t\tcase 'bmp':\n\t\t\t// Size will be in the first 32 bytes\n\t\t\t$range = 1024;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// Read the entire file then, webp for example might have the exif at the end\n\t\t\t$range = 0;\n\t}\n\n\t$image = new FsockFetchWebdata(array('max_length' => $range));\n\t$image->get_url_data($url);\n\n\t// The server may not understand Range: so lets try to fetch the entire thing\n\t// assuming we were not simply turned away\n\tif ($image->result('code') != 200 && $image->result('code') != 403)\n\t{\n\t\t$image = new FsockFetchWebdata(array());\n\t\t$image->get_url_data($url);\n\t}\n\n\t// Here is the data, getimagesizefromstring does not care if its a complete image, it only\n\t// searches for size headers in a given data set.\n\t$data = $image->result('body');\n\t$size = getimagesizefromstring($data);\n\n\t// Well, ok, umm, fail!\n\tif ($data === false || $size === false)\n\t{\n\t\treturn array(-1, -1, -1);\n\t}\n\n\t// Save this for 1hour, its not like the image size is going to change\n\tCache::instance()->put('url_image_size-' . md5($url), $size, 3600);\n\n\treturn $size;\n}", "public function compress_image($source_file, $target_file, $nwidth, $nheight, $quality) {\r\n\t //Return an array consisting of image type, height, widh and mime type.\r\n\t $image_info = getimagesize($source_file);\r\n\t if(!($nwidth > 0)) $nwidth = $image_info[0];\r\n\t if(!($nheight > 0)) $nheight = $image_info[1];\r\n\r\n\t if(!empty($image_info)) {\r\n\t switch($image_info['mime']) {\r\n\t case 'image/jpeg' :\r\n\t if($quality == '' || $quality < 0 || $quality > 100) $quality = 75; //Default quality\r\n\t // Create a new image from the file or the url.\r\n\t $image = imagecreatefromjpeg($source_file);\r\n\t $thumb = imagecreatetruecolor($nwidth, $nheight);\r\n\t //Resize the $thumb image\r\n\t imagecopyresized($thumb, $image, 0, 0, 0, 0, $nwidth, $nheight, $image_info[0], $image_info[1]);\r\n\t // Output image to the browser or file.\r\n\t return imagejpeg($thumb, $target_file, $quality);\r\n\r\n\t break;\r\n\r\n\t case 'image/png' :\r\n\t if($quality == '' || $quality < 0 || $quality > 9) $quality = 6; //Default quality\r\n\t // Create a new image from the file or the url.\r\n\t $image = imagecreatefrompng($source_file);\r\n\t $thumb = imagecreatetruecolor($nwidth, $nheight);\r\n\t //Resize the $thumb image\r\n\t imagecopyresized($thumb, $image, 0, 0, 0, 0, $nwidth, $nheight, $image_info[0], $image_info[1]);\r\n\t // Output image to the browser or file.\r\n\t return imagepng($thumb, $target_file, $quality);\r\n\t break;\r\n\r\n\t case 'image/gif' :\r\n\t if($quality == '' || $quality < 0 || $quality > 100) $quality = 75; //Default quality\r\n\t // Create a new image from the file or the url.\r\n\t $image = imagecreatefromgif($source_file);\r\n\t $thumb = imagecreatetruecolor($nwidth, $nheight);\r\n\t //Resize the $thumb image\r\n\t imagecopyresized($thumb, $image, 0, 0, 0, 0, $nwidth, $nheight, $image_info[0], $image_info[1]);\r\n\t // Output image to the browser or file.\r\n\t return imagegif($thumb, $target_file, $quality); //$success = true;\r\n\t break;\r\n\r\n\t default:\r\n\t echo \"<h4>Not supported file type!</h4>\";\r\n\t break;\r\n\t }\r\n\t }\r\n\t}", "function getImageSource() {return $this->_imagesource;}", "abstract public function process($image, $actions, $dir, $file);", "public function parsePICTURE()\n {\n }", "function testCompatible(){\n\t\tif($this->$imageAsset[\"type\"] == \"image/jpeg\" || $_FILES[\"image_upload_box\"][\"type\"] == \"image/pjpeg\"){\t\n\t\t\t$this->imgType = 'jpg';\n\t\t}\t\t\n\t\t// if uploaded image was GIF\n\t\tif($this->$imageAsset[\"type\"] == \"image/gif\"){\t\n\t\t\t$this->imgType = 'gif';\n\t\t}\t\n\t\t// if uploaded image was PNG\n\t\tif($this->$imageAsset[\"type\"] == \"image/x-png\"){\n\t\t\t$this->imgType = 'png';\n\t\t}\n\t\telse {\n\t\t\t$this->imgType = 'invalid';\n\t\t}\n\t\t\n\t}", "function getImageSize() \n { \n return array($this->_width,$this->_height); \n }", "function rest_get_avatar_sizes()\n {\n }", "private function get_image_sizes() {\n\n\t\treturn array(\n\t\t\t'square_medium' => array( 200, 200 ),\n\t\t\t'full' => array( 1200, 1200 ),\n\t\t);\n\n\t}", "public function testGetImageSize()\n {\n $img = new P4Cms_Image();\n $data = file_get_contents(TEST_ASSETS_PATH . '/images/luigi.png');\n $img->setData($data);\n $this->assertSame(\n $img->getImageSize(),\n array('width' => 516, 'height' => 710),\n 'Expected image size to be 516x710 pixels.'\n );\n\n if (extension_loaded('imagick')) {\n $img = new P4Cms_Image();\n try {\n $img->getImageSize();\n $this->fail('Expected failure with empty Imagick object.');\n } catch (P4Cms_Image_Exception $e) {\n $this->assertSame(\n $e->getMessage(),\n \"Can not get image size: no image data were set.\"\n );\n } catch (Exception $e) {\n $this->fail('Unexpected exception: '. $e->getMessage());\n }\n } else {\n $this->markTestIncomplete(\"Cannot verify default driver, 'imagick' extension not found.\");\n }\n }", "function wp_read_image_metadata($file)\n {\n }", "function custom_image_sizes() {\n}", "function compress_image($source_file, $target_file, $nwidth, $nheight, $quality) {\n $image_info = getimagesize($source_file);\n if(!($nwidth > 0)) $nwidth = $image_info[0];\n if(!($nheight > 0)) $nheight = $image_info[1];\n \n if(!empty($image_info)) {\n switch($image_info['mime']) {\n case 'image/jpeg' :\n if($quality == '' || $quality < 0 || $quality > 100) $quality = 75; //Default quality\n // Create a new image from the file or the url.\n $image = imagecreatefromjpeg($source_file);\n $thumb = imagecreatetruecolor($nwidth, $nheight);\n //Resize the $thumb image\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $nwidth, $nheight, $image_info[0], $image_info[1]);\n // Output image to the browser or file.\n return imagejpeg($thumb, $target_file, $quality); \n \n break;\n \n case 'image/png' :\n if($quality == '' || $quality < 0 || $quality > 9) $quality = 6; //Default quality\n // Create a new image from the file or the url.\n $image = imagecreatefrompng($source_file);\n $thumb = imagecreatetruecolor($nwidth, $nheight);\n //Resize the $thumb image\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $nwidth, $nheight, $image_info[0], $image_info[1]);\n // Output image to the browser or file.\n return imagepng($thumb, $target_file, $quality);\n break;\n \n case 'image/gif' :\n if($quality == '' || $quality < 0 || $quality > 100) $quality = 75; //Default quality\n // Create a new image from the file or the url.\n $image = imagecreatefromgif($source_file);\n $thumb = imagecreatetruecolor($nwidth, $nheight);\n //Resize the $thumb image\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $nwidth, $nheight, $image_info[0], $image_info[1]);\n // Output image to the browser or file.\n return imagegif($thumb, $target_file, $quality); //$success = true;\n break;\n \n default:\n echo \"<h4>Not supported file type!</h4>\";\n break;\n }\n }\n }", "public function checkImageType()\n {\n if (empty($this->checkImageType)) {\n return true;\n }\n\n if (('image' == substr($this->mediaType, 0, strpos($this->mediaType, '/')))\n || (!empty($this->mediaRealType)\n && 'image' == substr($this->mediaRealType, 0, strpos($this->mediaRealType, '/')))\n ) {\n if (!@getimagesize($this->mediaTmpName)) {\n $this->setErrors(\\XoopsLocale::E_INVALID_IMAGE_FILE);\n return false;\n }\n }\n return true;\n }", "public function read_image_file_size($url){\n\t\t\n if (strpos($url, 'http') !== false){\n\t\t\t\n\t\t try{\n\n\t\t // $time_ini_check_url_size = microtime(1);\n\t\t \n\t\t if (isset($this->stored_url_files_sizes[$url])){\n\n\t\t // sl_debbug('# time_check_size_url stored: '.(microtime(1) - $time_ini_check_url_size).' seconds.', 'timer');\n\t\t return $this->stored_url_files_sizes[$url];\n\n\t\t }else{\n\t\t \n\t\t $image_url_info = pathinfo($url);\n\t\t $filename_encoded = $image_url_info['basename'];\t \n\t\t $filename_encoded = rawurlencode(rawurldecode($filename_encoded));\n\t\t $image_url_encoded = $image_url_info['dirname'].'/'.$filename_encoded;\n\n\t\t $headers = get_headers($image_url_encoded, TRUE);\n\t\t // sl_debbug('# time_check_size_url: '.(microtime(1) - $time_ini_check_url_size).' seconds.', 'timer');\n\n\t\t }\n\n\t\t }catch(\\Exception $e){\n\n\t\t sl_debbug(\"## Error. Remote image with URL \".$url.\" couldn't been synchronized: \".$e->getMessage());\n\t\t return false;\n\n\t\t }\n\n\t\t if (isset($headers['Content-Length'])){\n\t\t \n\t\t $this->stored_url_files_sizes[$url] = $headers['Content-Length'];\n\t\t return $headers['Content-Length'];\n\t\t \n\t\t }else if (isset($headers['content-length'])){\n\t\t \n\t\t $this->stored_url_files_sizes[$url] = $headers['content-length'];\n\t\t return $headers['content-length'];\n\t\t \n\t\t }\n\t\t\n\t\t return false;\n\n\t\t}else{\n\t\t\t\n\t\t try{\n\n\t\t // $time_ini_check_local_size = microtime(1);\n\t\t $url_filesize = filesize($url);\n\t\t clearstatcache();\n\t\t // sl_debbug('# time_check_size_local: '.(microtime(1) - $time_ini_check_local_size).' seconds.', 'timer');\n\t\t return $url_filesize; \n\n\t\t }catch(\\Exception $e){\n\n\t\t sl_debbug(\"## Notice. Could not read local image with URL \".$url.\" : \".$e->getMessage());\n\n\t\t }\n\t\t \n\t\t return false;\n\n\t\t}\n\t\t\n\t}", "function wp_get_image_mime($file)\n {\n }", "function wp_calculate_image_sizes($size, $image_src = \\null, $image_meta = \\null, $attachment_id = 0)\n {\n }", "function getimagesize($filename){\n\t\treturn we_thumbnail::getimagesize($filename);\n\t}", "public function fileNeedsProcessing()\n {\n // @todo Implement fileNeedsProcessing() method.\n\n /**\n * Checks to perform:\n * - width/height smaller than image, keeping aspect ratio?\n */\n }", "public function get_uploaded_header_images()\n {\n }", "function ImageExt($filename){\n \n $size = getimagesize($filename);\nif($size==FALSE){\n $er=''; \n\n}else{\n $ext=explode(\"/\", $size['mime']);\n $er=$ext[1]; \n}\nreturn $er;\n}", "function _gd_parse_image($file, $to_file, $to_type, $flags = 0, $params = Array())\r\n {\r\n if (!QF_IMAGER_USE_GD) // if there is no GD2 module linked\r\n return false;\r\n $error = false;\r\n\r\n if (!($from_type = getimagesize($file)))\r\n return false;\r\n $from_type = $from_type[2];\r\n\r\n\r\n if (!is_array($params))\r\n $params = $this->def_params;\r\n else\r\n $params += $this->def_params;\r\n\r\n // required actions for output formats\r\n switch ($to_type)\r\n {\r\n case IMAGETYPE_GIF:\r\n if (!(imagetypes() & IMG_GIF) || !QF_IMAGER_GIF_WRITE)\r\n return false;\r\n $flags |= QF_IMAGER_DO_PALETTIZE;\r\n //$params['resample'] = false;\r\n break;\r\n case IMAGETYPE_JPEG:\r\n if (!(imagetypes() & IMG_JPG))\r\n return false;\r\n $flags |= QF_IMAGER_DO_DROPALPHA | QF_IMAGER_DO_DEPALETTIZE;\r\n $flags &= ~QF_IMAGER_DO_PALETTIZE;\r\n break;\r\n case IMAGETYPE_PNG:\r\n if (!(imagetypes() & IMG_PNG))\r\n return false;\r\n break;\r\n default:\r\n return false;\r\n }\r\n\r\n if ($img = $this->_gd_load($file))\r\n {\r\n // transparency options check\r\n if ($from_type == IMAGETYPE_JPEG) // JPEG does not contain transparency\r\n {\r\n if ($params['rsize_mode'] != QF_IMAGER_RSIZE_TBRDR)\r\n $params['alpha_br'] = 0;\r\n $flags &= ~QF_IMAGER_DO_DROPALPHA;\r\n }\r\n elseif ($flags & QF_IMAGER_DO_DROPALPHA)\r\n $params['alpha_br'] = 0;\r\n\r\n // resizing optimization\r\n if (!imageistruecolor($img) && ($flags & QF_IMAGER_DO_RESIZE) && !($flags & QF_IMAGER_DO_DEPALETTIZE))\r\n $flags |= QF_IMAGER_DO_DEPALETTIZE | QF_IMAGER_DO_PALETTIZE;\r\n\r\n // depalettizing\r\n if (!imageistruecolor($img) && ($flags & QF_IMAGER_DO_DEPALETTIZE))\r\n if ($this->_gd_depalettize($img, ($flags & QF_IMAGER_DO_DROPALPHA), $params['back_col']))\r\n $flags &= ~QF_IMAGER_DO_DROPALPHA;\r\n\r\n // resizing\r\n if ($flags & QF_IMAGER_DO_RESIZE)\r\n {\r\n if ($this->_gd_resize($img, $params['width'], $params['height'], $params['resample'], $params['rsize_mode'], $params['rsize_brdr'], $params['back_col'], ($flags & QF_IMAGER_DO_DROPALPHA)))\r\n $flags &= ~QF_IMAGER_DO_DROPALPHA;\r\n else\r\n {\r\n imagedestroy($img);\r\n return false;\r\n }\r\n }\r\n\r\n // watermark placing\r\n if (($flags & QF_IMAGER_DO_WATERMARK) && $params['wmark_img'] && ($wimg = $this->_gd_load($params['wmark_img'])))\r\n {\r\n $ww = imagesx($wimg);\r\n $wh = imagesy($wimg);\r\n if (($wa = (float) $params['wmark_scl']) && ($wa != 1))\r\n {\r\n $this->_gd_resize($wimg, $wa*$ww, $wa*$wh, $params['resample']);\r\n $ww = imagesx($wimg);\r\n $wh = imagesy($wimg);\r\n }\r\n\r\n $iw = imagesx($img);\r\n $ih = imagesy($img);\r\n $wx = (int) $params['wmark_x'];\r\n $wy = (int) $params['wmark_y'];\r\n $wp = (int) $params['wmark_pl'];\r\n if ($wp & QF_IMAGER_WMARK_CENTER)\r\n $wx = (int) (($iw - $ww)/2 + $wx);\r\n elseif ($wp & QF_IMAGER_WMARK_RIGHT)\r\n $wx = (int) ($iw - $ww - $wx);\r\n if ($wp & QF_IMAGER_WMARK_MIDDLE)\r\n $wy = (int) (($ih - $wh)/2 + $wy);\r\n elseif ($wp & QF_IMAGER_WMARK_BOTTOM)\r\n $wy = (int) ($ih - $wh - $wy);\r\n\r\n $this->_gd_watermark($img, $wimg, $wx, $wy, $params['wmark_al'], $params['back_col']);\r\n imagedestroy($wimg);\r\n }\r\n\r\n // palettizing/alpha-drop\r\n if (imageistruecolor($img) && ($flags & QF_IMAGER_DO_PALETTIZE))\r\n if ($this->_gd_palettize($img, $params['p_colors'], $params['back_col'], $params['alpha_br']))\r\n $flags &= ~QF_IMAGER_DO_DROPALPHA;\r\n\r\n if ($flags & QF_IMAGER_DO_DROPALPHA)\r\n $this->_gd_drop_alpha($img, $params['back_col']);\r\n\r\n // finally saving\r\n if ($this->_gd_save($img, $to_file, $to_type))\r\n {\r\n imagedestroy($img);\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }" ]
[ "0.71491253", "0.69297826", "0.6560186", "0.65012056", "0.64755875", "0.62051004", "0.61632794", "0.6095027", "0.6080456", "0.6054183", "0.6045824", "0.6022847", "0.60076004", "0.60044444", "0.59772086", "0.59537333", "0.5947711", "0.59413505", "0.5832828", "0.58320606", "0.58153343", "0.5800342", "0.577562", "0.5767533", "0.5750685", "0.5730053", "0.5689565", "0.56615835", "0.5654908", "0.5649597", "0.56467724", "0.56309396", "0.56121475", "0.56044626", "0.5597605", "0.55909264", "0.5575675", "0.5572727", "0.55676734", "0.5565984", "0.55488825", "0.5544339", "0.5544276", "0.55430007", "0.55367905", "0.5527374", "0.5527002", "0.55139756", "0.55038214", "0.5499148", "0.5494655", "0.54466194", "0.5441709", "0.5426284", "0.5415597", "0.54109794", "0.54102296", "0.54085094", "0.54034084", "0.53969437", "0.5395294", "0.5384458", "0.5383923", "0.5380991", "0.5378141", "0.537763", "0.5375097", "0.5375097", "0.5375097", "0.5375097", "0.5368038", "0.5365612", "0.5363503", "0.5356828", "0.534935", "0.534516", "0.5344725", "0.5335354", "0.5323627", "0.53160053", "0.5315131", "0.5313383", "0.5303714", "0.53030026", "0.5301249", "0.5299847", "0.5291125", "0.5281784", "0.5279841", "0.52798146", "0.5263688", "0.52633834", "0.52565825", "0.52539605", "0.52506614", "0.5249604", "0.52456117", "0.52409405", "0.523496", "0.5229533" ]
0.67621034
2
If one of the canvas dimensions is omitted, calculate it and complement it in $this>params Requirement: Needs sourceWidth and sourceHeight to be present, so can only be called after analyzing the image.
private function _addOmittedCanvasDimension() { $sourceWidth = $this->params['sourceWidth']; $sourceHeight = $this->params['sourceHeight']; $sourceRatio = $sourceWidth / $sourceHeight; if ( empty($this->params['w']) && empty($this->params['h']) ) { $this->params['w'] = $sourceWidth; $this->params['h'] = $sourceHeight; } elseif (empty($this->params['h'])) { if ( !$this->params['grow'] && $this->params['w'] > $sourceWidth ) { $this->params['h'] = $sourceHeight; } else { $this->params['h'] = $this->params['w'] / $sourceRatio; } } elseif (empty($this->params['w'])) { if ( !$this->params['grow'] && $this->params['h'] > $sourceHeight ) { $this->params['w'] = $sourceWidth; } else { $this->params['w'] = $this->params['h'] * $sourceRatio; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getProjectionSize() {\n\t\t$sourceWidth = $this->params['sourceWidth'];\n\t\t$sourceHeight = $this->params['sourceHeight'];\n\t\t$sourceRatio = $sourceWidth / $sourceHeight;\n\n\t\t$canvasWidth = $this->params['w'];\n\t\t$canvasHeight = $this->params['h'];\n\t\t$canvasRatio = $canvasWidth / $canvasHeight;\n\n\n\t\t//\tthe image is not allowed to be cut off in any dimension\n\t\tif ($sourceRatio < $canvasRatio) {\n\t\t\t//\tsource is less landscape-like than canvas\n\t\t\t$leadDimension = !$this->params['crop'] ?\n\t\t\t\t'Height' : 'Width';\n\t\t} else {\n\t\t\t//\tsource is more landscape-like than canvas\n\t\t\t$leadDimension = !$this->params['crop'] ?\n\t\t\t\t'Width' : 'Height';\n\t\t}\n\n\t\tif (\n\t\t\t!$this->params['grow'] &&\n\t\t\t${'source'.$leadDimension} < ${'canvas'.$leadDimension}\n\t\t) {\n\t\t\t${'projection'.$leadDimension} = ${'source'.$leadDimension};\n\t\t} else {\n\t\t\t${'projection'.$leadDimension} = ${'canvas'.$leadDimension};\n\t\t}\n\n\t\tif (isset($projectionWidth)) {\n\t\t\t$projectionHeight = $projectionWidth / $sourceRatio;\n\t\t} elseif (isset($projectionHeight)) {\n\t\t\t$projectionWidth = $projectionHeight * $sourceRatio;\n\t\t}\n\n\t\treturn array(round($projectionWidth), round($projectionHeight));\n\t}", "private function __setOptimalSizeByCrop() {\n \n $heightRatio = $this->__originalImageHeight / $this->__requestedHeight;\n $widthRatio = $this->__originalImageWidth / $this->__requestedWidth;\n \n if ($heightRatio < $widthRatio) {\n $optimalRatio = $heightRatio;\n } else {\n $optimalRatio = $widthRatio;\n }\n \n $this->__optimalHeight = $this->__originalImageHeight / $optimalRatio;\n $this->__optimalWidth = $this->__originalImageWidth / $optimalRatio;\n \n }", "public function CalcWidthHeight()\n {\n list($this->width, $this->height) = $this->imgInfo;\n\n $aspectRatio = $this->width / $this->height;\n\n if($this->cropToFit && $this->newWidth && $this->newHeight) {\n $targetRatio = $this->newWidth / $this->newHeight;\n $this->cropWidth = $targetRatio > $aspectRatio ? $this->width : round($this->height * $targetRatio);\n $this->cropHeight = $targetRatio > $aspectRatio ? round($this->width / $targetRatio) : $this->height;\n if($this->verbose) { self::verbose(\"Crop to fit into box of {$this->newWidth}x{$this->newHeight}. Cropping dimensions: {$this->cropWidth}x{$this->cropHeight}.\"); }\n }\n else if($this->newWidth && !$this->newHeight) {\n $this->newHeight = round($this->newWidth / $aspectRatio);\n if($this->verbose) { self::verbose(\"New width is known {$this->newWidth}, height is calculated to {$this->newHeight}.\"); }\n }\n else if(!$this->newWidth && $this->newHeight) {\n $this->newWidth = round($this->newHeight * $aspectRatio);\n if($this->verbose) { self::verbose(\"New height is known {$this->newHeight}, width is calculated to {$this->newWidth}.\"); }\n }\n else if($this->newWidth && $this->newHeight) {\n $ratioWidth = $this->width / $this->newWidth;\n $ratioHeight = $this->height / $this->newHeight;\n $ratio = ($ratioWidth > $ratioHeight) ? $ratioWidth : $ratioHeight;\n $this->newWidth = round($this->width / $ratio);\n $this->newHeight = round($this->height / $ratio);\n if($this->verbose) { self::verbose(\"New width & height is requested, keeping aspect ratio results in {$this->newWidth}x{$this->newHeight}.\"); }\n }\n else {\n $this->newWidth = $this->width;\n $this->newHeight = $this->height;\n if($this->verbose) { self::verbose(\"Keeping original width & heigth.\"); }\n }\n }", "function image_resize ( $args ) { /*\r\n\t\t * Changelog\r\n\t\t *\r\n\t\t * Version 3, July 20, 2007\r\n\t\t * - Cleaned\r\n\t\t *\r\n\t\t * Version 2, August 12, 2006\r\n\t\t * - Changed it to use $args\r\n\t\t */\r\n\t\t\r\n\t\t// Set default variables\r\n\t\t$image = $width_old = $height_old = $width_new = $height_new = $canvas_width = $canvas_height = $canvas_size = null;\r\n\t\t\r\n\t\t$x_old = $y_old = $x_new = $y_new = 0;\r\n\t\t\r\n\t\t// Exract user\r\n\t\textract($args);\r\n\t\t\r\n\t\t// Read image\r\n\t\t$image = image_read($image,false);\r\n\t\tif ( empty($image) ) { // error\r\n\t\t\ttrigger_error('no image was specified', E_USER_WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Check new dimensions\r\n\t\tif ( empty($width_new) || empty($height_new) ) { // error\r\n\t\t\ttrigger_error('Desired/new dimensions not found', E_USER_WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Do old dimensions\r\n\t\tif ( empty($width_old) && empty($height_old) ) { // Get the old dimensions from the image\r\n\t\t\t$width_old = imagesx($image);\r\n\t\t\t$height_old = imagesy($image);\r\n\t\t}\r\n\t\t\r\n\t\t// Do canvas dimensions\r\n\t\tif ( empty($canvas_width) && empty($canvas_height) ) { // Set default\r\n\t\t\t$canvas_width = $width_new;\r\n\t\t\t$canvas_height = $height_new;\r\n\t\t}\r\n\t\t\r\n\t\t// Let's force integer values\r\n\t\t$width_old = intval($width_old);\r\n\t\t$height_old = intval($height_old);\r\n\t\t$width_new = intval($width_new);\r\n\t\t$height_new = intval($height_new);\r\n\t\t$canvas_width = intval($canvas_width);\r\n\t\t$canvas_height = intval($canvas_height);\r\n\t\t\r\n\t\t// Create the new image\r\n\t\t$image_new = imagecreatetruecolor($canvas_width, $canvas_height);\r\n\t\t\r\n\t\t// Resample the image\r\n\t\t$image_result = imagecopyresampled(\r\n\t\t\t/* the new image */\r\n\t\t\t$image_new,\r\n\t\t\t/* the old image to update */\r\n\t\t\t$image,\r\n\t\t\t/* the new positions */\r\n\t\t\t$x_new, $y_new,\r\n\t\t\t/* the old positions */\r\n\t\t\t$x_old, $y_old,\r\n\t\t\t/* the new dimensions */\r\n\t\t\t$width_new, $height_new,\r\n\t\t\t/* the old dimensions */\r\n\t\t\t$width_old, $height_old);\r\n\t\t\r\n\t\t// Check\r\n\t\tif ( !$image_result ) { // ERROR\r\n\t\t\ttrigger_error('the image failed to resample', E_USER_WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// return\r\n\t\treturn $image_new;\r\n\t}", "public function setOptimalImageWidthHeight() {\n \n $checkError = $this->isError();\n if (!$checkError) {\n \n if (empty($this->__requestedHeight) || empty($this->__requestedWidth)) {\n $this->setError(__d('cloggy','Empty requested width and height.'));\n } else {\n\n /*\n * get optimal size width and height\n */\n switch ($this->__option) {\n\n case 'exact':\n $this->__optimalWidth = $this->__requestedWidth;\n $this->__optimalHeight = $this->__requestedHeight;\n break;\n\n case 'portrait':\n $this->__setOptimalSizeByPortrait();\n break;\n\n case 'landscape':\n $this->__setOptimalSizeByLandscape();\n break;\n\n case 'crop':\n $this->__setOptimalSizeByCrop();\n break;\n\n default:\n $this->__setOptimalSizeByAuto();\n break;\n }\n }\n \n }\n \n }", "public function _set_new_size_auto()\n {\n if (empty($this->source_width) || empty($this->source_height)) {\n if ( ! $this->SILENT_MODE) {\n trigger_error('Missing source image sizes!', E_USER_WARNING);\n }\n return false;\n }\n $k1 = $this->source_width / $this->limit_x;\n $k2 = $this->source_height / $this->limit_y;\n $k = $k1 >= $k2 ? $k1 : $k2;\n if ($this->reduce_only && $k1 <= 1 && $k2 <= 1) {\n $this->output_width = $this->source_width;\n $this->output_height = $this->source_height;\n } else {\n $this->output_width = round($this->source_width / $k, 0);\n $this->output_height = round($this->source_height / $k, 0);\n }\n return true;\n }", "public function image_reproportion()\n\t{\n\t\tif (($this->width === 0 && $this->height === 0) OR $this->orig_width === 0 OR $this->orig_height === 0\n\t\t\tOR ( ! ctype_digit((string) $this->width) && ! ctype_digit((string) $this->height))\n\t\t\tOR ! ctype_digit((string) $this->orig_width) OR ! ctype_digit((string) $this->orig_height))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Sanitize\n\t\t$this->width = (int) $this->width;\n\t\t$this->height = (int) $this->height;\n\n\t\tif ($this->master_dim !== 'width' && $this->master_dim !== 'height')\n\t\t{\n\t\t\tif ($this->width > 0 && $this->height > 0)\n\t\t\t{\n\t\t\t\t$this->master_dim = ((($this->orig_height/$this->orig_width) - ($this->height/$this->width)) < 0)\n\t\t\t\t\t\t\t? 'width' : 'height';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->master_dim = ($this->height === 0) ? 'width' : 'height';\n\t\t\t}\n\t\t}\n\t\telseif (($this->master_dim === 'width' && $this->width === 0)\n\t\t\tOR ($this->master_dim === 'height' && $this->height === 0))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->master_dim === 'width')\n\t\t{\n\t\t\t$this->height = (int) ceil($this->width*$this->orig_height/$this->orig_width);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->width = (int) ceil($this->orig_width*$this->height/$this->orig_height);\n\t\t}\n\t}", "private function setDimensions(){\r\n list($width, $height) = getimagesize($this->fileName);\r\n $this->imageDimensions = array('width'=>$width,\r\n 'height'=>$height);\r\n \r\n }", "protected function resize()\n {\n $width = $this->width;\n $height = $this->height;\n $orig_width = imagesx($this->image);\n $orig_height = imagesy($this->image);\n \n // Determine new image dimensions\n if($this->mode === \"crop\"){ // Crop image\n \n $max_width = $crop_width = $width;\n $max_height = $crop_height = $height;\n \n $x_ratio = @($max_width / $orig_width);\n $y_ratio = @($max_height / $orig_height);\n \n if($orig_width > $orig_height){ // Original is wide\n $height = $max_height;\n $width = ceil($y_ratio * $orig_width);\n \n } elseif($orig_height > $orig_width){ // Original is tall\n $width = $max_width;\n $height = ceil($x_ratio * $orig_height);\n \n } else { // Original is square\n $this->mode = \"fit\";\n \n return $this->resize();\n }\n \n // Adjust if the crop width is less than the requested width to avoid black lines\n if($width < $crop_width){\n $width = $max_width;\n $height = ceil($x_ratio * $orig_height);\n }\n \n } elseif($this->mode === \"fit\"){ // Fits the image according to aspect ratio to within max height and width\n $max_width = $width;\n $max_height = $height;\n \n $x_ratio = @($max_width / $orig_width);\n $y_ratio = @($max_height / $orig_height);\n \n if( ($orig_width <= $max_width) && ($orig_height <= $max_height) ){ // Image is smaller than max height and width so don't resize\n $tn_width = $orig_width;\n $tn_height = $orig_height;\n \n } elseif(($x_ratio * $orig_height) < $max_height){ // Wider rather than taller\n $tn_height = ceil($x_ratio * $orig_height);\n $tn_width = $max_width;\n \n } else { // Taller rather than wider\n $tn_width = ceil($y_ratio * $orig_width);\n $tn_height = $max_height;\n }\n \n $width = $tn_width;\n $height = $tn_height;\n \n } elseif($this->mode === \"fit-x\"){ // Sets the width to the max width and the height according to aspect ratio (will stretch if too small)\n $height = @round($orig_height * $width / $orig_width);\n \n if($orig_height <= $height){ // Don't stretch if smaller\n $width = $orig_width;\n $height = $orig_height;\n }\n \n } elseif($this->mode === \"fit-y\"){ // Sets the height to the max height and the width according to aspect ratio (will stretch if too small)\n $width = @round($orig_width * $height / $orig_height);\n \n if($orig_width <= $width){ // Don't stretch if smaller\n $width = $orig_width;\n $height = $orig_height;\n }\n } else {\n throw new \\Exception('Invalid mode: ' . $this->mode);\n }\n \n\n // Resize\n $this->temp = imagecreatetruecolor($width, $height);\n \n // Preserve transparency if a png\n if($this->image_info['mime'] == 'image/png'){\n imagealphablending($this->temp, false);\n imagesavealpha($this->temp, true);\n }\n \n imagecopyresampled($this->temp, $this->image, 0, 0, 0, 0, $width, $height, $orig_width, $orig_height);\n $this->sync();\n \n \n // Cropping?\n if($this->mode === \"crop\"){ \n $orig_width = imagesx($this->image);\n $orig_height = imagesy($this->image);\n \n $x_mid = $orig_width/2; // horizontal middle\n $y_mid = $orig_height/2; // vertical middle\n \n $this->temp = imagecreatetruecolor($crop_width, $crop_height);\n \n // Preserve transparency if a png\n if($this->image_info['mime'] == 'image/png'){\n imagealphablending($this->temp, false);\n imagesavealpha($this->temp, true);\n }\n\n imagecopyresampled($this->temp, $this->image, 0, 0, ($x_mid-($crop_width/2)), ($y_mid-($crop_height/2)), $crop_width, $crop_height, $crop_width, $crop_height);\n $this->sync();\n }\n }", "public function create($src, $width = null, $height = null, $no_crop = null, $keep_canvas_size = null, $public = null, $dynamic_output = null) {\n\n if (is_array($src)) {\n\n $src = array_only($src, array('src', 'width', 'w', 'height', 'h', 'no_crop', 'keep_canvas_size', 'dynamic_output'));\n\n if (isset($src['width'])) {\n $width = $src['width'];\n } elseif (isset($src['w'])) {\n $width = $src['w'];\n } else {\n $width = $width;\n }\n\n if (isset($src['height'])) {\n $height = $src['height'];\n } elseif (isset($src['h'])) {\n $height = $src['h'];\n } else {\n $height = $height;\n }\n\n $no_crop = isset($src['no_crop']) ? $src['no_crop'] : $no_crop;\n $keep_canvas_size = isset($src['keep_canvas_size']) ? $src['keep_canvas_size'] : $keep_canvas_size;\n $public = isset($src['public']) ? $src['public'] : $public;\n $dynamic_output = isset($src['dynamic_output']) ? $src['dynamic_output'] : $dynamic_output;\n\n // The following assignment is to be at the last place within this block.\n $src = isset($src['src']) ? $src['src'] : null;\n }\n\n $public = !empty($public);\n $dynamic_output = !empty($dynamic_output);\n\n // Sanitaze the source URL.\n if ($this->_check_path($src) === false) {\n\n if ($dynamic_output) {\n $this->_display_error(500);\n }\n\n return false;\n }\n\n // Calcualate the image path from the provided source URL.\n\n $src_path = $this->image_base_path.str_replace($this->image_base_url, '', $src);\n\n if (!is_file($src_path)) {\n\n if ($dynamic_output) {\n $this->_display_error(404);\n }\n\n return false;\n }\n\n $src_path = $this->_get_absolute_filename($src_path);\n\n if ($src_path === false || !is_file($src_path)) {\n\n if ($dynamic_output) {\n $this->_display_error(404);\n }\n\n return false;\n }\n\n // Get the name of a subdirectory that should contain the image's thumbnails.\n $image_cache_subdirectory = $this->_create_path_hash($src_path);\n $image_cache_path = ($public ? $this->image_public_cache_path : $this->image_cache_path).$image_cache_subdirectory.'/';\n\n // Get the image base name and file extension.\n $src_name_parts = $this->ci->image_lib->explode_name($src_path);\n $name = pathinfo($src_name_parts['name'], PATHINFO_BASENAME);\n $ext = $src_name_parts['ext'];\n\n // Expose the image default parameters.\n extract($this->_get_image_defaults());\n\n // Prepare the input parameters.\n\n $w = (string) $width;\n $h = (string) $height;\n\n $no_crop = !empty($no_crop);\n $no_crop_saved = $no_crop;\n\n if ($force_crop) {\n $no_crop = false;\n }\n\n $keep_canvas_size = !empty($keep_canvas_size);\n\n // Determine whether dynamic input is enabled.\n\n if ($dynamic_output) {\n\n $dynamic_output_enabled = false;\n\n foreach ($this->enable_dynamic_output as & $d_location) {\n\n if (strpos($src_path, $d_location) === 0) {\n $dynamic_output_enabled = true;\n }\n }\n\n unset($d_location);\n\n if (!$dynamic_output_enabled) {\n $this->_display_error(403);\n }\n }\n\n // Check whether the image is valid one.\n\n $prop = $this->ci->image_lib->get_image_properties($src_path, true);\n\n if ($prop === false) {\n\n if ($dynamic_output) {\n $this->_display_error(500);\n }\n\n return false;\n }\n\n $mime_type = $prop['mime_type'];\n $image_type = $prop['image_type'];\n $src_size = filesize($src_path);\n\n // The image seems to be valid, so create the corresponding\n // subdirectory that should contain the image's thumbnails.\n file_exists($image_cache_path) OR @mkdir($image_cache_path, DIR_WRITE_MODE, TRUE);\n\n // Determine whether a watermark should be put.\n\n $has_watermark = false;\n\n foreach ($this->enable_watermark as & $wm_location) {\n\n if (strpos($src_path, $wm_location) === 0) {\n $has_watermark = true;\n }\n }\n\n unset($wm_location);\n\n // Determine kind of Image_lib's resizing operation is to be executed.\n\n $resize_operation = null;\n\n if ($w > 0) {\n\n $resize_operation = 'fit_width';\n $w = (int) $w;\n\n } else {\n\n $w = '';\n }\n\n if ($h > 0) {\n\n $resize_operation = $resize_operation == 'fit_width'\n ? ($no_crop ? ($keep_canvas_size ? 'fit_canvas' : 'fit_inner') : 'fit')\n : 'fit_height';\n\n $h = (int) $h;\n\n } else {\n\n $h = '';\n }\n\n if ($resize_operation == '') {\n\n $w = (int) $prop['width'];\n $h = (int) $prop['height'];\n\n $resize_operation = $keep_canvas_size ? 'fit_canvas' : 'fit_inner';\n }\n\n // Based on the real file name and the relevant parameters the thumbnail's\n // filename (a hash) is to be created. Let us determine these parameters.\n\n $parameters = compact(\n 'src_path',\n 'src_size',\n 'resize_operation',\n 'w',\n 'h',\n 'no_crop',\n 'force_crop',\n 'keep_canvas_size',\n 'has_watermark'\n );\n\n if ($keep_canvas_size) {\n\n $parameters = array_merge($parameters, compact(\n 'bg_r',\n 'bg_g',\n 'bg_b',\n 'bg_alpha'\n ));\n }\n\n if ($has_watermark) {\n\n $wm_parameters = compact(\n 'wm_enabled_min_w',\n 'wm_enabled_min_h',\n 'wm_type',\n 'wm_padding',\n 'wm_vrt_alignment',\n 'wm_hor_alignment',\n 'wm_hor_offset',\n 'wm_vrt_offset'\n );\n\n if ($wm_type == 'text') {\n\n $wm_parameters = array_merge($wm_parameters, compact(\n 'wm_text',\n 'wm_font_path',\n 'wm_font_size',\n 'wm_font_color',\n 'wm_shadow_color',\n 'wm_shadow_distance'\n ));\n\n } elseif ($wm_type == 'overlay') {\n\n $wm_parameters = array_merge($wm_parameters, compact(\n 'wm_overlay_path',\n 'wm_opacity',\n 'wm_x_transp',\n 'wm_y_transp'\n ));\n }\n\n $parameters = array_merge($parameters, $wm_parameters);\n }\n\n // Determine the destination file.\n //$cached_image_name = sha1(serialize($parameters)).$ext;\n $cached_image_name = sha1(serialize($parameters)).'-'.url_title($name, '-', true, true, $this->ci->config->default_language()).$ext; // SEO-friendly, hopefully.\n $cached_image_file = $image_cache_path.$cached_image_name;\n\n // If the destination file does not exist - create it.\n\n if (!is_file($cached_image_file)) {\n\n // Resize the image and write it to destination file.\n\n $config = array();\n $config['source_image'] = $src_path;\n $config['dynamic_output'] = false;\n $config['new_image'] = $cached_image_file;\n $config['maintain_ratio'] = true;\n $config['create_thumb'] = false;\n $config['width'] = $w;\n $config['height'] = $h;\n $config['quality'] = 100;\n\n if (!$this->ci->image_lib->initialize($config)) {\n\n if ($dynamic_output) {\n $this->_display_error(500);\n }\n\n return false;\n }\n\n if ($resize_operation == 'fit_inner' || $resize_operation == 'fit_canvas') {\n $this->ci->image_lib->resize();\n } else {\n $this->ci->image_lib->fit();\n }\n\n $this->ci->image_lib->clear();\n\n // If the canvas size is to be preserved - add background with the\n // given width and height and place the image at the center.\n\n if ($resize_operation == 'fit_canvas') {\n\n $backgrund_image = @ tempnam(sys_get_temp_dir(), 'imp');\n\n if ($backgrund_image === false) {\n\n @ unlink($cached_image_file);\n\n if ($dynamic_output) {\n $this->_display_error(500);\n }\n\n return false;\n }\n\n $img = imagecreatetruecolor($w, $h);\n imagesavealpha($img, true);\n $bg = imagecolorallocatealpha($img, $bg_r, $bg_g, $bg_b, $bg_alpha);\n imagefill($img, 0, 0, $bg);\n\n $this->ci->image_lib->image_type = $image_type;\n $this->ci->image_lib->full_dst_path = $backgrund_image;\n $this->ci->image_lib->quality = 100;\n\n if (!$this->ci->image_lib->image_save_gd($img)) {\n\n @ unlink($backgrund_image);\n @ unlink($cached_image_file);\n\n if ($dynamic_output) {\n $this->_display_error(500);\n }\n\n return false;\n }\n\n $this->ci->image_lib->clear();\n\n $config = array();\n $config['source_image'] = $backgrund_image;\n $config['wm_type'] = 'overlay';\n $config['wm_overlay_path'] = $cached_image_file;\n $config['wm_opacity'] = 100;\n $config['wm_hor_alignment'] = 'center';\n $config['wm_vrt_alignment'] = 'middle';\n $config['wm_x_transp'] = false;\n $config['wm_y_transp'] = false;\n $config['dynamic_output'] = false;\n $config['new_image'] = $cached_image_file;\n $config['quality'] = 100;\n\n if (!$this->ci->image_lib->initialize($config)) {\n\n @ unlink($backgrund_image);\n @ unlink($cached_image_file);\n\n if ($dynamic_output) {\n $this->_display_error(500);\n }\n\n return false;\n }\n\n if (!$this->ci->image_lib->watermark()) {\n\n @ unlink($backgrund_image);\n @ unlink($cached_image_file);\n\n if ($dynamic_output) {\n $this->_display_error(500);\n }\n\n return false;\n }\n\n @ unlink($backgrund_image);\n $this->ci->image_lib->clear();\n }\n\n // If a watermark is needed, place it.\n\n if ($has_watermark) {\n\n $prop_resized = $this->ci->image_lib->get_image_properties($cached_image_file, true);\n\n if ($prop_resized === false) {\n\n @ unlink($cached_image_file);\n\n if ($dynamic_output) {\n $this->_display_error(500);\n }\n\n return false;\n }\n\n if ($prop_resized['width'] < $wm_enabled_min_w || $prop_resized['height'] < $wm_enabled_min_h) {\n $has_watermark = false;\n }\n\n if ($has_watermark) {\n\n $config = array();\n $config['source_image'] = $cached_image_file;\n $config['dynamic_output'] = false;\n $config['new_image'] = $cached_image_file;\n $config['quality'] = 100;\n $config = array_merge($config, $wm_parameters);\n\n if (!$this->ci->image_lib->initialize($config)) {\n\n @ unlink($cached_image_file);\n\n if ($dynamic_output) {\n $this->_display_error(500);\n }\n\n return false;\n }\n\n if (!$this->ci->image_lib->watermark()) {\n\n @ unlink($cached_image_file);\n\n if ($dynamic_output) {\n $this->_display_error(500);\n }\n\n return false;\n }\n\n $this->ci->image_lib->clear();\n }\n }\n }\n\n // Output or return the result.\n\n if ($dynamic_output) {\n $this->_display_graphic_file($cached_image_file, $mime_type, $cached_image_name);\n }\n\n if ($public) {\n\n return array(\n 'path' => $cached_image_file,\n 'url' => $this->image_public_cache_url.$image_cache_subdirectory.'/'.pathinfo($cached_image_file, PATHINFO_BASENAME),\n );\n }\n\n $uri = 'thumbnail';\n\n $url = http_build_url(default_base_url($uri), array(\n 'query' => http_build_query(array(\n 'src' => $src,\n 'w' => $width,\n 'h' => $height,\n 'no_crop' => $no_crop_saved ? 0 : 1,\n 'keep_canvas_size' => $keep_canvas_size ? 0 : 1\n )\n )\n ), HTTP_URL_JOIN_QUERY);\n\n return array(\n 'path' => $cached_image_file,\n 'url' => $url,\n );\n }", "function image_reproportion()\n\t{\n\t\tif ( ! is_numeric($this->dst_width) OR ! is_numeric($this->dst_height) OR $this->dst_width == 0 OR $this->dst_height == 0)\n\t\t\treturn;\n\t\t\n\t\tif ( ! is_numeric($this->src_width) OR ! is_numeric($this->src_height) OR $this->src_width == 0 OR $this->src_height == 0)\n\t\t\treturn;\n\t\n\t\tif (($this->dst_width >= $this->src_width) AND ($this->dst_height >= $this->src_height))\n\t\t{\n\t\t\t$this->dst_width = $this->src_width;\n\t\t\t$this->dst_height = $this->src_height;\n\t\t}\n\t\t\n\t\t$new_width\t= ceil($this->src_width*$this->dst_height/$this->src_height);\t\t\n\t\t$new_height\t= ceil($this->dst_width*$this->src_height/$this->src_width);\n\t\t\n\t\t$ratio = (($this->src_height/$this->src_width) - ($this->dst_height/$this->dst_width));\n\n\t\tif ($this->master_dim != 'width' AND $this->master_dim != 'height')\n\t\t{\n\t\t\t$this->master_dim = ($ratio < 0) ? 'width' : 'height';\n\t\t}\n\t\t\n\t\tif (($this->dst_width != $new_width) AND ($this->dst_height != $new_height))\n\t\t{\n\t\t\tif ($this->master_dim == 'height')\n\t\t\t{\n\t\t\t\t$this->dst_width = $new_width;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->dst_height = $new_height;\n\t\t\t}\n\t\t}\n\t}", "function someImage($width, $height, $options = []);", "protected function _reset()\n {\n $this->_width = null;\n $this->_height = null;\n $this->_imagePath = null;\n\n return parent::_reset();\n }", "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 __construct()\n {\n if (3 == func_num_args()) {\n $this->width = func_get_arg(0);\n $this->height = func_get_arg(1);\n $this->length = func_get_arg(2);\n }\n }", "public function draw(\\SetaPDF_Core_Canvas $canvas, $x = 0, $y = 0, $width = null, $height = null) {}", "public function draw(\\SetaPDF_Core_Canvas $canvas, $x = 0, $y = 0, $width = null, $height = null) {}", "function crop( $x = 0, $y = 0, $w = 0, $h = 0 )\n\t{\n\t\tif( $w == 0 || $h == 0 )\n\t\t\treturn FALSE;\n\t\t\n\t\t//create a target canvas\n\t\t$new_im = imagecreatetruecolor ( $w, $h );\n\t\n\t\t//copy and resize image to new canvas\n\t\timagecopyresampled( $new_im, $this->im, 0, 0, $x, $y, $w, $h, $w, $h );\n\t\t\n\t\t//delete the old image handle\n\t\timagedestroy( $this->im );\n\t\t\n\t\t//set the new image as the current handle\n\t\t$this->im = $new_im;\n\t}", "protected function _analyzeSourceImage($imageResource, $imageType) {\n\t\t$this->params['sourceWidth'] = imagesx($imageResource);\n\t\t$this->params['sourceHeight'] = imagesy($imageResource);\n\t\t$this->params['mime'] = image_type_to_mime_type($imageType);\n\t\t$this->params['type'] = $imageType;\n\t}", "protected function _generateThumbnail() {\n if ( $this->attributes['width'] == $this->_original_image_info[0] && $this->attributes['height'] == $this->_original_image_info[1] ) {\n $this->_calculated_width = $this->attributes['width'];\n return $this->_calculated_height = $this->attributes['height'];\n }\n if ( $this->attributes['width'] == 0 || $this->attributes['height'] == 0 ) {\n $this->_calculated_width = $this->_original_image_info[0];\n return $this->_calculated_height = $this->_original_image_info[1]; \n }\n //make sure the thumbnail directory exists. \n if ( !is_writable ( $this->thumbs_dir_path ) ) { \n trigger_error ( 'Cannot detect a writable thumbs directory!', E_USER_NOTICE );\n }\n if ( is_readable ( $this->_thumb_src ) ) {\n $this->_calculated_width = (int)$this->attributes['width'];\n $this->_calculated_height = (int)$this->attributes['height'];\n return $this->src = $this->_thumb_src; \n }\n // resize image\n $image = new Image();\n $image->open( $this->src, $this->thumb_background_rgb )\n ->resize( (int)$this->attributes['width'], (int)$this->attributes['height'] )\n ->save( $this->_thumb_src, (int)$this->thumb_quality );\n $this->_thumbnail = $image;\n $this->_calculated_width = $this->_thumbnail->getWidth();\n $this->_calculated_height = $this->_thumbnail->getHeight();\n $this->src = $this->_thumb_src;\n }", "protected function _generateThumbnail() {\n if ( $this->attributes['width'] == $this->_original_image_info[0] && $this->attributes['height'] == $this->_original_image_info[1] ) {\n $this->_calculated_width = $this->attributes['width'];\n return $this->_calculated_height = $this->attributes['height'];\n }\n if ( $this->attributes['width'] == 0 || $this->attributes['height'] == 0 ) {\n $this->_calculated_width = $this->_original_image_info[0];\n return $this->_calculated_height = $this->_original_image_info[1]; \n }\n //make sure the thumbnail directory exists. \n if ( !is_writable ( $this->thumbs_dir_path ) ) { \n trigger_error ( 'Cannot detect a writable thumbs directory!', E_USER_NOTICE );\n }\n if ( is_readable ( $this->_thumb_src ) ) {\n $this->_calculated_width = (int)$this->attributes['width'];\n $this->_calculated_height = (int)$this->attributes['height'];\n return $this->src = $this->_thumb_src; \n }\n // resize image\n $image = new Image();\n $image->open( $this->src, $this->thumb_background_rgb )\n ->resize( (int)$this->attributes['width'], (int)$this->attributes['height'] )\n ->save( $this->_thumb_src, (int)$this->thumb_quality );\n $this->_thumbnail = $image;\n $this->_calculated_width = $this->_thumbnail->getWidth();\n $this->_calculated_height = $this->_thumbnail->getHeight();\n $this->src = $this->_thumb_src;\n }", "function _crop_image_resource($img, $x, $y, $w, $h)\n {\n }", "public function setOriginalImageWidthHeight() {\n \n $checkError = $this->isError();\n if (!$checkError) {\n \n /*\n * get original width and height\n */\n $this->__originalImageWidth = imagesx($this->__image);\n $this->__originalImageHeight = imagesy($this->__image);\n \n }\n \n }", "public function __construct($height, $width){\n $this->height = $height;\n $this->width = $width; \n}", "function flexibleCropper($source_location, $desc_location=null,$crop_size_w=null,$crop_size_h=null)\n\t{\n\t list($src_w, $src_h) = getimagesize($source_location);\n\n\t $image_source = imagecreatefromjpeg($source_location);\n\t $image_desc = imagecreatetruecolor($crop_size_w,$crop_size_h);\n\n\t/*\n\t if ($crop_size_w>$crop_size_h) {$my_crop_size_w=null;}\n\t elseif ($crop_size_h>$crop_size_w)\n\t {$my_crop_size_h=null;\n\n\t if (is_null($my_crop_size_h) and !is_null($my_crop_size_w))\n\t { $my_crop_size_h=$src_h*$my_crop_size_w/$src_w; }\n\t elseif (!is_null($my_crop_size_h))\n\t { $my_crop_size_w=$src_w*$my_crop_size_h/$src_h; }\n\t*/\n\n\t if ($src_w<$src_h) {$my_crop_size_h=$src_h*$crop_size_w/$src_w;} else {$my_crop_size_h=$crop_size_h;}\n\t if ($src_h<$src_w) {$my_crop_size_w=$src_w*$crop_size_h/$src_h;} else {$my_crop_size_w=$crop_size_w;}\n\t// echo \"($my_crop_size_w-$my_crop_size_h)\";\n\t if ($my_crop_size_w>$crop_size_w) {$additional_x=round(($crop_size_w-$my_crop_size_w)/2);} else {$additional_x=0;}\n\t if ($my_crop_size_h>$crop_size_h) {$additional_y=round(($crop_size_h-$my_crop_size_h)/2);} else {$additional_y=0;}\n\n\t $off_x=round($src_w/2)-round($my_crop_size_w/2);\n\t $off_y=round($src_h/2)-round($my_crop_size_h/2)+$additional_y;\n\t $off_w=(round($src_w/2)+round($my_crop_size_w/2))-$off_x;\n\t $off_h=(round($src_h/2)+round($my_crop_size_h/2))-$off_y;\n\n\t imagecopyresampled($image_desc, $image_source,$additional_x, $additional_y, $off_x, $off_y, $my_crop_size_w, $my_crop_size_h, $off_w, $off_h);\n\n\t if (!is_null($desc_location))\n\t imagejpeg($image_desc, $desc_location,100);\n\t else\n\t imagejpeg($image_desc);\n\t}", "function cropRatioImage(&$srcImage, $src_width, $src_height, $desiredWidth = 0, $desiredHeight = 0)\n\t{\n\t\t// if only one size is specified\n\t\tif ($desiredWidth == '*' || $desiredHeight == '*')\n\t\t{\n\t\t\t$new_size = $this->calculateSize($src_width, $src_height, $desiredWidth, $desiredHeight);\n\t\t\t$desiredWidth = $new_size['width'];\n\t\t\t$desiredHeight = $new_size['height'];\n\t\t}\n\t\t\n\t\t// get aspect ratio\n\t\t$ratioW = $src_width / $desiredWidth;\n\t\t$ratioH = $src_height / $desiredHeight;\n\t\t\n\t\t$ratio = ($ratioW < $ratioH)?$ratioW:$ratioH;\n\t\t\t\n\t\t// calculate new height and width based on the ratio\n\t\t$new_width = floor($desiredWidth * $ratio);\n\t\t$new_height = floor($desiredHeight * $ratio);\n\t\t\n\t\t// calculate crop start position\n\t\t$startX = floor(($src_width - $new_width) / 2);\n\t\t$startY = floor(($src_height - $new_height) / 2);\n\t\t\n\t\treturn $this->cropImage($srcImage, $startX, $startY, $new_width, $new_height);\n\t}", "function getImageSize() \n { \n return array($this->_width,$this->_height); \n }", "function cropImage($param=array())\r\n {\r\n $ret = array(\r\n 'msg' => false,\r\n 'sts' => false,\r\n );\r\n\r\n $final_size = $param['final_size'];\r\n #$filename = $final_size.'-'.$param['img_newname'];\r\n $filename = $param['img_newname'];\r\n $target_dir = $param['dest_path'];\r\n $target_name = $target_dir.$filename;\r\n $source_name = $param['img_real'];\r\n \r\n //get size from real image \r\n $size = getimagesize($source_name);\r\n $targ_w = $param['w'];\r\n $targ_h = $param['h'];\r\n\r\n //get size from ratio\r\n $final_size = explode(\"x\", $final_size);\r\n $final_w = $final_size[0];\r\n $final_h = $final_size[1];\r\n \r\n if($final_w==='auto' && $final_h==='auto'){ //detect if width and height ratio is \"auto\" then readjust width and height size\r\n $final_w = $targ_w;\r\n $final_h = $targ_h;\r\n }elseif($final_w==='auto'){ //detect if width ratio is \"auto\" then readjust width size\r\n $final_w = intval(($final_size[1] * $targ_w) / $targ_h);\r\n }elseif($final_h==='auto'){ //detect if height ratio is \"auto\" then readjust height size\r\n $final_h = intval(($final_size[0] * $targ_h) / $targ_w);\r\n }\r\n //end\r\n \r\n \r\n $jpeg_quality = 90;\r\n $img_r = imagecreatefromjpeg($source_name);\r\n $dst_r = ImageCreateTrueColor( $final_w, $final_h );\r\n \r\n imagecopyresized(\r\n $dst_r, $img_r, \r\n 0,0, \r\n $param['x'],$param['y'], \r\n $final_w,$final_h,\r\n $param['w'],$param['h']\r\n );\r\n \r\n imagejpeg($dst_r,$target_name,$jpeg_quality);\r\n #$this->send_to_server( array($target_name) );\r\n $url_target_name = str_replace('/data/shopkl/_assets/', 'http://klimg.com/kapanlagi.com/klshop/', $target_name);\r\n \r\n\t\t\t\r\n //find image parent url and dir path from config\r\n //reset($this->imgsize['article']['size']);\r\n //$first_key = key($this->imgsize['article']['size']);\r\n //end find\r\n $ret['sts'] = true;\r\n $ret['filename'] = $filename;\r\n $ret['msg'] = '<div class=\"alert alert-success\">Image is cropped and saved in <a href=\"'. $url_target_name .'?'.date('his').'\" target=\"_blank\">'.$target_name.' !</a></div>';\r\n \r\n return $ret;\r\n }", "protected function _cached_required()\n {\n $image_info = getimagesize($this->source_file);\n\n if (($this->url_params['w'] == $image_info[0]) AND ($this->url_params['h'] == $image_info[1]))\n {\n $this->serve_default = TRUE;\n return FALSE;\n }\n\n return TRUE;\n }", "function imageResize($imageResourceId=null,$width=null,$height=null, $targetWidth=null, $targetHeight=null) {\n\n// $targetWidth =300;\n// $targetHeight =260;\n// dd($imageResourceId,$width,$height, $targetWidth, $targetHeight);\n\n $targetLayer=imagecreatetruecolor($targetWidth,$targetHeight);\n imagecopyresampled($targetLayer,$imageResourceId,0,0,0,0,$targetWidth,$targetHeight, $width,$height );\n// imagecopyresized($targetLayer,$imageResourceId,0,0,0,0, $width,$height,$targetWidth,$targetHeight);\n\n return $targetLayer;\n }", "protected function update_size($width = \\null, $height = \\null)\n {\n }", "function calculateThumbnailDimensions($dimensions, $arguments) {\r\n if (array_key_exists('thumbnail_dimensions', $arguments))\r\n return [\r\n 'height' => intval($arguments['thumbnail_dimensions']['height']),\r\n 'width' => intval($arguments['thumbnail_dimensions']['width']),\r\n 'crop' => '1'\r\n ];\r\n \r\n return null;\r\n }", "function _image_get_preview_ratio($w, $h)\n {\n }", "public function fileNeedsProcessing()\n {\n // @todo Implement fileNeedsProcessing() method.\n\n /**\n * Checks to perform:\n * - width/height smaller than image, keeping aspect ratio?\n */\n }", "function build_cropCanvas($cropConf=array())\r\n {\r\n $conf['imgSrc'] = (isset($cropConf['imgSrc'])) ? $cropConf['imgSrc'] : false;\r\n $conf['uniqueID'] = (isset($cropConf['uniqueID'])) ? $cropConf['uniqueID'] : false;\r\n $conf['cropSize'] = (isset($cropConf['cropSize'])) ? $cropConf['cropSize'] : false;\r\n $conf['imgUrl'] = (isset($cropConf['imgUrl'])) ? $cropConf['imgUrl'] : false;\r\n $conf['submitUrl'] = (isset($cropConf['submitUrl'])) ? $cropConf['submitUrl'] : false;\r\n $conf['include_freeResize'] = (isset($cropConf['include_freeResize'])) ? $cropConf['include_freeResize'] : false;\r\n $conf['ajaxSubmit'] = (isset($cropConf['ajaxSubmit'])) ? $cropConf['ajaxSubmit'] : false;\r\n \r\n foreach($conf as $key=>$c)\r\n if($c==false && $key!='ajaxSubmit') return 'Insufficient Parameter options';\r\n \r\n #echo $conf['imgSrc'];\r\n $size = getimagesize($conf['imgSrc']);\r\n $img_name = explode(\"/\", $conf['imgSrc']);\r\n $img_name = end($img_name);\r\n \r\n //img size option\r\n $option = $img_dest = $savePath = '';\r\n foreach($conf['cropSize']['size'] as $key=>$i)\r\n {\r\n #$option .= '<option value=\"'.$i.'\">'.$i.'</option>';\r\n $img_dest .= 'img_dest[\"'.$i.'\"] = \"'.$conf['cropSize']['path'][$key].'\"; '; \r\n if(!$savePath) $savePath = $conf['cropSize']['path'][$key] . (($conf['uniqueID']) ? $conf['uniqueID'].'/' : '');\r\n }\r\n #$option .= '<option value=\"200x100\">200x100</option>';\r\n if($conf['include_freeResize']) $option .= '<option value=\"free\">Free Size</option>';\r\n //end \r\n #echo '<pre>'; print_r($img_dest); echo '</pre>';\r\n \r\n $content = '\r\n <div style=\"min-width:700px; padding:10px 0 10px 30px;\">\r\n <form id=\"frCrop\" action=\"'.$conf['submitUrl'].'\" method=\"POST\">\r\n <div class=\"row-fluid\">\r\n <div class=\"span4\">\r\n <h3>Cropping Setting</h3> \r\n <label>Cropped Image size : </label>\r\n <select name=\"cSize\" id=\"cSize\">'.$option.'</select>\r\n <input type=\"hidden\" name=\"img_newName\" value=\"'.$img_name.'\" />\r\n <input type=\"hidden\" name=\"uniqueID\" value=\"'.$conf['uniqueID'].'\" />\r\n \r\n <input type=\"hidden\" id=\"x\" name=\"x\" />\r\n \t\t<input type=\"hidden\" id=\"y\" name=\"y\" />\r\n \t\t<input type=\"hidden\" id=\"w\" name=\"w\" />\r\n \t\t<input type=\"hidden\" id=\"h\" name=\"h\" />\r\n <input type=\"hidden\" id=\"img_real\" name=\"img_real\" value=\"'.$conf['imgUrl'].'\" />\r\n <label>Cropped Image destination : </label> \r\n <input type=\"hidden\" name=\"dest_path\" id=\"dest_path\" value=\"'.$savePath.'\" />\r\n \r\n <div class=\"alert\">select image size then drag mouse inside image area to crop !</div>\r\n <input type=\"button\" value=\"Crop\" name\"crop\" id\"Savecrop\" class=\"btn btn-primary\" onclick=\"act_cropSave()\" />\r\n <span id=\"sp-loadCrop\" class=\"hide\"><img src=\"/media/img/loading.gif\" alt=\"loading\" /> loading..</span>\r\n </div>\r\n <div style=\"float:left; width:600px; margin-left:20px;\">\r\n <img src=\"'.$conf['imgUrl'].'\" id=\"cropbox\" width=\"600\" />\r\n </div>\r\n </div>\r\n </form>\r\n <br class=\"clear\" />\r\n </div>\r\n <script>\r\n function initCrop(){ \r\n var img_dest = new Array(); \r\n '.$img_dest.'\r\n var snil = $(\"#cSize\").val();\r\n nil = snil.split(\"x\");\r\n \r\n var jcrop_api = $.Jcrop(\\'#cropbox\\', { \r\n trueSize: ['.$size[0].','.$size[1].'],\r\n aspectRatio: nil[0] / nil[1],\r\n onSelect: updateCoords\r\n });\r\n \r\n $(\"#cSize\").bind(\"change\", function(){\r\n var snil = $(this).val();\r\n nil = snil.split(\"x\");\r\n alert(nil);\r\n jcrop_api.setOptions({\r\n aspectRatio: nil[0] / nil[1]\r\n });\r\n $(\"#dest_path\").val( img_dest[snil] );\r\n });\r\n \r\n ' . (($conf['ajaxSubmit']) ? ('\r\n $(\"#frCrop\").ajaxForm({\r\n dataType: \"json\", \r\n beforeSubmit: function(){\r\n $(\"#sp-loadCrop\").show();\r\n }, \r\n success: function(data){\r\n //alert(data);\r\n $(\".alert\").replaceWith(data.msg);\r\n $(\"#sp-loadCrop\").hide();\r\n } \r\n });\r\n ') : '') . '\r\n \r\n function updateCoords(c)\r\n \t\t\t{\r\n \t\t\t\t$(\"#x\").val(c.x);\r\n \t\t\t\t$(\"#y\").val(c.y);\r\n \t\t\t\t$(\"#w\").val(c.w);\r\n \t\t\t\t$(\"#h\").val(c.h);\r\n \t\t\t};\r\n \r\n \t\t\tfunction checkCoords()\r\n \t\t\t{\r\n \t\t\t\tif (parseInt($(\"#w\").val())) return true;\r\n \t\t\t\talert(\"Please select a crop region then press submit.\");\r\n \t\t\t\treturn false;\r\n \t\t\t};\r\n }\r\n </script>\r\n ';\r\n \r\n return $content;\r\n }", "abstract public function draw(\\SetaPDF_Core_Canvas $canvas, $x = 0, $y = 0, $width = null, $height = null);", "public function resize($width = NULL, $height = NULL, $master = NULL)\n {\n if ($master === NULL)\n {\n // Choose the master dimension automatically\n $master = Image::AUTO;\n }\n // Image::WIDTH and Image::HEIGHT depricated. You can use it in old projects,\n // but in new you must pass empty value for non-master dimension\n elseif ($master == Image::WIDTH AND ! empty($width))\n {\n $master = Image::AUTO;\n\n // Set empty height for backvard compatibility\n $height = NULL;\n }\n elseif ($master == Image::HEIGHT AND ! empty($height))\n {\n $master = Image::AUTO;\n\n // Set empty width for backvard compatibility\n $width = NULL;\n }\n\n if (empty($width))\n {\n if ($master === Image::NONE)\n {\n // Use the current width\n $width = $this->width;\n }\n else\n {\n // If width not set, master will be height\n $master = Image::HEIGHT;\n }\n }\n\n if (empty($height))\n {\n if ($master === Image::NONE)\n {\n // Use the current height\n $height = $this->height;\n }\n else\n {\n // If height not set, master will be width\n $master = Image::WIDTH;\n }\n }\n\n switch ($master)\n {\n case Image::AUTO:\n // Choose direction with the greatest reduction ratio\n $master = ($this->width / $width) > ($this->height / $height) ? Image::WIDTH : Image::HEIGHT;\n break;\n case Image::INVERSE:\n // Choose direction with the minimum reduction ratio\n $master = ($this->width / $width) > ($this->height / $height) ? Image::HEIGHT : Image::WIDTH;\n break;\n }\n\n switch ($master)\n {\n case Image::WIDTH:\n // Recalculate the height based on the width proportions\n $height = $this->height * $width / $this->width;\n break;\n case Image::HEIGHT:\n // Recalculate the width based on the height proportions\n $width = $this->width * $height / $this->height;\n break;\n }\n\n // Convert the width and height to integers\n $width = round($width);\n $height = round($height);\n\n $this->_do_resize($width, $height);\n\n return $this;\n }", "public function crop(array $dimensions, array $coordinates) {\n// is there an image resource to work with?\n if (isset($this->_resource)) {\n// do the dimensions have and coordinates have the appropriate values to work with (checking the keys)? \n if (array_keys($dimensions) == array(\"width\", \"height\") && array_keys($coordinates) == array(\"x1\", \"x2\", \"y1\", \"y2\")) {\n $is_all_int = true;\n foreach (array_merge($dimensions, $coordinates) as $value) {\n if (is_int($value) == false) {\n $is_all_int = false;\n }\n }\n if ($is_all_int == true) {\n $width = $dimensions[\"width\"];\n $height = $dimensions[\"height\"];\n $x1 = $coordinates[\"x1\"];\n $x2 = $coordinates[\"x2\"];\n $y1 = $coordinates[\"y1\"];\n $y2 = $coordinates[\"y2\"];\n\n// generating the placeholder resource\n $cropped_image = $this->newImageResource($width, $height);\n\n// copying the original image's resource into the placeholder and cropping it accordingly\n imagecopyresampled($cropped_image, $this->_resource, 0, 0, $x1, $y1, $width, $height, ($x2 - $x1), ($y2 - $y1));\n\n// assigning the new image attributes\n $this->_resource = $cropped_image;\n $this->_width = $width;\n $this->_height = $height;\n } else {\n trigger_error(\"CAMEMISResizeImage::crop() was provided values that were not integers (check the dimensions or coordinates for strings or floats)\", E_USER_WARNING);\n }\n } else {\n trigger_error(\"CAMEMISResizeImage::crop() was not provided the appropriate arguments (first given parameter must be an array and must contain \\\"width\\\" and \\\"height\\\" elements, and the second given parameter must be an array and contain \\\"x1\\\", \\\"x2\\\", \\\"y2\\\", and \\\"y2\\\" elements)\", E_USER_WARNING);\n }\n } else {\n trigger_error(\"CAMEMISResizeImage::crop() attempting to access a non-existent resource (check if the image was loaded by CAMEMISResizeImage::__construct())\", E_USER_WARNING);\n }\n\n return $this;\n }", "public function resize(array $dimensions) {\n// is there an image resource to work with?\n if (isset($this->_resource)) {\n// does the dimensions array have the appropriate values to work with?\n if (isset($dimensions[\"width\"]) || isset($dimensions[\"height\"])) {\n// has the width value been omitted, while the height value given?\n if (!isset($dimensions[\"width\"]) && isset($dimensions[\"height\"])) {\n// is the height an integer?\n// -> if so, assign the height variable and assign the width variable scaled similarly to the height\n if (is_int($dimensions[\"height\"])) {\n $width = (int) floor($this->_width * ($dimensions[\"height\"] / $this->_height));\n $height = $dimensions[\"height\"];\n }\n }\n// or has the height value been omitted, and the width value given?\n else if (isset($dimensions[\"width\"]) && !isset($dimensions[\"height\"])) {\n// is the width an integer?\n// -> if so, assign the width variable and assign the height variable scaled similarly to the width\n if (is_int($dimensions[\"width\"])) {\n $width = $dimensions[\"width\"];\n $height = (int) floor($this->_height * ($dimensions[\"width\"] / $this->_width));\n }\n }\n// or both values were provided\n else {\n// are both width and height values integers?\n// -> if so, assign the width and height variables\n if (is_int($dimensions[\"width\"]) && is_int($dimensions[\"height\"])) {\n $width = $dimensions[\"width\"];\n $height = $dimensions[\"height\"];\n }\n }\n\n// have the width and height variables been assigned?\n// -> if so, proceed with cropping\n if (isset($width, $height)) {\n// generating the placeholder resource\n $resized_image = $this->newImageResource($width, $height);\n\n// copying the original image's resource into the placeholder and resizing it accordingly\n imagecopyresampled($resized_image, $this->_resource, 0, 0, 0, 0, $width, $height, $this->_width, $this->_height);\n\n// assigning the new image attributes\n $this->_resource = $resized_image;\n $this->_width = $width;\n $this->_height = $height;\n }\n } else {\n trigger_error(\"CAMEMISResizeImage::resize() was not provided the apporpriate arguments (given array must contain \\\"width\\\" and \\\"height\\\" elements)\", E_USER_WARNING);\n }\n } else {\n trigger_error(\"CAMEMISResizeImage::resize() attempting to access a non-existent resource (check if the image was loaded by Image2::__construct())\", E_USER_WARNING);\n }\n\n return $this;\n }", "function someImageUrl($width, $height, $options = []);", "function resize( $w = 0, $h = 0 )\n\t{\n\t\tif( $w == 0 || $h == 0 )\n\t\t\treturn FALSE;\n\t\t\n\t\t//get the size of the current image\n\t\t$oldsize = $this->size();\n\t\t\n\t\t//create a target canvas\n\t\t$new_im = imagecreatetruecolor ( $w, $h );\n\t\n\t\t//copy and resize image to new canvas\n\t\timagecopyresampled( $new_im, $this->im, 0, 0, 0, 0, $w, $h, $oldsize->w, $oldsize->h );\n\t\t\n\t\t//delete the old image handle\n\t\timagedestroy( $this->im );\n\t\t\n\t\t//set the new image as the current handle\n\t\t$this->im = $new_im;\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 __checkImgParams() {\n\t\t/* check file type */\n\t\t$this->__checkType($this->request->data['Upload']['file']['type']);\n\t\t\n\t\n\t\t\n\t\t/* check file size */\n\t\t$this->__checkSize($this->request->data['Upload']['file']['size']);\n\t\t\n\t\t\n\t\t\n\t\t/* check image dimensions */\n\t\t$this->__checkDimensions($this->request->data['Upload']['file']['tmp_name']);\n\t\t\n\t\t\t\n\t}", "private function __setOptimalSizeByAuto() {\n \n if ($this->__originalImageHeight < $this->__originalImageWidth) {\n $this->__setOptimalSizeByLandscape();\n }\n \n if ($this->__originalImageHeight > $this->__originalImageWidth) {\n $this->__setOptimalSizeByPortrait();\n }\n \n if ($this->__requestedHeight < $this->__requestedWidth) {\n $this->__setOptimalSizeByLandscape();\n }\n \n if ($this->__requestedHeight > $this->__requestedWidth) {\n $this->__setOptimalSizeByPortrait();\n }\n \n if (empty($this->__optimalHeight) && empty($this->__optimalWidth)) {\n $this->__optimalWidth = $this->__requestedWidth;\n $this->__optimalHeight = $this->__requestedHeight;\n }\n \n }", "public function operateImage($src=null)\n {\n $this->image_thumb=imagecreatetruecolor($this->imageX/2,$this->imageY/2);\n imagecopyresampled($this->image_thumb,$this->image,0,0,0,0,$this->imageX/2,$this->imageY/2,$this->imageX,$this->imageY);\n }", "public function apply() {\n\t\t$w = $this->getWidth();\n\t\t$h = $this->getHeight();\n\n\t\timagecopyresampled($this->original->getImage(), $this->getImage(), $this->x, $this->y, 0, 0, $w, $h, $w, $h);\n\t}", "public function reseize($path, $source, $width, $height, $nama_ori){\n \t//$source = sumber gambar yang akan di reseize\n $config['image_library'] = 'gd2';\n $config['source_image'] = $source;\n $config['new_image'] = $path.$width.'_'.$nama_ori;\n $config['overwrite'] = TRUE;\n $config['create_thumb'] = false;\n $config['width'] = $width;\n if($height>0){\n \t$config['maintain_ratio'] = false;\n \t$config['height'] = $height;\n }else{\n \t$config['maintain_ratio'] = true;\n }\n\n $this->image_lib->initialize($config);\n\n $this->image_lib->resize();\n $this->image_lib->clear();\n }", "public function validate()\n {\n if ($this->crop || $this->width || $this->height) {\n return;\n }\n\n throw new \\Exception(\n 'Slideshow expects a width or a height to be provided if crop is set to false.'\n );\n }", "function get_intermediate_image_sizes()\n {\n }", "protected function filter_video_dimensions( $new_attributes, $src ) {\n\n\t\t// Short-circuit if width and height are already defined.\n\t\tif ( ! empty( $new_attributes['width'] ) && ! empty( $new_attributes['height'] ) ) {\n\t\t\treturn $new_attributes;\n\t\t}\n\n\t\t// Short-circuit if no width and height are required based on the layout.\n\t\t$layout = isset( $new_attributes['layout'] ) ? $new_attributes['layout'] : null;\n\t\tif ( in_array( $layout, [ 'fill', 'nodisplay', 'flex-item' ], true ) ) {\n\t\t\treturn $new_attributes;\n\t\t}\n\n\t\t// Get the width and height from the file.\n\t\t$path = wp_parse_url( $src, PHP_URL_PATH );\n\t\t$ext = pathinfo( $path, PATHINFO_EXTENSION );\n\t\t$name = sanitize_title( wp_basename( $path, \".$ext\" ) ); // Extension removed by media_handle_upload().\n\t\t$args = [\n\t\t\t'name' => $name,\n\t\t\t'post_type' => 'attachment',\n\t\t\t'post_status' => 'inherit',\n\t\t\t'numberposts' => 1,\n\t\t];\n\n\t\t$attachments = get_posts( $args );\n\t\tif ( ! empty( $attachments ) ) {\n\t\t\t$attachment = array_shift( $attachments );\n\t\t\t$meta_data = wp_get_attachment_metadata( $attachment->ID );\n\t\t\tif ( empty( $new_attributes['width'] ) && ! empty( $meta_data['width'] ) && 'fixed-height' !== $layout ) {\n\t\t\t\t$new_attributes['width'] = $meta_data['width'];\n\t\t\t}\n\t\t\tif ( empty( $new_attributes['height'] ) && ! empty( $meta_data['height'] ) ) {\n\t\t\t\t$new_attributes['height'] = $meta_data['height'];\n\t\t\t}\n\t\t}\n\n\t\treturn $new_attributes;\n\t}", "public function generate($params = null)\n {\n return $this->parseParams($params)\n ->prepareSourceImageData()\n ->validateSourceImagePath()\n ->parseSourceImageData()\n ->calculateRatio()\n ->prepareThumbData()\n ->calculateFactorHeight()\n ->calculateFactorWidth()\n ->calculateDestinationImageDimensions()\n ->calculateDestinationStartPoints()\n ->generateThumbnail();\n }", "public function size()\n { \n $props = $this->uri->ruri_to_assoc();\n\n if (!isset($props['o'])) exit(0);\n $w = -1;\n $h = -1;\n $m = 0;\n if (isset($props['w'])) $w = $props['w'];\n if (isset($props['h'])) $h = $props['h'];\n if (isset($props['m'])) $m = $props['m'];\n\n $this->img->set_img($props['o']);\n $this->img->set_size($w, $h, $m);\n $this->img->set_square($m);\n $this->img->get_img();\n }", "public function calculateMediaWidthsAndHeightsDataProvider() {}", "function image_crop()\n\t{\n\t\t$protocol = 'image_process_'.$this->resize_protocol;\n\t\t\n\t\tif (substr($protocol, -3) == 'gd2')\n\t\t{\n\t\t\t$protocol = 'image_process_gd';\n\t\t}\n\t\t\n\t\treturn $this->$protocol('crop');\n\t}", "function thumb($width, $height)\n\t\t{\n\t\t // not allowing it to be more than 3x greater than the other\n\t\t if (!$height) {\n $reduction = $width / $this->width;\n $height = $this->height * $reduction;\n if ($height > 3*$width) $height = 3*$width;\n\t\t }\n\t\t if (!$width) {\n $reduction = $height / $this->height;\n $width = $this->width * $reduction;\n if ($width > 3*$height) $width = 3*$height;\n\t\t }\n\t\t \n\t\t\t// Picks the best fit from the original to the destination image, cropping when necessary\n\t\t\tif (!$this->image) return;\n\t\t\t$ratio = $this->width / $this->height;\n\t\t \n\t\t\tif ($width / $height > $ratio) {\n\t\t\t\t $new_height = $width / $ratio;\n\t\t\t\t $new_width = $width;\n\t\t\t} else {\n\t\t\t\t $new_width = $height * $ratio;\n\t\t\t\t $new_height = $height;\n\t\t\t}\n\t\t \n\t\t\t$x_mid = $new_width / 2; //horizontal middle\n\t\t\t$y_mid = $new_height / 2; //vertical middle\n\t\t \n\t\t\t$process = imagecreatetruecolor(round($new_width), round($new_height));\n\t\t \n\t\t\timagecopyresampled($process, $this->image, 0, 0, 0, 0, $new_width, $new_height, $this->width, $this->height);\n\t\t\t$thumb = imagecreatetruecolor($width, $height);\n\t\t\timagecopyresampled($thumb, $process, 0, 0, ($x_mid-($width/2)), ($y_mid-($height/2)), $width, $height, $width, $height);\n\t\t\t\n\t\t\timagedestroy($process);\n\t\t\treturn $this->image = $thumb;\n\t\t}", "public function fit()\n\t{\n\t\t// Load image\n\t\tif( $this->im == NULL) $this->im = imagecreatefromstring( file_get_contents( $this->imageFilePath ) );\n\n\t\tif($this->resizeFlag)\n\t\t{\n\t\t\t$newWidth=$this->width;\n\t\t\t$newHeight=$this->height;\n\t\n\t\t\t$t=imagecreatetruecolor($newWidth,$newHeight);\n\t\t\timagecopyresampled($t,$this->im,0,0,0,0,$newWidth,$newHeight,imagesx($this->im),imagesy($this->im));\n\t\t\timagedestroy($this->im);\n\t\t\t$this->im=$t;\n\t\t\t//imagedestroy($t);\t\n\t\t\t$this->debug[]=\"[RESIZE] TRUE -> $newWidth $newHeight\";\n\t\t}\n\n\t\t// Counter to keep track of iterations\n\t\t$cc = 0;\n\n\t\t// Use the buffer NOT the filesystem to compute intermediate image size\n\t\tob_start();\n\n\t\t// Loop forever\n\t\twhile( true )\n\t\t{\n\t\t\t// Empty buffer\n\t\t\tob_clean();\n\n\t\t\t// Keep track of previous quality setting\n\t\t\t$this->cq = $this->q;\n\n\t\t\t// Create and fill buffer with image with current quality setting\n\t\t\timagejpeg( $this->im, NULL, $this->cq );\n\n\t\t\t// Compute current image size from size of buffer\n\t\t\t$currentSize = strlen( ob_get_contents() );\n\n\t\t\t// Some debug\n\t\t\t$this->debug[] = \" \" . $this->low . \" >>> \" . $this->cq . \" <<< \" . $this->high . \" [ $currentSize / \" . $this->targetSize . \" ]\";\n\n\t\t\t// Break loop if target size is reached - very rare!\n\t\t\tif ( $currentSize == $this->targetSize )\n\t\t\t\tbreak;\n\n\t\t\t// If size > target then change quality range\n\t\t\tif ( $currentSize > $this->targetSize )\n\t\t\t{\n\t\t\t\t$this->high = $this->q;\n\t\t\t\t$this->q = ( $this->q + $this->low ) / 2;\n\t\t\t}\n\n\t\t\t// If size < target then change quality range\n\t\t\tif ( $currentSize < $this->targetSize )\n\t\t\t{\n\t\t\t\t$this->low = $this->q;\n\t\t\t\t$this->q = ( $this->q + $this->high ) / 2;\n\t\t\t}\n\n\t\t\t// Break loop if high/low gap below precision AND size is < target size\n\t\t\tif ( ( ( $this->high - $this->low ) < $this->precision ) && ( $currentSize <= $this->targetSize ) )\n\t\t\t\tbreak;\n\n\t\t\t// Break loop of counter has reached maximum iterations - target size either to low/high\n\t\t\tif ( $cc == $this->maxIterations )\n\t\t\t\tbreak;\n\n\t\t\t// Continue loop incrementing counter\n\t\t\t$cc++;\n\t\t}\n\n\t\t// Final debug\n\t\t$this->debug[] = \"Final Quality Setting = \" . $this->cq;\n\n\t\t// Disable buffer\n\t\tob_end_clean();\n\t}", "protected function _reset()\n {\n $this->_scheduleAdaptiveResize = false;\n $this->_cropPosition = 0;\n parent::_reset();\n }", "protected function getSourceData()\n\t{\n\t\tif($this->source instanceof UploadedFile) {\n\t\t\t$this->setParams(array(\n\t\t\t\t'name' => $this->source->getClientOriginalName(),\n\t\t\t\t'path' => $this->source->getPath() . '/' . $this->source->getClientOriginalName(),\n\t\t\t\t'extension' => $this->source->getExtension(),\n\t\t\t\t'mime' => $this->source->getMimeType()\n\t\t\t));\n\t\t} else if(is_string($this->source)) {\n\t\t\tif(file_exists($this->source)) {\n\t\t\t\t$this->setParams(array(\n\t\t\t\t\t'name' => basename($this->source),\n\t\t\t\t\t'path' => $this->source,\n\t\t\t\t\t'extension' => substr(strrchr($this->source, '.'), 1),\n\t\t\t\t\t'mime' => finfo_file(finfo_open(), $this->source, FILEINFO_MIME_TYPE)\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\tif(!$this->getParams()) {\n\t\t\tthrow new \\InvalidArgumentException('Invalid image data provided');\n\t\t}\n\t}", "public function setResolution()\n\t{\n\t\t$args=func_get_args();\n\n\t\tif(count($args)==0 or count($args)>2) return;\n\n\t\t$this->resizeFlag=true;\n\n\t\t$this->width=$args[0];\n\t\t$this->height=$args[1];\n\n\t}", "protected function calcImageSizeStrict($width, $height)\n {\n // first, we need to determine what the longest resize dimension is..\n if ($this->maxWidth >= $this->maxHeight) {\n // and determine the longest original dimension\n if ($width > $height) {\n $newDimensions = $this->calcHeight($width, $height);\n\n if ($newDimensions['width'] < $this->maxWidth) {\n $newDimensions = $this->calcWidth($width, $height);\n }\n }\n elseif ($height >= $width) {\n $newDimensions = $this->calcWidth($width, $height);\n\n if ($newDimensions['height'] < $this->maxHeight) {\n $newDimensions = $this->calcHeight($width, $height);\n }\n }\n }\n elseif ($this->maxHeight > $this->maxWidth) {\n if ($width >= $height) {\n $newDimensions = $this->calcWidth($width, $height);\n\n if ($newDimensions['height'] < $this->maxHeight) {\n $newDimensions = $this->calcHeight($width, $height);\n }\n }\n elseif ($height > $width) {\n $newDimensions = $this->calcHeight($width, $height);\n\n if ($newDimensions['width'] < $this->maxWidth) {\n $newDimensions = $this->calcWidth($width, $height);\n }\n }\n }\n\n if (isset($newDimensions)) {\n $this->newDimensions = $newDimensions;\n }\n }", "public function crop()\n {\n }", "private static function resize_image($source, $width, $height){\n\t\t$source_width = imagesx($source);\n\t\t$source_height = imagesy($source);\n\t\t$source_aspect = round($source_width / $source_height, 1);\n\t\t$target_aspect = round($width / $height, 1);\n\t\n\t\t$resized = imagecreatetruecolor($width, $height);\n\t\n\t\tif ($source_aspect < $target_aspect){\n\t\t\t// higher\n\t\t\t$new_size = array($width, ($width / $source_width) * $source_height);\n\t\t\t$source_pos = array(0, (($new_size[1] - $height) * ($source_height / $new_size[1])) / 2);\n\t\t}else if ($source_aspect > $target_aspect){\n\t\t\t// wider\n\t\t\t$new_size = array(($height / $source_height) * $source_width, $height);\n\t\t\t$source_pos = array((($new_size[0] - $width) * ($source_width / $new_size[0])) / 2, 0);\n\t\t}else{\n\t\t\t// same shape\n\t\t\t$new_size = array($width, $height);\n\t\t\t$source_pos = array(0, 0);\n\t\t}\n\t\n\t\tif ($new_size[0] < 1) $new_size[0] = 1;\n\t\tif ($new_size[1] < 1) $new_size[1] = 1;\n\t\n\t\timagecopyresampled($resized, $source, 0, 0, $source_pos[0], $source_pos[1], $new_size[0], $new_size[1], $source_width, $source_height);\n\t\n\t\treturn $resized;\n\t}", "function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = \\false)\n {\n }", "public static function cropValues($options)\n {\n\n // calculate new height for original image based crop ratio\n if ($options['fit'] == 'width') {\n $width = $options['originalWidth'];\n $height = floor($options['originalWidth'] / $options['ratio']);\n\n $heightHalf = floor($height / 2);\n\n // calculate focus for original image\n $focusX = floor($width * 0.5);\n $focusY = floor($options['originalHeight'] * $options['focusY']);\n\n $x1 = 0;\n $y1 = $focusY - $heightHalf;\n\n // $y1 off canvas?\n $y1 = ($y1 < 0) ? 0 : $y1;\n $y1 = ($y1 + $height > $options['originalHeight']) ? $options['originalHeight'] - $height : $y1;\n\n }\n\n // calculate new width for original image based crop ratio\n if ($options['fit'] == 'height') {\n $width = $options['originalHeight'] * $options['ratio'];\n $height = $options['originalHeight'];\n\n $widthHalf = floor($width / 2);\n\n // calculate focus for original image\n $focusX = floor($options['originalWidth'] * $options['focusX']);\n $focusY = $height * 0.5;\n\n $x1 = $focusX - $widthHalf;\n $y1 = 0;\n\n // $x1 off canvas?\n $x1 = ($x1 < 0) ? 0 : $x1;\n $x1 = ($x1 + $width > $options['originalWidth']) ? $options['originalWidth'] - $width : $x1;\n }\n\n $x2 = floor($x1 + $width);\n $y2 = floor($y1 + $height);\n\n return [\n 'x1' => $x1,\n 'x2' => $x2,\n 'y1' => $y1,\n 'y2' => $y2,\n 'width' => floor($width),\n 'height' => floor($height),\n ];\n }", "public function __construct($src, $width, $height){\r\r\n\t\t$this->src = $src;\r\r\n\t\t$this->width = $width;\r\r\n\t\t$this->height = $height;\r\r\n\t\t\r\r\n\t\t$this->SetType(\"application/x-shockwave-flash\");\r\r\n\t\t\r\r\n\t\t$this->attributes = array();\r\r\n\t}", "function yz_attachments_get_cover_image_dimensions( $wh ) {\n return array( 'width' => 1350, 'height' => 350 );\n}", "private function _projectSourceOnCanvas(&$source, &$canvas) {\n\t\t$srcX = 0;\n\t\t$srcY = 0;\n\t\tlist($projectionWidth, $projectionHeight) = $this->_getProjectionSize();\n\t\tlist($destX, $destY) = $this->_getLeftUpperCoordinateOnCanvas($projectionWidth, $projectionHeight);\n\t\timagecopyresampled($canvas, $source, $destX, $destY, $srcX, $srcY, $projectionWidth, $projectionHeight, $this->params['sourceWidth'], $this->params['sourceHeight']);\n\t}", "abstract public function calculateCropBoxSize();", "function prostarter_preprocess_image(&$variables) {\n unset(\n $variables['width'],\n $variables['height'],\n $variables['attributes']['width'],\n $variables['attributes']['height']\n );\n }", "public function cropAvatarAction()\n {\n // TODO: swap web dir to product path\n //$imgRealPath = '/Users/leonqiu/www/choumei.me/Symfony/web/' . $_POST['imageSource'];\n $imgRealPath = dirname(__FILE__) . '/../../../../web/' . $_POST['imageSource'];\n list($width, $height) = getimagesize($imgRealPath);\n \n $viewPortW = $_POST[\"viewPortW\"];\n\t $viewPortH = $_POST[\"viewPortH\"];\n $pWidth = $_POST[\"imageW\"];\n $pHeight = $_POST[\"imageH\"];\n $tmp = explode(\".\",$_POST[\"imageSource\"]);\n $ext = end(&$tmp);\n $function = $this->returnCorrectFunction($ext);\n //$image = $function($_POST[\"imageSource\"]);\n $image = $function($imgRealPath);\n $width = imagesx($image);\n $height = imagesy($image);\n \n // Resample\n $image_p = imagecreatetruecolor($pWidth, $pHeight);\n $this->setTransparency($image,$image_p,$ext);\n\t\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $pWidth, $pHeight, $width, $height);\n\t\timagedestroy($image);\n\t\t$widthR = imagesx($image_p);\n\t\t$hegihtR = imagesy($image_p);\n\t\t\n\t\t$selectorX = $_POST[\"selectorX\"];\n\t\t$selectorY = $_POST[\"selectorY\"];\n\t\t\n\t\tif($_POST[\"imageRotate\"]){\n\t\t $angle = 360 - $_POST[\"imageRotate\"];\n\t\t $image_p = imagerotate($image_p,$angle,0);\n\t\t \n\t\t $pWidth = imagesx($image_p);\n\t\t $pHeight = imagesy($image_p);\n\t\t \n\t\t //print $pWidth.\"---\".$pHeight;\n\t\t\n\t\t $diffW = abs($pWidth - $widthR) / 2;\n\t\t $diffH = abs($pHeight - $hegihtR) / 2;\n\t\t \n\t\t $_POST[\"imageX\"] = ($pWidth > $widthR ? $_POST[\"imageX\"] - $diffW : $_POST[\"imageX\"] + $diffW);\n\t\t $_POST[\"imageY\"] = ($pHeight > $hegihtR ? $_POST[\"imageY\"] - $diffH : $_POST[\"imageY\"] + $diffH);\n\t\t\n\t\t \n\t\t}\n\t\t\n\t\t$dst_x = $src_x = $dst_y = $dst_x = 0;\n\t\t\n\t\tif($_POST[\"imageX\"] > 0){\n\t\t $dst_x = abs($_POST[\"imageX\"]);\n\t\t}else{\n\t\t $src_x = abs($_POST[\"imageX\"]);\n\t\t}\n\t\tif($_POST[\"imageY\"] > 0){\n\t\t $dst_y = abs($_POST[\"imageY\"]);\n\t\t}else{\n\t\t $src_y = abs($_POST[\"imageY\"]);\n\t\t}\n\t\t\n\t\t\n\t\t$viewport = imagecreatetruecolor($_POST[\"viewPortW\"],$_POST[\"viewPortH\"]);\n\t\t$this->setTransparency($image_p,$viewport,$ext);\n\t\t\n\t\timagecopy($viewport, $image_p, $dst_x, $dst_y, $src_x, $src_y, $pWidth, $pHeight);\n\t\timagedestroy($image_p);\n\t\t\n\t\t\n\t\t$selector = imagecreatetruecolor($_POST[\"selectorW\"],$_POST[\"selectorH\"]);\n\t\t$this->setTransparency($viewport,$selector,$ext);\n\t\timagecopy($selector, $viewport, 0, 0, $selectorX, $selectorY,$_POST[\"viewPortW\"],$_POST[\"viewPortH\"]);\n\t\t\n\t\t//$file = \"tmp/test\".time().\".\".$ext;\n\t\t// TODO: generate file name\n\t\t$fileName = uniqid() . \".\" . $ext;\n\t\t$user = $this->get('security.context')->getToken()->getUser();\n\t\t$avatarFile = dirname(__FILE__).'/../../../../web/uploads/avatar/'.$user->getId(). '/' .$fileName;\n\t\t$avatarUrl = '/uploads/avatar/'. $user->getId() . '/' . $fileName;\n\t\t$this->parseImage($ext,$selector,$avatarFile);\n\t\timagedestroy($viewport);\n\t\t//Return value\n\t\t//update avatar\n $em = $this->getDoctrine()->getEntityManager();\n $user->setAvatar($avatarUrl);\n $em->persist($user);\n $em->flush();\n\t\techo $avatarUrl;\n\t\texit;\n }", "static function resize($sourcePath, $newWidth = 100, $newHeight = 100)\n {\n switch (exif_imagetype($sourcePath)) {\n case IMAGETYPE_JPEG :\n $sourceImage = imagecreatefromjpeg($sourcePath);\n break;\n case IMAGETYPE_PNG :\n $sourceImage = imagecreatefrompng($sourcePath);\n break;\n case IMAGETYPE_GIF :\n $sourceImage = imagecreatefromgif($sourcePath);\n break;\n default:\n return;\n }\n\n // Create the new image (still blank/empty)\n $newImage = imagecreatetruecolor($newWidth, $newHeight);\n imagesetinterpolation($newImage, IMG_SINC);\n\n // Determine the source image Dimensions\n $sourceImageWidth = imagesx($sourceImage);\n $sourceImageHeight = imagesy($sourceImage);\n $sourceImageAspectRatio = $sourceImageWidth / $sourceImageHeight;\n $newImageAspectRatio = $newWidth / $newHeight;\n\n // Determine parameters and copy part of the source image into the new image\n if ($newImageAspectRatio >= $sourceImageAspectRatio) { // width is the limiting factor for the source image\n $src_x = 0;\n $src_w = $sourceImageWidth;\n $src_h = $src_w / $newImageAspectRatio;\n $src_y = ($sourceImageHeight - $src_h) / 2;\n } else { // height of source image is limiting factor\n $src_y = 0;\n $src_h = $sourceImageHeight;\n $src_w = $src_h * $newImageAspectRatio;\n $src_x = ($sourceImageWidth - $src_w) / 2;\n }\n\n imagecopyresampled($newImage, $sourceImage, 0, 0, $src_x, $src_y, $newWidth, $newHeight, $src_w, $src_h);\n\n // Save new image to destination path\n switch (exif_imagetype($sourcePath)) {\n case IMAGETYPE_JPEG :\n imagejpeg($newImage, $sourcePath, 100);\n break;\n case IMAGETYPE_PNG :\n imagepng($newImage, $sourcePath);\n break;\n case IMAGETYPE_GIF :\n imagegif($newImage, $sourcePath);\n break;\n }\n\n // Remove image resources to reallocate space\n imagedestroy($sourceImage);\n imagedestroy($newImage);\n }", "function initializeImageProperties()\n\t{\n\t\tlist($this->width, $this->height, $iType, $this->htmlattributes) = getimagesize($this->sFileLocation);\n\n\t\tif (($this->width < 1) || ($this->height < 1)) {\n\t\t\t$this->printError('invalid imagesize');\n\t\t}\n\n\t\t$this->setImageOrientation();\n\t\t$this->setImageType($iType);\n\t}", "public function setDimensions($width, $height) {}", "function FE_CropImage($img, $w=0, $h=0, $a=''){\t\t\r\n\t\t$q=80; /* calitate 0-100 */\t\t\r\n\t\t$src =__URL__.'app/tt/tt.php?src='.$img.($w>0 ? \"&w=$w\" : \"\").($h>0 ? \"&h=$h\" : \"\").\"&q=$q\".(!empty($a) ? \"&a=$a\" : \"\");\r\n\t\treturn $src;\r\n\t\t\r\n }", "function imgcrop(){\n\t\t$id = $this->session->userdata(SESSION_CONST_PRE.'userId');\n\t\t$dir_path = './assets/uploads/students/';\n\t\n\t\t$file_path = $dir_path . \"/Profile.small.jpg\";\n\t\t$src = $dir_path .'Profile.jpg';\n\t\tif(file_exists($file_path)){\n\t\t\t$src = $dir_path .'Profile.small.jpg';\n\t\t}\n\t\n\t\t$imgW = $_POST['w'];\n\t\t$imgH = $_POST['h'];\n\t\t$imgY1 = $_POST['y'];\n\t\t$imgX1 = $_POST['x'];\n\t\t$cropW = $_POST['w'];\n\t\t$cropH = $_POST['h'];\n\t\n\t\t$jpeg_quality = 100;\n\t\n\t\t//$img_r = imagecreatefromjpeg($src);\n\t\t$what = getimagesize($src);\n\t\t//list($imgInitW, $imgInitH, $type, $what) = getimagesize($src);\n\t\t$imgW = $imgInitW = $what[0];\n\t\t$imgH = $imgInitH = $what[1];\n\t\tswitch(strtolower($what['mime']))\n\t\t{\n\t\t\tcase 'image/png':\n\t\t\t\t$img_r = imagecreatefrompng($src);\n\t\t\t\t$source_image = imagecreatefrompng($src);\n\t\t\t\t$type = '.png';\n\t\t\t\tbreak;\n\t\t\tcase 'image/jpeg':\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$source_image = imagecreatefromjpeg($src);\n\t\t\t\t$type = '.jpeg';\n\t\t\t\tbreak;\n\t\t\tcase 'image/jpg':\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$source_image = imagecreatefromjpeg($src);\n\t\t\t\t$type = '.jpg';\n\t\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\t$img_r = imagecreatefromgif($src);\n\t\t\t\t$source_image = imagecreatefromgif($src);\n\t\t\t\t$type = '.gif';\n\t\t\t\tbreak;\n\t\t\tdefault: die('image type not supported');\n\t\t}\n\t\n\t\t$resizedImage = imagecreatetruecolor($imgW, $imgH);\n\t\timagecopyresampled($resizedImage, $source_image, 0, 0, 0, 0, $imgW,\n\t\t$imgH, $imgInitW, $imgInitH);\n\t\n\t\n\t\t$dest_image = imagecreatetruecolor($cropW, $cropH);\n\t\timagecopyresampled($dest_image, $source_image, 0, 0, $imgX1, $imgY1, $cropW,\n\t\t$cropH, $cropW, $cropH);\n\t\n\t\n\t\timagejpeg($dest_image, $dir_path.'Profile.small.jpg', $jpeg_quality);\n\t\n\t}", "public function __construct(){\n parent::__construct(); // paima parent constructoriu\n $this->width = 50;\n $this->height = 50;\n }", "private function _paintCanvas(&$image) {\n\t\tif ($this->params['type'] === IMAGETYPE_JPEG) {\n\t\t\tif (\n\t\t\t\t!$this->params['crop'] ||\n\t\t\t\t!$this->params['grow']\n\t\t\t) {\n\t\t\t\t$this->_paintCanvasOpaque($image);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->_paintCanvasTransparent($image);\n\t\t}\n\t}", "public function setStrategy(Polycast_Filter_ImageSize_Strategy_Interface $strategy);", "protected function _create_cached()\n {\n if($this->url_params['c'])\n {\n // Resize to highest width or height with overflow on the larger side\n $this->image->resize($this->url_params['w'], $this->url_params['h'], Image::INVERSE);\n\n // Crop any overflow from the larger side\n $this->image->crop($this->url_params['w'], $this->url_params['h']);\n }\n else\n {\n // Just Resize\n $this->image->resize($this->url_params['w'], $this->url_params['h']);\n }\n\n // Apply any valid watermark params\n $watermarks = Arr::get($this->config, 'watermarks');\n if ( ! empty($watermarks))\n {\n foreach ($watermarks as $key => $watermark)\n {\n if (key_exists($key, $this->url_params))\n {\n $image = Image::factory($watermark['image']);\n $this->image->watermark($image, $watermark['offset_x'], $watermark['offset_y'], $watermark['opacity']);\n }\n }\n }\n\n // Save\n if($this->url_params['q'])\n {\n //Save image with quality param\n $this->image->save($this->cached_file, $this->url_params['q']);\n }\n else\n {\n //Save image with default quality\n $this->image->save($this->cached_file, Arr::get($this->config, 'quality', 80));\n }\n }", "function cropimage($source_url, $new_width=250, $quality=75){\n return false;\n \n if (!file_exists($source_url)){\n echo alertbuilder(\"File does not exist: $source_url\",'warning');\n return false;\n }\n \n //separate the file name and the extention\n $source_url_parts = pathinfo($source_url);\n $filename = $source_url_parts['filename'];\n $extension = strtolower($source_url_parts['extension']);\n \n //detect the width and the height of original image\n $info = getimagesize($source_url);\n \n if($info === false){\n echo alertbuilder('This file is not a valid image', 'warning');\n return false;\n }\n \n $type = $info[2];\n $width = $info[0];\n $height = $info[1];\n \n // resize only when the original image is larger than new width.\n // this helps you to avoid from unwanted resizing.\n if ($width > $new_width) {\n // cool to resize\n } else {\n echo alertbuilder('The image is already smaller than width', 'warning');\n return false;\n }\n \n //get the reduced width\n $reduced_width = ($width - $new_width);\n \n //now convert the reduced width to a percentage, round to 2 decimals\n $reduced_radio = round(($reduced_width / $width) * 100, 2);\n \n // reduce the same percentage from the height, round to 2 decimals\n $reduced_height = round(($height / 100) * $reduced_radio, 2);\n \n //reduce the calculated height from the original height\n $new_height = $height - $reduced_height;\n \n $img = null;\n $imgResized = null;\n \n switch($type) {\n case IMAGETYPE_JPEG:\n $img = imagecreatefromjpeg($source_url);\n $imgResized = imagescale($img, $new_width, $new_height, $quality);\n imagejpeg($imgResized, $source_url); \n break;\n \n case IMAGETYPE_GIF:\n $img = imagecreatefromgif($source_url);\n $imgResized = imagescale($img, $new_width, $new_height, $quality);\n imagegif($imgResized, $source_url); \n break;\n \n case IMAGETYPE_PNG:\n $img = imagecreatefrompng($source_url);\n $imgResized = imagescale($img, $new_width, $new_height, $quality);\n imagepng($imgResized, $source_url); \n break;\n \n default:\n echo alertbuilder('This file is not in JPG, GIF, or PNG format!');\n return false;\n }\n\n //Finally frees any memory associated with image\n imagedestroy($img);\n imagedestroy($imgResized);\n \n return true;\n}", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->imageChangeParams = func_get_arg(0);\n $this->type = func_get_arg(1);\n }\n }", "protected function _checkImage() {\n if ( !is_file ( $this->src ) ) {\n $this->src = $this->default_missing_image; \n }\n $image_path_parts = pathinfo ( $this->src );\n $this->_image_name = $image_path_parts['basename'];\n $this->_thumb_filename = $this->attributes['width'] . 'x' . $this->attributes['height'] . '_' . $this->_image_name;\n $this->_thumb_src = $this->thumbs_dir_path . $this->_thumb_filename;\n if ( is_readable ( $this->_thumb_src ) ) {\n $this->_calculated_width = $this->attributes['width'];\n $this->_calculated_height = $this->attributes['height'];\n $this->src = $this->_thumb_src;\n return 'no_thumb_required';\n }\n if ( KISSIT_MAIN_PRODUCT_WATERMARK_SIZE == 0 ) {\n \tif ( !$this->_original_image_info = getimagesize ( $this->src ) ) {\n \t\treturn 'abort';\n \t} \n \tif (!in_array ( $this->_original_image_info['mime'], $this->_valid_mime ) ) {\n \t\treturn 'abort';\n \t}\n }\n }", "public function crop_image($w, $h)\n\t{\n // This function resizes this image to fit in the box $w x $h, cropping to fill the entire image\n $image_size = $this->image_size();\n if ($image_size[0] == $w && $image_size[1] == $h) {\n // No need to crop\n return;\n }\n $ratio = $image_size[0] / $image_size[1];\n $goal_ratio = $w / $h;\n\n // Calculate the new image size\n if ($ratio < $goal_ratio) {\n // Tall image, crop top and bottom\n $l = 0;\n $r = $image_size[0];\n $height = $image_size[0] / $goal_ratio;\n $t = ($image_size[1] / 2) - ($height / 2);\n $b = ($image_size[1] / 2) + ($height / 2);\n } else {\n // Wide image, crop top and bottom\n $t = 0;\n $b = $image_size[1];\n $width = $image_size[1] * $goal_ratio;\n $l = ($image_size[0] / 2) - ($width / 2);\n $r = ($image_size[0] / 2) + ($width / 2);\n }\n\n // Create a new image for the resized image\n $oldimage = $this->load_image();\n $newimage = imagecreatetruecolor($w, $h);\n imagecopyresampled($newimage, $oldimage, 0, 0, $l, $t, $w, $h, $r - $l, $b - $t);\n $filename = tempnam(sys_get_temp_dir(), 'img');\n if (preg_match('/jpeg/', $image_size['mime'])) {\n imagejpeg($newimage, $filename, 100);\n } elseif (preg_match('/gif/', $image_size['mime'])) {\n imagegif($newimage, $filename);\n } elseif (preg_match('/png/', $image_size['mime'])) {\n imagepng($newimage, $filename);\n }\n $this->delete_local_file();\n $this->local_file = $filename;\n\t}", "function imageToCanvas ($_image, $_canvasWidth, $_canvasHeight, $color='white' ,$extension, $forceScale=false)\n{\n if (is_string($_image)) {\n if (is_file($_image)) {\n if($extension==\"jpg\" || $extension==\"jpeg\" ){\n\t\t\t\t$_image = imagecreatefromjpeg($_image);\n\t\t\t}\n\t\t\telse if($extension==\"png\"){\n\t\t\t\t$_image = imagecreatefrompng($_image);\n\t\t\t}else {\n\t\t\t\t$_image = imagecreatefromgif($_image);\n\t\t\t}\n } else {\n return \"Incorrect imagepath >> No file here \" . $_image;\n }\n } \n \n $width = imagesx($_image);\n $height = imagesy($_image);\n $image_aspect_ratio = $width / $height;\n $canvas_aspect_ratio = $_canvasWidth / $_canvasHeight;\n \n if($forceScale == 'true')\n {\n // scale by height\n if ($image_aspect_ratio < $canvas_aspect_ratio) {\n $new_height = $_canvasHeight;\n $new_width = ($new_height/$height) * $width;\n } \n // scale by width\n else {\n $new_width = $_canvasWidth;\n $new_height = ($new_width/$width) * $height;\n }\n }\n else\n {\n if($width > $_canvasWidth)\n {\n $new_width = $_canvasWidth;\n $new_height = ($new_width/$width) * $height;\n }\n elseif($height > $_canvasHeight)\n {\n $new_height = $_canvasHeight;\n $new_width = ($new_height/$height) * $width;\n }\n else\n {\n $new_height = $height;\n $new_width = $width;\n } \n }\n \n # offset values (ie. center the resized image to canvas)\n $xoffset = ($_canvasWidth - $new_width) / 2;\n $yoffset = ($_canvasHeight - $new_height) / 2;\n \n $image_resized = imagecreatetruecolor($_canvasWidth, $_canvasHeight);\n \n # fill colour\n\tif ($color == 'white'){\n\t $fill_color = imagecolorallocate($image_resized, 255, 255, 255);\n\t}else if ($color == 'black'){\n\t\t$fill_color = imagecolorallocate($image_resized, 0, 0, 0);\n\t}else if ($color == 'tran'){\t\t\n\t\t$black = imagecolorallocate($image_resized, 0, 0, 0);\n\t\timagecolortransparent($fill_color, $black);\n\t\t//$fill_color = imagecolortransparent($image_resized);\n\t\t//$fill_color = $image_resized;\n\t}\n imagefill($image_resized, 0, 0, $fill_color);\n imagecopyresampled($image_resized, $_image, $xoffset, $yoffset, 0, 0, $new_width, $new_height, $width, $height);\n \n imagedestroy($_image);\n return $image_resized;\n}", "function _process_image($data){\n\t\t\n\t\t// Largest side dimensions for small and large thumbnails\n\t\t$px_sm = 320;\n\t\t$px_lg = 640;\n\t\t\n\t\t// Generate new base name for this image\n\t\t$new_name = uniqid(TRUE);\n\t\t\n\t\t// Initialise array for resizing errors\n\t\t$this->resize_errors = array();\n\t\t\n\t\t// Array to hold the new dimensions\n\t\t$dimensions = array();\n\t\t\n\t\t// Work out the dimensions of the image based on longest side, or set both to same if equal\n\t\tif ($data['image_width'] > $data['image_height']){\n\t\t\t$dimensions['sm']['w'] = $px_sm;\n\t\t\t$dimensions['lg']['w'] = $px_lg;\n\t\t\t$dimensions['sm']['h'] = $data['image_height'] * ($px_sm / $data['image_width']);\n\t\t\t$dimensions['lg']['h'] = $data['image_height'] * ($px_lg / $data['image_width']);\n\t\t} elseif($data['image_width'] < $data['image_height']){\n\t\t\t$dimensions['sm']['w'] = $data['image_width'] * ($px_sm / $data['image_height']);\n\t\t\t$dimensions['lg']['w'] = $data['image_width'] * ($px_lg / $data['image_height']);\n\t\t\t$dimensions['sm']['h'] = $px_sm;\n\t\t\t$dimensions['lg']['h'] = $px_lg;\n\t\t} elseif ($data['image_width'] == $data['image_height']){\n\t\t\t$dimensions['sm']['w'] = $px_sm;\n\t\t\t$dimensions['lg']['w'] = $px_lg;\n\t\t\t$dimensions['sm']['h'] = $px_sm;\n\t\t\t$dimensions['lg']['h'] = $px_lg;\n\t\t}\n\t\t\n\t\t// Global resize vars\n\t\t$config['image_library'] = 'gd2';\n\t\t$config['source_image']\t= $data['full_path'];\n\t\t$config['create_thumb'] = FALSE;\n\t\t$config['maintain_ratio'] = TRUE;\n\t\t$config['quality'] = 100;\n\t\t$this->load->library('image_lib', $config);\n\t\t\n\t\t// Create small image\n\t\t$config['width'] = $dimensions['sm']['w'];\n\t\t$config['height'] = $dimensions['sm']['h'];\n\t\t$config['new_image'] = sprintf('%s/%s.sm%s', realpath('web/upload/'), $new_name, $data['file_ext']);\n\t\t$this->image_lib->initialize($config);\n\t\t$result_sm = $this->image_lib->resize();\n\t\tif($result_sm == FALSE){\n\t\t\tarray_push($this->resize_errors, $this->image_lib->display_errors());\n\t\t}\n\t\t\n\t\t// Create larger image\n\t\t$config['width'] = $dimensions['lg']['w'];\n\t\t$config['height'] = $dimensions['lg']['h'];\n\t\t$config['new_image'] = sprintf('%s/%s.lg%s', realpath('web/upload/'), $new_name, $data['file_ext']);\n\t\t$this->image_lib->initialize($config);\n\t\t$result_lg = $this->image_lib->resize();\n\t\tif($result_lg == FALSE){\n\t\t\tarray_push($this->resize_errors, $this->image_lib->display_errors());\n\t\t}\n\t\t\n\t\t// Delete the original source file now we're finished with it\n\t\t@unlink($data['full_path']);\n\t\t\n\t\t// Finished resizing functions - test for errors and return\n\t\tif($this->resize_errors == NULL){\n\t\t\t// No errors encountered - delete original image\n\t\t\t$name = sprintf('%s.#%s', $new_name, $data['file_ext']);\n\t\t\treturn $name;\n\t\t} else {\n\t\t\t// One or more errors occured when resizing the images\n\t\t\t$this->lasterr = 'Failed to resize the images.';\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t}", "public function init()\n {\n parent::init();\n\n $this->size = $this->finalWidth;\n }", "function set_valid_image_data() {\n $base_image = $this->get_config('base_image', false);\n if ($base_image !== false) {\n // Definitely configured\n if ($base_image == '0') {\n // Configured to text-only\n $this->image_name = $base_image;\n } else {\n $imagesize = serendipity_getimagesize(dirname(__FILE__) . \"/img/\" . $base_image);\n if ($imagesize['noimage']) {\n // Leave as default\n } else {\n // Set to valid image name\n $this->image_name = $base_image;\n }\n }\n }\n // Is the (possibly default) image valid?\n if ($this->image_name) {\n $imagesize = serendipity_getimagesize(dirname(__FILE__) . \"/img/\" . $this->image_name);\n if (isset($imagesize['noimage']) && $imagesize['noimage']) {\n // No valid image; use text-only\n $this->image_name = '0';\n } else {\n // Valid graphical image; set the dimensions, too\n $this->image_width = $imagesize[0];\n $this->image_height = $imagesize[1];\n }\n }\n }", "public function get_image_width()\n {\n }", "public function crop($source = array(), $new_name, $config = array())\n\t{\n\t\t$source_width = $source['image_width'];\n\t\t$source_height = $source['image_height'];\n\t\t$width = $config['width'];\n\t\t$height = $config['height'];\n\n\t\t$mark = '';\n\t\tif(array_key_exists('mark', $config))\n\t\t\t$mark = $config['mark'];\n\n\t\t$create_new = FALSE;\n\t\tif(array_key_exists('create_new', $config))\n\t\t\t$create_new = $config['create_new'];\n\n\t\tif($create_new && $mark == '')\n\t\t\t$mark = 'cropped-';\n\n\t\t$orientation = 'box';\n\t\tif($height > $width)\n\t\t{\n\t\t\t$orientation = 'portrait';\n\t\t}\n\t\telseif($height < $width)\n\t\t{\n\t\t\t$orientation = 'landscape';\n\t\t}\n\t\t\n\t\t$source_orientation = 'box';\n\t\tif($source_height > $source_width)\n\t\t{\n\t\t\t$source_orientation = 'portrait';\n\t\t}\n\t\telseif($source_height < $source_width)\n\t\t{\n\t\t\t$source_orientation = 'landscape';\n\t\t}\n\t\t\n\t\t$size = $this->_calculate_size(array(\n\t\t\t'orientation' => $source_orientation, 'width' => $source_width, 'height' => $source_height\n\t\t), array(\n\t\t\t'orientation' => $orientation, 'width' => $width, 'height' => $height\n\t\t));\n\t\t\n\t\t$thumb['image_library'] = 'gd2';\n\t\t$thumb['source_image'] = $source['full_path'];\n\t\t$thumb['width'] = $size['width'];\n\t\t$thumb['height'] = $size['height'];\n\t\t$thumb['maintain_ratio'] = TRUE;\n\t\t$thumb['quality'] = 100;\n\t\tif($create_new)\n\t\t{\n\t\t\t$thumb['new_image'] = './' . $this->upload_dir . $mark . $new_name;\n\t\t}\n\t\t$this->CI->image_lib->initialize($thumb);\n\t\tif($this->CI->image_lib->resize())\n\t\t{\n\t\t\t$this->CI->image_lib->clear();\n\t\t\tif($create_new)\n\t\t\t{\n\t\t\t\t$thumb['source_image'] = $source['file_path'] . $mark . $new_name;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$thumb['source_image'] = $source['file_path'] . $new_name;\n\t\t\t}\n\t\t\t$thumb['width'] = $width;\n\t\t\t$thumb['height'] = $height;\n\t\t\t$thumb['maintain_ratio'] = FALSE;\n\t\t\t$thumb['quality'] = 100;\n\t\t\t$thumb['new_image'] = '';\n\t\t\tif($create_new)\n\t\t\t{\n\t\t\t\tlist($thumb_width, $thumb_height) = getimagesize($source['file_path'] . $mark . $new_name);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlist($thumb_width, $thumb_height) = getimagesize($source['file_path'] . $new_name);\n\t\t\t}\n\t\t\tif($thumb_height == $height)\n\t\t\t{\n\t\t\t\t$thumb['x_axis'] = ($thumb_width - $width) / 2;\n\t\t\t\t$thumb['y_axis'] = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$thumb['y_axis'] = ($thumb_height - $height) / 2;\n\t\t\t\t$thumb['x_axis'] = 0;\n\t\t\t}\n\t\t\t$this->CI->image_lib->initialize($thumb);\n\t\t\tif($this->CI->image_lib->crop())\n\t\t\t{\n\t\t\t\treturn array(\n\t\t\t\t\t'status' => TRUE\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\texit($this->image_lib->display_errors());\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\texit($this->image_lib->display_errors());\n\t\t}\n\t}", "protected function calculateMediaWidthsAndHeights() {}", "private function __setOptimalSizeByLandscape() {\n \n $ratio = $this->__originalImageHeight / $this->__originalImageWidth;\n $newHeight = $this->__requestedWidth * $ratio;\n \n $this->__optimalWidth = $this->__requestedWidth;\n $this->__optimalHeight = $newHeight;\n \n }", "function getImageSource() {return $this->_imagesource;}", "function _needPreview ($imageToolkit) {\n if ($this->getSize() < MIN_SIZE_FOR_PREVIEW * 1024) {\n return false;\n }\n\n // Si image de départ plus petite, on ne redimentione pas la photo\n if ($imageToolkit->destBiggerThanFrom()) {\n return false;\n }\n\n return true;\n }", "public function user_crop()\r\n\t{\r\n\t\t// Get uploaded photo\r\n\t\t$uploaded_photo = $this->input->post('uploaded_photo');\r\n\r\n\t\t// Get image width, height\r\n\t\tlist($width, $height) = @getimagesize('./assets/uploads/' . $uploaded_photo);\r\n\r\n\t\t// Calculate ratio\r\n\t\t$ratio = $width / 536;\r\n\r\n\t\t// Get chosen crop coordinates\r\n\t\t$coords_x1 = round($ratio * $this->input->post('coords-x1'));\r\n\t\t$coords_y1 = round($ratio * $this->input->post('coords-y1'));\r\n\t\t$coords_x2 = round($ratio * $this->input->post('coords-x2'));\r\n\t\t$coords_y2 = round($ratio * $this->input->post('coords-y2'));\r\n\t\t$coords_w = round($ratio * $this->input->post('coords-w'));\r\n\t\t$coords_h = round($ratio * $this->input->post('coords-h'));\r\n\r\n\t\t// Profile thumbnail crop config\r\n\t\t$config['source_image'] = './assets/uploads/' . $uploaded_photo;\r\n\t\t$config['new_image'] = './assets/uploads/tall-' . strtolower($uploaded_photo);\r\n\t\t$config['width'] = $coords_w;\r\n\t\t$config['height'] = $coords_h;\r\n\t\t$config['maintain_ratio'] = FALSE;\r\n\t\t$config['x_axis'] = $coords_x1;\r\n\t\t$config['y_axis'] = $coords_y1;\r\n\r\n\t\t// Initialize the image library with config\r\n\t\t$this->image_lib->initialize($config);\r\n\r\n\t\t// Crop the image\r\n\t\tif (!$this->image_lib->crop())\r\n\t\t{\r\n\t\t\t$errors[] = $this->image_lib->display_errors('', '');\r\n\t\t}\r\n\r\n\t\t// Clear the config to start next thumbnail\r\n\t\t$config = array();\r\n\t\t$this->image_lib->clear();\r\n\r\n\t\t// Profile thumbnail resize config\r\n\t\t$config['source_image'] = './assets/uploads/tall-' . strtolower($uploaded_photo);\r\n\t\t$config['width'] = 385;\r\n\t\t$config['height'] = 465;\r\n\t\t$config['maintain_ratio'] = FALSE;\r\n\r\n\t\t// Initialize the image library with config\r\n\t\t$this->image_lib->initialize($config);\r\n\r\n\t\t// Resize the image\r\n\t\tif (!$this->image_lib->resize())\r\n\t\t{\r\n\t\t\t$errors[] = $this->image_lib->display_errors('', '');\r\n\t\t}\r\n\t}", "abstract function crop($properties);", "function myImageCrop($imgSrc,$newfilename,$thumbWidth=100,$output=false,$thumbHeight=0){\n \t\n\t\tif($thumbHeight == 0) $thumbHeight = $thumbWidth;\n\t\t\n\t\t//getting the image dimensions\n\t\tlist($width, $height) = getimagesize($this->path.$imgSrc); \n\t\t\n\t\t\n\t\t$extension = strtolower($this->getExtension($imgSrc,false)); // false - tells to get \"jpg\" NOT \".jpg\" GOT IT :P\n\t\t\n\t\t//saving the image into memory (for manipulation with GD Library)\n\t\tswitch($extension) {\n\t\t\tcase 'gif':\n\t\t\t$myImage = imagecreatefromgif($this->path.$imgSrc);\n\t\t\tbreak;\n\t\t\tcase 'jpg':\n\t\t\t$myImage = imagecreatefromjpeg($this->path.$imgSrc);\n\t\t\tbreak;\n\t\t\tcase 'png':\n\t\t\t$myImage = imagecreatefrompng($this->path.$imgSrc);\n\t\t\tbreak;\n\t\t}\n\t\t\n\n\n\t\t ///-------------------------------------------------------- \n\t\t //setting the crop size \n\t\t //-------------------------------------------------------- \n\t\t if($width > $height){ \n\t\t\t $biggestSide = $width; \n\t\t\t $cropPercent = .6; \n\t\t\t $cropWidth = $biggestSide*$cropPercent; \n\t\t\t $cropHeight = $biggestSide*$cropPercent; \n\t\t\t $c1 = array(\"x\"=>($width-$cropWidth)/2, \"y\"=>($height-$cropHeight)/2); \n\t\t }else{ \n\t\t\t $biggestSide = $height; \n\t\t\t $cropPercent = .6; \n\t\t\t $cropWidth = $biggestSide*$cropPercent; \n\t\t\t $cropHeight = $biggestSide*$cropPercent; \n\t\t\t $c1 = array(\"x\"=>($width-$cropWidth)/2, \"y\"=>($height-$cropHeight)/7); \n\t\t } \n\t\t \n\t\t //--------------------------------------------------------\n\t\t// Creating the thumbnail\n\t\t//--------------------------------------------------------\n\t\t$thumb = imagecreatetruecolor($thumbWidth, $thumbHeight); \n\t\timagecopyresampled($thumb, $myImage, 0, 0, $c1['x'], $c1['y'], $thumbWidth, $thumbHeight, $cropWidth, $cropHeight); \n\n\t\tif($output == false){\n\t\t\tif($extension==\"jpg\" ){\n\t\t\t\timagejpeg($thumb,$this->path.$newfilename,100);\n\t\t\t}elseif($extension==\"gif\" ){\n\t\t\t\timagegif($thumb,$this->path.$newfilename,100);\n\t\t\t}elseif($extension==\"png\" ){\n\t\t\t\timagepng($thumb,$this->path.$newfilename,9);\n\t\t\t}\n\t\t}else{\n\t\t\t//final output \n\t\t\t//imagejpeg($thumb);\n\t\t\tif($extension==\"jpg\" ){\n\t\t\t\theader('Content-type: image/jpeg');\n\t\t\t\timagejpeg($thumb);\n\t\t\t}elseif($extension==\"gif\" ){\n\t\t\t\theader('Content-type: image/gif');\n\t\t\t\timagegif($thumb);\n\t\t\t}elseif($extension==\"png\" ){\n\t\t\t\theader('Content-type: image/png');\n\t\t\t\timagepng($thumb);\n\t\t\t}\n\t\t} \n\t\timagedestroy($thumb); \n\t}", "public function getWidth($height = null) {}", "public function getWidth($height = null) {}", "protected function DSCHelperImage()\n\t{\n\t\t// Parent Helper Construction\n\t\tparent::__construct();\n\t\t\n\t\t$config = DSCConfig::getInstance();\n\t\t\n\t\t// Load default Parameters\n\t\t$this->product_img_height \t\t\t= $config->get('product_img_height');\n\t\t$this->product_img_width \t\t\t= $config->get('product_img_width');\n\t\t$this->category_img_height \t\t\t= $config->get('category_img_height');\n\t\t$this->category_img_width\t\t\t= $config->get('category_img_width');\n\t\t$this->manufacturer_img_width\t\t= $config->get('manufacturer_img_width');\n\t\t$this->manufacturer_img_height\t\t= $config->get('manufacturer_img_height');\n\t\t$this->product_img_path \t\t\t= DSC::getPath('products_images');\n\t\t$this->category_img_path\t\t\t= DSC::getPath('categories_images');\n\t\t$this->manufacturer_img_path \t\t= DSC::getPath('manufacturers_images');\n\t\t$this->product_thumb_path \t\t\t= DSC::getPath('products_thumbs');\n\t\t$this->category_thumb_path\t\t\t= DSC::getPath('categories_thumbs');\n\t\t$this->manufacturer_thumb_path \t\t= DSC::getPath('manufacturers_thumbs');\n\t}", "private function switchDimensions()\r\n {\r\n if (($this->ControlState & csLoading) != csLoading)\r\n {\r\n $temp=$this->_width;\r\n $this->_width=$this->_height;\r\n $this->_height=$temp;\r\n }\r\n }" ]
[ "0.5935662", "0.58573115", "0.5662739", "0.55336946", "0.55255026", "0.5448929", "0.538716", "0.53802663", "0.5368557", "0.53425324", "0.533961", "0.52804875", "0.52388597", "0.5222566", "0.5215349", "0.51861775", "0.51854885", "0.51797783", "0.51371247", "0.5130908", "0.5126694", "0.5121297", "0.51174366", "0.5106832", "0.5087795", "0.50560313", "0.50223064", "0.5022158", "0.5003942", "0.49947512", "0.499345", "0.49832016", "0.49786782", "0.49753603", "0.4975123", "0.4969617", "0.49666348", "0.4959238", "0.49568632", "0.49555486", "0.49519956", "0.49506766", "0.49410465", "0.49374676", "0.49353543", "0.49207628", "0.49177182", "0.49108124", "0.4879697", "0.48750812", "0.48743156", "0.48669532", "0.48636338", "0.48505783", "0.4847222", "0.48389328", "0.4834613", "0.48287952", "0.48243806", "0.481215", "0.481025", "0.4803806", "0.4797975", "0.47938335", "0.47922456", "0.4786839", "0.47825512", "0.47689", "0.4765869", "0.4740402", "0.4740285", "0.47375354", "0.47313267", "0.47270972", "0.47268158", "0.47182494", "0.47154304", "0.4706956", "0.47029164", "0.46931383", "0.46925068", "0.46843433", "0.46765494", "0.46547756", "0.46535176", "0.4652792", "0.4641616", "0.4641118", "0.46358472", "0.46307015", "0.46281576", "0.46249577", "0.46232378", "0.46227527", "0.46215287", "0.4619229", "0.46184373", "0.46184373", "0.46138373", "0.4606272" ]
0.74329525
0
Fills the canvas with the provided background color.
private function _paintCanvas(&$image) { if ($this->params['type'] === IMAGETYPE_JPEG) { if ( !$this->params['crop'] || !$this->params['grow'] ) { $this->_paintCanvasOpaque($image); } } else { $this->_paintCanvasTransparent($image); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setBackgroundColor($color) {}", "public function setBackgroundColor($backgroundColor) {}", "private function set_background_color()\n {\n imagecolorallocate(\n $this->img,\n L_BACKGROUND_COLOR_R,\n L_BACKGROUND_COLOR_G,\n L_BACKGROUND_COLOR_B\n );\n }", "public function background($color)\n {\n $this->background = $color;\n }", "public function setBackgroundColor($var)\n {\n GPBUtil::checkInt32($var);\n $this->backgroundColor = $var;\n\n return $this;\n }", "public function fill(TGraphicsColor $color) {\n\t\t$r = $color->getRed();\n\t\t$g = $color->getGreen();\n\t\t$b = $color->getBlue();\n\n\t\timagefilledrectangle($this->getImage(), 0, 0, $this->getWidth(), $this->getHeight(), $color->allocate($this));\n\t}", "public function addBackgroundFill($fillType, $color) {\n\t\t$this->setProperty('chf', $this->encodeData(array($fillType, 's', $color), ','), true);\n\t}", "public function background($color, $quality=null);", "public function setBackgroundColor($color)\n {\n //create canvas\n $canvas = $this->generateCanvas($this->getWidth(), $this->getHeight(), $color);\n\n //merge the background canvas with the main picture\n $this->mergeImage($canvas);\n\n return $this;\n }", "protected function setBgColor():void{\n\n\t\tif(isset($this->background)){\n\t\t\treturn;\n\t\t}\n\n\t\tif($this::moduleValueIsValid($this->options->bgColor)){\n\t\t\t$this->background = $this->prepareModuleValue($this->options->bgColor);\n\n\t\t\treturn;\n\t\t}\n\n\t\t$this->background = $this->prepareModuleValue([255, 255, 255]);\n\t}", "protected function setBgColor():void{\n\n\t\tif(isset($this->background)){\n\t\t\treturn;\n\t\t}\n\n\t\tif($this::moduleValueIsValid($this->options->bgColor)){\n\t\t\t$this->background = $this->prepareModuleValue($this->options->bgColor);\n\n\t\t\treturn;\n\t\t}\n\n\t\t$this->background = $this->prepareModuleValue('white');\n\t}", "public static function background($value)\n {\n self::$background = Color::toRGBA($value);\n }", "public function backgroundColor(array $color);", "public function fillColor($value)\n {\n $this->args = array_merge($this->args, ['fill-color' => $value]);\n\n return $this;\n }", "protected function _drawBorderAndBackground(\\SetaPDF_Core_Canvas $canvas, $x, $y) {}", "public function fill($value)\n {\n $this->args = array_merge($this->args, ['fill-color' => $value]);\n\n return $this;\n }", "function background_color()\n {\n }", "public function setInteriorColor($color) {}", "public function setInteriorColor($color) {}", "public function setInteriorColor($color) {}", "public function setBackgroundColor(Zend_Pdf_Color $color)\n {\n $this->_bgColor = $color;\n }", "public function setColorBackground(int $r, int $g, int $b) : void\n\t{\n\t\t$this->colorBackground = imagecolorallocate($this->im, $r, $g, $b);\n\t\timagefill($this->im, 0, 0, $this->colorBackground);\n\t}", "public function setBackground($color = null)\n {\n if (null === $color) {\n $this->background = null;\n\n return;\n }\n\n if (!isset(static::$availableBackgroundColors[$color])) {\n throw new \\InvalidArgumentException(sprintf(\n 'Invalid background color specified: \"%s\". Expected one of (%s)',\n $color,\n implode(', ', array_keys(static::$availableBackgroundColors))\n ));\n }\n\n $this->background = static::$availableBackgroundColors[$color];\n }", "function kickstart_background_callback() {\n if ( ! get_background_color() ) {\n return;\n }\n printf( '<style>body { background-color: #%s; }</style>' . \"\\n\", get_background_color() );\n}", "public function setBackgroundColor($backgroundColor) {\n $this->backgroundColor = $backgroundColor;\n return $this;\n }", "function get_background_color()\n {\n }", "function Style_Fill($color=null) {\n\n return array( 'type' => PHPExcel_Style_Fill::FILL_SOLID, \n 'color' => array('rgb' => $color) \n ); \n}", "function Style_Fill($color=null) {\n\n return array( 'type' => PHPExcel_Style_Fill::FILL_SOLID, \n 'color' => array('rgb' => $color) \n ); \n}", "function setBackground($c1 = 0xEEEEEE, $c2 = false)\n {\n if ($c2 === false) {\n $c2 = $c1;\n }\n $this->bg1 = $this->hexcol($c1);\n $this->bg2 = $this->hexcol($c2);\n }", "function setBackground($c1 = 0xEEEEEE, $c2 = false)\n {\n if ($c2 === false) {\n $c2 = $c1;\n }\n $this->bg1 = $this->hexcol($c1);\n $this->bg2 = $this->hexcol($c2);\n }", "public function fillAndStroke() {}", "public function setBGColor($arrColor)\r\n\t{\r\n\t\t$this->bgColor = $arrColor;\r\n\t}", "public function set_plot_bg_color($values, $by_lines = FALSE)\n\t{\n\t\t$this->plot_bg_color = $values;\n\t\t$this->plot_bg_by_lines = $by_lines;\n\t}", "public function set_plot_bg_color($values, $by_lines = FALSE)\n\t{\n\t\t$this->plot_bg_color = $values;\n\t\t$this->plot_bg_by_lines = $by_lines;\n\t}", "public function setCurrentBackgroundColor(Color $currentBackgroundColor) {\n $this->currentBackgroundColor = $currentBackgroundColor;\n }", "public function setBgColor($bgcolor)\n\t{\n\t\t$this->bgcolor = ((is_array($bgcolor) && count($bgcolor) == 3) ? $bgcolor : false);\n\t\treturn $this;\n\t}", "public function backgroundColor($color)\n {\n return $this->addAction(ClassUtils::verifyInstance($color, Background::class));\n }", "public function setFillColor($fill) {\n\t\t//Argument 3 must be a string\n\t\tEden_Twitter_Error::i()->argument(1, 'string');\n\t\t$this->_query['profile_sidebar_fill_color'] = $fill;\n\t\t\n\t\treturn $this;\n\t}", "function fillRect($x,$y,$w,$h) {\n\n if ( $this->rotate != 0 )\n $this->rotateRect($x,$y,$w,$h);\n\n #echo \" x = $x; y = $y; w = $w; h = $h; <br>\";\n\n imagefilledrectangle( $this->img, $x, $y, $x+$w-1, $y+$h-1, $this->currentColor);\n}", "abstract protected function renderFill($image, $params, int $color): void;", "public function Background(string $color)\n {\n return $this->setOption('bg', $color);\n }", "public function bg($value)\n {\n $this->args = array_merge($this->args, ['bg' => $value]);\n\n return $this;\n }", "public function setBackgroundColor($background) {\n\t\t//Argument 3 must be a string\n\t\tEden_Twitter_Error::i()->argument(1, 'string');\n\t\t$this->_query['profile_background_color'] = $backgroud;\n\t\t\n\t\treturn $this;\n\t}", "public function addBackground($Settings = array(\"R\"=>230, \"G\"=>230, \"B\"=>230, \"Dash\"=>1, \"DashR\"=>240, \"DashG\"=>240, \"DashB\"=>240)) {\n\t\t $this->drawFilledRectangle(0, 0, $this->XSize, $this->YSize,$Settings);\n\t\t $this->drawRectangle(0,0,$this->XSize - 1,$this->YSize - 1,array(\"R\"=> 80,\"G\"=>80,\"B\"=>80));\n\t}", "private function setBackground($width, $height)\n {\n list($r, $g, $b, $a) = self::$background;\n\n $color = imagecolorallocate($this->image, $r, $g, $b);\n\n if ($a === 0) {\n imagecolortransparent($this->image, $color);\n }\n\n imagefilledrectangle($this->image, 0, 0, $width, $height, $color);\n }", "public function fill()\n\t{\n\t\t$args = func_get_args();\n\t\t$fill = $this->argsToArray($args);\n\t\t\n\t\t$this->mergeFill($this->fill, $fill);\n\t}", "public function background($value) {\n return $this->setProperty('background', $value);\n }", "public function background($value) {\n return $this->setProperty('background', $value);\n }", "public function background($value) {\n return $this->setProperty('background', $value);\n }", "public function background($value) {\n return $this->setProperty('background', $value);\n }", "public function background($color, $opacity = 100)\n {\n if ($color[0] === '#')\n {\n // Remove the pound\n $color = substr($color, 1);\n }\n\n if (strlen($color) === 3)\n {\n // Convert shorthand into longhand hex notation\n $color = preg_replace('/./', '$0$0', $color);\n }\n\n // Convert the hex into RGB values\n list ($r, $g, $b) = array_map('hexdec', str_split($color, 2));\n\n // The opacity must be in the range of 0 to 100\n $opacity = min(max($opacity, 0), 100);\n\n $this->_do_background($r, $g, $b, $opacity);\n\n return $this;\n }", "function fillRect($x1, $y1, $x2, $y2)\r\n {\r\n $this->forceBrush();\r\n echo \"$this->_canvas.fillRect($x1, $y1, $x2 - $x1, $y2 - $y1);\\n\";\r\n }", "public function backgroundColor()\n {\n return '#dddddd';\n }", "public function setBackground(string $value)\n {\n $this->styles['background-color'] = HtmlBuilder::validateColor($value);\n }", "public function withBackgroundColor($background_color) {\n\t\tassert('is_string($background_color) && $this->validateColor($background_color)');\n\t\t$clone = clone $this;\n\t\t$clone->background_color = $background_color;\n\t\treturn $clone;\n\t}", "function fillCellColour($cellDim, $color) {\n $cellBckStyle = array(\n 'fill' => array(\n 'type' => \\PHPExcel_Style_Fill::FILL_SOLID,\n 'color' => array('rgb' => $color)\n ));\n $this->objWorksheet->getStyle($cellDim)->applyFromArray($cellBckStyle); // fill colour\n }", "function SetFillColor($r,$g=-1,$b=-1)\n\t\t{\n\t\t\tif(($r==0 and $g==0 and $b==0) or $g==-1)\t$this->FillColor=sprintf('%.3f g',$r/255);\n\t\t\telse$this->FillColor=sprintf('%.3f %.3f %.3f rg',$r/255,$g/255,$b/255);\n\t\t\t$this->ColorFlag = ($this->FillColor != $this->TextColor);\n\t\t\tif($this->page>0)\t$this->_out($this->FillColor);\n\t\t}", "public function imageBackgroundColor($color)\n {\n $this->imageBackgroundColor = $color;\n\n return $this;\n }", "public function setBgColor($color) {\n\t\tif (!isColor($color)) {\n\t\t\tthrow new StyleException('Invalid color value');\n\t\t}\n\t\t$this->tableProp->setAttribute('fo:background-color', $color);\n\t}", "protected function forceBrush()\r\n {\r\n if ($this->_brush->isModified())\r\n {\r\n echo \"$this->_canvas.setColor(\\\"\" . $this->_brush->Color . \"\\\");\\n\";\r\n $this->_brush->resetModified();\r\n $this->_pen->modified();\r\n }\r\n }", "function fillRect($x1, $y1, $x2, $y2)\r\n {\r\n $resp = $this->forceBrush();\r\n $resp .= $this->_getJavascriptVar() . \".fillRect($x1, $y1, $x2 - $x1, $y2 - $y1);\\n\";\r\n return $resp;\r\n }", "protected function forceBrush()\r\n {\r\n $resp = $this->_getJavascriptVar() . \".fillStyle = \\\"\" . $this->_brush->Color . \"\\\";\\n\";\r\n\r\n return $resp;\r\n }", "protected function setTransparencyColor():void{\n\n\t\tif(!$this->options->imageTransparent){\n\t\t\treturn;\n\t\t}\n\n\t\t$transparencyColor = $this->background;\n\n\t\tif($this::moduleValueIsValid($this->options->transparencyColor)){\n\t\t\t$transparencyColor = $this->prepareModuleValue($this->options->transparencyColor);\n\t\t}\n\n\t\t$this->imagick->transparentPaintImage($transparencyColor, 0.0, 10, false);\n\t}", "public function getBackgroundColor() {}", "public function getBackgroundColor() {}", "public function getBackgroundColor() {}", "Function setBgColor ($r=false, $g=false, $b=false){\n\t\t$this->bgColor = ($r===false)?\n\t\t\tfalse:\n\t\t\tArray($r, $g, $b);\n\t}", "public function getBackgroundColor()\n {\n return $this->backgroundColor;\n }", "protected function _do_background($r, $g, $b, $opacity)\n {\n $this->_load_image();\n\n // Convert an opacity range of 0-100 to 127-0\n $opacity = round(abs(($opacity * 127 / 100) - 127));\n\n // Create a new background\n $background = $this->_create($this->width, $this->height);\n\n // Allocate the color\n $color = imagecolorallocatealpha($background, $r, $g, $b, $opacity);\n\n // Fill the image with white\n imagefilledrectangle($background, 0, 0, $this->width, $this->height, $color);\n\n // Alpha blending must be enabled on the background!\n imagealphablending($background, TRUE);\n\n // Copy the image onto a white background to remove all transparency\n if (imagecopy($background, $this->_image, 0, 0, 0, 0, $this->width, $this->height))\n {\n // Swap the new image for the old one\n imagedestroy($this->_image);\n $this->_image = $background;\n }\n }", "function bgColor() {\n\t$color = dechex(rand(0x000000, 0xDDDDDD));\n\treturn \"#{$color}\";\n}", "public function getBackgroundColor() {\n\t\treturn $this->background_color;\n\t}", "public function backgroundColor(BackgroundColor $bc)\n {\n return $this->addOption($bc->toArray());\n }", "public function setBgColour(string $colour): void\n {\n $this->bgColour = $colour;\n }", "protected function drawChartImageBackground( &$image ){\n\n\t\tforeach ( $this->testResultRanges as $key => $testResultRange) {\n\n\t\t\t$lastX = NULL;\n\t\t\t$lastY = NULL;\n\n\t\t\t$colorRGB = $this->getChartIndexColor($key);\n\t\t\t$colorBg = imagecolorallocatealpha($image, $colorRGB[0], $colorRGB[1], $colorRGB[2],110);\n\n\t\t\t$bgPoints = array();\n\t\t\tforeach ( $testResultRange as $testResult ){\n\t\t\t\t$newX = intval( $this->transformX( $testResult->getTimestamp() ) );\n\t\t\t\t$newY = intval( $this->transformY( $testResult->getValue() ) );\n\t\t\t\tif( $lastX !== NULL ){\n\n\t\t\t\t\t$bgPoints[] = $lastX;\n\t\t\t\t\t$bgPoints[] = $lastY;\n\t\t\t\t\t$bgPoints[] = $newX;\n\t\t\t\t\t$bgPoints[] = $lastY;\n\t\t\t\t\t$bgPoints[] = $newX;\n\t\t\t\t\t$bgPoints[] = $newY;\n\n\t\t\t\t}\n\n\t\t\t\t$lastX = $newX;\n\t\t\t\t$lastY = $newY;\n\t\t\t}\n\n\t\t\t$bgPoints[] = intval( $this->transformX( $testResultRange->getLast()->getTimestamp() ) );\n\t\t\t$bgPoints[] = intval( $this->transformY( 0 ) );\n\t\t\t$bgPoints[] = intval( $this->transformX( $testResultRange->getFirst()->getTimestamp() ) );\n\t\t\t$bgPoints[] = intval( $this->transformY( 0 ) );\n\n\t\t\t\t// draw filled chart background\n\t\t\tif ( count($bgPoints) > 7 ){\n\t\t\t\timagefilledpolygon ($image, $bgPoints , count($bgPoints)/2 , $colorBg );\n\t\t\t}\n\t\t}\n\t}", "public function setFillColorsField($field)\n {\n $this->fillColorsField = (string) $field;\n \n return $this;\n }", "function _custom_background_cb()\n {\n }", "public function getBackgroundColor() {\n return $this->backgroundColor;\n }", "public function fill($value) {\n return $this->setProperty('fill', $value);\n }", "public function fill($value) {\n return $this->setProperty('fill', $value);\n }", "function set_background_color_for_all_fields_all_pages($color){\n\t\tif( isset($_POST[$color]) ){\n\t\t\t$take_color = $_POST[$color];\n\t\t\tmajor_class::select_background_color_for_all_fields_all_pages($take_color);\n\t\t}\n\t}", "public function setColor($color, $stroking = true) {}", "public function addLineFill($where, $color, $startLineIndex, $endLineIndex) {\n\t\t$this->setProperty('chm', $this->encodeData(array($where, $color, $startLineIndex, $endLineIndex, 0),','), true);\n\t}", "function costum_setting_colors_background1_callback() {\n\t$color1 = esc_attr( get_option( 'color1' ) ); ?>\n\n\t<div class=\"input-color-container\">\n\t\t<input name=\"color1\" id=\"input-color1\" value=\"<?php echo $color1; ?>\" class=\"input-color\" type=\"color\">\n\t</div>\n\n\t<?php\n}", "private function registerFill(Style $style)\n {\n $styleId = $style->getId();\n\n // Currently - only solid backgrounds are supported\n // so $backgroundColor is a scalar value (RGB Color)\n $backgroundColor = $style->getBackgroundColor();\n\n if ($backgroundColor) {\n $isBackgroundColorRegistered = isset($this->registeredFills[$backgroundColor]);\n\n // We need to track the already registered background definitions\n if ($isBackgroundColorRegistered) {\n $registeredStyleId = $this->registeredFills[$backgroundColor];\n $registeredFillId = $this->styleIdToFillMappingTable[$registeredStyleId];\n $this->styleIdToFillMappingTable[$styleId] = $registeredFillId;\n } else {\n $this->registeredFills[$backgroundColor] = $styleId;\n $this->styleIdToFillMappingTable[$styleId] = $this->fillIndex++;\n }\n } else {\n // The fillId maps a style to a fill declaration\n // When there is no background color definition - we default to 0\n $this->styleIdToFillMappingTable[$styleId] = 0;\n }\n }", "public function setFill($fill) {\n\t\t$this->attributes['fill'] = $fill;\n\t\t$this->fill = $fill;\n\t\treturn $this;\n\t}", "public function setDefaultBackgroundColorOverride(\n\t\tContextInterface $ctx,\n\t\tSetDefaultBackgroundColorOverrideRequest $request\n\t): void;", "public function draw()\n {\n echo \"画一个 {$this->color->run()} 的正方形\";\n }", "public function setColor( $rgb ) {\n\t}", "public function color()\n\t{\n\t\treturn $this->fill_color;\n\t}", "protected function _drawRenderingMode(\\SetaPDF_Core_Canvas $canvas) {}", "public function setColor($color) {}", "public function setColor($value)\r\n {\r\n $this->_cleanse($value, __METHOD__);\r\n $this->_color = $value;\r\n \r\n return $this;\r\n }", "protected function setTransparencyColor():void{\n\n\t\tif($this->options->outputType === QROutputInterface::GDIMAGE_JPG || !$this->options->imageTransparent){\n\t\t\treturn;\n\t\t}\n\n\t\t$transparencyColor = $this->background;\n\n\t\tif($this::moduleValueIsValid($this->options->transparencyColor)){\n\t\t\t$transparencyColor = $this->prepareModuleValue($this->options->transparencyColor);\n\t\t}\n\n\t\timagecolortransparent($this->image, $transparencyColor);\n\t}", "function pl_bg_color(){\n\t\n\tif( pl_check_color_hash( get_set_color( 'the_bg' ) ) )\n\t\treturn get_set_color( 'the_bg' );\n\telse \n\t\treturn 'FFFFFF';\t\n}", "function fit($width, $height, $bgColor=array(255, 0, 0))\n\t\t{\n\t\t\t//TODO: set background color\n\t\t\tif (!$this->image) return;\n\t\t\t$ratio = $this->width / $this->height;\n\t\t \n\t\t\tif ($width / $height < $ratio) {\n\t\t\t\t $new_height = $width / $ratio;\n\t\t\t\t $new_width = $width;\n\t\t\t} else {\n\t\t\t\t $new_width = $height * $ratio;\n\t\t\t\t $new_height = $height;\n\t\t\t}\n\t\t \n\t\t\t$x_mid = $new_width / 2; //horizontal middle\n\t\t\t$y_mid = $new_height / 2; //vertical middle\n\t\t \n\t\t\t$process = imagecreatetruecolor(round($new_width), round($new_height));\n\t\t \n\t\t\timagecopyresampled($process, $this->image, 0, 0, 0, 0, $new_width, $new_height, $this->width, $this->height);\n\t\t\t$fit = imagecreatetruecolor($width, $height);\n\t\t\timagecopyresampled($fit, $process, 0, 0, ($x_mid-($width/2)), ($y_mid-($height/2)), $width, $height, $width, $height);\n\t\t\t\n\t\t\timagedestroy($process);\n\t\t\treturn $this->image = $fit;\n\t\t}", "public function backgroundColor(int $r = 0, int $g = 0, int $b = 0)\n {\n $this->label.= \"48;2;$r;$g;$b;\";\n return $this;\n\n }", "private function drawChartBackground($im, $ymin, $ymax, $yscale, $chart_bounds, $axis_size)\n {\n $chart_x1 = $chart_bounds[0] + $axis_size[0];\n $chart_y1 = $chart_bounds[1] + $axis_size[3];\n $chart_x2 = $chart_bounds[2] - $axis_size[2];\n $chart_y2 = $chart_bounds[3] - $axis_size[1];\n\n $chart_w = $chart_x2 - $chart_x1;\n $chart_h = $chart_y2 - $chart_y1;\n\n // Background\n\n imagefilledrectangle($im, $chart_x1, $chart_y1, $chart_x2, $chart_y2, 0x30FFFFFF);\n }", "public function draw($canvas)\n {\n }", "public function draw($canvas)\n {\n }", "public function setBackgroundMode($backgroundMode) {\n $this->backgroundMode = $backgroundMode;\n }", "function show_background_color()\r\n\t\t{\r\n\t\t\t$image = get_background_image();\r\n\t\t\t/* If there's an image, just call the normal WordPress callback. We won't do anything here. */\r\n\t\t\tif ( !empty( $image ) ) {\r\n\t\t\t\t_custom_background_cb();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t/* Get the background color. */\r\n\t\t\t$color = get_background_color();\r\n\t\t\t/* If no background color, return. */\r\n\t\t\tif ( empty( $color ) )\r\n\t\t\t\treturn;\r\n\t\t\t/* Use 'background' instead of 'background-color'. */\r\n\t\t\t$style = \"background: #{$color};\";\r\n\t\t?>\r\n\t\t\t<style type=\"text/css\">\r\n\t\t\t\tbody.custom-background {\r\n\t\t\t\t\t<?php echo trim( $style );?>\r\n\t\t\t\t}\r\n\t\t\t</style>\r\n\t\t<?php\r\n\t\t}" ]
[ "0.6516231", "0.64968276", "0.6457154", "0.64225805", "0.6195005", "0.60902625", "0.5931177", "0.5914932", "0.582726", "0.57886213", "0.5667563", "0.5647163", "0.5629234", "0.55155826", "0.5495939", "0.547451", "0.54690015", "0.5455835", "0.54553753", "0.54553753", "0.54446787", "0.5443099", "0.543045", "0.5395735", "0.53284407", "0.5324618", "0.5314932", "0.5314932", "0.53013366", "0.53013366", "0.5270964", "0.52410126", "0.52397996", "0.52397996", "0.5236646", "0.5140275", "0.513376", "0.5109398", "0.51064783", "0.5102609", "0.50878704", "0.50461835", "0.5038526", "0.50324786", "0.50168455", "0.50045586", "0.4992378", "0.4992378", "0.4992378", "0.4992378", "0.49657586", "0.49336395", "0.49309862", "0.49240595", "0.49225217", "0.49086687", "0.49000508", "0.48381305", "0.48301324", "0.48180965", "0.48014656", "0.47848228", "0.47794172", "0.47775313", "0.47775313", "0.47762457", "0.47506934", "0.47359478", "0.47341368", "0.47153175", "0.46911123", "0.4657119", "0.46488485", "0.46439633", "0.4639148", "0.46305448", "0.46197462", "0.4614897", "0.4614897", "0.46140203", "0.460842", "0.46027672", "0.45912278", "0.457701", "0.4575717", "0.45635566", "0.4525932", "0.45258394", "0.45101386", "0.44833758", "0.44491962", "0.44473916", "0.44206372", "0.4419973", "0.44155475", "0.44008315", "0.43848056", "0.4382284", "0.4382284", "0.43708608", "0.4367411" ]
0.0
-1
Writes the graphical output to image file data.
private function _renderToImageData(&$canvas) { ob_start(); switch ($this->params['type']) { case IMAGETYPE_GIF: imagegif($canvas); break; case IMAGETYPE_JPEG: imagejpeg($canvas, null, $this->params['quality']); break; case IMAGETYPE_PNG: // calculate PNG quality, because it runs from 0 (uncompressed) to 9, instead of 0 - 100. $pngQuality = ($this->params['quality'] - 100) / 11.111111; $pngQuality = round(abs($pngQuality)); imagepng($canvas, null, $pngQuality, NULL); break; default: throw new Exception('Sorry, this image type is not supported'); } $imgData = ob_get_contents(); ob_end_clean(); return $imgData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function writeGifAndPng() {}", "public function png(){\n #header(\"Expires: \" . date(DATE_RFC822,strtotime($this->cache.\" seconds\")));\n header(\"content-type: image/png\");\n $graphdata = implode(' ', $graphdata);\n echo `$graphdata`;\n }", "function dumpGraphic()\r\n {\r\n // Graphic component that dumps binary data\r\n header(\"Content-type: $this->_binarytype\");\r\n\r\n // Tries to prevent the browser from caching the image\r\n header(\"Pragma: no-cache\");\r\n header(\"Cache-Control: no-cache, must-revalidate\");// HTTP/1.1\r\n header(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");// Date in the past\r\n\r\n if($this->hasValidDataField())\r\n {\r\n echo $this->readDataFieldValue();\r\n }\r\n\r\n exit;\r\n }", "function output()\r\n\t{\r\n\t\theader(\"Cache-Control: no-store, no-cache, must-revalidate\"); \r\n\t\theader(\"Expires: \" . date(\"r\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\tswitch($this->image_type)\r\n\t\t{\r\n\t\t\tcase SI_IMAGE_JPG:\r\n\t\t\t\theader(\"Content-Type: image/jpeg\");\r\n\t\t\t\timagejpeg($this->im, null, 90);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase SI_IMAGE_GIF:\r\n\t\t\t\theader(\"Content-Type: image/gif\");\r\n\t\t\t\timagegif($this->im);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\theader(\"Content-Type: image/gif\");\r\n\t\t\t\timagepng($this->im);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\timagedestroy($this->im);\r\n\t}", "public function getImageOutputStream() {\n\t\t\t//Send Modified Header\n\t\t\theader(\"Content-Type: image/png\");\n\t\t\t\n\t\t\t//Output Image and destroy the Stream\n\t\t\timagepng($this->image);\n\t\t\timagedestroy($this->image);\n\t\t}", "public function save($file)\r\n\t{\r\n\t\tif(empty($this->img))\r\n\t\t{\r\n\t\t\t$this->render();\r\n\t\t}\r\n\t\timagepng($this->img, $file);\r\n\t}", "public function output()\n {\n $imageFile = $this->storage->getPath($this);\n\n if(file_exists($imageFile))\n {\n header('Content-Type: image');\n header('Content-Length: ' . filesize($imageFile));\n\n readfile($imageFile);\n exit;\n }\n }", "public function display()\n {\n header(\"Content-Type: image/png; name=\\\"barcode.png\\\"\");\n imagepng($this->_image);\n }", "public function stream()\r\n\t{\r\n\t\tif(empty($this->img))\r\n\t\t{\r\n\t\t\t$this->render();\r\n\t\t}\r\n\t\theader('Content-type: image/png');\r\n\t\timagepng($this->img);\r\n\t}", "public function drawInFile()\n {\n }", "public function clientOutput()\n {\n\t\theader( \"Content-type: image/jpeg\" );\n imagejpeg( $this->im, NULL, $this->cq);\n }", "public function output()\r\n {\r\n // look for a cached version and use it if it exists\r\n $this->_checkCache();\r\n \r\n // build the path to the font file\r\n $font = $this->_config['paths']['font'] . \"/\" . $this->_font;\r\n \r\n // find the dimensions of the text being created\r\n list($height, $width, $offset) = $this->_calculateDimensions($font);\r\n \r\n // create an image with the dimensions of the text to be generated\r\n $im = imagecreatetruecolor($width, $height);\r\n \r\n // set colors\r\n $txt = imagecolorallocate(\r\n $im, hexdec(\r\n substr($this->_color,0,2)), \r\n hexdec(substr($this->_color,2,2)), \r\n hexdec(substr($this->_color,4,2)\r\n )\r\n );\r\n $bg = imagecolorallocate(\r\n $im, hexdec(\r\n substr($this->_backColor,0,2)), \r\n hexdec(substr($this->_backColor,2,2)), \r\n hexdec(substr($this->_backColor,4,2)\r\n )\r\n );\r\n \r\n // make background transparent if requested\r\n if ($this->_transparent) {\r\n imagecolortransparent($im, $bg);\r\n }\r\n \r\n // fill the image with the background color\r\n imagefilledrectangle($im, 0, 0, $width, $height, $bg);\r\n \r\n // write the text to the image\r\n imagettftext($im, $this->_size, 0, 0, $offset, $txt, $font, $this->_text);\r\n \r\n // generate image based on desired output type\r\n ob_start();\r\n \r\n switch ($this->_config['output']) {\r\n case 'png':\r\n header('Content-type: image/png');\r\n imagepng($im);\r\n break;\r\n case 'gif':\r\n header('Content-type: image/gif');\r\n imagegif($im);\r\n break;\r\n case 'jpg':\r\n header('Content-type: image/jpg');\r\n imagejpeg($im);\r\n break;\r\n }\r\n \r\n $buffer = ob_get_clean();\r\n imagedestroy($im);\r\n \r\n // save to the cache\r\n $this->_saveCache($buffer);\r\n \r\n // display the image\r\n echo $buffer;\r\n }", "public function output_file()\n {\n $file_data = $this->get_cached_path();\n // Create the headers\n $this->_create_headers($file_data);\n\n // Get the file data\n $data = file_get_contents($file_data);\n\n // Send the image to the browser in bite-sized chunks\n $chunk_size = 1024 * 8;\n $fp = fopen('php://memory', 'r+b');\n\n // Process file data\n fwrite($fp, $data);\n rewind($fp);\n while ( ! feof($fp))\n {\n echo fread($fp, $chunk_size);\n flush();\n }\n fclose($fp);\n\n exit();\n }", "public function render()\n {\n header('Content-Type: image/png');\n\n imagepng($this->imageResource);\n imagedestroy($this->imageResource);\n }", "function drawImage($filename){\n $img=imagecreatetruecolor(400,300);\n drawFromUserdata($img); //draw on $img\n imagepng($img, $filename); //output the $img to the given $filename as PNG\n imagedestroy($img); //destroy the $img\n }", "function __write(&$image) {\r\r\n\t\tasido::trigger_abstract_error(\r\r\n\t\t\t__CLASS__,\r\r\n\t\t\t__FUNCTION__\r\r\n\t\t\t);\r\r\n\t\t}", "public function draw(){\n\t\t$this->doOutputResource();\n\t\t$defExt=\"gif\";\n\t\t$ext = ($this->outputFilename && strtolower(substr($this->outputFilename,-3))==\"$defExt\") ? substr($this->outputFilename,-4) :\".$defExt\";\n\t\t$out = $this->outputFilename.$ext;\n\t\tif(!$this->outputFilename){\n\t\t\theader(\"Content-Type: image/gif\");\n\t\t\t$out=null;\n\t\t}\n\t\t$this->outputFilename = $out;\n\t\treturn imagegif($this->outImage,$this->outputFilename);\n\t}", "public function showOutput()\n {\n $this->diagram->showOutput($this->getFileName('.dia'));\n }", "function savePicture($filepath,$data)\n {\n $file = fopen($filepath,\"w+\");\n fwrite($file,$data);\n fclose($file);\n }", "public function output() {\n //\n // Get information on the image\n //\n $this->Information();\n\n //\n // Calculate new width and height for the image\n //\n $this->CalcWidthHeight();\n\n //\n // Creating a filename for the cache\n //\n $cacheFileName = $this->CacheFileName();\n\n //\n // Is there already a valid image in the cache directory, then use it and exit\n //\n $imageModifiedTime = filemtime($this->pathToImage);\n $cacheModifiedTime = is_file($cacheFileName) ? filemtime($cacheFileName) : null;\n\n // If cached image is valid, output it.\n if(!$this->ignoreCache && is_file($cacheFileName) && $imageModifiedTime < $cacheModifiedTime) {\n if($this->verbose) { self::verbose(\"Cache file is valid, output it.\"); }\n $this->outputFile($cacheFileName);\n }\n\n if($this->verbose) { self::verbose(\"Cache is not valid, process image and create a cached version of it.\"); }\n\n // If there is no valid cached file, create one, store in cache, and output this.\n //\n // Open up the original image from file\n //\n $image = $this->PrepareImageForCache();\n\n //\n // Resize the image if needed\n //\n $image = $this->Resize($image);\n //\n // Apply filters and postprocessing of image\n //\n if($this->sharpen) {\n $image = $this->sharpen($image);\n }\n //\n // Save the image\n //\n $this->CacheSave($image, $cacheFileName);\n //\n // Output the resulting image\n //\n $this->outputFile($cacheFileName);\n }", "public function send()\n {\n header(static::CONTENT_TYPE_HEADER);\n imagepng($this->imageResource);\n }", "protected function drawImage():void{\n\t\tfor($y = 0; $y < $this->moduleCount; $y++){\n\t\t\tfor($x = 0; $x < $this->moduleCount; $x++){\n\t\t\t\t$this->setPixel($x, $y);\n\t\t\t}\n\t\t}\n\t}", "function output($image_type=IMAGETYPE_JPEG)\n {\n //JPEG\n if( $image_type == IMAGETYPE_JPEG )\n {\n imagejpeg($this->image);\n } \n //GIF\n elseif( $image_type == IMAGETYPE_GIF ) \n {\n imagegif($this->image); \n } \n //PNG\n elseif( $image_type == IMAGETYPE_PNG ) \n {\n imagepng($this->image);\n } \n }", "private function plotData() : void\n\t{\n\t\t$n = $this->getSize();\n\t\tif($n === -1) {\n\t\t\texit();\n\t\t}\n\n\t\tfor ($i=0; $i < $n; $i++) { \n\t\t\timagefilledellipse($this->im, $this->xValues[$i]*$this->scaleX+$this->shiftX, $this->yValues[$i]*$this->scaleY*(-1)+$this->shiftY, 10, 10, $this->colorPoints);\n\t\t}\n\n\t}", "public function saveGraphicState() {}", "public function saveGraphicState() {}", "function saveImage()\n\t{\n\n\t\tif (!$this->ImageStream) {\n\t\t\t$this->printError('image not loaded');\n\t\t}\n\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\t/* store a interlaced gif image */\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagegif($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t/* store a progressive jpeg image (with default quality value)*/\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagejpeg($this->ImageStream, $this->sFileLocation, $this->jpegquality);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t/* store a png image */\n\t\t\t\timagepng($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\n\t\t\t\tif (!file_exists($this->sFileLocation)) {\n\t\t\t\t\t$this->printError('file not stored');\n\t\t\t\t}\n\t\t}\n\t}", "public function output($filename=null)\n\t{\n\t\tif($this->auto_rotate && $this->info('orientation') )\n\t\t{\n\t\t\tswitch($this->info('orientation') )\n\t\t\t{\n\t\t\t\tcase 8:\n\t\t\t\t\t$this->effect('rotate', array(90) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$this->effect('rotate', array(180) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\t$this->effect('rotate', array(-90) );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(empty($filename))\n\t\t{\n\t\t\theader(\"Content-Type: $this->mime\");\n\t\t\n\t\t\tswitch($this->format)\n\t\t\t{\n\t\t\t\tcase 'png':\n\t\t\t\t\timagepng($this->image);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'gif':\n\t\t\t\t\timagegif($this->image);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'jpg':\n\t\t\t\t\timagejpeg($this->image);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(!file_exists(dirname($filename) ) )\n\t\t\t\tmkdir(dirname($filename), 0777, true);\n\n\t\t\tswitch($this->format)\n\t\t\t{\n\t\t\t\tcase 'png':\n\t\t\t\t\timagepng($this->image, $filename, 9);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'gif':\n\t\t\t\t\timagegif($this->image, $filename);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'jpg':\n\t\t\t\t\timagejpeg($this->image, $filename);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}//end if\n\t}", "function output($im) {\r\n\t\t//capture output buffer\r\n\t\tob_start();\r\n\t\t\timagejpeg($im);\r\n\t\t\t$output = ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\t//echo encoded image\r\n\t\techo base64_encode($output);\r\n\t\treturn;\r\n\t}", "public function execute()\n\t{\n\t\t$outputPath = null != $this->outputPath ? $this->outputPath : $this->imagePath;\n\t\t$dotPos = stripos($outputPath, '.');\n\t\t$path = substr($outputPath, 0, $dotPos);\n\t\t$ext = substr($outputPath, $dotPos+1);\n\t\t\n\t\t$this->setDensities();\n\t\t\n\t\t$filter = $this->imagine instanceof \\Imagine\\Imagick\\Imagine \n\t\t ? \\Imagine\\Image\\ImageInterface::FILTER_POINT \n\t\t : \\Imagine\\Image\\ImageInterface::FILTER_UNDEFINED;\n\t\t \n\t\tforeach ($this->densities as $dens => $size) {\n\t\t\t$this->imagine->open($this->imagePath)\n\t\t\t ->resize(new \\Imagine\\Image\\Box($size[0], $size[1]), $filter)\n\t\t\t ->save($path.'-'.$dens.'.'.$ext, array($this->compressionType => $this->compressionValue));\n\t\t}\n\t}", "private function save()\n {\n $this->collage->setImageFormat('jpeg');\n return $this->collage->writeImage($this->name);\n }", "protected function drawImage():void{\n\t\t$this->imagickDraw = new ImagickDraw;\n\t\t$this->imagickDraw->setStrokeWidth(0);\n\n\t\tfor($y = 0; $y < $this->moduleCount; $y++){\n\t\t\tfor($x = 0; $x < $this->moduleCount; $x++){\n\t\t\t\t$this->setPixel($x, $y);\n\t\t\t}\n\t\t}\n\n\t\t$this->imagick->drawImage($this->imagickDraw);\n\t}", "function print_image($path){\n $image = new Imagick();\n $image->readImage(_LOCAL_.$path);\n $height = $image->getImageHeight();\n $width = $image->getImageWidth();\n\n $canvas = new Imagick();\n $canvas->newImage($width,$height,new ImagickPixel('white'));\n $canvas->setImageFormat('png');\n $canvas->compositeImage($image,imagick::COMPOSITE_OVER, 0, 0);\n\n header('Content-type: image/png');\n echo $canvas;\n $image->destroy();\n $canvas->destroy();\n}", "function export_file($file, $location = 'svg', $target = 'png', $format = 'png', $dpi = 300) {\n $newfile = str_replace('.svg', '.png', $file);\n shell_exec(\"inkscape '$location/$file' --export-png='$target/$newfile' -d 300\");\n}", "public function writeimg() {\n\t\t$data = Input::all();\n\t\t$img = $data['imgdata'];\n\t\t$student_id = $data['student_id'];\n\t\t$img = str_replace('data:image/png;base64,', '', $img);\n\t\t$img = str_replace(' ', '+', $img);\n\t\t$imgdat = base64_decode($img);\n\t\t$myPublicFolder = public_path();\n\t\t$savePath = $myPublicFolder.\"/photo\";\n\t\t$path = $savePath.\"/$student_id.png\";\n\t\tFile::delete($path);\n\t\tFile::put($path , $imgdat);\n\t\t$last_add = Student::orderby('id', 'desc')->first();\n\t\tStudent::where('student_id', '=', $student_id)->update(array('pic' => \"$student_id.png\"));\n\t\treturn View::make('finish', array('imgid' => Student::where('student_id', '=', $student_id)->firstOrFail()->group));\n\t}", "private function plotWithGraphviz() {\n $graphvizPath = $this->controller->configurations->get('graphvizPath');\n $graphvizBinary = $this->controller->configurations->get('graphvizBinary');\n if(! empty($graphvizPath) || empty($graphvizBinary)) {\n $output = array();\n ob_start();\n passthru($graphvizPath.$graphvizBinary.' '.$this->filename.' -Tpng ', $returnCode);\n if($returnCode) {\n throw new Exception('Couldn\\'t process relations file!');\n }\n else {\n $this->png = base64_encode(ob_get_contents());\n }\n ob_end_clean();\n }\n }", "protected function dumpImage():string{\n\t\tob_start();\n\n\t\ttry{\n\n\t\t\tswitch($this->options->outputType){\n\t\t\t\tcase QROutputInterface::GDIMAGE_GIF:\n\t\t\t\t\timagegif($this->image);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QROutputInterface::GDIMAGE_JPG:\n\t\t\t\t\timagejpeg($this->image, null, max(0, min(100, $this->options->jpegQuality)));\n\t\t\t\t\tbreak;\n\t\t\t\t// silently default to png output\n\t\t\t\tcase QROutputInterface::GDIMAGE_PNG:\n\t\t\t\tdefault:\n\t\t\t\t\timagepng($this->image, null, max(-1, min(9, $this->options->pngCompression)));\n\t\t\t}\n\n\t\t}\n\t\t// not going to cover edge cases\n\t\t// @codeCoverageIgnoreStart\n\t\tcatch(Throwable $e){\n\t\t\tthrow new QRCodeOutputException($e->getMessage());\n\t\t}\n\t\t// @codeCoverageIgnoreEnd\n\n\t\t$imageData = ob_get_contents();\n\t\timagedestroy($this->image);\n\n\t\tob_end_clean();\n\n\t\treturn $imageData;\n\t}", "abstract public function save($img, $filename);", "public function display() {\n //send header to browser\n header( \"Content-type: {$this->mimetype}\" );\n\n //output image\n if ( $this->mimetype == 'image/jpeg' ) {\n imagejpeg( $this->image );\n }\n if ( $this->mimetype == 'image/png' ) {\n imagepng( $this->image );\n }\n if ( $this->mimetype == 'image/gif' ) {\n imagegif( $this->image );\n }\n }", "protected function generateGraphic() {}", "function draw()\n {\n $img = imagecreatetruecolor(600, 600);\n\n // fill img with color (background)\n imagefill($img, 0, 0, imagecolorallocate($img, 220, 220, 220));\n\n //check color of border and get it in rgb format\n $rgb = HelperUtilities::getRgbColor($this->getBorder()->getColor());\n\n $red = $rgb['r'];\n $green = $rgb['g'];\n $blue = $rgb['b'];\n\n $color = imagecolorallocate($img, $red, $green, $blue);\n\n imagerectangle($img, 10, 10, $this->getSideLength(), $this->getSideLength(), $color);\n\n //output image\n $image_data_base64 = HelperUtilities::convertToBase64($img, get_class($this));\n HelperUtilities::writeBinaryDataInFile($image_data_base64, get_class($this));\n\n // Free up memory\n imagedestroy($img);\n\n header('Content-type: application/json');\n $response_array['status'] = 'success';\n $response_array['type'] = get_class($this);\n return $response_array;\n }", "public function DrawPicture() { \r\n\r\n $hogerarm = $this->GetHogerArm();\r\n $vansterarm = $this->GetVansterArm();\r\n $vansterben = $this->GetVansterBen();\r\n $hogerben = $this->GetHogerBen();\r\n $kroppen = $this->GetKroppen();\r\n $huvud = $this->GetHuvud();\r\n $repet = $this->GetRepet();\r\n $stolpen = $this->GetStolpen();\r\n $kullen = $this->GetKullen();\r\n $header = $this->GetSvgHeader();\r\n\r\n $html = <<<EOD\r\n {$header}\r\n {$kullen}\r\n {$stolpen}\r\n {$kroppen} \r\n {$hogerarm} \r\n {$vansterarm} \r\n {$vansterben} \r\n {$hogerben}\t\r\n {$repet} \t\t\r\n {$huvud}\r\n </svg>\r\nEOD;\r\n\r\n return $html;\r\n }", "public function draw_graph($values,$filename,$drivename)\n {\n\n // ------- The graph values in the form of associative array --Debug Only\n /*$values=array(\n \"T\" => 060,\n \"W\" => 130,\n \"V\" => 200,\n );*/\n\n \n $img_width=54;\n $img_height=100; \n $margins=0;\n $topmargin=15;\n $bottommargin=15;\n \n // ---- Find the size of graph by substracting the size of borders\n $graph_width=$img_width - $margins * 2;\n $graph_height=$img_height- $margins * 2; \n $img=imagecreate($img_width, $img_height);\n \n $bar_width=14;\n $total_bars=count($values);\n $gap= ($graph_width- $total_bars * $bar_width ) / ($total_bars +1);\n\n\n // ------- Define Colors ----------------\n $bar_color = imagecolorallocate($img, 107, 142, 35);\n $background_color = imagecolorallocate($img, 240, 240, 255);\n $border_color = imagecolorallocate($img, 240, 240, 255);\n $line_color = imagecolorallocate($img, 220, 220, 220);\n \n // ------ Create the border around the graph ------\n imagefilledrectangle($img, 1, 1, $img_width-2, $img_height-2, $border_color);\n imagefilledrectangle($img, $margins, $margins, $img_width-1-$margins, $img_height-1-$margins, $background_color);\n \n // ------- Max value is required to adjust the scale -------\n $max_value=max($values);\n $ratio= ($graph_height-$bottommargin-$topmargin)/$max_value;\n\n // -------- Create scale and draw horizontal lines --------\n // Horiz bars not required\n $horizontal_lines=0;\n /*$horizontal_gap=$graph_height/$horizontal_lines;\n\n for($i=1;$i<=$horizontal_lines;$i++){\n $y=$img_height - $margins - $horizontal_gap * $i ;\n imageline($img,$margins,$y,$img_width-$margins,$y,$line_color);\n $v=intval($horizontal_gap * $i /$ratio);\n imagestring($img,0,5,$y-5,$v,$bar_color);\n\n }*/\n \n // ----------- Draw the bars here ------\n for ($i=0; $i< $total_bars; $i++) { \n // ------ Extract key and value pair from the current pointer position\n list($key, $value)=each($values); \n $x1= $margins + $gap + $i * ($gap+$bar_width) ;\n $x2= $x1 + $bar_width; \n $y1=$margins -$bottommargin +$graph_height- intval($value * $ratio);\n $y2=$img_height-$margins -$bottommargin;\n imagestring($img, 0, $x1+1, $y1-10, $value, $bar_color);\n imagestring($img, 0, $x1+4, $img_height-10, $key, $bar_color); \n imagefilledrectangle($img, $x1, $y1, $x2, $y2, $bar_color);\n }\n //header(\"Content-type:image/png\");\n // dump graphs in temporary folder\n imagepng($img, '/var/clearos/smart_monitor/graph_'.$drivename.'_'.$filename.'.png', 0);\n \n }", "protected static function _writeNoise() {\n\t\tfor($i = 0; $i < 10; $i++){\n\t\t\t//Noise color\n\t\t $noiseColor = imagecolorallocate(\n\t\t self::$_image, \n\t\t mt_rand(150,225), \n\t\t mt_rand(150,225), \n\t\t mt_rand(150,225)\n\t\t );\n\t\t\tfor($j = 0; $j < 5; $j++) {\n\t\t\t\t//Draw noise\n\t\t\t imagestring(\n\t\t\t self::$_image,\n\t\t\t 5, \n\t\t\t mt_rand(-10, self::$imageL), \n\t\t\t mt_rand(-10, self::$imageH), \n\t\t\t self::$codeSet[mt_rand(0, 27)], //The text for the random noise letters or numbers\n\t\t\t $noiseColor\n\t\t\t );\n\t\t\t}\n\t\t}\n\t}", "public function toGDImage() {}", "public function formatGraphics() {\n }", "function writeGifData() {\n header(\"Content-Type: image/gif\");\n header(\"Cache-Control: \" .\n \"private, no-cache, no-cache=Set-Cookie, proxy-revalidate\");\n header(\"Pragma: no-cache\");\n header(\"Expires: Wed, 17 Sep 1975 21:32:10 GMT\");\n echo join($GLOBALS['GIF_DATA']);\n }", "public function outputAsJPG(){\n header('Content-Type: image/jpeg');\n\t\theader (\"Cache-Control: must-revalidate\");\n\t\t$offset = 7 * 24 * 60 * 60;//expires one week\n\t\t$expire = \"Expires: \" . gmdate (\"D, d M Y H:i:s\", time() + $offset) . \" GMT\";\n\t\theader ($expire);\n imagejpeg($this->gd_image);\n }", "public function makeGraph($savePath) {\n\n\t\t//set plot starting points\n\t\t$leftMargin = ($this->getGraphWidth() - $this->getPlotWidth())/2;\n\t\t$topMargin = ($this->getGraphHeight() - $this->getPlotHeight())/2;\n\n\t\t\n\t\t//create graph\n\t\t$im = @imagecreatetruecolor($this->getGraphWidth(), $this->getGraphHeight()) or die(\"Cannot create image\");\n\n\t\t//set graph background color\n\t\t$alpha = $this->getAlpha();\n\t\t$grapColorArray = $this->getRGB($this->getGraphColor());\n\t\t$graphColor = imagecolorallocatealpha($im, $grapColorArray[0], $grapColorArray[1], $grapColorArray[2], 50);\n\t\timagefill($im, 0, 0, $graphColor);\n\n\n\t\t//set plot color\n\t\t$plotColorArray = $this->getRGB($this->getPlotColor());\n\t\t$plotColor = imagecolorallocate($im, $plotColorArray[0], $plotColorArray[1], $plotColorArray[2]);\n\t\timagefilledrectangle($im, $leftMargin, $topMargin, $leftMargin + $this->getPlotWidth(), $topMargin + $this->getPlotHeight(), $plotColor);\n\n\t\t//creating y label\n\t\t$yLabelColorArray = $this->getRGB($this->getYLabelColor());\n\t\t$yLabelColor = imagecolorallocate($im, $yLabelColor[0], $yLabelColor[1], $yLabelColor[2]);\n\n\t\t//write string y label\n\t\timagestringup($im, 5, $leftMargin-50, $topMargin + ($this->getGraphHeight()/2), $this->getYLabel(), $yLabelColor);\n\n\t\t//creating x label\n\t\t$xLabelColorArray = $this->getRGB($this->getXLabelColor());\n\t\t$xLabelColor = imagecolorallocate($im, $xLabelColor[0], $xLabelColor[1], $xLabelColor[2]);\n\n\t\t//write string x label\n\t\timagestring($im, 5, $this->getPlotWidth()/2, $topMargin + $this->getPlotHeight()+20, $this->getXLabel(), $xLabelColor);\n\n\t\t\n\t\t//making Y labels\n\t\t$totalYLabels = count($this->getYLabelsArray()) - 1;\n\t\t$avgYPerLabel = floor($this->getPlotHeight() / $totalYLabels);\n\n\t\t$startYLabel = 0;\n\t\t$yLabelCtr = 1;\n\t\t$yLabelPointsArray = array();\n\t\t$yLabelPointsArray[] = $startYLabel;\n\t\twhile($yLabelCtr <= $totalYLabels) {\n\t\t\t$startYLabel += $avgYPerLabel;\n\t\t\t$yLabelPointsArray[] = $startYLabel;\n\t\t\t$yLabelCtr++;\n\t\t}\n\n\t\t//making ylables array\n\t\t$yLabelsColorArray = $this->getRGB($this->getYLabelsColor());\n\t\t$yLabelsColor = imagecolorallocate($im, $yLabelsColor[0], $yLabelsColor[1], $yLabelsColor[2]);\n\n\t\t//fetching y labels\n\t\t$yPoint = 0;\n\t\t$yLabelsArray = array_reverse($this->getYLabelsArray());\n\n\t\t//making axis color\n\t\t$axisColorArray = $this->getRGB($this->getAxisColor());\n\t\t$axisColor = imagecolorallocate($im, $axisColorArray[0], $axisColorArray[1], $axisColorArray[2]);\n\n\t\twhile($yPoint < count($yLabelPointsArray)) {\n\t\t\t//print y labels\n\t\t\timagestring($im, 2, $leftMargin-20 , $topMargin + $yLabelPointsArray[$yPoint]-5, $yLabelsArray[$yPoint], $yLabelsColor);\n\t\t\tif($yPoint != 0 ) {\n\t\t\t\t//print axis\n\t\t\t\timageline($im, $leftMargin, $topMargin + $yLabelPointsArray[$yPoint]+3, $leftMargin + $this->getPlotWidth(), $topMargin + $yLabelPointsArray[$yPoint]+3, $axisColor);\n\t\t\t}\n\t\t\t$yPoint++;\n\t\t}\n\n\n\t\t//making X labels\n\t\t$totalXLabels = count($this->getXLabelsArray()) - 1;\n\t\t$avgXPerLabel = floor($this->getPlotWidth() / $totalXLabels);\n\n\t\t$startXLabel = 0;\n\t\t$xLabelCtr = 1;\n\t\t$xLabelPointsArray = array();\n\t\t$xLabelPointsArray[] = $startXLabel;\n\t\twhile($xLabelCtr <= $totalXLabels) {\n\t\t\t$startXLabel += $avgXPerLabel;\n\t\t\t$xLabelPointsArray[] = $startXLabel;\n\t\t\t$xLabelCtr++;\n\t\t}\n\n\t\t//making x labels color\n\t\t$xLabelsColorArray = $this->getRGB($this->getXLabelsColor());\n\t\t$xLabelsColor = imagecolorallocate($im, $xLabelsColor[0], $xLabelsColor[1], $xLabelsColor[2]);\n\n\t\t$xPoint = 0;\n\t\t$xLabelsArray = $this->getXLabelsArray();\n\n\t\t//first point shown outside loop, because, first label to start from 0 position, and rest of elements to be labelled in plot area\n\t\timagestring($im, 2, $leftMargin + $xLabelPointsArray[$xPoint] , $topMargin + $this->getPlotHeight() + 2, $xLabelsArray[$xPoint], $yLabelsColor);\n\n\t\t$xPositionsArray = array();\n\t\t$xPositionsArray[] = $leftMargin + $xLabelPointsArray[$xPoint];\n\n\t\t$xPoint++;\n\n\t\twhile($xPoint < count($xLabelPointsArray)) {\n\t\t\t//printing x labels\n\t\t\timagestring($im, 2, $xLabelPointsArray[$xPoint] , $topMargin + $this->getPlotHeight() + 2, $xLabelsArray[$xPoint], $yLabelsColor);\n\t\t\t$xPositionsArray[] = $xLabelPointsArray[$xPoint]-15;\n\t\t\t$xPoint++;\n\t\t}\n\t\t\n\t\t//making bars color\n\n\t\t$dataArrays = $this->getDataArray();\n\n\t\n\t\t$dataArrayCounter = -1;\n\t\t$startX = 0;\n\t\t$totalWidth = 65;\n\t\t$totalBars = count($dataArrays);\n\t\t$widthPerBar = $totalWidth / $totalBars;\n\t\tforeach($dataArrays as $dataArrayKey => $dataArray) {\n\t\t\t$dataColorArray = $this->getDataColorArray();\n\t\t\t$dataColorValue = $this->getRGB($dataColorArray[++$dataArrayCounter]);\n\t\t\t$dataColor = imagecolorallocatealpha($im, $dataColorValue[0], $dataColorValue[1], $dataColorValue[2], $alpha);\n\t\t\t$ctr = 0;\n\t\t\tforeach($dataArray as $recordKey => $recordVal) {\n\t\t\t\t//printing bars and value\n\t\t\t\t$maxValue = max($this->getYLabelsArray());\n\t\t\t\t$value = round(($this->getPlotHeight() * $recordVal) / $maxValue,0);\n\t\t\t\t$barLabel = $recordVal;\n\t\t\t\tif (is_string($dataArrayKey) and !empty($dataArrayKey)) {\n\t\t\t\t\t$barLabel .= \" [ $dataArrayKey ]\";\n\t\t\t\t}\n\t\t\t\t$recordKey;\n\t\t\t\timagerectangle($im, $xPositionsArray[$ctr] + $startX, $this->getPlotHeight()+ $topMargin, $xPositionsArray[$ctr] + $startX+$widthPerBar, $this->getPlotHeight()+ $topMargin- $value +2, $yLabelsColor);\n\t\t\t\timagefilledrectangle($im, $xPositionsArray[$ctr] + $startX, $this->getPlotHeight()+ $topMargin, $xPositionsArray[$ctr] + $startX+$widthPerBar, $this->getPlotHeight()+ $topMargin- $value+2, $dataColor);\n\t\t\t\timagestringup($im, 1, $xPositionsArray[$ctr]+$startX+1 , $this->getPlotHeight()+ $topMargin - $value - 5, $barLabel, $xLabelsColor);\n\t\t\t\t$ctr++;\n\t\t\t}\n\t\t\t$startX += $widthPerBar;\n\t\t}\n\n\t\t//saving image\n\t\timagejpeg($im, $savePath);\n\t\t//cleanup\n\t\timagedestroy($im);\n\t}", "private function savePngCache() {\n\t\t// the CSS property dominant-baseline.\n\t\t// https://bugs.launchpad.net/inkscape/+bug/811862\n\t\twfDebugLog( \"Pathway\", \"savePngCache() called\\n\" );\n\t\tglobal $wgSVGConverters, $wgSVGConverter, $wgSVGConverterPath;\n\n\t\t$input = $this->getFileLocation( FILETYPE_IMG );\n\t\t$output = $this->getFileLocation( FILETYPE_PNG );\n\n\t\t$width = 1000;\n\t\t$retval = 0;\n\t\tif ( isset( $wgSVGConverters[$wgSVGConverter] ) ) {\n\t\t\t// TODO: calculate proper height for rsvg\n\t\t\t$cmd = str_replace(\n\t\t\t\t[ '$path/', '$width', '$input', '$output' ],\n\t\t\t\t[\n\t\t\t\t\t$wgSVGConverterPath\n\t\t\t\t\t? wfEscapeShellArg( \"$wgSVGConverterPath/\" )\n\t\t\t\t\t: \"\",\n\t\t\t\t\tintval( $width ),\n\t\t\t\t\twfEscapeShellArg( $input ),\n\t\t\t\t\twfEscapeShellArg( $output )\n\t\t\t\t],\n\t\t\t\t$wgSVGConverters[$wgSVGConverter] ) . \" 2>&1\";\n\t\t\t$err = wfShellExec( $cmd, $retval );\n\t\t\tif ( $retval != 0 || !file_exists( $output ) ) {\n\t\t\t\tthrow new Exception(\n\t\t\t\t\t\"Unable to convert to png: $err\\nCommand: $cmd\"\n\t\t\t\t);\n\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Exception(\n\t\t\t\t\"Unable to convert to png, no SVG rasterizer found\"\n\t\t\t);\n\t\t}\n\t\twfDebugLog( \"Pathway\", \"PNG CACHE SAVED: $output\\n\" );\n\t}", "public function show() {\n\t\t$this->create();\n\t\theader(\"Content-Type: image/png\");\n\t\theader(\"Content-Transfer-Encoding: binary\");\n\t\theader(\"Content-Length: \" . filesize($this->fileName));\n\t\theader(\"ETag: \" . md5($this->fileName)); // note we calculate md5 from filename, not from the file content\n\t\theader(\"Cache-Control: max-age=3600\");\n\t\theader(\"Expires: \" . gmdate('D, j M Y H:i:s', time() + 3600) . ' GMT');\n\t\tob_clean();\n\t\tflush();\n\t\treadfile($this->fileName);\n\t}", "function save(&$image) {\r\r\n\t\treturn $this->__write($image);\r\r\n\t\t}", "protected function savePicture($file)\n {\n $this->loadImageResource();\n\n // SUPPORT FOR CMYK IMAGES\n $colorSpace = new Colorspace();\n $colorSpace->apply($this);\n\n // APPLY EFFECT ON IMAGE\n foreach($this->effect as $effect)\n {\n if($effect instanceof PictureEffect)\n {\n $effect->apply($this);\n }\n }\n\n // CREATE DIRECTORY BY FILE PATH\n if(!file_exists($directory = dirname($file)))\n {\n mkdir($directory, 0777, TRUE);\n }\n\n // Zjistíme v jakém formátu máme obrázek uložit.\n $imageSaveFormat = $this->saveAs ?: strtolower(pathinfo($file, PATHINFO_EXTENSION));\n\n // Provedeme uložení obrázku přes GD.\n if($this->isGd())\n {\n // Uložení do WebP.\n if($imageSaveFormat === EPictureFormat::WEBP)\n {\n if($this->progressive)\n {\n imageinterlace($this->resource, TRUE);\n }\n\n imagewebp($this->resource, $file, $this->quality);\n }\n // Uložení do PNG.\n elseif($imageSaveFormat === EPictureFormat::PNG)\n {\n if($this->progressive)\n {\n imageinterlace($this->resource, TRUE);\n }\n\n imagepng($this->resource, $file, 9);\n }\n // Uložení do GIF.\n elseif($imageSaveFormat === EPictureFormat::GIF)\n {\n $gifResource = $this->resource;\n\n if($this->isGdImageTransparent($gifResource))\n {\n $validAlpha = ceil(0.333 * 127);\n $visiblePixels = 0;\n\n $height = imagesy($gifResource);\n $width = imagesx($gifResource);\n\n $transparentColor = imagecolorallocate($gifResource, 0xfe, 0x3, 0xf4);\n\n // FIX GIF IMAGE OPACITY\n for($x = 0; $x < $width; $x++)\n {\n for($y = 0; $y < $height; $y++)\n {\n $pixelIndex = imagecolorat($gifResource, $x, $y);\n $pixelColor = imagecolorsforindex($gifResource, $pixelIndex);\n\n if($pixelColor['alpha'] <= $validAlpha)\n {\n $visiblePixels++;\n }\n }\n }\n\n if(!$visiblePixels)\n {\n $validAlpha = 127;\n }\n\n for($x = 0; $x < $width; $x++)\n {\n for($y = 0; $y < $height; $y++)\n {\n $pixelIndex = imagecolorat($gifResource, $x, $y);\n $pixelColor = imagecolorsforindex($gifResource, $pixelIndex);\n\n if($pixelColor['alpha'] >= $validAlpha)\n {\n imagesetpixel($gifResource, $x, $y, $transparentColor);\n }\n else\n {\n $visiblePixel = imagecolorallocatealpha(\n\n $gifResource,\n $pixelColor['red'],\n $pixelColor['green'],\n $pixelColor['blue'],\n 0\n );\n\n imagesetpixel($gifResource, $x, $y, $visiblePixel);\n }\n }\n }\n\n imagecolortransparent($gifResource, $transparentColor);\n }\n\n if($this->progressive)\n {\n imageinterlace($gifResource, TRUE);\n }\n\n imagegif($gifResource, $file);\n }\n // Uložení do JPG.\n else\n {\n $image = $this->resource;\n\n $width = imagesx($image);\n $height = imagesy($image);\n\n $background = imagecreatetruecolor($width, $height);\n $whiteColor = imagecolorallocate($background, 255, 255, 255);\n\n imagefilledrectangle($background, 0, 0, $width, $height, $whiteColor);\n imagecopy($background, $image, 0, 0, 0, 0, $width, $height);\n\n if($this->progressive)\n {\n imageinterlace($background, TRUE);\n }\n\n imagejpeg($background, $file, $this->quality);\n }\n }\n // Provedeme uložení obrázku přes Imagick.\n else\n {\n // Uložení do WebP.\n if($imageSaveFormat === EPictureFormat::WEBP)\n {\n // There are problems with saving webP via imagick.\n // We will fall back to use GD extension to save image.\n $imageGd = $this->convertResource($this::WORKER_GD);\n\n if($this->progressive)\n {\n imageinterlace($imageGd, TRUE);\n }\n\n imagewebp($imageGd, $file, $this->quality);\n }\n // Uložení do JPG.\n elseif($imageSaveFormat === EPictureFormat::JPG)\n {\n $background = $this->createImagick();\n $background->newImage(\n\n $this->resource->getImageWidth(),\n $this->resource->getImageHeight(),\n '#FFFFFF'\n );\n\n $background->compositeImage($this->resource, Imagick::COMPOSITE_OVER, 0, 0);\n $background->setImageFormat('jpg');\n $background->setImageCompression(Imagick::COMPRESSION_JPEG);\n $background->setImageCompressionQuality($this->quality);\n\n if($this->progressive)\n {\n $background->setInterlaceScheme(Imagick::INTERLACE_PLANE);\n }\n\n $background->writeImage($file);\n }\n // Uložení do GIF.\n elseif($imageSaveFormat === EPictureFormat::GIF)\n {\n $validAlpha = 0.333;\n $visiblePixels = 0;\n $iterator = $this->resource->getPixelIterator();\n\n /** @var $pixel \\ImagickPixel */\n foreach($iterator as $row => $pixels)\n {\n foreach ($pixels as $col => $pixel)\n {\n $color = $pixel->getColor(TRUE);\n\n if($color['a'] >= $validAlpha)\n {\n $visiblePixels++;\n }\n }\n\n $iterator->syncIterator();\n }\n\n if(!$visiblePixels)\n {\n $validAlpha = 0;\n }\n\n // SAVE NEW ALPHA COLOR VALUE\n foreach($iterator as $row => $pixels)\n {\n foreach ($pixels as $col => $pixel)\n {\n $color = $pixel->getColor(TRUE);\n $pixel->setColorValue(Imagick::COLOR_ALPHA, $color['a'] >= $validAlpha ? 1 : 0);\n }\n\n $iterator->syncIterator();\n }\n\n if($this->progressive)\n {\n $this->resource->setInterlaceScheme(Imagick::INTERLACE_PLANE);\n }\n\n $this->resource->writeImage($file);\n }\n // Uložení do PNG.\n else\n {\n if($this->progressive)\n {\n $this->resource->setInterlaceScheme(Imagick::INTERLACE_PLANE);\n }\n\n $this->resource->writeImage($file);\n }\n }\n\n // Nastavení práv založenému obrázku.\n chmod($file, 0777);\n touch($file, filemtime($this->getImage()));\n\n // Odstranění dočasných souborů.\n foreach($this->tmpImage as $tmpImage)\n {\n unlink($tmpImage);\n }\n }", "protected function save()\n {\n switch ($this->image_info['mime']) {\n \n case 'image/gif':\n imagegif($this->image, $this->getPath(true));\n break;\n \n case 'image/jpeg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/jpg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/png':\n imagepng($this->image, $this->getPath(true), round($this->quality / 10));\n break;\n \n default:\n $_errors[] = $this->image_info['mime'] . ' images are not supported';\n return $this->errorHandler();\n break;\n }\n \n chmod($this->getPath(true), 0777);\n }", "function image_return_write($im, $write_to_abspath)\n{\n $return = $im->writeImage($write_to_abspath);\n $im->clear();\n $im->destroy();\n return $return;\n}", "public function output()\n {\n if ($this->html)\n {\n return $this->snappy->getOutputFromHtml($this->html, $this->options);\n }\n\n if ($this->file)\n {\n return $this->snappy->getOutput($this->file, $this->options);\n }\n\n throw new \\InvalidArgumentException('Image Generator requires a html or file in order to produce output.');\n }", "public function render() {\n if (!$this->layout) return false;\n \n $mime = $this->layoutInfo['mime'] ? $this->layoutInfo['mime'] : 'image/png';\n \n header('Content-Type: ' . $mime);\n switch ($mime) {\n case 'image/jpeg':\n imagejpeg($this->layout);\n break;\n case 'image/gif':\n imagegif($this->layout);\n case 'image/png':\n default:\n imagepng($this->layout);\n break;\n }\n }", "function do_export_images()\n\t{\n\t\t$skin_dir = $this->ipsclass->input['skin_dirs'];\n\n\t\tif ( ! @file_exists( CACHE_PATH.'style_images/'.$skin_dir ) )\n\t\t{\n\t\t\t$this->ipsclass->main_msg = \"Невозможно найти выбранную директорию, проверьте настройки и попробуйте еще раз\";\n\t\t\t$this->show_export_page();\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get xml mah-do-dah\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\trequire_once( KERNEL_PATH.'class_xmlarchive.php' );\n\n\t\t$xmlarchive = new class_xmlarchive( KERNEL_PATH );\n\n\t\t$xmlarchive->strip_path = CACHE_PATH.'style_images/'.$skin_dir;\n\n\t\t$xmlarchive->xml_add_directory( CACHE_PATH.'style_images/'.$skin_dir );\n\n\t\t$xmlarchive->xml_create_archive();\n\n\t\t$contents = $xmlarchive->xml_get_contents();\n\n\t\t$this->ipsclass->admin->show_download( $contents, 'ipb_images-'.$skin_dir.'.xml' );\n\t}", "function OutputImage ($im, $format, $quality) \n{ \n\tswitch ($format) \n\t{ \n\t\tcase \"JPEG\": \n\t\t\tImageJPEG ($im, NULL, $quality); \n\t\t\tbreak; \n\t\tcase \"PNG\": \n\t\t\tImagePNG ($im); \n\t\t\tbreak; \n\t\tcase \"GIF\": \n\t\t\tImageGIF ($im); \n\t\t\tbreak; \n\t} \n}", "public function write() {\n\t\t$this->script .= implode(\",\", $this->data).\"]\";\n\t\tif(!isArrayEmpty($this->colors)) {\n\t\t\t$this->script .= \",colors:['\".implode(\"','\", $this->colors).\"']\";\n\t\t}\n\t\t$this->script .= \"});\";\n\t\treturn $this->chart.$this->script;\n\t}", "public function outputBoard(Board $_board, Bool $_isFinalBoard)\n {\n echo \"\\rGamestep: \" . ($_board->gameStep() + 1);\n $image = $this->imageCreator->createImage($_board);\n\n $fileName = $_board->gameStep() . \".jpg\";\n $filePath = $this->imageOutputDirectory . \"/\" . $fileName;\n\n imagejpeg($image, $filePath);\n unset($image);\n }", "function OutputImage ($im, $format, $quality)\n{\n switch ($format)\n {\n case \"JPEG\": \n ImageJPEG ($im, \"\", $quality);\n break;\n case \"PNG\":\n ImagePNG ($im);\n break;\n case \"GIF\":\n ImageGIF ($im);\n break;\n }\n}", "protected function _output($data) {}", "public function WriteFiles()\n {\n $popdata = \"\\$pop = \" . var_export($this->population, true) . \";\\n\";\n $popdata .= \"\\$names = \" . var_export($this->names, true) . \";\\n\";\n file_put_contents(\"population.txt\", $popdata);\n \n file_put_contents(\"fitness.txt\", \"\\$fitness = \" . var_export($this->fitness, true) . \";\");\n \n $state_data = \"\\$generation = \" . var_export($this->generation, true) . \";\\n\";\n $state_data .= \"\\$memory = \" . var_export($this->memory, true) . \";\\n\";\n $state_data .= \"\\$strains = \" . var_export($this->strains, true) . \";\\n\";\n $state_data .= \"\\$lastname = \" . var_export($this->lastname, true) . \";\\n\";\n file_put_contents(\"ga_state.txt\", $state_data);\n }", "function drawPNG($w, $h, $thumb_w = 0, $thumb_h = 0)\n {\n $im = $this->drawIm($w, $h);\n $im = $this->convertToThumbnail($im, $thumb_w, $thumb_h);\n\n //- Output PNG data\n\n header('Content-type: image/png');\n imagepng($im);\n\n imagedestroy($im);\n }", "function writeimage( $imagepath ) {\r\n global $CFG;\r\n\r\n if (empty($imagepath)) {\r\n return '';\r\n }\r\n\r\n $courseid = $this->course->id;\r\n if (!$binary = file_get_contents( \"{$CFG->dataroot}/$courseid/$imagepath\" )) {\r\n return '';\r\n }\r\n\r\n $content = \" <image_base64>\\n\".addslashes(base64_encode( $binary )).\"\\n\".\r\n \"\\n </image_base64>\\n\";\r\n return $content;\r\n }", "function write_translation() {\r\n $this->final_image = cloneImg($this->get_cleaned_image());\r\n foreach ($this->text_blocks as $block) {\r\n $black = imagecolorallocate($this->final_image, 0, 0, 0);\r\n $red = imagecolorallocate($this->final_image, 255, 0, 0);\r\n $green = imagecolorallocate($this->final_image, 0, 255, 0);\r\n $yellow = imagecolorallocate($this->final_image, 255, 255, 0);\r\n \r\n $translation_width=$block->translation_width;\r\n $translation_height=$block->translation_height;\r\n\r\n $block_height=round(distance($block->x4,$block->y4,$block->x1,$block->y1));\r\n $block_width=round(distance($block->x1,$block->y1,$block->x2,$block->y2));\r\n\r\n $Ix=$block->x1+($block_width-$translation_width)/2;\r\n $Iy=$block->y1+$block->translation_top_offset+($block_height-$translation_height)/2 ;\r\n $tmpx=$Ix;\r\n $tmpy=$Iy;\r\n\r\n if ($block->text_angle !=0) {\r\n $insert=rotate($Ix,$Iy, $block->x1,$block->y1,0- $block->text_angle);\r\n $Ix = $insert[0];\r\n $Iy = $insert[1];\r\n }\r\n\r\n imagettftext (\r\n $this->final_image,\r\n $block->font_size,\r\n $block->text_angle,\r\n $Ix,\r\n $Iy,\r\n $black,\r\n $block->font,\r\n $block->formatted_text );\r\n }\r\n\r\n \r\n $this->final_image_path=\"uploads/\".microtime().\".jpg\";\r\n imagewrite($this->final_image,$this->final_image_path,$quality=100);\r\n }", "function save_ico( $file ) {\n\t\tif ( ! $this->_has_requirements )\n\t\t\treturn false;\n\t\t\n\t\tif ( false === ( $data = $this->_get_ico_data() ) )\n\t\t\treturn false;\n\t\t\n\t\tif ( false === ( $fh = fopen( $file, 'w' ) ) )\n\t\t\treturn false;\n\t\t\n\t\tif ( false === ( fwrite( $fh, $data ) ) ) {\n\t\t\tfclose( $fh );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfclose( $fh );\n\t\t\n\t\treturn true;\n\t}", "public function writeFile($data);", "function drawPNG($w, $h, $thumb_w = 0, $thumb_h = 0)\n {\n if ($w < 1) {\n $w = 1;\n }\n if ($h < 1) {\n $h = 1;\n }\n\n $im = $this->drawIm($w, $h);\n $im = $this->convertToThumbnail($im, $thumb_w, $thumb_h);\n\n //- Output PNG data\n\n header('Content-type: image/png');\n imagepng($im);\n\n imagedestroy($im);\n }", "protected function image_render()\r\n {\r\n // Send the correct HTTP header\r\n \\header(\"Cache-Control:no-cache,must-revalidate\");\r\n \\header(\"Pragma:no-cache\");\r\n \\header('Content-Type: image/'.static::$image_type);\r\n \\header(\"Connection:close\");\r\n\r\n // Pick the correct output function\r\n $function = '\\\\image'.static::$image_type;\r\n $function(static::$image);\r\n\r\n // Free up resources\r\n \\imagedestroy(static::$image);\r\n }", "function save_img() {\n imagejpeg($this->img, 'captcha.jpg');\n\n // Libération de la mémoire\n imagedestroy($this->img);\n \n }", "protected final function output ()\n\t{\n\t\tif ($this->isFailed() || !$this->isOutputSet())\n\t\t{\n\t\t\t$this->outputData();\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('Content-Description: File Download');\n\t\t\theader('Content-Type: ' . $this->outputContentType);\n\t\t\t$disposition = $this->attachResult ?\n\t\t\t\t\t'attachment; filename=' . $this->outputFileName :\n\t\t\t\t\t'inline';\n\t\t\theader('Content-Disposition: ' . $disposition);\n\t\t\theader('Content-Transfer-Encoding: binary');\n\t\t\theader('Content-Length: ' . filesize($this->outputFile));\n\n\t\t\twhile (ob_get_level()) {\n\t\t\t\tob_end_clean();\n\t\t\t}\n\t\t\tflush();\n\t\t\treadfile($this->outputFile);\n\t\t}\n\t}", "public function writeToFile($data){\t\n\t\tfwrite($this->fptr,$data);\n\t}", "public function write() {\n\t\tcopy($this->_path, str_replace('.css', getDatetime(time(), 'Y-m-d_H-i-s') . '.css', $this->_path));\n\t\t$cssData = preg_replace('/\\/\\*\\* @_START_@ \\*\\/(.*?)\\/\\*\\* @_END_@ \\*\\//s', '/** @_START_@ */\n' . $this->toString() . '\n/** @_END_@ */', $this->_fileContent);\n\t\tfile_put_contents($this->_path, $cssData);\n\t}", "public function draw()\n {\n //Skip calculations; dummy result after calculating points\n $points = [\n [\"x\" => '0', \"y\" => '0'],\n [\"x\" => '10', \"y\" => '0'],\n [\"x\" => '0', \"y\" => '10'],\n [\"x\" => '10', \"y\" => '10']\n ];\n\n if ($this->format instanceof \\GraphicEditor\\Formats\\Points) {\n $this->format->addPoints($points);\n }\n }", "public static function toImage($data, $filepath){\n if(extension_loaded(\"gd\")){\n $data = bin2hex($data);\n $height = 64;\n $width = 64;\n $image = imagecreatetruecolor($width, $height);\n imagealphablending($image, false);\n imagesavealpha($image, true);\n $imgPointer = 0;\n for($y = 1; $y <= $height; $y++){\n for($z = 1; $y <= $width; $x++){\n $pixel = substr($data, ($imgPointer++ * 8), 8);\n $r = hexdec(substr($pixel, 0, 2));\n $g = hexdec(substr($pixel, 2, 2));\n $b = hexdec(substr($pixel, 4, 2));\n $a = hexdec(substr($pixel, 6, 2));\n if($a === 255) $a = 0;\n elseif($a === 0) $a = 127;\n else{\n break;\n }\n $c = imagecolorallocatealpha($image, $r, $g, $b, $a);\n if($c === false or imagesetpixel($image, $x, $y, $c) === false){\n break;\n }\n imagepng($image, $filepath);\n }\n }\n }\n else{\n Server::getInstance()->getLogger()->critical(\"Failed to create image from skin data, PHP extension \\\"GD\\\" wasn't found.\");\n }\n }", "public function save() {\n \n $checkError = $this->isError();\n if (!$checkError) {\n \n $ext = $this->getImageExt();\n $quality = $this->__imageQuality;\n $dirSavePath = dirname($this->__imageSavePath);\n \n if (empty($this->__imageSavePath) || !is_dir($dirSavePath)) {\n $this->setError(__d('cloggy','Image save path not configured or maybe not exists.'));\n } else { \n \n /*\n * create resized image\n */\n switch($ext) {\n \n case 'jpg':\n case 'jpeg':\n\n if (imagetypes() & IMG_JPG) {\n @imagejpeg($this->__imageResized,$this->__imageSavePath,$quality); \n }\n\n break;\n\n case 'gif':\n\n if (imagetypes() & IMG_GIF) {\n @imagegif($this->__imageResized,$this->__imageSavePath); \n }\n\n break;\n\n case 'png':\n\n $scaleQuality = round($this->__imageQuality/100) * 9;\n $invertScaleQuality = 9 - $scaleQuality;\n\n if (imagetypes() & IMG_PNG) {\n @imagepng($this->__imageResized,$this->__imageSavePath,$invertScaleQuality); \n }\n\n break;\n\n } \n \n } \n \n /*\n * destroy resized image\n */\n if ($this->__imageResized) {\n \n //destroy resized image\n imagedestroy($this->__imageResized);\n \n } \n \n }\n \n }", "protected function filewrite($data = NULL) {\n ob_start();\n print_r($data);\n $c = ob_get_clean();\n $fc = fopen('txtfile' . DS . 'data.txt', 'w');\n fwrite($fc, $c);\n fclose($fc);\n }", "private function writeZoom(): void\n {\n // If scale is 100 we don't need to write a record\n if ($this->phpSheet->getSheetView()->getZoomScale() == 100) {\n return;\n }\n\n $record = 0x00A0; // Record identifier\n $length = 0x0004; // Bytes to follow\n\n $header = pack('vv', $record, $length);\n $data = pack('vv', $this->phpSheet->getSheetView()->getZoomScale(), 100);\n $this->append($header . $data);\n }", "private function write($data)\n {\n $this -> printer -> getPrintConnector() -> write($data);\n }", "public static function run($dataDir=null){\r\n $create_options = new BmpOptions();\r\n $create_options->setBitsPerPixel(24);\r\n\r\n # Create an instance of FileCreateSource and assign it to Source property\r\n $fileCreateSource=new FileCreateSource();\r\n $create_options->setSource(new FileCreateSource($dataDir . \"sample.bmp\",false));\r\n\r\n # Create an instance of RasterImage\r\n $image=new Image();\r\n $raster_image = $image->create($create_options,500,500);\r\n\r\n # Get the pixels of the image by specifying the area as image boundary\r\n $pixels = $raster_image->loadPixels($raster_image->getBounds());\r\n\r\n $index = 0;\r\n while ($index < sizeof($pixels)) {\r\n # Set the indexed pixel color to yellow\r\n $color = new Color();\r\n $pixels[$index] = $color->getYellow();\r\n $index += 1;\r\n }\r\n $raster_image->savePixels($raster_image->getBounds(), $pixels);\r\n\r\n # save all changes\r\n $raster_image->save();\r\n\r\n print \"Draw Images Using Core Functionality.\".PHP_EOL;\r\n }", "public function writeToFile() {\n $this->offset = ftell($this->file); //Save the file pointer\n $this->headerSize = 12;\n $this->size = 108;//count up all the fields\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->size); //Write the box size place holder for now\n \\Flare\\Common\\ByteUtils::writeChars($this->file, $this->boxType); //Write the box type\n \n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->version); //Write the box version\n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->flags[0]); //Write the box version\n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->flags[1]); //Write the box version\n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->flags[2]); //Write the box version //12 bytes so far\n \n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->creationTime); //Write the creation time\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->modificationTime); //Write the creation time\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->timeScale); //Write the timeScale\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->duration); //Write the duration //28 bytes\n \n \\Flare\\Common\\ByteUtils::writeFixed16_16($this->file, $this->rate); //Later Change this to the fixed point - 32 Bytes\n \n \\Flare\\Common\\ByteUtils::writeFixed8_8($this->file, $this->volume); //34 bytes\n \\Flare\\Common\\ByteUtils::padBytes($this->file, 10); //44 bytes\n //+3 \n \n $this->writeMatrix(); // 80 bytes\n \n \n \\Flare\\Common\\ByteUtils::padBytes($this->file, 4*6); //104\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->nextTrackID); //108\n \n\n \n }", "function write_config()\n\t{\n\t\t$charmap \t= $this->paths['tempdir'].'/'.$this->paths['config'];\n\t\t$handle \t= @fopen( $charmap, 'w' );\n\t\t\n\t if ($handle)\n\t {\n\t fwrite( $handle, '<?php $chars = array();');\n\t \n\t foreach($this->svg_config[$this->font_name] as $unicode)\n\t {\n\t \tif(!empty($unicode))\n\t \t{\n\t \t\t$delimiter = \"'\";\n\t \t\tif(strpos($unicode, \"'\") !== false) $delimiter = '\"';\n\t \t\tfwrite( $handle, \"\\r\\n\".'$chars[\\''.$this->font_name.'\\']['.$delimiter.$unicode.$delimiter.'] = '.$delimiter.$unicode.$delimiter.';' );\n\t \t}\n\t } \t \n\t \n\t fclose( $handle );\n\t }\n\t else\n\t {\n\t \t$this->delete_folder($this->paths['tempdir']);\n\t\t\texit('Was not able to write a config file');\n\t }\n\t\t\n\t\t\n\t}", "function outputImage( $code, $filename ) {\n\n if ( empty( $this->filePath ) ) {\n #Header( \"Content-type: text/plain\"); \n Header( \"Content-type: image/\".$this->imgMime); \n } else {\n if ( empty($filename) ) $filename = \"$code.\".$this->imgType;\n $filename = $this->filePath.$filename;\n }\n\n $func = \"image\".$this->imgType;\n \n if ( $this->imgQuality < 100 ) \n\n // Output JPEG with lower quality to browser or file\n\t \n $func($this->img, $filename,$this->imgQuality); \n\n else {\n if ( $filename ) \n\n // Output image to file\n\t\t\n $func($this->img, $filename); \n else\n\n // Output image to browser\n\n $func($this->img); \n }\n\n ImageDestroy($this->img);\n return $filename;\n}", "public function output()\n {\n // TODO: Implement output() method.\n }", "public function save($path = 'barcode.png')\n {\n $dir = dirname($path);\n if (!file_exists($dir)) {\n mkdir($dir, 0644, true);\n }\n imagepng($this->_image, $path);\n }", "public function render()\n\t{\n\t\t//set our header to display an image\n\t\theader('Content-Type: image/png');\n\n\t\t//print the image\n\t\techo $this->bg;\n\t}", "public function display() {\n \t\n \tif($this->userCanVisualize()){\n \t\t\n \t\t$e = $this->buildGraph();\n \t\tif($e){\n\t \techo $e->graph->GetHTMLImageMap(\"map\".$this->getId());\n\t \t$this->displayImgTag();\n \t\t}\n \t}\n }", "function dumpContents()\r\n {\r\n\r\n $draggable = ($this->_draggable) ? \"draggable=\\\"true\\\"\" : \"\";\r\n\r\n\r\n echo \"<canvas id=\\\"$this->_name\\\" $draggable width=\\\"\" . $this->Width . \"\\\" height=\\\"\" . $this->Height . \"\\\">\";\r\n\r\n //If your browser does not support canvas show the user a message\r\n echo $this->_notsupportedmessage;\r\n\r\n echo \"</canvas>\\n\";\r\n\r\n }", "function save ($input) {\r\n // Do your processing\r\n // Save to database of something\r\n //processin here cuz\r\n\r\n// $fp = fopen('images/test.txt', 'w');//opens file in append mode \r\n// fwrite($fp, $input); \r\n// fclose($fp);\r\n\r\n// $fp = fopen('images/len.txt', 'w');//opens file in append mode \r\n// fwrite($fp, strlen($input)); \r\n// fclose($fp);\r\n\r\n $img = str_replace('data:image/png;base64,', '', $input);\r\n $img = str_replace(' ', '+', $img);\r\n\r\n// $fp = fopen('images/img2.txt', 'w');//opens file in append mode \r\n// fwrite($fp, $img); \r\n// fclose($fp);\r\n\r\n $fileData = base64_decode($img);\r\n file_put_contents('images/photo.png',$fileData);\r\n return true;\r\n}", "function image_display_gd($resource)\n\t{\n\t\theader(\"Content-Disposition: filename={$this->file_name};\");\n\t\theader(\"Content-Type: {$this->mime_type}\");\n\t\theader('Content-Transfer-Encoding: binary');\n\t\theader('Last-Modified: '.gmdate('D, d M Y H:i:s', $this->EE->localize->now).' GMT'); \n\t\n\t\tswitch ($this->image_type)\n\t\t{\n\t\t\tcase 1 \t\t:\timagegif($resource);\n\t\t\t\tbreak;\n\t\t\tcase 2\t\t:\timagejpeg($resource, '', $this->quality);\n\t\t\t\tbreak;\n\t\t\tcase 3\t\t:\timagepng($resource);\n\t\t\t\tbreak;\n\t\t\tdefault\t\t:\techo 'Unable to display the image';\n\t\t\t\tbreak;\t\t\n\t\t}\t\t\t\n\t}", "public static function run($dataDir=null){\r\n $diagram = new Diagram($dataDir.\"drawing.vsd\");\r\n\r\n # Save as Html\r\n $saveFileFormat=new SaveFileFormat();\r\n $diagram->save($dataDir.\"Diagram.html\", $saveFileFormat->HTML);\r\n\r\n print \"Exported visio diagram to HTML.\".PHP_EOL;\r\n }", "private function writeTextToFile() {\n\t\t$text = $this -> pm -> getText($this -> padid);\n\t\t$path = sprintf('%s/%s.tex', $this -> directory, $this -> name);\n\t\tfile_put_contents($path, $text);\n\t}", "function save($show = false)\n {\n if ($show)\n {\n @header('Content-Type: image/' . $this->type);\n }\n \n if (!$this->width && !$this->height) \n {\n $this->width = $this->image_width;\n $this->height = $this->image_height;\n } elseif (is_numeric($this->width) && empty($this->height)) {\n $this->height = round($this->width / ($this->image_width / $this->image_height));\n \n } elseif (is_numeric($this->height) && empty($this->width)) {\n $this->width = round($this->height / ($this->image_height / $this->image_width));\n \n } else {\n if ($this->width <= $this->height) \n {\n $height = round($this->width / ($this->image_width / $this->image_height));\n if ($height != $this->height)\n {\n $percentage = ($this->image_height * 100) / $height;\n $this->image_height = round($this->height * ($percentage / 100));\n }\n } else {\n $width = round($this->height / ($this->image_height / $this->image_width));\n if ($width != $this->width)\n {\n $percentage = ($this->image_width * 100) / $width;\n $this->image_width = round($this->width * ($percentage / 100));\n }\n }\n }\n\n if ($this->crop)\n {\n $this->image_width = $this->width;\n $this->image_height = $this->height;\n }\n\n if ($this->type == 'jpeg')\n {\n $image = imagecreatefromjpeg($this->file);\n }\n \n if ($this->type == 'png')\n {\n $image = imagecreatefrompng($this->file);\n }\n \n if ($this->type == 'gif')\n {\n $image = imagecreatefromgif($this->file);\n }\n \n $new_image = imagecreatetruecolor($this->width, $this->height);\n imagecopyresampled($new_image, $image, 0, 0, \n $this->top, \n $this->left,\n $this->width, \n $this->height, \n $this->image_width,\n $this->image_height);\n\n $name = $show ? null : $this->dir . DIRECTORY_SEPARATOR . $this->name . '.' . $this->ext;\n \n if ($this->type == 'jpeg')\n {\n imagejpeg($new_image, $name, $this->quality);\n }\n \n if ($this->type == 'png')\n {\n imagepng($new_image, $name);\n }\n \n if ($this->type == 'gif')\n {\n imagegif($new_image, $name);\n }\n \n imagedestroy($image);\n imagedestroy($new_image);\n }", "public function save()\n {\n App::cliLog(\"Saving to $this->format file\", false);\n\n try {\n call_user_func([$this, 'export' . ucfirst($this->format)]);\n } catch (Exception $e) {\n App::cliLog($e->getMessage());\n }\n }", "function write() {\n\t\t$this->readychk();\n\t\tif (!is_dir($this->dir_path)) { mkdir($this->dir_path); }\n\t\tif (!is_dir($this->asset_path)) { mkdir($this->asset_path); }\n\n\t\t$cstr = json_encode($this->export(TRUE, TRUE));\n\t\tif (\n\t\t\t$cstr === FALSE &&\n\t\t\tjson_last_error() !== JSON_ERROR_NONE\n\t\t) { throw new IntException(\"Slide config encoding failed.\"); }\n\t\tfile_lock_and_put($this->conf_path, $cstr);\n\t}", "function convertImage($file, $out) {\n\t$im=imagecreatefrompng($file);\n\t$of=fopen($out, \"w\");\n\tfor ($y=0; $y<600; $y++) {\n\t\tfor ($x=0; $x<800; $x+=8) {\n\t\t\t$b=0;\n\t\t\tfor ($z=0; $z<8; $z++) {\n\t\t\t\t$b<<=1;\n\t\t\t\t$c=imagecolorat($im, $x+$z, $y);\n\t\t\t\tif ((($c)&0xff)<0x80) $b|=1;\n\t\t\t}\n\t\t\tfprintf($of, \"%c\", $b);\n\t\t}\n\t}\n\timagedestroy($im);\n\tfclose($of);\n}", "public function drawDimensions() {\n\t\tset_image_header();\n\n\t\t$this->selectTriggers();\n\t\t$this->calcDimentions();\n\n\t\tif (function_exists('imagecolorexactalpha') && function_exists('imagecreatetruecolor')\n\t\t\t\t&& @imagecreatetruecolor(1, 1)\n\t\t) {\n\t\t\t$this->im = imagecreatetruecolor(1, 1);\n\t\t}\n\t\telse {\n\t\t\t$this->im = imagecreate(1, 1);\n\t\t}\n\n\t\t$this->initColors();\n\n\t\timageOut($this->im);\n\t}", "function savePNG($filename, $w, $h, $thumb_w = 0, $thumb_h = 0)\n {\n $im = $this->drawIm($w, $h);\n $im = $this->convertToThumbnail($im, $thumb_w, $thumb_h);\n\n //- Save PNG data\n\n imagepng($im, $filename);\n\n imagedestroy($im);\n }", "function savePNG($filename, $w, $h, $thumb_w = 0, $thumb_h = 0)\n {\n $im = $this->drawIm($w, $h);\n $im = $this->convertToThumbnail($im, $thumb_w, $thumb_h);\n\n //- Save PNG data\n\n imagepng($im, $filename);\n\n imagedestroy($im);\n }" ]
[ "0.6747658", "0.66048294", "0.64193153", "0.6386922", "0.63199186", "0.6281341", "0.6260114", "0.6251393", "0.6236465", "0.62218654", "0.61737573", "0.61378473", "0.6084312", "0.60144347", "0.59543824", "0.5922047", "0.5802057", "0.5775232", "0.5775171", "0.57631683", "0.57239866", "0.5717643", "0.5708534", "0.5665967", "0.56371754", "0.56370676", "0.56216353", "0.5607851", "0.56022084", "0.5565796", "0.555538", "0.55319685", "0.5514588", "0.5434519", "0.54219", "0.54088175", "0.5398835", "0.539648", "0.5391869", "0.5388495", "0.53844357", "0.5378608", "0.5368251", "0.53656274", "0.5357214", "0.535207", "0.5346655", "0.53203934", "0.5301994", "0.5297478", "0.52888477", "0.52860236", "0.5280598", "0.5278778", "0.5254266", "0.5248924", "0.52423406", "0.52392846", "0.5234143", "0.52281404", "0.51980317", "0.5182109", "0.51813465", "0.5172132", "0.5137367", "0.51328164", "0.5128453", "0.5110259", "0.5098323", "0.5091957", "0.5087731", "0.5082121", "0.5077365", "0.5072957", "0.5055804", "0.5051119", "0.5040673", "0.5034871", "0.5016804", "0.50165033", "0.49884054", "0.4988209", "0.4985456", "0.4983297", "0.4978772", "0.49762064", "0.49681106", "0.496025", "0.4952061", "0.49510258", "0.4947119", "0.49446887", "0.49412686", "0.49405318", "0.49361324", "0.49346435", "0.4923193", "0.49197498", "0.49159476", "0.49142656", "0.49142656" ]
0.0
-1
Performs the actual projection of the source onto the canvas.
private function _projectSourceOnCanvas(&$source, &$canvas) { $srcX = 0; $srcY = 0; list($projectionWidth, $projectionHeight) = $this->_getProjectionSize(); list($destX, $destY) = $this->_getLeftUpperCoordinateOnCanvas($projectionWidth, $projectionHeight); imagecopyresampled($canvas, $source, $destX, $destY, $srcX, $srcY, $projectionWidth, $projectionHeight, $this->params['sourceWidth'], $this->params['sourceHeight']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execute()\n {\n $this->_loadProjection();\n $this->_loadShapes();\n $this->_loadSymbols();\n $this->_setWebConfig();\n $this->_setResolution();\n $this->_setUnits();\n $this->_setMapColor();\n $this->_setOutputFormat();\n $this->_setMapExtent();\n $this->_setMapSize();\n $this->_setZoom();\n $this->_setPan();\n $this->_setRotation();\n $this->_setCrop();\n $this->_addLayers();\n $this->addRegions();\n $this->addGraticules();\n $this->addCoordinates();\n $this->_addWatermark();\n $this->_prepareOutput();\n\n return $this;\n }", "public function apply() {\n\t\t$w = $this->getWidth();\n\t\t$h = $this->getHeight();\n\n\t\timagecopyresampled($this->original->getImage(), $this->getImage(), $this->x, $this->y, 0, 0, $w, $h, $w, $h);\n\t}", "public function draw(\\SetaPDF_Core_Canvas $canvas, $x, $y) {}", "public function update()\r\n {\r\n $this->x += $this->dx;\r\n $this->y += $this->dy;\r\n $this->z += $this->dz;\r\n }", "private function _getProjectionSize() {\n\t\t$sourceWidth = $this->params['sourceWidth'];\n\t\t$sourceHeight = $this->params['sourceHeight'];\n\t\t$sourceRatio = $sourceWidth / $sourceHeight;\n\n\t\t$canvasWidth = $this->params['w'];\n\t\t$canvasHeight = $this->params['h'];\n\t\t$canvasRatio = $canvasWidth / $canvasHeight;\n\n\n\t\t//\tthe image is not allowed to be cut off in any dimension\n\t\tif ($sourceRatio < $canvasRatio) {\n\t\t\t//\tsource is less landscape-like than canvas\n\t\t\t$leadDimension = !$this->params['crop'] ?\n\t\t\t\t'Height' : 'Width';\n\t\t} else {\n\t\t\t//\tsource is more landscape-like than canvas\n\t\t\t$leadDimension = !$this->params['crop'] ?\n\t\t\t\t'Width' : 'Height';\n\t\t}\n\n\t\tif (\n\t\t\t!$this->params['grow'] &&\n\t\t\t${'source'.$leadDimension} < ${'canvas'.$leadDimension}\n\t\t) {\n\t\t\t${'projection'.$leadDimension} = ${'source'.$leadDimension};\n\t\t} else {\n\t\t\t${'projection'.$leadDimension} = ${'canvas'.$leadDimension};\n\t\t}\n\n\t\tif (isset($projectionWidth)) {\n\t\t\t$projectionHeight = $projectionWidth / $sourceRatio;\n\t\t} elseif (isset($projectionHeight)) {\n\t\t\t$projectionWidth = $projectionHeight * $sourceRatio;\n\t\t}\n\n\t\treturn array(round($projectionWidth), round($projectionHeight));\n\t}", "private function _reproject($input_projection, $output_projection)\n {\n $this->_setOrigin($output_projection);\n\n $origProjObj = ms_newProjectionObj(self::getProjection($input_projection));\n $newProjObj = ms_newProjectionObj(self::getProjection($output_projection));\n\n $oRect = $this->map_obj->extent;\n $oRect->project($origProjObj, $newProjObj);\n //TODO: failing for http://www.simplemappr.net/map/2962\n $this->map_obj->setExtent($oRect->minx, $oRect->miny, $oRect->maxx, $oRect->maxy);\n $this->map_obj->setProjection(self::getProjection($output_projection));\n }", "function paint()\r\n {\r\n echo \"$this->_canvas.paint();\\n\";\r\n }", "public function draw() {}", "public function draw() {}", "public function render($canvas);", "public function draw();", "public function draw($canvas)\n {\n }", "public function draw($canvas)\n {\n }", "public function setProjection($value)\n {\n $this->_projection = $value;\n return $this;\n }", "protected function _drawRenderingMode(\\SetaPDF_Core_Canvas $canvas) {}", "protected function drawImage():void{\n\t\t$this->imagickDraw = new ImagickDraw;\n\t\t$this->imagickDraw->setStrokeWidth(0);\n\n\t\tfor($y = 0; $y < $this->moduleCount; $y++){\n\t\t\tfor($x = 0; $x < $this->moduleCount; $x++){\n\t\t\t\t$this->setPixel($x, $y);\n\t\t\t}\n\t\t}\n\n\t\t$this->imagick->drawImage($this->imagickDraw);\n\t}", "public function getCanvas() {}", "public function getCanvas() {}", "public function draw()\n {\n //Skip calculations; dummy result after calculating points\n $points = [\n [\"x\" => '0', \"y\" => '0'],\n [\"x\" => '10', \"y\" => '0'],\n [\"x\" => '0', \"y\" => '10'],\n [\"x\" => '10', \"y\" => '10']\n ];\n\n if ($this->format instanceof \\GraphicEditor\\Formats\\Points) {\n $this->format->addPoints($points);\n }\n }", "function _done()\n {\n $this->_getFillStyle();\n $this->_canvas->rectangle(\n \tarray(\n \t\t'x0' => $this->_fillLeft(),\n \t'y0' => $this->_fillTop(),\n \t'x1' => $this->_fillRight(),\n \t'y1' => $this->_fillBottom()\n )\n );\n\n $scaledWidth = $this->_mapSize['X']*$this->_scale;\n $scaledHeight = $this->_mapSize['Y']*$this->_scale;\n\n $this->_canvas->image(\n \tarray(\n \t'x' => $this->_plotLeft,\n \t'y' => $this->_plotTop,\n \t'filename' => $this->_imageMap,\n \t'width' => $scaledWidth,\n \t'height' => $scaledHeight\n )\n );\n\n return Image_Graph_Layout::_done();\n }", "public function getRequest()\n {\n $this->coords = $this->loadParam('coords', array());\n $this->regions = $this->loadParam('regions', array());\n\n $this->output = $this->loadParam('output', 'pnga');\n $this->width = (float)$this->loadParam('width', 900);\n $this->height = (float)$this->loadParam('height', $this->width/2);\n\n $this->image_size = array($this->width, $this->height);\n\n $this->projection = $this->loadParam('projection', 'epsg:4326');\n $this->projection_map = $this->loadParam('projection_map', 'epsg:4326');\n $this->origin = (int)$this->loadParam('origin', false);\n\n $this->bbox_map = $this->loadParam('bbox_map', '-180,-90,180,90');\n\n $this->bbox_rubberband = $this->loadParam('bbox_rubberband', array());\n\n $this->pan = $this->loadParam('pan', false);\n\n $this->layers = $this->loadParam('layers', array());\n\n $this->graticules = (array_key_exists('grid', $this->layers)) ? true : false;\n\n $this->watermark = $this->loadParam('watermark', false);\n\n $this->gridspace = $this->loadParam('gridspace', false);\n\n $this->gridlabel = (int)$this->loadParam('gridlabel', 1);\n\n $this->download = $this->loadParam('download', false);\n\n $this->crop = $this->loadParam('crop', false);\n\n $this->options = $this->loadParam('options', array()); //scalebar, legend, border, linethickness\n\n $this->border_thickness = (float)$this->loadParam('border_thickness', 1.25);\n\n $this->rotation = (int)$this->loadParam('rotation', 0);\n $this->zoom_in = $this->loadParam('zoom_in', false);\n $this->zoom_out = $this->loadParam('zoom_out', false);\n\n $this->_download_factor = (int)$this->loadParam('download_factor', 1);\n\n $this->file_name = $this->loadParam('file_name', time());\n\n $this->download_token = $this->loadParam('download_token', md5(time()));\n setcookie(\"fileDownloadToken\", $this->download_token, time()+3600, \"/\");\n\n return $this;\n }", "public function draw(\\SetaPDF_Core_Canvas $canvas, $x = 0, $y = 0, $width = null, $height = null) {}", "public function draw(\\SetaPDF_Core_Canvas $canvas, $x = 0, $y = 0, $width = null, $height = null) {}", "private function _getLeftUpperCoordinateOnCanvas($projectionWidth, $projectionHeight) {\n\t\t$projectionRatio = $projectionWidth / $projectionHeight;\n\t\t$canvasWidth = $this->params['w'];\n\t\t$canvasHeight = $this->params['h'];\n\t\t$canvasRatio = $canvasWidth / $canvasHeight;\n\n\t\t//\talways center the projection horizontally\n\t\tif ($projectionWidth > $canvasWidth) {\n\t\t\t$x = - (($projectionWidth / 2) - ($this->params['w'] / 2));\n\t\t} else {\n\t\t\t$x = ($this->params['w'] - $projectionWidth) / 2;\n\t\t}\n\n\t\tswitch ($this->params['cropfocus']) {\n\t\t\tcase 'face':\n\t\t\t\t//\tif the image is taller than the canvas, move the starting point halfway up the center\n\t\t\t\tif ($projectionHeight > $canvasHeight) {\n\t\t\t\t\t$y = - ((($projectionHeight / 2) - ($this->params['h'] / 2)) / 2);\n\t\t\t\t} else {\n\t\t\t\t\t$y = ($this->params['h'] - $projectionHeight) / 2;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'center':\n\t\t\tdefault:\n\t\t\t\t//\tcenter the projection vertically\n\t\t\t\tif ($projectionHeight > $canvasHeight) {\n\t\t\t\t\t$y = - (($projectionHeight / 2) - ($this->params['h'] / 2));\n\t\t\t\t} else {\n\t\t\t\t\t$y = ($this->params['h'] - $projectionHeight) / 2;\n\t\t\t\t}\n\t\t}\n\n\t\treturn array($x, $y);\n\t}", "protected function doActualConvert()\n {\n\n $this->logLn('GD Version: ' . gd_info()[\"GD Version\"]);\n\n // Btw: Check out processWebp here:\n // https://github.com/Intervention/image/blob/master/src/Intervention/Image/Gd/Encoder.php\n\n // Create image resource\n $image = $this->createImageResource();\n\n // Try to convert color palette if it is not true color\n $this->tryToMakeTrueColorIfNot($image);\n\n\n if ($this->getMimeTypeOfSource() == 'image/png') {\n // Try to set alpha blending\n $this->trySettingAlphaBlending($image);\n }\n\n // Try to convert it to webp\n $this->tryConverting($image);\n\n // End of story\n imagedestroy($image);\n }", "public function draw()\n {\n echo 'Draw circle';\n }", "abstract public function draw(\\SetaPDF_Core_Canvas $canvas, $x = 0, $y = 0, $width = null, $height = null);", "public static function run($dataDir=null){\r\n $create_options = new BmpOptions();\r\n $create_options->setBitsPerPixel(24);\r\n\r\n # Create an instance of FileCreateSource and assign it to Source property\r\n $fileCreateSource=new FileCreateSource();\r\n $create_options->setSource(new FileCreateSource($dataDir . \"sample.bmp\",false));\r\n\r\n # Create an instance of RasterImage\r\n $image=new Image();\r\n $raster_image = $image->create($create_options,500,500);\r\n\r\n # Get the pixels of the image by specifying the area as image boundary\r\n $pixels = $raster_image->loadPixels($raster_image->getBounds());\r\n\r\n $index = 0;\r\n while ($index < sizeof($pixels)) {\r\n # Set the indexed pixel color to yellow\r\n $color = new Color();\r\n $pixels[$index] = $color->getYellow();\r\n $index += 1;\r\n }\r\n $raster_image->savePixels($raster_image->getBounds(), $pixels);\r\n\r\n # save all changes\r\n $raster_image->save();\r\n\r\n print \"Draw Images Using Core Functionality.\".PHP_EOL;\r\n }", "protected function drawImage():void{\n\t\tfor($y = 0; $y < $this->moduleCount; $y++){\n\t\t\tfor($x = 0; $x < $this->moduleCount; $x++){\n\t\t\t\t$this->setPixel($x, $y);\n\t\t\t}\n\t\t}\n\t}", "public function alejarCamaraPresidencia() {\n\n self::$presidencia->alejarZoom();\n\n }", "protected function compile()\n {\n $this->addImageToTemplate($this->Template, $this->arrData);\n }", "function draw() {\n }", "function image_mirror_gd()\n\t{\t\t\n\t\tif ( ! $src_img = $this->image_create_gd())\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$width = $this->src_width;\n\t\t$height = $this->src_height;\n\n\t\tif ($this->rotation == 'hor')\n\t\t{\n\t\t\tfor ($i = 0; $i < $height; $i++)\n\t\t\t{\t\t \n\t\t\t\t$left = 0; \n\t\t\t\t$right = $width-1; \n\t\n\t\t\t\twhile ($left < $right)\n\t\t\t\t{ \n\t\t\t\t\t$cl = imagecolorat($src_img, $left, $i); \n\t\t\t\t\t$cr = imagecolorat($src_img, $right, $i);\n\t\t\t\t\t\n\t\t\t\t\timagesetpixel($src_img, $left, $i, $cr); \n\t\t\t\t\timagesetpixel($src_img, $right, $i, $cl); \n\t\t\t\t\t\n\t\t\t\t\t$left++; \n\t\t\t\t\t$right--; \n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor ($i = 0; $i < $width; $i++)\n\t\t\t{\t\t \n\t\t\t\t$top = 0; \n\t\t\t\t$bot = $height-1; \n\t\n\t\t\t\twhile ($top < $bot)\n\t\t\t\t{ \n\t\t\t\t\t$ct = imagecolorat($src_img, $i, $top);\n\t\t\t\t\t$cb = imagecolorat($src_img, $i, $bot);\n\t\t\t\t\t\n\t\t\t\t\timagesetpixel($src_img, $i, $top, $cb); \n\t\t\t\t\timagesetpixel($src_img, $i, $bot, $ct); \n\t\t\t\t\t\n\t\t\t\t\t$top++; \n\t\t\t\t\t$bot--; \n\t\t\t\t} \n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\t/** ---------------------------------\n\t\t/** Save the Image\n\t\t/** ---------------------------------*/\n\t\tif ( ! $this->image_save_gd($src_img))\n\t\t{\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t/** ---------------------------------\n\t\t/** Kill the file handles\n\t\t/** ---------------------------------*/\n\t\timagedestroy($src_img);\n\t\t\n\t\t// Set the file to 777\n\t\t@chmod($this->full_dst_path, FILE_WRITE_MODE);\t\t\t\n\t\t\n\t\treturn TRUE;\n\t}", "public function image_mirror_gd()\n\t{\n\t\tif ( ! $src_img = $this->image_create_gd())\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$width = $this->orig_width;\n\t\t$height = $this->orig_height;\n\n\t\tif ($this->rotation_angle === 'hor')\n\t\t{\n\t\t\tfor ($i = 0; $i < $height; $i++)\n\t\t\t{\n\t\t\t\t$left = 0;\n\t\t\t\t$right = $width - 1;\n\n\t\t\t\twhile ($left < $right)\n\t\t\t\t{\n\t\t\t\t\t$cl = imagecolorat($src_img, $left, $i);\n\t\t\t\t\t$cr = imagecolorat($src_img, $right, $i);\n\n\t\t\t\t\timagesetpixel($src_img, $left, $i, $cr);\n\t\t\t\t\timagesetpixel($src_img, $right, $i, $cl);\n\n\t\t\t\t\t$left++;\n\t\t\t\t\t$right--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor ($i = 0; $i < $width; $i++)\n\t\t\t{\n\t\t\t\t$top = 0;\n\t\t\t\t$bottom = $height - 1;\n\n\t\t\t\twhile ($top < $bottom)\n\t\t\t\t{\n\t\t\t\t\t$ct = imagecolorat($src_img, $i, $top);\n\t\t\t\t\t$cb = imagecolorat($src_img, $i, $bottom);\n\n\t\t\t\t\timagesetpixel($src_img, $i, $top, $cb);\n\t\t\t\t\timagesetpixel($src_img, $i, $bottom, $ct);\n\n\t\t\t\t\t$top++;\n\t\t\t\t\t$bottom--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Show the image\n\t\tif ($this->dynamic_output === TRUE)\n\t\t{\n\t\t\t$this->image_display_gd($src_img);\n\t\t}\n\t\telseif ( ! $this->image_save_gd($src_img)) // ... or save it\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Kill the file handles\n\t\timagedestroy($src_img);\n\n\t\tchmod($this->full_dst_path, $this->file_permissions);\n\n\t\treturn TRUE;\n\t}", "function convert($utm_x, $utm_y, $utmZone)\n {\n $LngOrigin = Deg2Rad($utmZone * 6 - 183);\n\n // The following set of class constants define characteristics of the\n // ellipsoid, as defined my the WGS84 datum. These values need to be\n // changed if a different dataum is used.\n\n $FalseNorth = 0; // South or North?\n //if (lat < 0.) FalseNorth = 10000000. // South or North?\n //else FalseNorth = 0.\n\n $Ecc = 0.081819190842622; // Eccentricity\n $EccSq = $Ecc * $Ecc;\n $Ecc2Sq = $EccSq / (1. - $EccSq);\n $Ecc2 = sqrt($Ecc2Sq); // Secondary eccentricity\n $E1 = (1 - sqrt(1 - $EccSq)) / (1 + sqrt(1 - $EccSq));\n $E12 = $E1 * $E1;\n $E13 = $E12 * $E1;\n $E14 = $E13 * $E1;\n\n $SemiMajor = 6378137.0; // Ellipsoidal semi-major axis (Meters)\n $FalseEast = 500000.0; // UTM East bias (Meters)\n $ScaleFactor = 0.9996; // Scale at natural origin\n\n // Calculate the Cassini projection parameters\n\n $M1 = ($utm_x - $FalseNorth) / $ScaleFactor;\n $Mu1 = $M1 / ($SemiMajor * (1 - $EccSq / 4.0 - 3.0 * $EccSq * $EccSq / 64.0 - 5.0 * $EccSq * $EccSq * $EccSq / 256.0));\n\n $Phi1 = $Mu1 + (3.0 * $E1 / 2.0 - 27.0 * $E13 / 32.0) * sin(2.0 * $Mu1);\n +(21.0 * $E12 / 16.0 - 55.0 * $E14 / 32.0) * sin(4.0 * $Mu1);\n +(151.0 * $E13 / 96.0) * sin(6.0 * $Mu1);\n +(1097.0 * $E14 / 512.0) * sin(8.0 * $Mu1);\n\n $sin2phi1 = sin($Phi1) * sin($Phi1);\n $Rho1 = ($SemiMajor * (1.0 - $EccSq)) / pow(1.0 - $EccSq * $sin2phi1, 1.5);\n $Nu1 = $SemiMajor / sqrt(1.0 - $EccSq * $sin2phi1);\n\n // Compute parameters as defined in the POSC specification. T, C and D\n\n $T1 = tan($Phi1) * tan($Phi1);\n $T12 = $T1 * $T1;\n $C1 = $Ecc2Sq * cos($Phi1) * cos($Phi1);\n $C12 = $C1 * $C1;\n $D = ($utm_y - $FalseEast) / ($ScaleFactor * $Nu1);\n $D2 = $D * $D;\n $D3 = $D2 * $D;\n $D4 = $D3 * $D;\n $D5 = $D4 * $D;\n $D6 = $D5 * $D;\n\n // Compute the Latitude and Longitude and convert to degrees\n $lat = $Phi1 - $Nu1 * tan($Phi1) / $Rho1 * ($D2 / 2.0 - (5.0 + 3.0 * $T1 + 10.0 * $C1 - 4.0 * $C12 - 9.0 * $Ecc2Sq) * $D4 / 24.0 + (61.0 + 90.0 * $T1 + 298.0 * $C1 + 45.0 * $T12 - 252.0 * $Ecc2Sq - 3.0 * $C12) * $D6 / 720.0);\n\n $lat = Rad2Deg($lat);\n\n $lon = $LngOrigin + ($D - (1.0 + 2.0 * $T1 + $C1) * $D3 / 6.0 + (5.0 - 2.0 * $C1 + 28.0 * $T1 - 3.0 * $C12 + 8.0 * $Ecc2Sq + 24.0 * $T12) * $D5 / 120.0) / cos($Phi1);\n\n $lon = Rad2Deg($lon);\n\n // Create a object to store the calculated Latitude and Longitude values\n $PC_LatLon['lat'] = $lat;\n $PC_LatLon['lon'] = $lon;\n\n // Returns a PC_LatLon object\n return $PC_LatLon;\n }", "private function _setCrop()\n {\n if (isset($this->crop) && $this->crop && $this->bbox_rubberband && $this->_isResize()) {\n\n $bbox_rubberband = explode(',', $this->bbox_rubberband);\n\n //lower-left coordinate\n $ll_point = new \\stdClass();\n $ll_point->x = $bbox_rubberband[0];\n $ll_point->y = $bbox_rubberband[3];\n $ll_coord = $this->pix2Geo($ll_point);\n\n //upper-right coordinate\n $ur_point = new \\stdClass();\n $ur_point->x = $bbox_rubberband[2];\n $ur_point->y = $bbox_rubberband[1];\n $ur_coord = $this->pix2Geo($ur_point);\n\n //set the size as selected\n $width = abs($bbox_rubberband[2]-$bbox_rubberband[0]);\n $height = abs($bbox_rubberband[3]-$bbox_rubberband[1]);\n\n $this->map_obj->setSize($width, $height);\n if ($this->_isResize() && $this->_download_factor > 1) {\n $this->map_obj->setSize($this->_download_factor*$width, $this->_download_factor*$height);\n }\n\n //set the extent to match that of the crop\n $this->map_obj->setExtent($ll_coord->x, $ll_coord->y, $ur_coord->x, $ur_coord->y);\n }\n }", "function __copy(&$tmp_target, &$tmp_source, $destination_x, $destination_y) {\n\n\t\t// call `composite -geometry`\n\t\t//\n\t\t$cmd = $this->__command(\n\t\t\t'composite',\n\t\t\t\" -geometry {$tmp_source->image_width}x{$tmp_source->image_height}+{$destination_x}+{$destination_y} \"\n \t\t. escapeshellarg(realpath($tmp_source->source))\n \t\t. \" \"\n \t\t. escapeshellarg(realpath($tmp_target->target))\n \t\t. \" \"\n \t\t. escapeshellarg(realpath($tmp_target->target))\n \t);\n\n exec($cmd, $result, $errors);\n\t\treturn ($errors == 0);\n\t\t}", "public function setProjection(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Datastore\\V1beta3\\Projection::class);\n $this->projection = $arr;\n }", "protected function doActualConvert()\n {\n/*\n $im = \\Jcupitt\\Vips\\Image::newFromFile($this->source);\n //$im->writeToFile(__DIR__ . '/images/small-vips.webp', [\"Q\" => 10]);\n\n $im->webpsave($this->destination, [\n \"Q\" => 80,\n //'near_lossless' => true\n ]);\n return;*/\n\n $im = $this->createImageResource();\n $options = $this->createParamsForVipsWebPSave();\n $this->webpsave($im, $options);\n }", "public function draw()\n {\n return;\n }", "abstract public function applyToImage(Image $image, $posx = 0, $posy = 0);", "abstract public function applyToImage(Image $image, $posx = 0, $posy = 0);", "function crop( $x = 0, $y = 0, $w = 0, $h = 0 )\n\t{\n\t\tif( $w == 0 || $h == 0 )\n\t\t\treturn FALSE;\n\t\t\n\t\t//create a target canvas\n\t\t$new_im = imagecreatetruecolor ( $w, $h );\n\t\n\t\t//copy and resize image to new canvas\n\t\timagecopyresampled( $new_im, $this->im, 0, 0, $x, $y, $w, $h, $w, $h );\n\t\t\n\t\t//delete the old image handle\n\t\timagedestroy( $this->im );\n\t\t\n\t\t//set the new image as the current handle\n\t\t$this->im = $new_im;\n\t}", "public function isProjection();", "public function execute()\r\n\t{\t\t\r\n\t\t@unlink($this->targetFile);\t\t\t\t\t\r\n\t\t$this->targetFile = @myFileConverter::convertImage($this->sourceFile, $this->targetFile, $this->params['width'], $this->params['height'],\r\n\t\t\t$this->params['cropType'], $this->params['bGColor'], $this->params['forceJpeg'], $this->params['quality'],\r\n\t\t\t$this->params['srcX'], $this->params['srcY'], $this->params['srcW'], $this->params['srcH']);\r\n\t\tif ($this->targetFile === null)\r\n\t\t\treturn true;\r\n\t\telseif(!file_exists($this->targetFile))\t// wait for convertion to end and produce the target file\r\n\t\t\tsleep(2);\r\n\t\tif (!file_exists($this->targetFile))\r\n\t\t\treturn false;\r\n\t\treturn true; \r\n\t}", "public function setProjection(SQLRenderable $projection= NULL, $alias= '') {\n $this->projection= (is_null($projection) || ($projection instanceof ProjectionList))\n ? $projection\n : $projection= Projections::ProjectionList()->add($projection, $alias)\n ;\n return $this;\n }", "public function toCartesian()\n {\n $phi = deg2rad($this->getLatitude());\n $lambda = deg2rad($this->getLongitude());\n\n $H = $this->getHeight();\n $a = $this->getEllipsoid()->getA();\n $b = $this->getEllipsoid()->getB();\n\n $sin_phi = sin($phi);\n $cos_phi = cos($phi);\n $sin_lambda = sin($lambda);\n $cos_lambda = cos($lambda);\n\n $eSq = (pow($a, 2) - pow($b, 2)) / (pow($a, 2));\n $nu = $a / sqrt(1 - $eSq * $sin_phi * $sin_phi);\n\n $x = ($nu + $H) * $cos_phi * $cos_lambda;\n $y = ($nu + $H) * $cos_phi * $sin_lambda;\n $z = ((1 - $eSq) * $nu + $H) * $sin_phi;\n\n // TODO: return a cartesian coordinate object, not an array.\n // The object will provide the means for converting back again.\n $point = array($x, $y, $z);\n\n return $point;\n }", "public function cropAvatarAction()\n {\n // TODO: swap web dir to product path\n //$imgRealPath = '/Users/leonqiu/www/choumei.me/Symfony/web/' . $_POST['imageSource'];\n $imgRealPath = dirname(__FILE__) . '/../../../../web/' . $_POST['imageSource'];\n list($width, $height) = getimagesize($imgRealPath);\n \n $viewPortW = $_POST[\"viewPortW\"];\n\t $viewPortH = $_POST[\"viewPortH\"];\n $pWidth = $_POST[\"imageW\"];\n $pHeight = $_POST[\"imageH\"];\n $tmp = explode(\".\",$_POST[\"imageSource\"]);\n $ext = end(&$tmp);\n $function = $this->returnCorrectFunction($ext);\n //$image = $function($_POST[\"imageSource\"]);\n $image = $function($imgRealPath);\n $width = imagesx($image);\n $height = imagesy($image);\n \n // Resample\n $image_p = imagecreatetruecolor($pWidth, $pHeight);\n $this->setTransparency($image,$image_p,$ext);\n\t\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $pWidth, $pHeight, $width, $height);\n\t\timagedestroy($image);\n\t\t$widthR = imagesx($image_p);\n\t\t$hegihtR = imagesy($image_p);\n\t\t\n\t\t$selectorX = $_POST[\"selectorX\"];\n\t\t$selectorY = $_POST[\"selectorY\"];\n\t\t\n\t\tif($_POST[\"imageRotate\"]){\n\t\t $angle = 360 - $_POST[\"imageRotate\"];\n\t\t $image_p = imagerotate($image_p,$angle,0);\n\t\t \n\t\t $pWidth = imagesx($image_p);\n\t\t $pHeight = imagesy($image_p);\n\t\t \n\t\t //print $pWidth.\"---\".$pHeight;\n\t\t\n\t\t $diffW = abs($pWidth - $widthR) / 2;\n\t\t $diffH = abs($pHeight - $hegihtR) / 2;\n\t\t \n\t\t $_POST[\"imageX\"] = ($pWidth > $widthR ? $_POST[\"imageX\"] - $diffW : $_POST[\"imageX\"] + $diffW);\n\t\t $_POST[\"imageY\"] = ($pHeight > $hegihtR ? $_POST[\"imageY\"] - $diffH : $_POST[\"imageY\"] + $diffH);\n\t\t\n\t\t \n\t\t}\n\t\t\n\t\t$dst_x = $src_x = $dst_y = $dst_x = 0;\n\t\t\n\t\tif($_POST[\"imageX\"] > 0){\n\t\t $dst_x = abs($_POST[\"imageX\"]);\n\t\t}else{\n\t\t $src_x = abs($_POST[\"imageX\"]);\n\t\t}\n\t\tif($_POST[\"imageY\"] > 0){\n\t\t $dst_y = abs($_POST[\"imageY\"]);\n\t\t}else{\n\t\t $src_y = abs($_POST[\"imageY\"]);\n\t\t}\n\t\t\n\t\t\n\t\t$viewport = imagecreatetruecolor($_POST[\"viewPortW\"],$_POST[\"viewPortH\"]);\n\t\t$this->setTransparency($image_p,$viewport,$ext);\n\t\t\n\t\timagecopy($viewport, $image_p, $dst_x, $dst_y, $src_x, $src_y, $pWidth, $pHeight);\n\t\timagedestroy($image_p);\n\t\t\n\t\t\n\t\t$selector = imagecreatetruecolor($_POST[\"selectorW\"],$_POST[\"selectorH\"]);\n\t\t$this->setTransparency($viewport,$selector,$ext);\n\t\timagecopy($selector, $viewport, 0, 0, $selectorX, $selectorY,$_POST[\"viewPortW\"],$_POST[\"viewPortH\"]);\n\t\t\n\t\t//$file = \"tmp/test\".time().\".\".$ext;\n\t\t// TODO: generate file name\n\t\t$fileName = uniqid() . \".\" . $ext;\n\t\t$user = $this->get('security.context')->getToken()->getUser();\n\t\t$avatarFile = dirname(__FILE__).'/../../../../web/uploads/avatar/'.$user->getId(). '/' .$fileName;\n\t\t$avatarUrl = '/uploads/avatar/'. $user->getId() . '/' . $fileName;\n\t\t$this->parseImage($ext,$selector,$avatarFile);\n\t\timagedestroy($viewport);\n\t\t//Return value\n\t\t//update avatar\n $em = $this->getDoctrine()->getEntityManager();\n $user->setAvatar($avatarUrl);\n $em->persist($user);\n $em->flush();\n\t\techo $avatarUrl;\n\t\texit;\n }", "function imageToCanvas ($_image, $_canvasWidth, $_canvasHeight, $color='white' ,$extension, $forceScale=false)\n{\n if (is_string($_image)) {\n if (is_file($_image)) {\n if($extension==\"jpg\" || $extension==\"jpeg\" ){\n\t\t\t\t$_image = imagecreatefromjpeg($_image);\n\t\t\t}\n\t\t\telse if($extension==\"png\"){\n\t\t\t\t$_image = imagecreatefrompng($_image);\n\t\t\t}else {\n\t\t\t\t$_image = imagecreatefromgif($_image);\n\t\t\t}\n } else {\n return \"Incorrect imagepath >> No file here \" . $_image;\n }\n } \n \n $width = imagesx($_image);\n $height = imagesy($_image);\n $image_aspect_ratio = $width / $height;\n $canvas_aspect_ratio = $_canvasWidth / $_canvasHeight;\n \n if($forceScale == 'true')\n {\n // scale by height\n if ($image_aspect_ratio < $canvas_aspect_ratio) {\n $new_height = $_canvasHeight;\n $new_width = ($new_height/$height) * $width;\n } \n // scale by width\n else {\n $new_width = $_canvasWidth;\n $new_height = ($new_width/$width) * $height;\n }\n }\n else\n {\n if($width > $_canvasWidth)\n {\n $new_width = $_canvasWidth;\n $new_height = ($new_width/$width) * $height;\n }\n elseif($height > $_canvasHeight)\n {\n $new_height = $_canvasHeight;\n $new_width = ($new_height/$height) * $width;\n }\n else\n {\n $new_height = $height;\n $new_width = $width;\n } \n }\n \n # offset values (ie. center the resized image to canvas)\n $xoffset = ($_canvasWidth - $new_width) / 2;\n $yoffset = ($_canvasHeight - $new_height) / 2;\n \n $image_resized = imagecreatetruecolor($_canvasWidth, $_canvasHeight);\n \n # fill colour\n\tif ($color == 'white'){\n\t $fill_color = imagecolorallocate($image_resized, 255, 255, 255);\n\t}else if ($color == 'black'){\n\t\t$fill_color = imagecolorallocate($image_resized, 0, 0, 0);\n\t}else if ($color == 'tran'){\t\t\n\t\t$black = imagecolorallocate($image_resized, 0, 0, 0);\n\t\timagecolortransparent($fill_color, $black);\n\t\t//$fill_color = imagecolortransparent($image_resized);\n\t\t//$fill_color = $image_resized;\n\t}\n imagefill($image_resized, 0, 0, $fill_color);\n imagecopyresampled($image_resized, $_image, $xoffset, $yoffset, 0, 0, $new_width, $new_height, $width, $height);\n \n imagedestroy($_image);\n return $image_resized;\n}", "function fillArcTo($source, $from, $to, $radius)\r\n {\r\n $resp = \"\";\r\n $resp .= $this->_getJavascriptVar() . \".beginPath();\\n\";\r\n $resp .= $this->_getJavascriptVar() . \".moveTo(\".$source[0] .\", \". $source[1] . \");\\n\";\r\n $resp .= $this->_getJavascriptVar() . \".arcTo(\". $from[0] . \", \". $from[1] . \", \" . $to[0] .\", \". $to[1] .\", $radius);\\n\";\r\n $resp .= $this->_getJavascriptVar() . \".stroke();\\n\";\r\n\r\n return $resp;\r\n }", "function startProcessing(){\n\t\t$aPuntos = array();\n\t\t//lower left\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmin\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymax\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t//lower right\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmax\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymax\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t//upper right\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmax\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymin\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t//upper left\n\t\t$punto = array($this->convertXFromShpToMapWare($this->shp_data[\"xmin\"]), $this->convertYFromShpToMapWare($this->shp_data[\"ymin\"]) );\n\t\tarray_push($aPuntos, $punto);\n\t\t\n\t\t//cargar laimagen\n\t\t$imagePath = SATELITE_RESOURCES.$this->resources[\"folder\"].\"/\".$this->resources[\"imagename\"].\".jpg\";\n\t\t$image_original = imagecreatefromjpeg($imagePath) or die(\"no image defined\");\n\t\t//definir los niveles en los cuales se va a generar esta imagen de satelite\n\t\t$nivelInicial = ($this->resources[\"hd\"] == 1) ? 7 : 1;\n\t\t$nivelFinal = ($this->resources[\"hd\"] == 1) ? 14 : 9;\n\t\t//loop sobre los niveles\n\t\tfor($nivel=$nivelInicial; $nivel<=$nivelFinal; $nivel++){\n\t\t\t//actualizar datos globales por nivel\n\t\t\t$this->actualizarEscalaPorNivel($nivel);\n\t\t\t//\n\t\t\t$upperLeft = $this->getCuadroFromPoint($aPuntos[0][0], $aPuntos[0][1]);\n\t\t\t$lowerRight = $this->getCuadroFromPoint($aPuntos[2][0], $aPuntos[2][1]);\n\t\t\t//\n\t\t\t//info imagen sat\n\t\t\t$info = getimagesize($imagePath);\n\t\t\t//width en latitud y longitud de la imagen de satelite\n\t\t\t$satWidth = $aPuntos[1][0] - $aPuntos[0][0];\n\t\t\t$satHeight = $aPuntos[2][1] - $aPuntos[1][1];\n\t\t\t//width y height que debe tener la imagen de satelite en pixeles\n\t\t\t$pixelWidthSat = $satWidth / $this->escala;\n\t\t\t$pixelHeightSat = $satHeight / $this->escala;\n\t\t\t//escala correspondiente entre el pixelaje que debe tener y el real de la imagen de satelite\n\t\t\t$escalaImagenSatelite = $info[0] / $pixelWidthSat;\n\t\t\t//copio la imagen al tamaño que le corresponde en este nivel para evitar desfaces\n\t\t\t$image = imagecreatetruecolor(round($info[0]/$escalaImagenSatelite), round($info[1]/$escalaImagenSatelite)) or die(\"no se pudo crear la imagen para empezar\");\n\t\t\timagecopyresampled($image, $image_original, 0, 0, 0, 0, round($info[0]/$escalaImagenSatelite), round($info[1]/$escalaImagenSatelite), $info[0], $info[1]) or die(\"no se pudo generar copia a nivel\");\n\t\t\t//\n\t\t\techo \"************************Nivel\".$nivel.\"<br />\";\n\t\t\t//Si la imagen es de hd entonces se crea un padding (bufferSize) alrededor con imagen de satelite de bajar resolucion\n\t\t\t$bufferSize = ($this->resources[\"hd\"] == 1 && $nivel >= 10) ? 4 : 0;\n\t\t\t//creamos y guardamos las imagenes en la base de datos\n\t\t\t$this->crearGuardarImagenes($upperLeft, $lowerRight, $nivel, $this->resources[\"clave\"], \"satelite_originales\", $bufferSize, \"satelite\");\n\t\t\t//para todos los cuadros que toca la imagen de satelite\n\t\t\tfor($i=$upperLeft[0] - $bufferSize; $i<=$lowerRight[0] + $bufferSize; $i++){\n\t\t\t\tfor($j=$upperLeft[1] - $bufferSize; $j<=$lowerRight[1] + $bufferSize; $j++){\n\t\t\t\t\t//cuadro\n\t\t\t\t\t$square = array($i, $j);\n\t\t\t\t\t//ver si ya existe una imagen en estas coordenadas\n\t\t\t\t\t$query = \"select * from imagenes\n\t\t\t\t\twhere satelite_exists != '0' and i = '$i' and j = '$j' and nivel = '$nivel'\";\n\t\t\t\t\t$exists = mysql_query($query) or die($query);\n\t\t\t\t\t//crear nueva imagen\n\t\t\t\t\tif( mysql_num_rows($exists) != 0 ){\n\t\t\t\t\t\t//en caso de que ya existiera antes una imagen de satelite asociada\n\t\t\t\t\t\t$newImage = imagecreatefromjpeg(IMAGE_MAPWARE_URL.\"?clave=\".$i.\"_\".$j.\"_\".$nivel);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newImage = imagecreatetruecolor(200, 200);\n\t\t\t\t\t\t//de ser hd copiar sobre una imagen de lowDef ampliada\n\t\t\t\t\t\tif($this->resources[\"hd\"] == 1){\n\t\t\t\t\t\t\t// copiamos la imagen de sat de baja resolucion en esta imagen para que forme parte del buffer\n\t\t\t\t\t\t\t// puede que sea cubierta por la imagen de hd en donde esta se encuentre\n\t\t\t\t\t\t\t$lowDef_i = ceil( ($i+1)/pow(2, $nivel-8) ) - 1;\n\t\t\t\t\t\t\t$lowDef_j = ceil( ($j+1)/pow(2, $nivel-8) ) - 1;\n\t\t\t\t\t\t\t$query = \"select \n\t\t\t\t\t\t\tX(POINTN( EXTERIORRING( ENVELOPE( mysql_puntos ) ) , 1 ) ) as xmin, \n\t\t\t\t\t\t\tY(POINTN( EXTERIORRING( ENVELOPE( mysql_puntos ) ) , 1 ) ) as ymin \n\t\t\t\t\t\t\tfrom imagenes where i = $lowDef_i and j = $lowDef_j and nivel = 8\";\n\t\t\t\t\t\t\t$lowDef = mysql_fetch_array(mysql_query($query)) or die($query);\n\t\t\t\t\t\t\t//que tantas veces es mas grande la newImage que la de baja resolucion que se va a sacar\n\t\t\t\t\t\t\t$escala_ld = pow(2, $nivel-8);\t\n\t\t\t\t\t\t\t//sacar la imagen que se va a usar\n\t\t\t\t\t\t\t$image_ld = imagecreatefromjpeg(IMAGE_MAPWARE_URL.\"?clave=\".$lowDef_i.\"_\".$lowDef_j.\"_8\");\n\t\t\t\t\t\t\tif($image_ld != false){\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$destX_ld = ($lowDef[\"xmin\"] - $this->xmin - $square[0]*$this->squareSize*$this->escala) / $this->escala;\n\t\t\t\t\t\t\t\t$destY_ld = ($lowDef[\"ymin\"] - $this->ymin - $square[1]*$this->squareSize*$this->escala) / $this->escala;\n\t\t\t\t\t\t\t\t//\t\t\t\n\t\t\t\t\t\t\t\t$sourceX_ld = -1*$destX_ld;\n\t\t\t\t\t\t\t\t$sourceY_ld = -1*$destY_ld;\n\t\t\t\t\t\t\t\timagecopyresampled($newImage, $image_ld, 0, 0, round($sourceX_ld/$escala_ld), round($sourceY_ld/$escala_ld), 200, 200, round(200/$escala_ld), round(200/$escala_ld)) or die(\"no copy resampled\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//\n\t\t\t\t\t//\n\t\t\t\t\t//lugar que representa la esquina superior izqierda de la imagen de satelite dentro del cuadro, igual que en generar imagenes simplemente referenciamos una coordenada de latitud, longitud a la imagen de 200 px a dibujar\n\t\t\t\t\t$destX = $aPuntos[0][0] - ($this->xmin + $square[0]*$this->squareSize*$this->escala);\n\t\t\t\t\t$destX = round($destX/$this->escala);\n\t\t\t\t\t$destY = $aPuntos[0][1] - ($this->ymin + $square[1]*$this->squareSize*$this->escala);\n\t\t\t\t\t$destY = round($destY/$this->escala);\n\t\t\t\t\t//\n\t\t\t\t\t//sourceX y sourceY representan la esquina superior izquierda correspondiente a la imagen a \n\t\t\t\t\t//dibujar dentro de la imagen de satelite completa\n\t\t\t\t\t$sourceX = round(-1*$destX);\n\t\t\t\t\t$sourceY = round(-1*$destY);\n\t\t\t\t\tif($destX > 0){\n\t\t\t\t\t\t//ver cuanto hay que copiar, solo lo suficiente para llenar la imagen newImage\n\t\t\t\t\t\t//como sourceX es negativo ya que destX positivo\n\t\t\t\t\t\t$Width = min(round(210 + $sourceX), round($info[0]/$escalaImagenSatelite));\n\t\t\t\t\t\t//\n\t\t\t\t\t\tif($destY > 0){\n\t\t\t\t\t\t\t$Height = min(round(210 + $sourceY), round($info[1]/$escalaImagenSatelite));\n\t\t\t\t\t\t\t//copiar el pedazo de imagen correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, $destX, $destY, 0, 0, $Width, $Height) or die(\"no image copy\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$Height= min(210, round($info[1]/$escalaImagenSatelite- $sourceY));\n\t\t\t\t\t\t\t//copiar el pedazo de imagen correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, $destX, 0, 0, $sourceY, $Width, $Height) or die(\"no image copy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//ver cuanto hay que coipar, solo lo suficiente para llenar la imagen newImage no mas\n\t\t\t\t\t\t$Width = min(210, round($info[0]/$escalaImagenSatelite - $sourceX));\n\t\t\t\t\t\t//\n\t\t\t\t\t\tif($destY > 0){\n\t\t\t\t\t\t\t$Height = min(round(210 + $sourceY), round($info[1]/$escalaImagenSatelite));\n\t\t\t\t\t\t\t//copiar el pedazo correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, 0, $destY, $sourceX, 0, $Width, $Height) or die(\"no image copy\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$Height= min(210, round($info[1]/$escalaImagenSatelite- $sourceY));\n\t\t\t\t\t\t\t//copiar el pedazo correspondiente\n\t\t\t\t\t\t\timagecopy($newImage, $image, 0, 0, $sourceX, $sourceY, $Width, $Height) or die(\"no image copy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//set compression level = 3\n\t\t\t\t\t$archivo = \"temporales/satelite_temporal.jpg\";\n\t\t\t\t\timagejpeg($newImage, $archivo, 90);\n\t\t\t\t\tchmod($archivo, 0777);\n\t\t\t\t\t//tomar la informacion del archivo e ingresarla a la base de datos\n\t\t\t\t\t$file = mysql_real_escape_string(file_get_contents($archivo));\n\t\t\t\t\t//guardar en base de datos que la imagen ya fue dibujada\n\t\t\t\t\t$query = \"UPDATE `imagenes`\n\t\t\t\t\tSET `satelite` = '$file', `satelite_exists` = '1'\n\t\t\t\t\tWHERE `i` = '\".$i.\"' and `j` = '\".$j.\"' \n\t\t\t\t\tand `nivel` = '\".$nivel.\"'\";\n\t\t\t\t\tmysql_query($query) or die($query);\n\t\t\t\t}\n\t\t\t}\n\t\t}//cierre del for de niveles\n\t\t//\n\t\t//actualizar el campo de generado para no volver a usar esta imagen\n\t\t$query = \"update satelite_originales set generada = 1 where clave = '\".$this->resources[\"clave\"].\"'\";\n\t\tmysql_query($query) or die($query);\n\t}", "public function execute()\n\t{\n\t\t$outputPath = null != $this->outputPath ? $this->outputPath : $this->imagePath;\n\t\t$dotPos = stripos($outputPath, '.');\n\t\t$path = substr($outputPath, 0, $dotPos);\n\t\t$ext = substr($outputPath, $dotPos+1);\n\t\t\n\t\t$this->setDensities();\n\t\t\n\t\t$filter = $this->imagine instanceof \\Imagine\\Imagick\\Imagine \n\t\t ? \\Imagine\\Image\\ImageInterface::FILTER_POINT \n\t\t : \\Imagine\\Image\\ImageInterface::FILTER_UNDEFINED;\n\t\t \n\t\tforeach ($this->densities as $dens => $size) {\n\t\t\t$this->imagine->open($this->imagePath)\n\t\t\t ->resize(new \\Imagine\\Image\\Box($size[0], $size[1]), $filter)\n\t\t\t ->save($path.'-'.$dens.'.'.$ext, array($this->compressionType => $this->compressionValue));\n\t\t}\n\t}", "public function run()\n {\n $L = 50;\n $position = [\"lat\" => -13.929307, \"lng\" => -78.074548,];\n $position2 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*3, 90);\n $position3 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*sqrt(3), 120);\n\n //for ($i=0; $i < 2000; $i++) {\n for ($i=0; $i < 2000; $i++) {\n $this->rawHexagon($position2, $L, 4000);\n $this->rawHexagon($position3, $L, 4000);\n echo(\"Step :\".$i.\"\\n\");\n $position = $position2;\n $position2 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*3, 90);\n $position3 = \\GeometryLibrary\\SphericalUtil::computeOffset($position, $L*sqrt(3), 120);\n }\n\n\n }", "private function _setOrigin($output_projection)\n {\n $lambert_projections = array('esri:102009', 'esri:102015', 'esri:102014', 'esri:102102', 'esri:102024', 'epsg:3112');\n if (in_array($this->projection, $lambert_projections) && $this->origin && ($this->origin >= -180) && ($this->origin <= 180)) {\n self::$accepted_projections[$output_projection]['proj'] = preg_replace('/lon_0=(.*?),/', 'lon_0='.$this->origin.',', self::getProjection($output_projection));\n }\n }", "public function load()\n {\n $placement = $this->createPoint($this->x, $this->y);\n $size = $this->createBox($this->width, $this->height);\n $background = $this->createColor($this->background);\n return new Canvas($this->factory, $size, $placement, $background);\n }", "private function _paintCanvas(&$image) {\n\t\tif ($this->params['type'] === IMAGETYPE_JPEG) {\n\t\t\tif (\n\t\t\t\t!$this->params['crop'] ||\n\t\t\t\t!$this->params['grow']\n\t\t\t) {\n\t\t\t\t$this->_paintCanvasOpaque($image);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->_paintCanvasTransparent($image);\n\t\t}\n\t}", "public static function mouseCenter() {\n self::mouseMove(array('polar'), 0, 0);\n }", "public function crop()\n {\n }", "public function projectPoints($pts) {\n\t\tif (preg_match('/^UTM/',$this->coordinate_type)) {\n\t\t\tforeach ($pts as $i=>$pt) {\n\t\t\t\t$latlon = $this->utm2latlon($pts[$i][0], $pts[$i][1],$this->utm_zone);\n\t\t\t\t$pts[$i] = array(\n\t\t\t\t\t\tround($latlon['longitude'],6),\n\t\t\t\t\t\tround($latlon['latitude'],6)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "function draw(): void\n {\n echo \"Circle::draw() <br>\";\n }", "protected function _do_crop($width, $height, $offset_x, $offset_y)\n {\n $image = $this->_create($width, $height);\n\n // Loads image if not yet loaded\n $this->_load_image();\n\n // Execute the crop\n if (imagecopyresampled($image, $this->_image, 0, 0, $offset_x, $offset_y, $width, $height, $width, $height))\n {\n // Swap the new image for the old one\n imagedestroy($this->_image);\n $this->_image = $image;\n\n // Reset the width and height\n $this->width = imagesx($image);\n $this->height = imagesy($image);\n }\n }", "function frame(&$tmp, $width, $height, $color=null) {\r\r\n\t\t\r\r\n\t\t// color ?\r\r\n\t\t//\r\r\n\t\tif (!is_a($color, 'Asido_Color')) {\r\r\n\t\t\t$color = new Asido_Color;\r\r\n\t\t\t$color->set(255, 255, 255);\r\r\n\t\t\t}\r\r\n\t\t\r\r\n\t\t// resize it\r\r\n\t\t//\r\r\n\t\tif (!$this->resize($tmp, $width, $height, ASIDO_RESIZE_FIT)) {\r\r\n\t\t\treturn false;\r\r\n\t\t\t}\r\r\n\t\t\r\r\n\t\t// get canvas\r\r\n\t\t//\r\r\n\t\tif (!$t2 = $this->__canvas($width, $height, $color)) {\r\r\n\t\t\ttrigger_error(\r\r\n\t\t\t\tsprintf(\r\r\n\t\t\t\t\t'Unable to get a canvas '\r\r\n\t\t\t\t\t\t. ' with %s pixels '\r\r\n\t\t\t\t\t\t. ' width and %s '\r\r\n\t\t\t\t\t\t. ' pixels height',\r\r\n\t\t\t\t\t$width, $height\r\r\n\t\t\t\t\t),\r\r\n\t\t\t\tE_USER_WARNING\r\r\n\t\t\t\t);\r\r\n\t\t\treturn false;\r\r\n\t\t\t}\r\r\n\t\t\r\r\n\t\t// target\r\r\n\t\t//\r\r\n\t\t$t3 = new Asido_TMP;\r\r\n\t\t$t3->source =& $tmp->target;\r\r\n\t\t$t3->image_width = $tmp->image_width;\r\r\n\t\t$t3->image_height = $tmp->image_height;\r\r\n\t\t\r\r\n\t\t// apply the image\r\r\n\t\t//\r\r\n\t\tif (!$this->__copy(\r\r\n\t\t\t$t2, $t3,\r\r\n\t\t\tround(($t2->image_width - $t3->image_width)/2),\r\r\n\t\t\tround(($t2->image_height - $t3->image_height)/2)\r\r\n\t\t\t)) {\r\r\n\t\t\ttrigger_error(\r\r\n\t\t\t\t'Failed to copy to the passepartout image',\r\r\n\t\t\t\tE_USER_WARNING\r\r\n\t\t\t\t);\r\r\n\t\t\treturn false;\r\r\n\t\t\t}\r\r\n\t\t\r\r\n\t\t// cook the result\r\r\n\t\t//\r\r\n\t\t$this->__destroy_target($tmp);\r\r\n\t\t$tmp->target = $t2->target;\r\r\n\t\t$tmp->image_width = $t2->image_width;\r\r\n\t\t$tmp->image_height = $t2->image_height;\r\r\n\t\t\r\r\n\t\treturn true;\r\r\n\t\t}", "public function setUp() {\n $this->transformation = new Clip();\n\n $user = 'user';\n $imageIdentifier = 'imageIdentifier';\n $blob = file_get_contents(FIXTURES_DIR . '/jpeg-with-multiple-paths.jpg');\n\n $this->image = $this->createMock('Imbo\\Model\\Image');\n $this->image->expects($this->any())->method('getImageIdentifier')->will($this->returnValue($imageIdentifier));\n $this->image->expects($this->any())->method('getUser')->will($this->returnValue($user));\n\n $database = $this->createMock('Imbo\\Database\\DatabaseInterface');\n $database->expects($this->any())->method('getMetadata')->with($user, $imageIdentifier)->will($this->returnValue([\n 'paths' => ['House', 'Panda'],\n ]));\n\n $event = $this->createMock('Imbo\\EventManager\\Event');\n $event->expects($this->any())->method('getDatabase')->will($this->returnValue($database));\n\n $this->transformation->setEvent($event);\n $this->transformation->setImage($this->image);\n\n $this->imagick = new Imagick();\n $this->imagick->readImageBlob($blob);\n $this->transformation->setImagick($this->imagick);\n }", "public function getAllProjections()\n {\n try{\n return $this->projDao->getAllProjections();\n }\n catch(Exception $e){\n $message=\"Error getting the projections.\";\n include(VIEWS_PATH.\"message_view.php\");\n }\n }", "public function showProjectionsList(){\n $locContro=new LocationController();\n $gencontr=new GenreController();\n try{\n $projectionList=$this->projDao->getAllProjectionsGroup();\n $genres=$gencontr->getAll();\n $provinces=$locContro->getAllProvinces();\n $initCities=$locContro->getCitiesByProvince(1);\n include(VIEWS_PATH.\"movies_list.php\");\n }\n catch(Exception $e){\n $message=\"Projections are not currently available.\";\n include(VIEWS_PATH.\"message_view.php\");\n }\n }", "protected function project($input)\n {\n if ($this->projection === null) {\n return $input;\n }\n\n try {\n $output = i\\function_call($this->jmespath, $this->projection, $input);\n } catch (\\JmesPath\\SyntaxErrorException $e) {\n throw new \\RuntimeException(\"JMESPath projection failed: \" . $e->getMessage(), 0, $e);\n }\n\n return i\\type_cast($output, 'object');\n }", "private function _renderToImageData(&$canvas) {\n\t\tob_start();\n\n\t\tswitch ($this->params['type']) {\n\t\t\tcase IMAGETYPE_GIF:\n\t\t\t\timagegif($canvas);\n\t\t\tbreak;\n\t\t\tcase IMAGETYPE_JPEG:\n\t\t\t\timagejpeg($canvas, null, $this->params['quality']);\n\t\t\tbreak;\n\t\t\tcase IMAGETYPE_PNG:\n\t\t\t\t//\tcalculate PNG quality, because it runs from 0 (uncompressed) to 9, instead of 0 - 100.\n\t\t\t\t$pngQuality = ($this->params['quality'] - 100) / 11.111111;\n\t\t\t\t$pngQuality = round(abs($pngQuality));\n\t\t\t\timagepng($canvas, null, $pngQuality, NULL);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Exception('Sorry, this image type is not supported');\n\t\t}\n\n\t\t$imgData = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $imgData;\n\t}", "public function getProjection()\n {\n return $this->_projection;\n }", "function _paintJS()\r\n {\r\n\r\n $penwidth = max($this->Pen->Width, 1);\r\n\r\n switch ($this->_shape)\r\n {\r\n case stCircle:\r\n case stSquare:\r\n case stRoundSquare:\r\n // need to center the shape\r\n $size = min($this->Width, $this->Height) / 2 - $penwidth * 4;\r\n $xc= ($this->Width/2);\r\n $yc= ($this->Height/2);\r\n $x1 = $xc - $size;\r\n $y1 = $yc - $size;\r\n $x2= $xc + $size;\r\n $y2= $yc + $size;\r\n break;\r\n default:\r\n $x1=$penwidth;\r\n $y1=$penwidth;\r\n $x2=max($this->Width, 2) - $penwidth * 2;\r\n $y2=max($this->Height, 2) - $penwidth * 2;\r\n $size=max($x2, $y2);\r\n break;\r\n };\r\n\r\n $w = max($this->Width, 1);\r\n $h = max($this->Height, 1);\r\n\r\n // need to center the shape\r\n $size = min($this->Width, $this->Height) / 2 - $penwidth * 4;\r\n $result = \"\";\r\n switch ($this->_shape)\r\n {\r\n case stRectangle:\r\n case stSquare:\r\n $result .= $this->FillRect($x1, $y1, $x2, $y2);\r\n $result .= $this->Rectangle($x1, $y1, $x2, $y2);\r\n break;\r\n case stRoundRect:\r\n case stRoundSquare:\r\n if ($w < $h) $s = $w;\r\n else $s = $h;\r\n\r\n $result .= $this->RoundRect($x1, $y1, $x2, $y2);\r\n break;\r\n case stCircle:\r\n $xc = $this->Width / 2;\r\n $yc = $this->Height / 2;\r\n if ($w < $h) $radius = ($w/2)-5;\r\n else $radius = ($h/2)-5;\r\n\r\n $result .= $this->Circle($xc, $yc, $radius);\r\n break;\r\n case stEllipse:\r\n $x = 5;\r\n $y = 5;\r\n $result .= $this->Ellipse($x, $y, $this->Width-10, $this->Height-10);\r\n break;\r\n }\r\n return $result;\r\n }", "function beginDraw()\r\n {\r\n echo \"<script type=\\\"text/javascript\\\">\\n\";\r\n echo \" var cnv=findObj('$this->_object');\\n\";\r\n echo \" if (cnv==null) cnv=findObj('{$this->_object}_outer');\\n\";\r\n echo \" var $this->_canvas = new jsGraphics(cnv);\\n\";\r\n $this->_canvas= \" \" . $this->_canvas;\r\n }", "public function display() { ImageLib::serve($this->source_image, $this->source_image_mimetype); }", "private function _addOmittedCanvasDimension() {\n\t\t$sourceWidth = $this->params['sourceWidth'];\n\t\t$sourceHeight = $this->params['sourceHeight'];\n\t\t$sourceRatio = $sourceWidth / $sourceHeight;\n\n\t\tif (\n\t\t\tempty($this->params['w']) &&\n\t\t\tempty($this->params['h'])\n\t\t) {\n\t\t\t$this->params['w'] = $sourceWidth;\n\t\t\t$this->params['h'] = $sourceHeight;\n\t\t} elseif (empty($this->params['h'])) {\n\t\t\tif (\n\t\t\t\t!$this->params['grow'] &&\n\t\t\t\t$this->params['w'] > $sourceWidth\n\t\t\t) {\n\t\t\t\t$this->params['h'] = $sourceHeight;\n\t\t\t} else {\n\t\t\t\t$this->params['h'] = $this->params['w'] / $sourceRatio;\n\t\t\t}\n\t\t} elseif (empty($this->params['w'])) {\n\t\t\tif (\n\t\t\t\t!$this->params['grow'] &&\n\t\t\t\t$this->params['h'] > $sourceHeight\n\t\t\t) {\n\t\t\t\t$this->params['w'] = $sourceWidth;\n\t\t\t} else {\n\t\t\t\t$this->params['w'] = $this->params['h'] * $sourceRatio;\n\t\t\t}\n\t\t}\n\t}", "abstract public function coordinates();", "public function getProjection()\n {\n return $this->projection;\n }", "public function withProjection(SQLRenderable $projection, $alias= '') {\n $crit= clone($this);\n return $crit->setProjection($projection, $alias);\n }", "function assignTo($dest)\r\n {\r\n $dest->setCols($this->getCols());\r\n $dest->setRows($this->getRows());\r\n $dest->setType($this->getType());\r\n $dest->setUsePixelTrans($this->getUsePixelTrans());\r\n }", "public static function crop(){\n\n}", "public function setProjectionFilter(&$var)\n {\n GPBUtil::checkMessage($var, \\Accountgroup\\V1\\ProjectionFilter::class);\n $this->projection_filter = $var;\n }", "public function run() {\n\n // make enough memory available to scale bigger images\n ini_set('memory_limit', $this->thumb->options['memory']);\n \n // create the gd lib image object\n switch($this->thumb->image->mime()) {\n case 'image/jpeg':\n $image = @imagecreatefromjpeg($this->thumb->image->root()); \n break;\n case 'image/png':\n $image = @imagecreatefrompng($this->thumb->image->root()); \n break;\n case 'image/gif':\n $image = @imagecreatefromgif($this->thumb->image->root()); \n break;\n default:\n raise('The image mime type is invalid');\n break;\n } \n\n // check for a valid created image object\n if(!$image) raise('The image could not be created');\n\n // cropping stuff needs a couple more steps \n if($this->thumb->options['crop'] == true) {\n\n // Starting point of crop\n $startX = floor($this->thumb->tmp->width() / 2) - floor($this->thumb->result->width() / 2);\n $startY = floor($this->thumb->tmp->height() / 2) - floor($this->thumb->result->height() / 2);\n \n // Adjust crop size if the image is too small\n if($startX < 0) $startX = 0;\n if($startY < 0) $startY = 0;\n \n // create a temporary resized version of the image first\n $thumb = imagecreatetruecolor($this->thumb->tmp->width(), $this->thumb->tmp->height()); \n $thumb = $this->keepColor($thumb);\n imagecopyresampled($thumb, $image, 0, 0, 0, 0, $this->thumb->tmp->width(), $this->thumb->tmp->height(), $this->thumb->source->width(), $this->thumb->source->height()); \n \n // crop that image afterwards \n $cropped = imagecreatetruecolor($this->thumb->result->width(), $this->thumb->result->height()); \n $cropped = $this->keepColor($cropped);\n imagecopyresampled($cropped, $thumb, 0, 0, $startX, $startY, $this->thumb->tmp->width(), $this->thumb->tmp->height(), $this->thumb->tmp->width(), $this->thumb->tmp->height()); \n imagedestroy($thumb);\n \n // reasign the variable\n $thumb = $cropped;\n\n } else {\n $thumb = imagecreatetruecolor($this->thumb->result->width(), $this->thumb->result->height()); \n $thumb = $this->keepColor($thumb);\n imagecopyresampled($thumb, $image, 0, 0, 0, 0, $this->thumb->result->width(), $this->thumb->result->height(), $this->thumb->source->width(), $this->thumb->source->height()); \n } \n \n // convert the thumbnail to grayscale \n if($this->thumb->options['grayscale']) {\n imagefilter($thumb, IMG_FILTER_GRAYSCALE);\n }\n\n // convert the image to a different format\n if($this->thumb->options['to']) {\n\n switch($this->thumb->options['to']) {\n case 'jpg': \n imagejpeg($thumb, $this->thumb->root(), $this->thumb->options['quality']); \n break;\n case 'png': \n imagepng($thumb, $this->thumb->root(), 0); \n break; \n case 'gif': \n imagegif($thumb, $this->thumb->root()); \n break; \n }\n\n // keep the original file's format\n } else {\n\n switch($this->thumb->image->mime()) {\n case 'image/jpeg': \n imagejpeg($thumb, $this->thumb->root(), $this->thumb->options['quality']); \n break;\n case 'image/png': \n imagepng($thumb, $this->thumb->root(), 0); \n break; \n case 'image/gif': \n imagegif($thumb, $this->thumb->root()); \n break;\n }\n\n }\n\n imagedestroy($thumb);\n \n }", "public function map($name, $source) {\n $this->map[$this->collection][$name] = $source;\n return $this;\n }", "public function update($x1,$y1,$a1,$z1,$x2,$y2,$a2,$z2,$x3,$y3,$a3,$z3,$x4,$y4,$a4,$z4,$x5,$y5,$a5,$z5,\n $x6,$y6,$a6,$z6,$x7,$y7,$a7,$z7,$x8,$y8,$a8,$z8,$x9,$y9,$a9,$z9,$x10,$y10,$a10,$z10,$x11,$y11,$a11,$z11,\n $x12,$y12,$a12,$z12,$x13,$y13,$a13,$z13,$x14,$y14,$a14,$z14,$x15,$y15,$a15,$z15,$x16,$y16,$a16,$z16)\n {\n $origenes = origenes::find(1);\n $origenesuto = origenesuto::find(1);\n if ($origenes != NULL){\n $origenes->x1=$x1;\n $origenes->y1=$y1;\n $origenes->a1=$a1;\n $origenes->z1=$z1;\n $origenes->x2=$x2;\n $origenes->y2=$y2;\n $origenes->a2=$a2;\n $origenes->z2=$z2;\n $origenes->x3=$x3;\n $origenes->y3=$y3;\n $origenes->a3=$a3;\n $origenes->z3=$z3;\n $origenes->x4=$x4;\n $origenes->y4=$y4;\n $origenes->a4=$a4;\n $origenes->z4=$z4;\n $origenes->x5=$x5;\n $origenes->y5=$y5;\n $origenes->a5=$a5;\n $origenes->z5=$z5;\n $origenes->x6=$x6;\n $origenes->y6=$y6;\n $origenes->a6=$a6;\n $origenes->z6=$z6;\n $origenes->x7=$x7;\n $origenes->y7=$y7;\n $origenes->a7=$a7;\n $origenes->z7=$z7;\n $origenes->x8=$x8;\n $origenes->y8=$y8;\n $origenes->a8=$a8;\n $origenes->z8=$z8;\n $origenes->x9=$x9;\n $origenes->y9=$y9;\n $origenes->a9=$a9;\n $origenes->z9=$z9;\n $origenes->x10=$x10;\n $origenes->y10=$y10;\n $origenes->a10=$a10;\n $origenes->z10=$z10;\n $origenes->x11=$x11;\n $origenes->y11=$y11;\n $origenes->a11=$a11;\n $origenes->z11=$z11;\n $origenes->x12=$x12;\n $origenes->y12=$y12;\n $origenes->a12=$a12;\n $origenes->z12=$z12;\n $origenes->x13=$x13;\n $origenes->y13=$y13;\n $origenes->a13=$a13;\n $origenes->z13=$z13;\n $origenes->x14=$x14;\n $origenes->y14=$y14;\n $origenes->a14=$a14;\n $origenes->z14=$z14;\n $origenes->x15=$x15;\n $origenes->y15=$y15;\n $origenes->a15=$a15;\n $origenes->z15=$z15;\n $origenes->x16=$x16;\n $origenes->y16=$y16;\n $origenes->a16=$a16;\n $origenes->z16=$z16;\n $origenesuto->x1=$x1;\n $origenesuto->y1=$y1;\n $origenesuto->a1=$a1;\n $origenesuto->z1=$z1;\n $origenesuto->x2=$x2;\n $origenesuto->y2=$y2;\n $origenesuto->a2=$a2;\n $origenesuto->z2=$z2;\n $origenesuto->x3=$x3;\n $origenesuto->y3=$y3;\n $origenesuto->a3=$a3;\n $origenesuto->z3=$z3;\n $origenesuto->x4=$x4;\n $origenesuto->y4=$y4;\n $origenesuto->a4=$a4;\n $origenesuto->z4=$z4;\n $origenesuto->x5=$x5;\n $origenesuto->y5=$y5;\n $origenesuto->a5=$a5;\n $origenesuto->z5=$z5;\n $origenesuto->x6=$x6;\n $origenesuto->y6=$y6;\n $origenesuto->a6=$a6;\n $origenesuto->z6=$z6;\n $origenesuto->x7=$x7;\n $origenesuto->y7=$y7;\n $origenesuto->a7=$a7;\n $origenesuto->z7=$z7;\n $origenesuto->x8=$x8;\n $origenesuto->y8=$y8;\n $origenesuto->a8=$a8;\n $origenesuto->z8=$z8;\n $origenesuto->x9=$x9;\n $origenesuto->y9=$y9;\n $origenesuto->a9=$a9;\n $origenesuto->z9=$z9;\n $origenesuto->x10=$x10;\n $origenesuto->y10=$y10;\n $origenesuto->a10=$a10;\n $origenesuto->z10=$z10;\n $origenesuto->x11=$x11;\n $origenesuto->y11=$y11;\n $origenesuto->a11=$a11;\n $origenesuto->z11=$z11;\n $origenesuto->x12=$x12;\n $origenesuto->y12=$y12;\n $origenesuto->a12=$a12;\n $origenesuto->z12=$z12;\n $origenesuto->x13=$x13;\n $origenesuto->y13=$y13;\n $origenesuto->a13=$a13;\n $origenesuto->z13=$z13;\n $origenesuto->x14=$x14;\n $origenesuto->y14=$y14;\n $origenesuto->a14=$a14;\n $origenesuto->z14=$z14;\n $origenesuto->x15=$x15;\n $origenesuto->y15=$y15;\n $origenesuto->a15=$a15;\n $origenesuto->z15=$z15;\n $origenesuto->x16=$x16;\n $origenesuto->y16=$y16;\n $origenesuto->a16=$a16;\n $origenesuto->z16=$z16;\n\n \n \n $origenes->save();\n $origenesuto->save();\n }\n else{\n \n $origenes = new origenes;\n $origenesuto = new origenesuto;\n\n $origenes->x1=$x1;\n $origenes->y1=$y1;\n $origenes->a1=$a1;\n $origenes->z1=$z1;\n $origenes->x2=$x2;\n $origenes->y2=$y2;\n $origenes->a2=$a2;\n $origenes->z2=$z2;\n $origenes->x3=$x3;\n $origenes->y3=$y3;\n $origenes->a3=$a3;\n $origenes->z3=$z3;\n $origenes->x4=$x4;\n $origenes->y4=$y4;\n $origenes->a4=$a4;\n $origenes->z4=$z4;\n $origenes->x5=$x5;\n $origenes->y5=$y5;\n $origenes->a5=$a5;\n $origenes->z5=$z5;\n $origenes->x6=$x6;\n $origenes->y6=$y6;\n $origenes->a6=$a6;\n $origenes->z6=$z6;\n $origenes->x7=$x7;\n $origenes->y7=$y7;\n $origenes->a7=$a7;\n $origenes->z7=$z7;\n $origenes->x8=$x8;\n $origenes->y8=$y8;\n $origenes->a8=$a8;\n $origenes->z8=$z8;\n $origenes->x9=$x9;\n $origenes->y9=$y9;\n $origenes->a9=$a9;\n $origenes->z9=$z9;\n $origenes->x10=$x10;\n $origenes->y10=$y10;\n $origenes->a10=$a10;\n $origenes->z10=$z10;\n $origenes->x11=$x11;\n $origenes->y11=$y11;\n $origenes->a11=$a11;\n $origenes->z11=$z11;\n $origenes->x12=$x12;\n $origenes->y12=$y12;\n $origenes->a12=$a12;\n $origenes->z12=$z12;\n $origenes->x13=$x13;\n $origenes->y13=$y13;\n $origenes->a13=$a13;\n $origenes->z13=$z13;\n $origenes->x14=$x14;\n $origenes->y14=$y14;\n $origenes->a14=$a14;\n $origenes->z14=$z14;\n $origenes->x15=$x15;\n $origenes->y15=$y15;\n $origenes->a15=$a15;\n $origenes->z15=$z15;\n $origenes->x16=$x16;\n $origenes->y16=$y16;\n $origenes->a16=$a16;\n $origenes->z16=$z16;\n $origenes->xactivo=0;\n $origenes->yactivo=0;\n $origenes->aactivo=0;\n $origenes->zactivo=0;\n $origenes->coordactivas=0;\n $origenesuto->x1=$x1;\n $origenesuto->y1=$y1;\n $origenesuto->a1=$a1;\n $origenesuto->z1=$z1;\n $origenesuto->x2=$x2;\n $origenesuto->y2=$y2;\n $origenesuto->a2=$a2;\n $origenesuto->z2=$z2;\n $origenesuto->x3=$x3;\n $origenesuto->y3=$y3;\n $origenesuto->a3=$a3;\n $origenesuto->z3=$z3;\n $origenesuto->x4=$x4;\n $origenesuto->y4=$y4;\n $origenesuto->a4=$a4;\n $origenesuto->z4=$z4;\n $origenesuto->x5=$x5;\n $origenesuto->y5=$y5;\n $origenesuto->a5=$a5;\n $origenesuto->z5=$z5;\n $origenesuto->x6=$x6;\n $origenesuto->y6=$y6;\n $origenesuto->a6=$a6;\n $origenesuto->z6=$z6;\n $origenesuto->x7=$x7;\n $origenesuto->y7=$y7;\n $origenesuto->a7=$a7;\n $origenesuto->z7=$z7;\n $origenesuto->x8=$x8;\n $origenesuto->y8=$y8;\n $origenesuto->a8=$a8;\n $origenesuto->z8=$z8;\n $origenesuto->x9=$x9;\n $origenesuto->y9=$y9;\n $origenesuto->a9=$a9;\n $origenesuto->z9=$z9;\n $origenesuto->x10=$x10;\n $origenesuto->y10=$y10;\n $origenesuto->a10=$a10;\n $origenesuto->z10=$z10;\n $origenesuto->x11=$x11;\n $origenesuto->y11=$y11;\n $origenesuto->a11=$a11;\n $origenesuto->z11=$z11;\n $origenesuto->x12=$x12;\n $origenesuto->y12=$y12;\n $origenesuto->a12=$a12;\n $origenesuto->z12=$z12;\n $origenesuto->x13=$x13;\n $origenesuto->y13=$y13;\n $origenesuto->a13=$a13;\n $origenesuto->z13=$z13;\n $origenesuto->x14=$x14;\n $origenesuto->y14=$y14;\n $origenesuto->a14=$a14;\n $origenesuto->z14=$z14;\n $origenesuto->x15=$x15;\n $origenesuto->y15=$y15;\n $origenesuto->a15=$a15;\n $origenesuto->z15=$z15;\n $origenesuto->x16=$x16;\n $origenesuto->y16=$y16;\n $origenesuto->a16=$a16;\n $origenesuto->z16=$z16;\n $origenesuto->save();\n $origenes->save();\n \n\n }\n\n }", "abstract public function calculateCropBoxCoordinates();", "public function __construct( $image_path ) {\r\n\t\t$image = imagecreatefromjpeg( $image_path );\r\n\r\n\t\t/* get image size ... */\r\n\t\t$x = imagesx( $image );\r\n\t\t$y = imagesy( $image );\r\n\r\n\t\t/* diameter of the circle is always the smaller side ... */\r\n\t\t$this->diameter = $x > $y ? $y : $x;\r\n\r\n\t\t/* radius is half a diameter ... am i must explain this ...? */\r\n\t\t$this->radius = $this->diameter / 2;\r\n\r\n\t\t/* save the original image ... */\r\n\t\t$this->original_image = $image;\r\n\r\n\t\t/* create new canvas to save our work ... */\r\n\t\t$this->create_blank_image();\r\n\r\n\t\t/* PAINTING TIME ... */\r\n\t\t$this->read_the_original_image_and_write();\r\n\r\n\t\t/* i'm positively bursting to see what we have done ... */\r\n\t}", "protected function _drawText(\\SetaPDF_Core_Canvas $canvas, $x, $y) {}", "public function draw()\n {\n echo \"画一个 {$this->color->run()} 的正方形\";\n }", "private function crunch($x, $y) {\n // Subtract one b/c the row and column keys start at 0.\n $max_index = $this->options['grid_size'] - 1;\n // All of the calculations assume that x and y are in the grid, so we need\n // to throw an exception if they are not.\n if ($x > $max_index * $this->options['x_increm'] ||\n $y > $max_index * $this->options['y_increm']\n ) {\n throw new InvalidArgumentException('Invalid coordinates'); \n }\n \n $row_num = round($x / $this->options['x_increm']);\n $col_num = round($y / $this->options['y_increm']);\n $next_row_num = $row_num < $max_index ? $row_num + 1 : $row_num - 1;\n $next_col_num = $col_num < $max_index ? $col_num + 1 : $col_num - 1;\n\n $data = &$this->data;\n $data->closestPoint = $this->fetchPoint($this->points[\"{$row_num}:{$col_num}\"], $x, $y);\n $data->swingX = $this->fetchPoint($this->points[\"{$next_row_num}:{$col_num}\"], $x, $y);\n $data->swingY = $this->fetchPoint($this->points[\"{$row_num}:{$next_col_num}\"], $x, $y);\n $this->weightedAverage($data);\n }", "public function process()\n\t{\n\t\t$aAlbum = $this->getParam(\"aAlbum\");\n\t\t$aConditions = array();\n\t\t$aConditions[] = 'p.album_id = ' . $aAlbum['album_id'] . '';\n\t\tlist($iCnt, $aPhotos) = Phpfox::getService('advancedphoto')->get($aConditions, 'p.yn_ordering DESC', 0, 9999);\n\t\t$aAlbum = Phpfox::getService('advancedphoto.album')->getForView($aAlbum['album_id']);\n\t\tforeach ($aPhotos as $aPhoto)\n\t\t{\n\t\t\tPhpfox::getService(\"advancedphoto.process\")->cropCenterlize($aPhoto[\"destination\"], $aPhoto[\"width\"], $aPhoto[\"height\"]);\n\t\t}\n\n\t\t$this->template()->assign(array(\n\t\t\t'aPhotos' => $aPhotos,\n\t\t\t'aForms' => $aAlbum,\n\t\t));\n\t}", "public function createCircle($cx, $cy, $width, $height, $start, $end){\n imagearc($this->img, $cx, $cy, $width, $height, $start, $end, $this->color);\t\n }", "public function run()\r\n {\r\n $this->spaceShip->navigateTo($this->destination['x'], $this->destination['y'], $this->destination['z']);\r\n }", "public function cropAction()\n {\n $candidate = $this->getRequest()->server->get('HTTP_REFERER');\n\n // make sure we get back to product page (fallback to admin home)\n if (strpos($candidate, '/product/product/') !== false) {\n $return_path = $candidate;\n $this->getRequest()->getSession()->set('crop_return_path', $return_path);\n } else {\n $return_path = $this->getRequest()->getSession()->get('crop_return_path');\n if (empty($return_path)) {\n $return_path = '/admin/dashboard';\n }\n }\n\n $path = $this->getRequest()->get('path');\n\n $source_path = $this->container->getParameter('kernel.root_dir') . \"/../web\" . $this->getRequest()->get('src');\n list( $source_width, $source_height, $source_type ) = getimagesize($source_path);\n\n if ($this->getRequest()->isMethod('post')) {\n\n $vector = $this->getRequest()->get('v');\n\n switch ( $source_type )\n {\n case IMAGETYPE_GIF:\n $source_gdim = imagecreatefromgif($source_path);\n break;\n\n case IMAGETYPE_JPEG:\n $source_gdim = imagecreatefromjpeg($source_path);\n break;\n\n case IMAGETYPE_PNG:\n $source_gdim = imagecreatefrompng($source_path);\n break;\n }\n\n $width = $vector[2] - $vector[0];\n $height = $vector[3] - $vector[1];\n\n // if crop makes sense\n if ($width < $source_width) {\n $dest = imagecreatetruecolor($width, $height);\n imagecopy($dest, $source_gdim, 0, 0, $vector[0], $vector[1], $width, $height);\n\n switch ( $source_type )\n {\n case IMAGETYPE_GIF:\n imagegif($dest, $source_path);\n break;\n\n case IMAGETYPE_JPEG:\n imagejpeg($dest, $source_path);\n break;\n\n case IMAGETYPE_PNG:\n imagepng($dest, $source_path);\n break;\n }\n\n // use new width for rendering\n list( $source_width, $source_height, $source_type ) = getimagesize($source_path);\n\n $this->addFlash('sonata_flash_success', 'Image cropped');\n } else {\n $this->addFlash('sonata_flash_error', 'Image not cropped: wrong dimensions');\n }\n }\n\n return $this->render('TeoProductBundle:Admin:crop_image.html.twig', array(\n 'path' => $path,\n 'action' => 'crop',\n 'teo_product_aspect_ratio' => $this->container->getParameter('teo_product_aspect_ratio'),\n 'actual_width' => $source_width,\n 'return_path' => $return_path,\n 'random' => md5(mt_rand()) . md5(mt_rand())\n ));\n }", "public function extract()\n\t{\n\t\t$this->map = array_merge_recursive($this->loop($this->target), $this->loop($this->source));\n\n\t\treturn $this;\n\t}", "function TubeView(&$pxl, $src, $radius, $turbulence, $fade1, $fade2, $center, $bgColor) {}", "public function run() {\r\nif(!($new_image = @imagecreatetruecolor($this->new_width, $this->new_height)))\r\nthrow new Exception(\"Error while the new image was initialized\");\r\n\r\nswitch($this->type) {\r\ncase 1:\r\n$image = imagecreatefromgif($this->src);\r\n$transparent_index = imagecolortransparent($image);\r\n$transparent_color = imagecolorsforindex($image, $transparent_index);\r\n$transparent_index = imagecolorallocate($new_image, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);\r\nimagefill($new_image, 0, 0, $transparent_index);\r\nimagecolortransparent($new_image, $transparent_index);\r\nbreak;\r\ncase 2:\r\n$image = imagecreatefromjpeg($this->src);\r\nbreak;\r\ncase 3:\r\n$image = imagecreatefrompng($this->src);\r\nimagealphablending($new_image, false);\r\nimagesavealpha($new_image, true);\r\nbreak;\r\ndefault:\r\nthrow new Exception('<b>Error:</b> The image type was not recognized');\r\nbreak;\r\n}\r\n\r\ntry {\r\nimagecopyresampled($new_image, $image, 0, 0, 0, 0, $this->new_width, $this->new_height, $this->width, $this->height);\r\n}\r\ncatch(Exception $e) {\r\nthrow new Exception(\"<b>Error:</b> The image couldn't be resized\");\r\n}\r\n\r\nswitch($this->type) {\r\ncase 1:\r\nimagegif($new_image, $this->dest);\r\nbreak;\r\ncase 2:\r\nimagejpeg($new_image, $this->dest);\r\nbreak;\r\ncase 3:\r\nimagepng($new_image, $this->dest);\r\nbreak;\r\ndefault:\r\nthrow new Exception('Error while the image was created');\r\nbreak;\r\n}\r\n\r\n$this->releaseMemory($image, $new_image);\r\n}", "public function run()\n {\n //\n $imagePlan = new Image();\n $imagePlan->save();\n }", "public function isProjection() {\n return (NULL !== $this->projection);\n }", "private function read_the_original_image_and_write() {\r\n\t\tfor ( $x = 0; $x <= $this->radius; $x += 0.01 ) {\r\n\r\n\t\t\t/* standard form for the equation of a circle ... don't tell me you never knew that ... */\r\n\t\t\t$y = sqrt( $this->diameter * $x - pow( $x , 2 ) ) + $this->radius;\r\n\r\n\t\t\t/* i think i should call this successive scans ... */\r\n\t\t\tfor ( $i = $x; $i < $this->diameter - $x; $i++ ) {\r\n\r\n\t\t\t\t/* half of the circle ... */\r\n\t\t\t\timagesetpixel (\r\n\t\t\t\t\t$this->cutted_image , $i, $y,\r\n\t\t\t\t\timagecolorat( $this->original_image, $i, $y )\r\n\t\t\t\t);\r\n\r\n\t\t\t\t/* the other half of course ... */\r\n\t\t\t\timagesetpixel (\r\n\t\t\t\t\t$this->cutted_image , $i, $this->diameter - $y,\r\n\t\t\t\t\timagecolorat( $this->original_image, $i, $this->diameter - $y )\r\n\t\t\t\t);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t/* avoid the white line when the diameter is an even number ... */\r\n\t\tif ( ! is_float( $this->radius ) )\r\n\t\t\tfor ( $i = 0; $i < $this->diameter; $i++ )\r\n\r\n\t\t\t\timagesetpixel (\r\n\t\t\t\t\t$this->cutted_image , $i, $this->radius - 1,\r\n\t\t\t\t\timagecolorat( $this->original_image, $i, $this->radius - 1 )\r\n\t\t\t\t);\r\n\r\n\t\t/* woo ... not as difficult as you think ... that's all ... */\r\n\t\treturn;\r\n\r\n\t}", "public function zoomRect($r) {\r\n $this->x0 = $r->getLeft();\r\n $this->y0 = $r->getTop();\r\n $this->x1 = $r->getRight();\r\n $this->y1 = $r->getBottom();\r\n $this->calcZoomPoints();\r\n }", "public function draw() {\r\n $g = $this->chart->getGraphics3D();\r\n $e = $g->getGraphics();\r\n\r\n $r = new Rectangle($this->x0,$this->y0,$this->x1-$this->x0,$this->y1-$this->y0);\r\n\r\n if($this->chart->getParent()!=null) {\r\n if ($this->bBrush != null && $this->bBrush->getVisible()) {\r\n $brushXOR = -1 ^ $this->bBrush->getColor()->getRGB();\r\n $e->setXORMode($this->Color->fromArgb($brushXOR));\r\n $e->fillRect($this->x0, $this->y0, $this->x1 - $this->x0, $this->y1 - $this->y0);\r\n\r\n if ($this->pen!= null && $this->pen->getVisible()) {\r\n $penXOR = -1 ^ $this->pen->getColor()->getRGB();\r\n $e->setXORMode($this->Color->fromArgb($penXOR));\r\n $e->drawRect($this->x0-1,$this->y0-1,$this->x1+1-$this->x0,$this->y1+1-$this->y0);\r\n }\r\n }\r\n else if($this->pen!= null && $this->pen->getVisible()) {\r\n $this->chart->invalidate();\r\n $g->setPen($this->getPen());\r\n $g->getBrush()->setVisible(false);\r\n $g->rectangle($r);\r\n $g->getBrush()->setVisible(true);\r\n }\r\n else {\r\n $this->chart->invalidate();\r\n $tmpColor = new Color();\r\n $tmpLineCap = new LineCap();\r\n $tmpDashStyle = new DashStyle();\r\n $g->setPen(new ChartPen($this->chart, $tmpColor->BLACK, true, 1, $tmpLineCap->BEVEL, $tmpDashStyle->DASH));\r\n $g->getBrush()->setVisible(false);\r\n $g->rectangle($r);\r\n $g->getBrush()->setVisible(true);\r\n }\r\n }\r\n }", "public function compileAllSRS () {\n\t\tforeach ($this->layerList as $layerIdentifier => $layer) {\n\t\t\tforeach ($layer->getTileMatrixSetList() as $tmsIdentifier => $tms) {\n\t\t\t\t$this->SRSList[] = $tms->srs;\n\t\t\t}\n\t\t}\n\t\t$this->SRSList = array_unique($this->SRSList);\n\t}", "public function zoomin($source, $dest, Array $option)\n {\n $image_obj = $this->_getInstance('montage');\n $source = $this->_getSource($source);\n return $image_obj->zoomin($source, $dest, $option);\n }" ]
[ "0.5165557", "0.5083971", "0.48546487", "0.4785309", "0.47584483", "0.47312027", "0.45633852", "0.45289192", "0.45289192", "0.44930074", "0.44896773", "0.43907428", "0.43907428", "0.4387824", "0.43251786", "0.43057728", "0.42746568", "0.42746568", "0.42426994", "0.42317322", "0.42116258", "0.41927707", "0.41905886", "0.41839156", "0.41632164", "0.40930435", "0.4092837", "0.40662783", "0.4065883", "0.40468246", "0.4026245", "0.39819792", "0.39608768", "0.39530906", "0.3945805", "0.3942583", "0.39212245", "0.3915141", "0.38997814", "0.38870707", "0.38841492", "0.38841492", "0.38816702", "0.38754213", "0.3869714", "0.3869334", "0.386642", "0.3865964", "0.38558474", "0.3854692", "0.38508573", "0.38476518", "0.38252681", "0.3805263", "0.3798341", "0.3778844", "0.37786546", "0.3773781", "0.37467942", "0.37441048", "0.37422433", "0.37207112", "0.37199134", "0.370016", "0.36786622", "0.3676833", "0.36405778", "0.3638518", "0.36341533", "0.3631255", "0.3623555", "0.36217704", "0.36217442", "0.3615849", "0.36156285", "0.36105123", "0.36043295", "0.35924572", "0.35848227", "0.35836604", "0.35754526", "0.35689494", "0.35678533", "0.3562839", "0.35521165", "0.35478926", "0.3543884", "0.3531174", "0.35263175", "0.35229412", "0.35227525", "0.35182464", "0.3516686", "0.35119313", "0.34937564", "0.34878823", "0.3487638", "0.34587434", "0.34526464", "0.34504056" ]
0.70185035
0
Calculates the coordinates of the projection location on the canvas
private function _getLeftUpperCoordinateOnCanvas($projectionWidth, $projectionHeight) { $projectionRatio = $projectionWidth / $projectionHeight; $canvasWidth = $this->params['w']; $canvasHeight = $this->params['h']; $canvasRatio = $canvasWidth / $canvasHeight; // always center the projection horizontally if ($projectionWidth > $canvasWidth) { $x = - (($projectionWidth / 2) - ($this->params['w'] / 2)); } else { $x = ($this->params['w'] - $projectionWidth) / 2; } switch ($this->params['cropfocus']) { case 'face': // if the image is taller than the canvas, move the starting point halfway up the center if ($projectionHeight > $canvasHeight) { $y = - ((($projectionHeight / 2) - ($this->params['h'] / 2)) / 2); } else { $y = ($this->params['h'] - $projectionHeight) / 2; } break; case 'center': default: // center the projection vertically if ($projectionHeight > $canvasHeight) { $y = - (($projectionHeight / 2) - ($this->params['h'] / 2)); } else { $y = ($this->params['h'] - $projectionHeight) / 2; } } return array($x, $y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCoordinates();", "abstract public function coordinates();", "private function _getProjectionSize() {\n\t\t$sourceWidth = $this->params['sourceWidth'];\n\t\t$sourceHeight = $this->params['sourceHeight'];\n\t\t$sourceRatio = $sourceWidth / $sourceHeight;\n\n\t\t$canvasWidth = $this->params['w'];\n\t\t$canvasHeight = $this->params['h'];\n\t\t$canvasRatio = $canvasWidth / $canvasHeight;\n\n\n\t\t//\tthe image is not allowed to be cut off in any dimension\n\t\tif ($sourceRatio < $canvasRatio) {\n\t\t\t//\tsource is less landscape-like than canvas\n\t\t\t$leadDimension = !$this->params['crop'] ?\n\t\t\t\t'Height' : 'Width';\n\t\t} else {\n\t\t\t//\tsource is more landscape-like than canvas\n\t\t\t$leadDimension = !$this->params['crop'] ?\n\t\t\t\t'Width' : 'Height';\n\t\t}\n\n\t\tif (\n\t\t\t!$this->params['grow'] &&\n\t\t\t${'source'.$leadDimension} < ${'canvas'.$leadDimension}\n\t\t) {\n\t\t\t${'projection'.$leadDimension} = ${'source'.$leadDimension};\n\t\t} else {\n\t\t\t${'projection'.$leadDimension} = ${'canvas'.$leadDimension};\n\t\t}\n\n\t\tif (isset($projectionWidth)) {\n\t\t\t$projectionHeight = $projectionWidth / $sourceRatio;\n\t\t} elseif (isset($projectionHeight)) {\n\t\t\t$projectionWidth = $projectionHeight * $sourceRatio;\n\t\t}\n\n\t\treturn array(round($projectionWidth), round($projectionHeight));\n\t}", "abstract public function calculateCropBoxCoordinates();", "public function getCoords()\n\t{\n\t\treturn $this->coords;\n\t}", "public function getMapCropTopLeft(): XY\n {\n return $this->mapCropTopLeft;\n }", "public function toCartesian()\n {\n $phi = deg2rad($this->getLatitude());\n $lambda = deg2rad($this->getLongitude());\n\n $H = $this->getHeight();\n $a = $this->getEllipsoid()->getA();\n $b = $this->getEllipsoid()->getB();\n\n $sin_phi = sin($phi);\n $cos_phi = cos($phi);\n $sin_lambda = sin($lambda);\n $cos_lambda = cos($lambda);\n\n $eSq = (pow($a, 2) - pow($b, 2)) / (pow($a, 2));\n $nu = $a / sqrt(1 - $eSq * $sin_phi * $sin_phi);\n\n $x = ($nu + $H) * $cos_phi * $cos_lambda;\n $y = ($nu + $H) * $cos_phi * $sin_lambda;\n $z = ((1 - $eSq) * $nu + $H) * $sin_phi;\n\n // TODO: return a cartesian coordinate object, not an array.\n // The object will provide the means for converting back again.\n $point = array($x, $y, $z);\n\n return $point;\n }", "function get_position( )\n\t{\n\t\treturn $this->latdeg.\";\".$this->londeg;\n\t}", "function convert($utm_x, $utm_y, $utmZone)\n {\n $LngOrigin = Deg2Rad($utmZone * 6 - 183);\n\n // The following set of class constants define characteristics of the\n // ellipsoid, as defined my the WGS84 datum. These values need to be\n // changed if a different dataum is used.\n\n $FalseNorth = 0; // South or North?\n //if (lat < 0.) FalseNorth = 10000000. // South or North?\n //else FalseNorth = 0.\n\n $Ecc = 0.081819190842622; // Eccentricity\n $EccSq = $Ecc * $Ecc;\n $Ecc2Sq = $EccSq / (1. - $EccSq);\n $Ecc2 = sqrt($Ecc2Sq); // Secondary eccentricity\n $E1 = (1 - sqrt(1 - $EccSq)) / (1 + sqrt(1 - $EccSq));\n $E12 = $E1 * $E1;\n $E13 = $E12 * $E1;\n $E14 = $E13 * $E1;\n\n $SemiMajor = 6378137.0; // Ellipsoidal semi-major axis (Meters)\n $FalseEast = 500000.0; // UTM East bias (Meters)\n $ScaleFactor = 0.9996; // Scale at natural origin\n\n // Calculate the Cassini projection parameters\n\n $M1 = ($utm_x - $FalseNorth) / $ScaleFactor;\n $Mu1 = $M1 / ($SemiMajor * (1 - $EccSq / 4.0 - 3.0 * $EccSq * $EccSq / 64.0 - 5.0 * $EccSq * $EccSq * $EccSq / 256.0));\n\n $Phi1 = $Mu1 + (3.0 * $E1 / 2.0 - 27.0 * $E13 / 32.0) * sin(2.0 * $Mu1);\n +(21.0 * $E12 / 16.0 - 55.0 * $E14 / 32.0) * sin(4.0 * $Mu1);\n +(151.0 * $E13 / 96.0) * sin(6.0 * $Mu1);\n +(1097.0 * $E14 / 512.0) * sin(8.0 * $Mu1);\n\n $sin2phi1 = sin($Phi1) * sin($Phi1);\n $Rho1 = ($SemiMajor * (1.0 - $EccSq)) / pow(1.0 - $EccSq * $sin2phi1, 1.5);\n $Nu1 = $SemiMajor / sqrt(1.0 - $EccSq * $sin2phi1);\n\n // Compute parameters as defined in the POSC specification. T, C and D\n\n $T1 = tan($Phi1) * tan($Phi1);\n $T12 = $T1 * $T1;\n $C1 = $Ecc2Sq * cos($Phi1) * cos($Phi1);\n $C12 = $C1 * $C1;\n $D = ($utm_y - $FalseEast) / ($ScaleFactor * $Nu1);\n $D2 = $D * $D;\n $D3 = $D2 * $D;\n $D4 = $D3 * $D;\n $D5 = $D4 * $D;\n $D6 = $D5 * $D;\n\n // Compute the Latitude and Longitude and convert to degrees\n $lat = $Phi1 - $Nu1 * tan($Phi1) / $Rho1 * ($D2 / 2.0 - (5.0 + 3.0 * $T1 + 10.0 * $C1 - 4.0 * $C12 - 9.0 * $Ecc2Sq) * $D4 / 24.0 + (61.0 + 90.0 * $T1 + 298.0 * $C1 + 45.0 * $T12 - 252.0 * $Ecc2Sq - 3.0 * $C12) * $D6 / 720.0);\n\n $lat = Rad2Deg($lat);\n\n $lon = $LngOrigin + ($D - (1.0 + 2.0 * $T1 + $C1) * $D3 / 6.0 + (5.0 - 2.0 * $C1 + 28.0 * $T1 - 3.0 * $C12 + 8.0 * $Ecc2Sq + 24.0 * $T12) * $D5 / 120.0) / cos($Phi1);\n\n $lon = Rad2Deg($lon);\n\n // Create a object to store the calculated Latitude and Longitude values\n $PC_LatLon['lat'] = $lat;\n $PC_LatLon['lon'] = $lon;\n\n // Returns a PC_LatLon object\n return $PC_LatLon;\n }", "public function getCoord(){\n return $this->coord;\n }", "public function coordenadasOrigen($x,$y){\r\n\t\t$this->x_punto_origen=$x;\r\n\t\t$this->y_punto_origen=$y;\r\n\t}", "public function coordenadasOrigen($x,$y){\r\n\t\t$this->x_punto_origen=$x;\r\n\t\t$this->y_punto_origen=$y;\r\n\t}", "public function getCoordinates()\n {\n return $this->coordinates;\n }", "public function center()\n {\n return new Point(($this->north + $this->south) / 2, ($this->east + $this->west) / 2);\n }", "public function getSurface() {\r\n return 6 * $this -> lato * $this -> lato;\r\n }", "public function coordenadasDefaut(){\r\n\t\t$this->x_punto_destino=0;\r\n\t\t$this->y_punto_destino=0;\r\n\t\t$this->x_punto_origen=0;\r\n\t\t$this->y_punto_origen=0;\r\n\t}", "public function getXCoordinate()\n {\n return $this->getValueOfN() * cos(\\deg2rad($this->latitude)) * cos(deg2rad($this->longitude));\n }", "function findPoint($px, $py, $qx, $qy) {\n return array(2*$qx - $px,2*$qy - $py);\n}", "public function getCenterOfArea() {\r\n\t\t/* PROTECTED REGION ID(php.implementation._14_0_b6f02e1_1211871307421_631477_281__16_0_b6f02e1_1249464477484_822826_834) ENABLED START */\r\n\t\treturn new Form_Point($this->_center->x, $this->_center->y);\r\n\t\t/* PROTECTED REGION END */\r\n\t}", "public function getMapCropBottomRight(): XY\n {\n return $this->mapCropBottomRight;\n }", "public function getCoordinate()\n {\n return $this->coordinate;\n }", "public function toWGS84()\n {\n $gkProjection = new GaussKreugerProjection();\n $gkProjection->swedish_params($this->getProjectionString($this->projection));\n $lat_lon = $gkProjection->grid_to_geodetic($this->latitude, $this->longitude);\n\n $newPos = new WGS84Position($lat_lon[0], $lat_lon[1]);\n\n return $newPos;\n }", "public function getCoordinate() {\n return $this->coordinate;\n }", "public function getProjection()\n {\n return $this->projection;\n }", "public function getProjection()\n {\n return $this->_projection;\n }", "public function getMarkersCenterCoord()\n\t{\n\t\tif (null === $this->resources->itemAt('markers'))\n\t\t\tthrow new CException(Yii::t('EGMap', 'At least one more marker is necessary for getMarkersCenterCoord to work'));\n\t\t//todo: check for markers existence\n\t\treturn EGMapMarker::getCenterCoord($this->resources->itemAt('markers'));\n\t}", "public function test_make_coordinates_4()\n {\n $coord = \"52° 32' 25\\\" N; 89° 40' 31\\\" W\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], 52.540277777778);\n $this->assertEquals($dd[1], -89.675277777778);\n }", "private function buildCenter() {\n $latitude = 0;\n $longitude = 0;\n $i = 0;\n\n if(count($this->locations) === 0)\n return 0;\n\n foreach($this->locations as $location) {\n $latitude += (float) $location->latitude;\n $longitude += (float) $location->longitude;\n $i++;\n }\n\n $latitude = $latitude / $i;\n $longitude = $longitude / $i;\n\n return '&center=' . $latitude . ',' . $longitude;\n }", "public function getCoordinate() {\n\n return $this->coordinate;\n }", "public function getCoordinates(): array\n {\n return $this->coordinates;\n }", "public function getCoordAmigavelAttribute()\n {\n return \"(\".$this->x.\")|(\".$this->y.\")\";\n }", "public abstract function getOrigin(): Point;", "public function getLatLngTopLeft(): LatLng\n {\n return $this->latLngTopLeft;\n }", "public function getLatLng() {\n return $point = $this->getLat().','.$this->getLng();\n }", "public function getPosY();", "public function calculateCenter(): Position\n {\n if ($this->center) {\n return $this->center;\n }\n if ($this->isEmpty()) {\n return new Position(0, 0);\n }\n $sumX = 0;\n $sumY = 0;\n foreach ($this->destinations as $destination) {\n $sumX += $destination->getX();\n $sumY += $destination->getY();\n }\n $destinationCount = count($this->destinations);\n $this->center = new Position(\n $sumX / $destinationCount,\n $sumY / $destinationCount\n );\n return $this->center;\n }", "public function recalc_coords(array $continent_rect, array $map_rect, array $point){\n\t\t// don't look at it. really! it will melt your brain and make your eyes bleed!\n\t\treturn [\n\t\t\tround($continent_rect[0][0]+($continent_rect[1][0]-$continent_rect[0][0])*($point[0]-$map_rect[0][0])/($map_rect[1][0]-$map_rect[0][0])),\n\t\t\tround($continent_rect[0][1]+($continent_rect[1][1]-$continent_rect[0][1])*(1-($point[1]-$map_rect[0][1])/($map_rect[1][1]-$map_rect[0][1])))\n\t\t];\n\t}", "public function getYCoordinate()\n {\n return $this->getValueOfN() * cos(\\deg2rad($this->latitude)) * sin(deg2rad($this->longitude));\n }", "public function coordenadasDestino($x,$y){\r\n\t\t$this->x_punto_destino=$x;\r\n\t\t$this->y_punto_destino=$y;\r\n\t}", "public function coordenadasDestino($x,$y){\r\n\t\t$this->x_punto_destino=$x;\r\n\t\t$this->y_punto_destino=$y;\r\n\t}", "public function getLat();", "function toPoint($matches)\n{\n\t$point = array();\n\t\t\t\n\t$degrees = $minutes = $seconds = 0;\t\t\n\t\t\n\tif (isset($matches['latitude_seconds']))\n\t{\n\t\t$seconds = $matches['latitude_seconds'];\n\t}\n\t$minutes = $matches['latitude_minutes'];\n\t$degrees = $matches['latitude_degrees'];\n\t\n\t$point['latitude'] = degrees2decimal($degrees, $minutes, $seconds, $matches['latitude_hemisphere']);\n\n\t$degrees = $minutes = $seconds = 0;\t\n\t\n\tif (isset($matches['longitude_seconds']))\n\t{\n\t\t$seconds = $matches['longitude_seconds'];\n\t}\n\t$minutes = $matches['longitude_minutes'];\n\t$degrees = $matches['longitude_degrees'];\n\t\n\t$point['longitude'] = degrees2decimal($degrees, $minutes, $seconds, $matches['longitude_hemisphere']);\n\n\treturn $point;\n}", "function GetCenterFromDegrees($data)\n{\n if (!is_array($data)) return FALSE;\n\n $num_coords = count($data);\n\n $X = 0.0;\n $Y = 0.0;\n $Z = 0.0;\n\n foreach ($data as $coord)\n {\n $lat = $coord[0] * pi() / 180;\n $lon = $coord[1] * pi() / 180;\n\n $a = cos($lat) * cos($lon);\n $b = cos($lat) * sin($lon);\n $c = sin($lat);\n\n $X += $a;\n $Y += $b;\n $Z += $c;\n }\n\n $X /= $num_coords;\n $Y /= $num_coords;\n $Z /= $num_coords;\n\n $lon = atan2($Y, $X);\n $hyp = sqrt($X * $X + $Y * $Y);\n $lat = atan2($Z, $hyp);\n\n return array($lat * 180 / pi(), $lon * 180 / pi());\n}", "public function projectPoints($pts) {\n\t\tif (preg_match('/^UTM/',$this->coordinate_type)) {\n\t\t\tforeach ($pts as $i=>$pt) {\n\t\t\t\t$latlon = $this->utm2latlon($pts[$i][0], $pts[$i][1],$this->utm_zone);\n\t\t\t\t$pts[$i] = array(\n\t\t\t\t\t\tround($latlon['longitude'],6),\n\t\t\t\t\t\tround($latlon['latitude'],6)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "function geodetictoutm($lat, $lon) {\r\n\r\n $sm_a = 6378137.0;\r\n $sm_b = 6356752.314;\r\n $sm_EccSquared = 0.000669437999013;\r\n $UTMScaleFactor = 0.9996;\r\n\r\n // get UTM XY from Lat Lon\r\n $zone = floor(($lon + 180.0) / 6) + 1;\r\n\r\n // Compute the UTM zone\r\n $phi = $lat / 180 * Pi();\r\n $lambda = $lon / 180 * Pi();\r\n $lambda0 = (-183 + ($zone * 6))/ 180 * Pi(); //center merdian\r\n\r\n // Precalculate ep2\r\n $ep2 = (pow($sm_a,2) - pow($sm_b,2) ) / pow($sm_b,2);\r\n\r\n // Precalculate nu2\r\n $nu2 = $ep2 * pow(cos($phi),2);\r\n\r\n // Precalculate N\r\n $N = pow($sm_a,2) / ($sm_b * sqrt(1 + $nu2));\r\n\r\n // Precalculate t\r\n $t = tan ($phi);\r\n $t2 = $t * $t;\r\n $tmp = pow($t2,3) - pow($t,6);\r\n\r\n // Precalculate l\r\n $l = $lambda - $lambda0;\r\n\r\n //Precalculate coefficients for l**n in the equations below\r\n //so a normal human being can read the expressions for easting and northing\r\n\r\n $l3coef = 1 - $t2 + $nu2;\r\n $l4coef = 5 - $t2 + 9 * $nu2 + 4 * ($nu2 * $nu2);\r\n $l5coef = 5 - 18 * $t2 + ($t2 * $t2) + 14 * $nu2 - 58 * $t2 * $nu2;\r\n $l6coef = 61 - 58 * $t2 + ($t2 * $t2) + 270 * $nu2 - 330 * $t2 * $nu2;\r\n $l7coef = 61 - 479 * $t2 + 179 * ($t2 * $t2) - ($t2 * $t2 * $t2);\r\n $l8coef = 1385 - 3111 * $t2 + 543 * ($t2 * $t2) - ($t2 * $t2 * $t2);\r\n\r\n // ArcLengthOfMeridian\r\n //Precalculate n\r\n $n2 = ($sm_a - $sm_b) / ($sm_a + $sm_b);\r\n //Precalculate alpha\r\n $alpha = (($sm_a + $sm_b) / 2) * (1 + (pow($n2,2) / 4) + (pow($n2,4) / 64));\r\n //Precalculate beta\r\n $beta = (-3 * $n2 / 2) + (9 * pow($n2,3) / 16) + (-3 * pow($n2,5) / 32);\r\n //Precalculate gamma\r\n $gamma = (15 * pow($n2,2) / 16) + (-15 * pow($n2,4) / 32);\r\n //Precalculate delta\r\n $delta = (-35 * pow($n2,3) / 48) + (105 * pow($n2,5) / 256);\r\n //Precalculate epsilon\r\n $epsilon = (315 * pow($n2,4) / 512);\r\n //Now calculate the sum of the series and return\r\n $ArcLengthOfMeridian = $alpha * ($phi + ($beta * sin(2 * $phi)) + ($gamma * sin(4 * $phi)) + ($delta * sin (6 * $phi)) + ($epsilon * sin(8 * $phi)));\r\n\r\n //Calculate easting(x)\r\n $x = $N * cos($phi) * $l\r\n + ($N / 6 * pow(cos($phi),3) * $l3coef * pow($l,3))\r\n + ($N / 120 * pow(cos($phi),5) * $l5coef * pow($l,5))\r\n + ($N / 5040 * pow(cos($phi),7) * $l7coef * pow($l,7));\r\n\r\n //Calculate northing(y)\r\n $y = $ArcLengthOfMeridian\r\n + ($t / 2 * $N * pow(cos($phi),2) * pow($l,2))\r\n + ($t / 24 * $N * pow(cos($phi),4) * $l4coef * pow($l,4))\r\n + ($t / 720 * $N* pow(cos($phi),6) * $l6coef * pow($l,6))\r\n + ($t / 40320 * $N * pow(cos($phi),8) * $l8coef * pow($l,8));\r\n\r\n\r\n $x = $x * $UTMScaleFactor + 500000;\r\n $y = $y * $UTMScaleFactor;\r\n\r\n //print_r(get_defined_vars ( ));die;\r\n return array($x, $y, $zone);\r\n\r\n}", "public function userWithCoord() {\n $sql = \"select * from infos_contributeur where lat != 0 and lng != 0\";\n $result = $this->db->fetchAll($sql);\n\n return $result;\n }", "function gps($img){\n\tglobal $argv;\n\t// hemisphere\n\tif(!isset(exif_read_data($img)[\"GPSLatitudeRef\"]) || !isset(exif_read_data($img)[\"GPSLongitudeRef\"])) die(\"Error: No GPS metadata\");\n\t$lat_ref = exif_read_data($argv[1])[\"GPSLatitudeRef\"] == \"W\" ? 1 : -1;\n\t$lon_ref = exif_read_data($argv[1])[\"GPSLongitudeRef\"] == \"S\" ? 1 : -1;\n\n\t$lat = exif_read_data($argv[1])[\"GPSLatitude\"];\n\t$lon = exif_read_data($argv[1])[\"GPSLongitude\"];\n\n\t$coords[\"lat\"] = $lat_ref * deg2dec($lat[0],$lat[1],$lat[2]);\n\t$coords[\"lon\"] = $lon_ref * deg2dec($lon[0],$lon[1],$lon[2]);\n\n\treturn $coords;\n}", "public function test_make_coordinates_3()\n {\n $coord = \"52° 32' 25\\\" N, 89° 40' 31\\\" W\";\n $dd = \\SimpleMappr\\Mappr::makeCoordinates($coord);\n $this->assertEquals($dd[0], 52.540277777778);\n $this->assertEquals($dd[1], -89.675277777778);\n }", "public function fromDegreesToRadians(): Point {\n return new Point(\n rad2deg($this->x),\n rad2deg($this->y)\n );\n }", "public function fromRadiansToDegrees(): Point {\n return new Point(\n rad2deg($this->x),\n rad2deg($this->y)\n );\n }", "function RD2WGS84($x, $y){\n\n $dX = ($x - 155000) * pow(10,-5);\n $dY = ($y - 463000) * pow(10,-5);\n\n $SomN = (3235.65389 * $dY) + (-32.58297 * pow($dX,2)) + (-0.2475 * pow($dY,2)) + (-0.84978 * pow($dX,2) * $dY) + (-0.0655 * pow($dY,3)) + (-0.01709 * pow($dX,2) * pow($dY,2)) + (-0.00738 * $dX) + (0.0053 * pow($dX,4)) + (-0.00039 * pow($dX,2) * pow($dY,3)) + (0.00033 * pow($dX,4) * $dY) + (-0.00012 * $dX * $dY);\n $SomE = (5260.52916 * $dX) + (105.94684 * $dX * $dY) + (2.45656 * $dX * pow($dY,2)) + (-0.81885 * pow($dX,3)) + (0.05594 * $dX * pow($dY,3)) + (-0.05607 * pow($dX,3) * $dY) + (0.01199 * $dY) + (-0.00256 * pow($dX,3) * pow($dY,2)) + (0.00128 * $dX * pow($dY,4)) + (0.00022 * pow($dY,2)) + (-0.00022 * pow($dX,2)) + (0.00026 * pow($dX,5));\n\n $lat = 52.15517 + ($SomN / 3600);\n $lon = 5.387206 + ($SomE / 3600);\n \n return(Array($lat, $lon));\n }", "public function draw(\\SetaPDF_Core_Canvas $canvas, $x, $y) {}", "private function _getTicketsCoordinates()\n {\n /** @var Ticket[] $tickets */\n $tickets = $this->Tickets->find('all')\n ->select(['latitude', 'longitude'])\n ->where([\n 'latitude IS NOT' => null,\n 'longitude IS NOT' => null\n ])\n ->toArray();\n\n $coordinates = [];\n\n /** @var Ticket $ticket */\n foreach ($tickets as $id => $ticket) {\n $coordinates[] = [\n 'latitude' => $ticket->latitude,\n 'longitude' => $ticket->longitude,\n ];\n }\n\n return $coordinates;\n }", "private function calculateOffsets( $xpath ) {\n\t\t$allGeometries = $xpath->query( '//mxGeometry' );\n\t\t$xCoords = [];\n\t\t$yCoords = [];\n\n\t\tforeach ( $allGeometries as $geometry ) {\n\t\t\t$xCoords[] = $geometry->getAttribute( 'x' );\n\t\t\t$yCoords[] = $geometry->getAttribute( 'y' );\n\t\t}\n\t\tif ( !empty( $xCoords ) ) {\n\t\t\t$this->offsetX = min( $xCoords );\n\t\t}\n\t\tif ( !empty( $yCoords ) ) {\n\t\t\t$this->offsetY = min( $yCoords );\n\t\t}\n\t}", "function getCoords(){\n\tglobal $conn;\n\t$numargs = func_num_args();\n\t/* all foi */\n\tif ($numargs == 0){\n\t\t$result= pg_query($conn,\"SELECT ST_X(geom), ST_Y(geom) FROM feature_of_interest\");\n\t\treturn pg_fetch_all($result);\n\t}\n\t/* one foi */\n\telse\n\t{\n\t\t$foi_id = func_get_arg(0);\n\t\t$result = pg_query($conn,\"SELECT ST_X(geom), ST_Y(geom) \n\t\t\t\tFROM feature_of_interest \n\t\t\t\tWHERE feature_of_interest_id = '$foi_id' \");\n\t\treturn pg_fetch_all($result);\n\t}\n}", "function getCoordsForSQL4($strict = false) {\n\t\tif (is_null($this->x)) {\n\t\t\t$pos = $this->getPosition();\n\t\t\tif (!$strict) return \"`x`=$pos->x AND `y`=$pos->y AND `local_x`=$pos->lx AND `local_y`=$pos->ly\";\n\t\t\treturn \"`x`=NULL AND `y`=NULL\";\n\t\t}\n\t\treturn \"`x`=$this->x AND `y`=$this->y AND `local_x`=$this->localx AND `local_y`=$this->localy\";\n\t}", "public function getXandY(): array {\n return [$this->x, $this->y];\n }", "function get_pose(){\n header('Content-Type: application/json');\n $posx=$_SESSION['world'][$_SESSION[\"room\"]][\"points\"][0][0];\n $posy=$_SESSION['world'][$_SESSION[\"room\"]][\"points\"][0][1];\n $dimx = $_SESSION['world'][$_SESSION[\"room\"]][\"points\"][1][0]-$_SESSION['world'][$_SESSION[\"room\"]][\"points\"][0][0];\n $dimy = $_SESSION['world'][$_SESSION[\"room\"]][\"points\"][2][1]-$_SESSION['world'][$_SESSION[\"room\"]][\"points\"][0][1];\n echo json_encode([$posx+$dimx/2,$posy+$dimy/2,[$_SESSION[\"room\"]]]);\n}", "public function getLng();", "public function get_minCorner()\r\n\t{\r\n\t\t$returnValue = new vector3;\r\n\t\t$returnValue->x = $this->position->x - $this->extent->x/2;\r\n\t\t$returnValue->y = $this->position->y - $this->extent->y/2;\r\n\t\t$returnValue->z = $this->position->z - $this->extent->z/2;\r\n\r\n\t\treturn $returnValue;\r\n\t}", "public function setPosition()\n {\n // get the current position\n $currentX = $this->_pdf->getX();\n $currentY = $this->_pdf->getY();\n\n // save it\n $this->value['xc'] = $currentX;\n $this->value['yc'] = $currentY;\n\n if ($this->value['position']=='relative' || $this->value['position']=='absolute') {\n if ($this->value['right']!==null) {\n $x = $this->getLastWidth(true) - $this->value['right'] - $this->value['width'];\n if ($this->value['margin']['r']) $x-= $this->value['margin']['r'];\n } else {\n $x = $this->value['left'];\n if ($this->value['margin']['l']) $x+= $this->value['margin']['l'];\n }\n\n if ($this->value['bottom']!==null) {\n $y = $this->getLastHeight(true) - $this->value['bottom'] - $this->value['height'];\n if ($this->value['margin']['b']) $y-= $this->value['margin']['b'];\n } else {\n $y = $this->value['top'];\n if ($this->value['margin']['t']) $y+= $this->value['margin']['t'];\n }\n\n if ($this->value['position']=='relative') {\n $this->value['x'] = $currentX + $x;\n $this->value['y'] = $currentY + $y;\n } else {\n $this->value['x'] = $this->_getLastAbsoluteX()+$x;\n $this->value['y'] = $this->_getLastAbsoluteY()+$y;\n }\n } else {\n $this->value['x'] = $currentX;\n $this->value['y'] = $currentY;\n if ($this->value['margin']['l']) $this->value['x']+= $this->value['margin']['l'];\n if ($this->value['margin']['t']) $this->value['y']+= $this->value['margin']['t'];\n }\n\n // save the new position\n $this->_pdf->setXY($this->value['x'], $this->value['y']);\n }", "public function getPerimeter() {\r\n return $this -> lato * 4;\r\n }", "public function getCoordinates()\n\t{\n\t\tif (!empty($this->_coordinates)) {\n\t\t\treturn $this->_coordinates;\n\t\t} else {\n\t\t\t$errorMsg = 'getCoordinates called before coordinates values have been set';\n\t\t\tthrow new Exception($errorMsg);\n\t\t}\n\t}", "function make_position( $lat, $lon )\n\t{\n\t\t$latdms = geo_param::make_minsec( $lat );\n\t\t$londms = geo_param::make_minsec( $lon );\n\t\t$outlat = intval(abs($latdms['deg'])) . \"&deg;&nbsp;\";\n\t\t$outlon = intval(abs($londms['deg'])) . \"&deg;&nbsp;\";\n\t\tif ($latdms['min'] != 0 or $londms['min'] != 0\n\t\t or $latdms['sec'] != 0 or $londms['sec'] != 0) {\n\t\t\t$outlat .= intval($latdms['min']) . \"&prime;&nbsp;\";\n\t\t\t$outlon .= intval($londms['min']) . \"&prime;&nbsp;\";\n\t\t\tif ($latdms['sec'] != 0 or $londms['sec'] != 0) {\n\t\t\t\t$outlat .= $latdms['sec']. \"&Prime;&nbsp;\";\n\t\t\t\t$outlon .= $londms['sec']. \"&Prime;&nbsp;\";\n\t\t\t}\n\t\t}\n\t\treturn $outlat . $latdms['NS'] . \" \" . $outlon . $londms['EW'];\n\t}", "public function gmap_center() {\n return $this->gmap_center;\n }", "public static function getWindowPosition() : \\raylib\\Vector2 {}", "public function getPos();", "public function getPos();", "function get_coordinates($object, $field_name, $request) {\n\tglobal $wpdb;\n\t$location = $wpdb->get_row('SELECT wp_geo_mashup_locations.lat, wp_geo_mashup_locations.lng FROM wp_geo_mashup_locations INNER JOIN wp_geo_mashup_location_relationships ON wp_geo_mashup_locations.id = wp_geo_mashup_location_relationships.location_id\nWHERE wp_geo_mashup_location_relationships.object_id = ' . $object[\"id\"]);\n\tif ($location) {\n\t\treturn $location->lat . \",\" . $location->lng;\n\t} else {\n\t\treturn null;\n\t}\n}", "function sloodle_finished_login_coordinates($pos, $size)\n {\n // Make sure the parameters are valid types\n if (!is_string($pos) || !is_string($size)) {\n return FALSE;\n }\n // Convert both to arrays\n $posarr = sloodle_vector_to_array($pos);\n $sizearr = sloodle_vector_to_array($size);\n // Calculate a position just below the loginzone\n $coord = array();\n $coord['x'] = round($posarr['x'],0);\n $coord['y'] = round($posarr['y'],0);\n $coord['z'] = round(($posarr['z']-(($sizearr['z'])/2)-2),0);\n return $coord;\n }", "public function x() {\n return $this->coords[0];\n }", "public function getCoords(Path $path){\n $directionRepresentation = array(\n 'up' => 0,\n 'down' => 4,\n 'left' => 6,\n 'right' => 2,\n 'upleft' => 7,\n 'upright' => 1,\n 'downright' => 3,\n 'downleft' => 5\n );\n \n $from = $this->map->source->getKey();\n $to = $this->map->destination->getKey();\n $mapName = $this->map->mapName;\n \n //draw path on map\n $returnData = [];\n for($y = 1; $y <= $this->map->height; $y++){\n for($x = 1; $x <= $this->map->width; $x++){\n $node = $this->map->getNode($x, $y);\n $nodeRepresentation = Config::getNodeRepresentation($node->type);\n if(\n array_key_exists($node->getKey(), $path->nodes) && \n $node->type != NodeType::SOURCE &&\n $node->type != NodeType::DESTINATION\n ){\n $node = $path->nodes[$node->getKey()];\n $nodeRepresentation = $node->parentDirection;\n }\n\n if (isset($directionRepresentation[$nodeRepresentation]))\n $returnData[] = $directionRepresentation[$nodeRepresentation];\n }\n }\n // exit();\n\n return array_reverse($returnData);\n }", "public function testSquareOriginPoint()\n {\n $point = $this->grid100x100->pointToGridIndex(1, 1);\n $this->assertEquals(0, $point);\n }", "public static function getCornerSourceLocation($quads)\t \n\t{\n\t\t$sensors = [];\n\t\t$quadrants = [];\n\t\tforeach ($quads as $sensor => $quadrant) {\n\t\t\t$sensors[] = $sensor;\n\t\t\t$quadrants[] = $quadrant;\n\t\t}\n\t\n\t\t$sensors = self::getSensorSpoted($quads);\n\t\t\n\t\t$sensorL = self::getSensorLocation($sensors);\n\t\treturn (self::getSubQuadCenter($sensorL, $quadrants[0]));\n\t}", "public function getLatitude(): float;", "public function getZCoordinate()\n {\n return $this->getValueOfN() * (1 - pow($this->getValueOfSquareEccentricity(), 2)) * sin(\\deg2rad($this->latitude));\n }", "private function SWEREF99PositionPositionProjection(WGS84Position $position, $projection)\n {\n parent::__construct(Grid::SWEREF99);\n $gkProjection = new GaussKreugerProjection();\n $gkProjection->swedish_params($this->getProjectionString($projection));\n list($this->latitude, $this->longitude)\n = $gkProjection->geodetic_to_grid($position->getLatitude(), $position->getLongitude());\n $this->projection = $projection;\n }", "private function _projectSourceOnCanvas(&$source, &$canvas) {\n\t\t$srcX = 0;\n\t\t$srcY = 0;\n\t\tlist($projectionWidth, $projectionHeight) = $this->_getProjectionSize();\n\t\tlist($destX, $destY) = $this->_getLeftUpperCoordinateOnCanvas($projectionWidth, $projectionHeight);\n\t\timagecopyresampled($canvas, $source, $destX, $destY, $srcX, $srcY, $projectionWidth, $projectionHeight, $this->params['sourceWidth'], $this->params['sourceHeight']);\n\t}", "public static function Orthographic()\n {\n $m = new Matrix4(\n array(\n\n )\n );\n return $m;\n }", "function getCoordsForSQL3($strict = false) {\n\t\tif (is_null($this->x)) {\n\t\t\t$pos = $this->getPosition();\n\t\t\tif (!$strict) return \"`global_x`=$pos->x AND `global_y`=$pos->y AND `local_x`=$pos->lx AND `local_y`=$pos->ly\";\n\t\t\treturn \"`global_x`=NULL AND `global_y`=NULL\";\n\t\t}\n\t\treturn \"`global_x`=$this->x AND `global_y`=$this->y AND `local_x`=$this->localx AND `local_y`=$this->localy\";\n\t}", "public function isProjection();", "public function getArea() {\r\n return $this -> lato * $this -> lato ;\r\n }", "protected function calculateSpritePositions() {}", "public function getAxisCoordinates(array $axis, array $crop_selection) {\n return [\n 'x' => (int) $axis['x'] + ($crop_selection['width'] / 2),\n 'y' => (int) $axis['y'] + ($crop_selection['height'] / 2),\n ];\n }", "public function generateCropCoords($endW,$endH)\n {\n $originalInstance = $this->imageInstance;\n\n $origW = imagesx($originalInstance);\n $origH = imagesy($originalInstance);\n $origRatio= $origW/$origH;\n\n $endRatio = $endW/$endH;\n\n if($endRatio>$origRatio) //end will go from origTop to origBottom\n {\n $cropW=$origW;\n $cropH=$cropW/$endRatio;\n $cropX=0;\n $cropY=($origH-$cropH)/2;\n }\n else //end\n {\n $cropH=$origH;\n $cropW=$cropH*$endRatio;\n $cropY=0;\n $cropX=($origW-$cropW)/2;\n }\n\n $coords = array(\n 'x'=>$cropX,\n 'y'=>$cropY,\n 'x2'=>$cropX+$cropW,\n 'y2'=>$cropY+$cropH,\n 'w'=>$cropW,\n 'h'=>$cropH,\n );\n\n return $coords;\n }", "private function bound_to_coord($bound){\r\n $vertices=$bound->getVertices();\r\n $polygon=[\r\n 'x1' => $vertices[0]->getX(),\r\n 'y1' => $vertices[0]->getY(),\r\n 'x2' => $vertices[1]->getX(),\r\n 'y2' => $vertices[1]->getY(),\r\n 'x3' => $vertices[2]->getX(),\r\n 'y3' => $vertices[2]->getY(),\r\n 'x4' => $vertices[3]->getX(),\r\n 'y4' => $vertices[3]->getY(),\r\n ];\r\n return $polygon;\r\n }", "protected function coordinate()\n {\n $this->match(($this->lexer->isNextToken(Lexer::T_FLOAT) ? Lexer::T_FLOAT : Lexer::T_INTEGER));\n\n return $this->lexer->value();\n }", "public function getLongitude(): float;", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function iClickAdCoordinates()\n {\n //$session->moveto(array('xoffset' => 3, 'yoffset' => 300));\n //$this->getSession()->click();\n }", "public function refitCropCoords($coords,$targetAspect)\n {\n $ocoords = $coords;\n\n if(!isset($coords['w']) || !$coords['w'])\n {\n $coords['w'] = $coords['x2']-$coords['x'];\n }\n if(!isset($coords['h']) || !$coords['h'])\n {\n $coords['h'] = $coords['y2']-$coords['y']; \n }\n\n $originalAspect = $oA = $coords['w']/$coords['h'];\n $tA = $targetAspect;\n\n if($tA< $coords['w']/$coords['h'])\n {\n //widen\n $origW = $coords['w'];\n $coords['w'] = $coords['w']*($tA/$oA);//anaW\n $coords['x'] = $coords['x']-($coords['w'] - $origW)/2;\n $coords['x2']= $coords['x']+$coords['w'];\n }\n else\n {\n //heighten\n $origH = $coords['h'];\n $coords['h'] = $coords['h']/($tA/$oA);//anaH\n $coords['y'] = $coords['y']-($coords['h'] - $origH)/2;\n $coords['y2'] = $coords['y']+$coords['h'];\n }\n\n return $coords;\n }", "public function toXYZ()\n {\n $tmp_r = $this->red / 255;\n $tmp_g = $this->green / 255;\n $tmp_b = $this->blue / 255;\n if ($tmp_r > 0.04045) {\n $tmp_r = pow((($tmp_r + 0.055) / 1.055), 2.4);\n } else {\n $tmp_r = $tmp_r / 12.92;\n }\n if ($tmp_g > 0.04045) {\n $tmp_g = pow((($tmp_g + 0.055) / 1.055), 2.4);\n } else {\n $tmp_g = $tmp_g / 12.92;\n }\n if ($tmp_b > 0.04045) {\n $tmp_b = pow((($tmp_b + 0.055) / 1.055), 2.4);\n } else {\n $tmp_b = $tmp_b / 12.92;\n }\n $tmp_r = $tmp_r * 100;\n $tmp_g = $tmp_g * 100;\n $tmp_b = $tmp_b * 100;\n $new_x = $tmp_r * 0.4124 + $tmp_g * 0.3576 + $tmp_b * 0.1805;\n $new_y = $tmp_r * 0.2126 + $tmp_g * 0.7152 + $tmp_b * 0.0722;\n $new_z = $tmp_r * 0.0193 + $tmp_g * 0.1192 + $tmp_b * 0.9505;\n return new XYZ($new_x, $new_y, $new_z);\n }", "function is_in_circle(array $circle, array $proj)\r\n{\r\n\t$r = $circle['r'];\r\n\r\n\t// calculer de $d distance par rapport au centre du cercle du point $proj\r\n\t$d = pow(($circle['x'] - $proj['x']), 2) + pow(($circle['y'] - $proj['y']), 2);\r\n\r\n\t// si cette distance est inférieur au rayon du cercle c'est que le proj est dans le cercle.\r\n\tif($d < pow($r,2) ) return true;\r\n\r\n\treturn false;\r\n}", "public static function getCountrycoordArray()\n\t{\n\t\t$countrycoord = array();\n\t\t$countrycoord['AD'] = array(42.5, 1.5);\n\t\t$countrycoord['AE'] = array(24, 54);\n\t\t$countrycoord['AF'] = array(33, 65);\n\t\t$countrycoord['AG'] = array(17.05, -61.8);\n\t\t$countrycoord['AI'] = array(18.25, -63.17);\n\t\t$countrycoord['AL'] = array(41, 20);\n\t\t$countrycoord['AM'] = array(40, 45);\n\t\t$countrycoord['AN'] = array(12.25, -68.75);\n\t\t$countrycoord['AO'] = array(-12.5, 18.5);\n\t\t$countrycoord['AP'] = array(35, 105);\n\t\t$countrycoord['AQ'] = array(-90, 0);\n\t\t$countrycoord['AR'] = array(-34, -64);\n\t\t$countrycoord['AS'] = array(-14.33, -170);\n\t\t$countrycoord['AT'] = array(47.33, 13.33);\n\t\t$countrycoord['AU'] = array(-27, 133);\n\t\t$countrycoord['AW'] = array(12.5, -69.97);\n\t\t$countrycoord['AZ'] = array(40.5, 47.5);\n\t\t$countrycoord['BA'] = array(44, 18);\n\t\t$countrycoord['BB'] = array(13.17, -59.53);\n\t\t$countrycoord['BD'] = array(24, 90);\n\t\t$countrycoord['BE'] = array(50.83, 4);\n\t\t$countrycoord['BF'] = array(13, -2);\n\t\t$countrycoord['BG'] = array(43, 25);\n\t\t$countrycoord['BH'] = array(26, 50.55);\n\t\t$countrycoord['BI'] = array(-3.5, 30);\n\t\t$countrycoord['BJ'] = array(9.5, 2.25);\n\t\t$countrycoord['BM'] = array(32.33, -64.75);\n\t\t$countrycoord['BN'] = array(4.5, 114.67);\n\t\t$countrycoord['BO'] = array(-17, -65);\n\t\t$countrycoord['BR'] = array(-10, -55);\n\t\t$countrycoord['BS'] = array(24.25, -76);\n\t\t$countrycoord['BT'] = array(27.5, 90.5);\n\t\t$countrycoord['BV'] = array(-54.43, 3.4);\n\t\t$countrycoord['BW'] = array(-22, 24);\n\t\t$countrycoord['BY'] = array(53, 28);\n\t\t$countrycoord['BZ'] = array(17.25, -88.75);\n\t\t$countrycoord['CA'] = array(60, -95);\n\t\t$countrycoord['CC'] = array(-12.5, 96.83);\n\t\t$countrycoord['CD'] = array(0, 25);\n\t\t$countrycoord['CF'] = array(7, 21);\n\t\t$countrycoord['CG'] = array(-1, 15);\n\t\t$countrycoord['CH'] = array(47, 8);\n\t\t$countrycoord['CI'] = array(8, -5);\n\t\t$countrycoord['CK'] = array(-21.23, -159.77);\n\t\t$countrycoord['CL'] = array(-30, -71);\n\t\t$countrycoord['CM'] = array(6, 12);\n\t\t$countrycoord['CN'] = array(35, 105);\n\t\t$countrycoord['CO'] = array(4, -72);\n\t\t$countrycoord['CR'] = array(10, -84);\n\t\t$countrycoord['CU'] = array(21.5, -80);\n\t\t$countrycoord['CV'] = array(16, -24);\n\t\t$countrycoord['CX'] = array(-10.5, 105.67);\n\t\t$countrycoord['CY'] = array(35, 33);\n\t\t$countrycoord['CZ'] = array(49.75, 15.5);\n\t\t$countrycoord['DE'] = array(51, 9);\n\t\t$countrycoord['DJ'] = array(11.5, 43);\n\t\t$countrycoord['DK'] = array(56, 10);\n\t\t$countrycoord['DM'] = array(15.42, -61.33);\n\t\t$countrycoord['DO'] = array(19, -70.67);\n\t\t$countrycoord['DZ'] = array(28, 3);\n\t\t$countrycoord['EC'] = array(-2, -77.5);\n\t\t$countrycoord['EE'] = array(59, 26);\n\t\t$countrycoord['EG'] = array(27, 30);\n\t\t$countrycoord['EH'] = array(24.5, -13);\n\t\t$countrycoord['ER'] = array(15, 39);\n\t\t$countrycoord['ES'] = array(40, -4);\n\t\t$countrycoord['ET'] = array(8, 38);\n\t\t$countrycoord['EU'] = array(47, 8);\n\t\t$countrycoord['FI'] = array(64, 26);\n\t\t$countrycoord['FJ'] = array(-18, 175);\n\t\t$countrycoord['FK'] = array(-51.75, -59);\n\t\t$countrycoord['FM'] = array(6.92, 158.25);\n\t\t$countrycoord['FO'] = array(62, -7);\n\t\t$countrycoord['FR'] = array(46, 2);\n\t\t$countrycoord['GA'] = array(-1, 11.75);\n\t\t$countrycoord['GB'] = array(54, -2);\n\t\t$countrycoord['GD'] = array(12.12, -61.67);\n\t\t$countrycoord['GE'] = array(42, 43.5);\n\t\t$countrycoord['GF'] = array(4, -53);\n\t\t$countrycoord['GH'] = array(8, -2);\n\t\t$countrycoord['GI'] = array(36.18, -5.37);\n\t\t$countrycoord['GL'] = array(72, -40);\n\t\t$countrycoord['GM'] = array(13.47, -16.57);\n\t\t$countrycoord['GN'] = array(11, -10);\n\t\t$countrycoord['GP'] = array(16.25, -61.58);\n\t\t$countrycoord['GQ'] = array(2, 10);\n\t\t$countrycoord['GR'] = array(39, 22);\n\t\t$countrycoord['GS'] = array(-54.5, -37);\n\t\t$countrycoord['GT'] = array(15.5, -90.25);\n\t\t$countrycoord['GU'] = array(13.47, 144.78);\n\t\t$countrycoord['GW'] = array(12, -15);\n\t\t$countrycoord['GY'] = array(5, -59);\n\t\t$countrycoord['HK'] = array(22.25, 114.17);\n\t\t$countrycoord['HM'] = array(-53.1, 72.52);\n\t\t$countrycoord['HN'] = array(15, -86.5);\n\t\t$countrycoord['HR'] = array(45.17, 15.5);\n\t\t$countrycoord['HT'] = array(19, -72.42);\n\t\t$countrycoord['HU'] = array(47, 20);\n\t\t$countrycoord['ID'] = array(-5, 120);\n\t\t$countrycoord['IE'] = array(53, -8);\n\t\t$countrycoord['IL'] = array(31.5, 34.75);\n\t\t$countrycoord['IN'] = array(20, 77);\n\t\t$countrycoord['IO'] = array(-6, 71.5);\n\t\t$countrycoord['IQ'] = array(33, 44);\n\t\t$countrycoord['IR'] = array(32, 53);\n\t\t$countrycoord['IS'] = array(65, -18);\n\t\t$countrycoord['IT'] = array(42.83, 12.83);\n\t\t$countrycoord['JM'] = array(18.25, -77.5);\n\t\t$countrycoord['JO'] = array(31, 36);\n\t\t$countrycoord['JP'] = array(36, 138);\n\t\t$countrycoord['KE'] = array(1, 38);\n\t\t$countrycoord['KG'] = array(41, 75);\n\t\t$countrycoord['KH'] = array(13, 105);\n\t\t$countrycoord['KI'] = array(1.42, 173);\n\t\t$countrycoord['KM'] = array(-12.17, 44.25);\n\t\t$countrycoord['KN'] = array(17.33, -62.75);\n\t\t$countrycoord['KP'] = array(40, 127);\n\t\t$countrycoord['KR'] = array(37, 127.5);\n\t\t$countrycoord['KW'] = array(29.34, 47.66);\n\t\t$countrycoord['KY'] = array(19.5, -80.5);\n\t\t$countrycoord['KZ'] = array(48, 68);\n\t\t$countrycoord['LA'] = array(18, 105);\n\t\t$countrycoord['LB'] = array(33.83, 35.83);\n\t\t$countrycoord['LC'] = array(13.88, -61.13);\n\t\t$countrycoord['LI'] = array(47.17, 9.53);\n\t\t$countrycoord['LK'] = array(7, 81);\n\t\t$countrycoord['LR'] = array(6.5, -9.5);\n\t\t$countrycoord['LS'] = array(-29.5, 28.5);\n\t\t$countrycoord['LT'] = array(56, 24);\n\t\t$countrycoord['LU'] = array(49.75, 6.17);\n\t\t$countrycoord['LV'] = array(57, 25);\n\t\t$countrycoord['LY'] = array(25, 17);\n\t\t$countrycoord['MA'] = array(32, -5);\n\t\t$countrycoord['MC'] = array(43.73, 7.4);\n\t\t$countrycoord['MD'] = array(47, 29);\n\t\t$countrycoord['ME'] = array(42, 19);\n\t\t$countrycoord['MG'] = array(-20, 47);\n\t\t$countrycoord['MH'] = array(9, 168);\n\t\t$countrycoord['MK'] = array(41.83, 22);\n\t\t$countrycoord['ML'] = array(17, -4);\n\t\t$countrycoord['MM'] = array(22, 98);\n\t\t$countrycoord['MN'] = array(46, 105);\n\t\t$countrycoord['MO'] = array(22.17, 113.55);\n\t\t$countrycoord['MP'] = array(15.2, 145.75);\n\t\t$countrycoord['MQ'] = array(14.67, -61);\n\t\t$countrycoord['MR'] = array(20, -12);\n\t\t$countrycoord['MS'] = array(16.75, -62.2);\n\t\t$countrycoord['MT'] = array(35.83, 14.58);\n\t\t$countrycoord['MU'] = array(-20.28, 57.55);\n\t\t$countrycoord['MV'] = array(3.25, 73);\n\t\t$countrycoord['MW'] = array(-13.5, 34);\n\t\t$countrycoord['MX'] = array(23, -102);\n\t\t$countrycoord['MY'] = array(2.5, 112.5);\n\t\t$countrycoord['MZ'] = array(-18.25, 35);\n\t\t$countrycoord['NA'] = array(-22, 17);\n\t\t$countrycoord['NC'] = array(-21.5, 165.5);\n\t\t$countrycoord['NE'] = array(16, 8);\n\t\t$countrycoord['NF'] = array(-29.03, 167.95);\n\t\t$countrycoord['NG'] = array(10, 8);\n\t\t$countrycoord['NI'] = array(13, -85);\n\t\t$countrycoord['NL'] = array(52.5, 5.75);\n\t\t$countrycoord['NO'] = array(62, 10);\n\t\t$countrycoord['NP'] = array(28, 84);\n\t\t$countrycoord['NR'] = array(-0.53, 166.92);\n\t\t$countrycoord['NU'] = array(-19.03, -169.87);\n\t\t$countrycoord['NZ'] = array(-41, 174);\n\t\t$countrycoord['OM'] = array(21, 57);\n\t\t$countrycoord['PA'] = array(9, -80);\n\t\t$countrycoord['PE'] = array(-10, -76);\n\t\t$countrycoord['PF'] = array(-15, -140);\n\t\t$countrycoord['PG'] = array(-6, 147);\n\t\t$countrycoord['PH'] = array(13, 122);\n\t\t$countrycoord['PK'] = array(30, 70);\n\t\t$countrycoord['PL'] = array(52, 20);\n\t\t$countrycoord['PM'] = array(46.83, -56.33);\n\t\t$countrycoord['PR'] = array(18.25, -66.5);\n\t\t$countrycoord['PS'] = array(32, 35.25);\n\t\t$countrycoord['PT'] = array(39.5, -8);\n\t\t$countrycoord['PW'] = array(7.5, 134.5);\n\t\t$countrycoord['PY'] = array(-23, -58);\n\t\t$countrycoord['QA'] = array(25.5, 51.25);\n\t\t$countrycoord['RE'] = array(-21.1, 55.6);\n\t\t$countrycoord['RO'] = array(46, 25);\n\t\t$countrycoord['RS'] = array(44, 21);\n\t\t$countrycoord['RU'] = array(60, 100);\n\t\t$countrycoord['RW'] = array(-2, 30);\n\t\t$countrycoord['SA'] = array(25, 45);\n\t\t$countrycoord['SB'] = array(-8, 159);\n\t\t$countrycoord['SC'] = array(-4.58, 55.67);\n\t\t$countrycoord['SD'] = array(15, 30);\n\t\t$countrycoord['SE'] = array(62, 15);\n\t\t$countrycoord['SG'] = array(1.37, 103.8);\n\t\t$countrycoord['SH'] = array(-15.93, -5.7);\n\t\t$countrycoord['SI'] = array(46, 15);\n\t\t$countrycoord['SJ'] = array(78, 20);\n\t\t$countrycoord['SK'] = array(48.67, 19.5);\n\t\t$countrycoord['SL'] = array(8.5, -11.5);\n\t\t$countrycoord['SM'] = array(43.77, 12.42);\n\t\t$countrycoord['SN'] = array(14, -14);\n\t\t$countrycoord['SO'] = array(10, 49);\n\t\t$countrycoord['SR'] = array(4, -56);\n\t\t$countrycoord['ST'] = array(1, 7);\n\t\t$countrycoord['SV'] = array(13.83, -88.92);\n\t\t$countrycoord['SY'] = array(35, 38);\n\t\t$countrycoord['SZ'] = array(-26.5, 31.5);\n\t\t$countrycoord['TC'] = array(21.75, -71.58);\n\t\t$countrycoord['TD'] = array(15, 19);\n\t\t$countrycoord['TF'] = array(-43, 67);\n\t\t$countrycoord['TG'] = array(8, 1.17);\n\t\t$countrycoord['TH'] = array(15, 100);\n\t\t$countrycoord['TJ'] = array(39, 71);\n\t\t$countrycoord['TK'] = array(-9, -172);\n\t\t$countrycoord['TM'] = array(40, 60);\n\t\t$countrycoord['TN'] = array(34, 9);\n\t\t$countrycoord['TO'] = array(-20, -175);\n\t\t$countrycoord['TR'] = array(39, 35);\n\t\t$countrycoord['TT'] = array(11, -61);\n\t\t$countrycoord['TV'] = array(-8, 178);\n\t\t$countrycoord['TW'] = array(23.5, 121);\n\t\t$countrycoord['TZ'] = array(-6, 35);\n\t\t$countrycoord['UA'] = array(49, 32);\n\t\t$countrycoord['UG'] = array(1, 32);\n\t\t$countrycoord['UM'] = array(19.28, 166.6);\n\t\t$countrycoord['US'] = array(38, -97);\n\t\t$countrycoord['UY'] = array(-33, -56);\n\t\t$countrycoord['UZ'] = array(41, 64);\n\t\t$countrycoord['VA'] = array(41.9, 12.45);\n\t\t$countrycoord['VC'] = array(13.25, -61.2);\n\t\t$countrycoord['VE'] = array(8, -66);\n\t\t$countrycoord['VG'] = array(18.5, -64.5);\n\t\t$countrycoord['VI'] = array(18.33, -64.83);\n\t\t$countrycoord['VN'] = array(16, 106);\n\t\t$countrycoord['VU'] = array(-16, 167);\n\t\t$countrycoord['WF'] = array(-13.3, -176.2);\n\t\t$countrycoord['WS'] = array(-13.58, -172.33);\n\t\t$countrycoord['YE'] = array(15, 48);\n\t\t$countrycoord['YT'] = array(-12.83, 45.17);\n\t\t$countrycoord['ZA'] = array(-29, 24);\n\t\t$countrycoord['ZM'] = array(-15, 30);\n\t\t$countrycoord['ZW'] = array(-20, 30);\n\n\t\treturn $countrycoord;\n\t}", "public function getAllProjections()\n {\n try{\n return $this->projDao->getAllProjections();\n }\n catch(Exception $e){\n $message=\"Error getting the projections.\";\n include(VIEWS_PATH.\"message_view.php\");\n }\n }", "private function _setMapExtent()\n {\n $ext = explode(',', $this->bbox_map);\n if (isset($this->projection) && $this->projection != $this->projection_map) {\n $origProjObj = ms_newProjectionObj(self::getProjection($this->projection_map));\n $newProjObj = ms_newProjectionObj(self::getProjection($this->default_projection));\n\n $poPoint1 = ms_newPointObj();\n $poPoint1->setXY($ext[0], $ext[1]);\n\n $poPoint2 = ms_newPointObj();\n $poPoint2->setXY($ext[2], $ext[3]);\n\n $poPoint1->project($origProjObj, $newProjObj);\n $poPoint2->project($origProjObj, $newProjObj);\n\n $ext[0] = $poPoint1->x;\n $ext[1] = $poPoint1->y;\n $ext[2] = $poPoint2->x;\n $ext[3] = $poPoint2->y;\n\n if ($poPoint1->x < $this->max_extent[0]\n || $poPoint1->y < $this->max_extent[1]\n || $poPoint2->x > $this->max_extent[2]\n || $poPoint2->y > $this->max_extent[3]\n || $poPoint1->x > $poPoint2->x\n || $poPoint1->y > $poPoint2->y\n ) {\n $ext[0] = $this->max_extent[0];\n $ext[1] = $this->max_extent[1];\n $ext[2] = $this->max_extent[2];\n $ext[3] = $this->max_extent[3];\n }\n }\n\n $ext0 = (min($ext[0], $ext[2]) == $ext[0]) ? $ext[0] : $ext[2];\n $ext2 = (max($ext[0], $ext[2]) == $ext[2]) ? $ext[2] : $ext[0];\n $ext1 = (min($ext[1], $ext[3]) == $ext[1]) ? $ext[1] : $ext[3];\n $ext3 = (max($ext[1], $ext[3]) == $ext[3]) ? $ext[3] : $ext[1];\n\n // Set the padding correction factors because final extent produced after draw() is off from setExtent\n $cellsize = max(($ext2 - $ext0)/($this->image_size[0]-1), ($ext3 - $ext1)/($this->image_size[1]-1));\n\n if ($cellsize > 0) {\n $ox = max((($this->image_size[0]-1) - ($ext2 - $ext0)/$cellsize)/2, 0);\n $oy = max((($this->image_size[1]-1) - ($ext3 - $ext1)/$cellsize)/2, 0);\n $this->ox_pad = $ox*$cellsize;\n $this->oy_pad = $oy*$cellsize;\n }\n\n $this->map_obj->setExtent($ext0, $ext1, $ext2, $ext3);\n }" ]
[ "0.63214964", "0.6132625", "0.5935755", "0.5798123", "0.5664144", "0.5513403", "0.5512146", "0.5459305", "0.5450354", "0.5449349", "0.54250354", "0.54250354", "0.54176974", "0.5407727", "0.53592694", "0.52250606", "0.52245295", "0.515584", "0.5059417", "0.50372857", "0.50313485", "0.49857906", "0.49243087", "0.49231005", "0.49073642", "0.4905051", "0.48605835", "0.48551968", "0.4835936", "0.48173353", "0.48089007", "0.4800477", "0.47845352", "0.47458035", "0.474172", "0.47390854", "0.4709791", "0.46973276", "0.46899277", "0.46899277", "0.46485916", "0.46481133", "0.46367913", "0.461872", "0.4610864", "0.46019524", "0.45993203", "0.45963272", "0.45867714", "0.45710775", "0.45553523", "0.45483774", "0.4539109", "0.45338577", "0.45319495", "0.4516828", "0.4507224", "0.45033535", "0.44942376", "0.44895938", "0.44825107", "0.44790694", "0.44691026", "0.4459989", "0.44563174", "0.4447702", "0.44451576", "0.44451576", "0.4444167", "0.44402713", "0.44373864", "0.443305", "0.44276667", "0.4427462", "0.4425578", "0.4425426", "0.44243172", "0.44152308", "0.44109258", "0.44096476", "0.44076082", "0.4406279", "0.43959573", "0.43951428", "0.43917763", "0.43872502", "0.43857205", "0.43831354", "0.4376426", "0.4376426", "0.4376426", "0.4376426", "0.4376426", "0.4374603", "0.43728524", "0.43614137", "0.4360382", "0.43512508", "0.43455473", "0.4340663" ]
0.61274034
2
Calculate projection size of source image on canvas. The resulting projection might be larger than the canvas; this function does not consider cutoff by means of cropping.
private function _getProjectionSize() { $sourceWidth = $this->params['sourceWidth']; $sourceHeight = $this->params['sourceHeight']; $sourceRatio = $sourceWidth / $sourceHeight; $canvasWidth = $this->params['w']; $canvasHeight = $this->params['h']; $canvasRatio = $canvasWidth / $canvasHeight; // the image is not allowed to be cut off in any dimension if ($sourceRatio < $canvasRatio) { // source is less landscape-like than canvas $leadDimension = !$this->params['crop'] ? 'Height' : 'Width'; } else { // source is more landscape-like than canvas $leadDimension = !$this->params['crop'] ? 'Width' : 'Height'; } if ( !$this->params['grow'] && ${'source'.$leadDimension} < ${'canvas'.$leadDimension} ) { ${'projection'.$leadDimension} = ${'source'.$leadDimension}; } else { ${'projection'.$leadDimension} = ${'canvas'.$leadDimension}; } if (isset($projectionWidth)) { $projectionHeight = $projectionWidth / $sourceRatio; } elseif (isset($projectionHeight)) { $projectionWidth = $projectionHeight * $sourceRatio; } return array(round($projectionWidth), round($projectionHeight)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCropWidth()\n {\n return $this->_daImage->getCropWidth( $this->getId() );\n }", "abstract public function calculateCropBoxSize();", "public function getCropHeight()\n {\n return $this->_daImage->getCropHeight( $this->getId() );\n }", "private function _projectSourceOnCanvas(&$source, &$canvas) {\n\t\t$srcX = 0;\n\t\t$srcY = 0;\n\t\tlist($projectionWidth, $projectionHeight) = $this->_getProjectionSize();\n\t\tlist($destX, $destY) = $this->_getLeftUpperCoordinateOnCanvas($projectionWidth, $projectionHeight);\n\t\timagecopyresampled($canvas, $source, $destX, $destY, $srcX, $srcY, $projectionWidth, $projectionHeight, $this->params['sourceWidth'], $this->params['sourceHeight']);\n\t}", "public function CalcWidthHeight()\n {\n list($this->width, $this->height) = $this->imgInfo;\n\n $aspectRatio = $this->width / $this->height;\n\n if($this->cropToFit && $this->newWidth && $this->newHeight) {\n $targetRatio = $this->newWidth / $this->newHeight;\n $this->cropWidth = $targetRatio > $aspectRatio ? $this->width : round($this->height * $targetRatio);\n $this->cropHeight = $targetRatio > $aspectRatio ? round($this->width / $targetRatio) : $this->height;\n if($this->verbose) { self::verbose(\"Crop to fit into box of {$this->newWidth}x{$this->newHeight}. Cropping dimensions: {$this->cropWidth}x{$this->cropHeight}.\"); }\n }\n else if($this->newWidth && !$this->newHeight) {\n $this->newHeight = round($this->newWidth / $aspectRatio);\n if($this->verbose) { self::verbose(\"New width is known {$this->newWidth}, height is calculated to {$this->newHeight}.\"); }\n }\n else if(!$this->newWidth && $this->newHeight) {\n $this->newWidth = round($this->newHeight * $aspectRatio);\n if($this->verbose) { self::verbose(\"New height is known {$this->newHeight}, width is calculated to {$this->newWidth}.\"); }\n }\n else if($this->newWidth && $this->newHeight) {\n $ratioWidth = $this->width / $this->newWidth;\n $ratioHeight = $this->height / $this->newHeight;\n $ratio = ($ratioWidth > $ratioHeight) ? $ratioWidth : $ratioHeight;\n $this->newWidth = round($this->width / $ratio);\n $this->newHeight = round($this->height / $ratio);\n if($this->verbose) { self::verbose(\"New width & height is requested, keeping aspect ratio results in {$this->newWidth}x{$this->newHeight}.\"); }\n }\n else {\n $this->newWidth = $this->width;\n $this->newHeight = $this->height;\n if($this->verbose) { self::verbose(\"Keeping original width & heigth.\"); }\n }\n }", "public function getImageDimensions()\n {\n $dimension = $this->_getSetting('dimension');\n if ($this->getRow()->use_crop) {\n $parentDimension = $this->_getImageEnlargeComponent()->getImageDimensions();\n $dimension['crop'] = $parentDimension['crop'];\n }\n $data = $this->getImageData();\n return Kwf_Media_Image::calculateScaleDimensions($data['file'], $dimension);\n }", "function image_crop()\n\t{\n\t\t$protocol = 'image_process_'.$this->resize_protocol;\n\t\t\n\t\tif (substr($protocol, -3) == 'gd2')\n\t\t{\n\t\t\t$protocol = 'image_process_gd';\n\t\t}\n\t\t\n\t\treturn $this->$protocol('crop');\n\t}", "public function getPreviewPixelWidth()\n {\n return isset($this->preview_pixel_width) ? $this->preview_pixel_width : null;\n }", "private function _getLeftUpperCoordinateOnCanvas($projectionWidth, $projectionHeight) {\n\t\t$projectionRatio = $projectionWidth / $projectionHeight;\n\t\t$canvasWidth = $this->params['w'];\n\t\t$canvasHeight = $this->params['h'];\n\t\t$canvasRatio = $canvasWidth / $canvasHeight;\n\n\t\t//\talways center the projection horizontally\n\t\tif ($projectionWidth > $canvasWidth) {\n\t\t\t$x = - (($projectionWidth / 2) - ($this->params['w'] / 2));\n\t\t} else {\n\t\t\t$x = ($this->params['w'] - $projectionWidth) / 2;\n\t\t}\n\n\t\tswitch ($this->params['cropfocus']) {\n\t\t\tcase 'face':\n\t\t\t\t//\tif the image is taller than the canvas, move the starting point halfway up the center\n\t\t\t\tif ($projectionHeight > $canvasHeight) {\n\t\t\t\t\t$y = - ((($projectionHeight / 2) - ($this->params['h'] / 2)) / 2);\n\t\t\t\t} else {\n\t\t\t\t\t$y = ($this->params['h'] - $projectionHeight) / 2;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'center':\n\t\t\tdefault:\n\t\t\t\t//\tcenter the projection vertically\n\t\t\t\tif ($projectionHeight > $canvasHeight) {\n\t\t\t\t\t$y = - (($projectionHeight / 2) - ($this->params['h'] / 2));\n\t\t\t\t} else {\n\t\t\t\t\t$y = ($this->params['h'] - $projectionHeight) / 2;\n\t\t\t\t}\n\t\t}\n\n\t\treturn array($x, $y);\n\t}", "function image_reproportion()\n\t{\n\t\tif ( ! is_numeric($this->dst_width) OR ! is_numeric($this->dst_height) OR $this->dst_width == 0 OR $this->dst_height == 0)\n\t\t\treturn;\n\t\t\n\t\tif ( ! is_numeric($this->src_width) OR ! is_numeric($this->src_height) OR $this->src_width == 0 OR $this->src_height == 0)\n\t\t\treturn;\n\t\n\t\tif (($this->dst_width >= $this->src_width) AND ($this->dst_height >= $this->src_height))\n\t\t{\n\t\t\t$this->dst_width = $this->src_width;\n\t\t\t$this->dst_height = $this->src_height;\n\t\t}\n\t\t\n\t\t$new_width\t= ceil($this->src_width*$this->dst_height/$this->src_height);\t\t\n\t\t$new_height\t= ceil($this->dst_width*$this->src_height/$this->src_width);\n\t\t\n\t\t$ratio = (($this->src_height/$this->src_width) - ($this->dst_height/$this->dst_width));\n\n\t\tif ($this->master_dim != 'width' AND $this->master_dim != 'height')\n\t\t{\n\t\t\t$this->master_dim = ($ratio < 0) ? 'width' : 'height';\n\t\t}\n\t\t\n\t\tif (($this->dst_width != $new_width) AND ($this->dst_height != $new_height))\n\t\t{\n\t\t\tif ($this->master_dim == 'height')\n\t\t\t{\n\t\t\t\t$this->dst_width = $new_width;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->dst_height = $new_height;\n\t\t\t}\n\t\t}\n\t}", "public function sizeImg($width, $height, $crop = true);", "private function getWorkingImageWidth()\n {\n return imagesx($this->workingImageResource);\n }", "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}", "function cropRatioImage(&$srcImage, $src_width, $src_height, $desiredWidth = 0, $desiredHeight = 0)\n\t{\n\t\t// if only one size is specified\n\t\tif ($desiredWidth == '*' || $desiredHeight == '*')\n\t\t{\n\t\t\t$new_size = $this->calculateSize($src_width, $src_height, $desiredWidth, $desiredHeight);\n\t\t\t$desiredWidth = $new_size['width'];\n\t\t\t$desiredHeight = $new_size['height'];\n\t\t}\n\t\t\n\t\t// get aspect ratio\n\t\t$ratioW = $src_width / $desiredWidth;\n\t\t$ratioH = $src_height / $desiredHeight;\n\t\t\n\t\t$ratio = ($ratioW < $ratioH)?$ratioW:$ratioH;\n\t\t\t\n\t\t// calculate new height and width based on the ratio\n\t\t$new_width = floor($desiredWidth * $ratio);\n\t\t$new_height = floor($desiredHeight * $ratio);\n\t\t\n\t\t// calculate crop start position\n\t\t$startX = floor(($src_width - $new_width) / 2);\n\t\t$startY = floor(($src_height - $new_height) / 2);\n\t\t\n\t\treturn $this->cropImage($srcImage, $startX, $startY, $new_width, $new_height);\n\t}", "public function getPixelWidth()\n {\n return isset($this->pixel_width) ? $this->pixel_width : null;\n }", "public function getWidth()\n\t{\n\t\treturn $this->image->getWidth();\n\t}", "public function crop()\n\t{\n\t\t$protocol = ($this->image_library === 'gd2') ? 'image_process_gd' : 'image_process_'.$this->image_library;\n\t\treturn $this->$protocol('crop');\n\t}", "protected function resize()\n {\n $width = $this->width;\n $height = $this->height;\n $orig_width = imagesx($this->image);\n $orig_height = imagesy($this->image);\n \n // Determine new image dimensions\n if($this->mode === \"crop\"){ // Crop image\n \n $max_width = $crop_width = $width;\n $max_height = $crop_height = $height;\n \n $x_ratio = @($max_width / $orig_width);\n $y_ratio = @($max_height / $orig_height);\n \n if($orig_width > $orig_height){ // Original is wide\n $height = $max_height;\n $width = ceil($y_ratio * $orig_width);\n \n } elseif($orig_height > $orig_width){ // Original is tall\n $width = $max_width;\n $height = ceil($x_ratio * $orig_height);\n \n } else { // Original is square\n $this->mode = \"fit\";\n \n return $this->resize();\n }\n \n // Adjust if the crop width is less than the requested width to avoid black lines\n if($width < $crop_width){\n $width = $max_width;\n $height = ceil($x_ratio * $orig_height);\n }\n \n } elseif($this->mode === \"fit\"){ // Fits the image according to aspect ratio to within max height and width\n $max_width = $width;\n $max_height = $height;\n \n $x_ratio = @($max_width / $orig_width);\n $y_ratio = @($max_height / $orig_height);\n \n if( ($orig_width <= $max_width) && ($orig_height <= $max_height) ){ // Image is smaller than max height and width so don't resize\n $tn_width = $orig_width;\n $tn_height = $orig_height;\n \n } elseif(($x_ratio * $orig_height) < $max_height){ // Wider rather than taller\n $tn_height = ceil($x_ratio * $orig_height);\n $tn_width = $max_width;\n \n } else { // Taller rather than wider\n $tn_width = ceil($y_ratio * $orig_width);\n $tn_height = $max_height;\n }\n \n $width = $tn_width;\n $height = $tn_height;\n \n } elseif($this->mode === \"fit-x\"){ // Sets the width to the max width and the height according to aspect ratio (will stretch if too small)\n $height = @round($orig_height * $width / $orig_width);\n \n if($orig_height <= $height){ // Don't stretch if smaller\n $width = $orig_width;\n $height = $orig_height;\n }\n \n } elseif($this->mode === \"fit-y\"){ // Sets the height to the max height and the width according to aspect ratio (will stretch if too small)\n $width = @round($orig_width * $height / $orig_height);\n \n if($orig_width <= $width){ // Don't stretch if smaller\n $width = $orig_width;\n $height = $orig_height;\n }\n } else {\n throw new \\Exception('Invalid mode: ' . $this->mode);\n }\n \n\n // Resize\n $this->temp = imagecreatetruecolor($width, $height);\n \n // Preserve transparency if a png\n if($this->image_info['mime'] == 'image/png'){\n imagealphablending($this->temp, false);\n imagesavealpha($this->temp, true);\n }\n \n imagecopyresampled($this->temp, $this->image, 0, 0, 0, 0, $width, $height, $orig_width, $orig_height);\n $this->sync();\n \n \n // Cropping?\n if($this->mode === \"crop\"){ \n $orig_width = imagesx($this->image);\n $orig_height = imagesy($this->image);\n \n $x_mid = $orig_width/2; // horizontal middle\n $y_mid = $orig_height/2; // vertical middle\n \n $this->temp = imagecreatetruecolor($crop_width, $crop_height);\n \n // Preserve transparency if a png\n if($this->image_info['mime'] == 'image/png'){\n imagealphablending($this->temp, false);\n imagesavealpha($this->temp, true);\n }\n\n imagecopyresampled($this->temp, $this->image, 0, 0, ($x_mid-($crop_width/2)), ($y_mid-($crop_height/2)), $crop_width, $crop_height, $crop_width, $crop_height);\n $this->sync();\n }\n }", "public function getWidth() {\n return imagesx($this->image);\n }", "function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = \\false)\n {\n }", "public function getWidth()\n {\n return imagesx($this->image);\n }", "function resizeCropImage($src, $dst, $dstx, $dsty){\n\t\t//$dst = destination image location\n\t\t//$dstx = user defined width of image\n\t\t//$dsty = user defined height of image\n\t\t$allowedExtensions = 'jpg jpeg gif png';\n\t\t$name = explode(\".\", strtolower($src));\n\t\t$currentExtensions = $name[count($name)-1];\n\t\t$extensions = explode(\" \", $allowedExtensions);\n\n\t\tfor($i=0; count($extensions)>$i; $i=$i+1) {\n\t\t\tif($extensions[$i]==$currentExtensions)\n\t\t\t{ \n\t\t\t\t$extensionOK=1; \n\t\t\t\t$fileExtension=$extensions[$i]; \n\t\t\t\tbreak; \n\t\t\t}\n\t\t}\n\n\t\tif($extensionOK){\n\t\t\t$size = getImageSize($src);\n\t\t\t$width = $size[0];\n\t\t\t$height = $size[1];\n\t\t\tif($width >= $dstx AND $height >= $dsty){\n\t\t\t\t$proportion_X = $width / $dstx;\n\t\t\t\t$proportion_Y = $height / $dsty;\n\t\t\t\tif($proportion_X > $proportion_Y ){\n\t\t\t\t\t$proportion = $proportion_Y;\n\t\t\t\t}else{\n\t\t\t\t\t$proportion = $proportion_X ;\n\t\t\t\t}\n\t\t\t\t$target['width'] = $dstx * $proportion;\n\t\t\t\t$target['height'] = $dsty * $proportion;\n\t\t\t\t$original['diagonal_center'] = round(sqrt(($width*$width)+($height*$height))/2);\n\t\t\t\t$target['diagonal_center'] = round(sqrt(($target['width']*$target['width']) + ($target['height']*$target['height']))/2);\n\t\t\t\t$crop = round($original['diagonal_center'] - $target['diagonal_center']);\n\t\t\t\tif($proportion_X < $proportion_Y ){\n\t\t\t\t\t$target['x'] = 0;\n\t\t\t\t\t$target['y'] = round((($height/2)*$crop)/$target['diagonal_center']);\n\t\t\t\t}else{\n\t\t\t\t\t$target['x'] = round((($width/2)*$crop)/$target['diagonal_center']);\n\t\t\t\t\t$target['y'] = 0;\n\t\t\t\t}\n\t\t\t\tif($fileExtension == \"jpg\" OR $fileExtension=='jpeg'){ \n\t\t\t\t\t$from = ImageCreateFromJpeg($src); \n\t\t\t\t} elseif ($fileExtension == \"gif\"){ \n\t\t\t\t\t$from = ImageCreateFromGIF($src); \n\t\t\t\t} elseif ($fileExtension == 'png'){\n\t\t\t\t\t$from = imageCreateFromPNG($src);\n\t\t\t\t}\n\t\t\t\t$new = ImageCreateTrueColor ($dstx,$dsty);\n\t\t\t\timagecopyresampled ($new, $from, 0, 0, $target['x'], \n\t\t\t\t$target['y'], $dstx, $dsty, $target['width'], $target['height']);\n\t\t\t\tif($fileExtension == \"jpg\" OR $fileExtension == 'jpeg'){ \n\t\t\t\t\timagejpeg($new, $dst, 70); \n\t\t\t\t} elseif ($fileExtension == \"gif\"){ \n\t\t\t\t\timagegif($new, $dst); \n\t\t\t\t}elseif ($fileExtension == 'png'){\n\t\t\t\t\timagepng($new, $dst);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcopy($src, $dst);\n\t\t\t}\n\t\t}\n\t}", "private function __setOptimalSizeByCrop() {\n \n $heightRatio = $this->__originalImageHeight / $this->__requestedHeight;\n $widthRatio = $this->__originalImageWidth / $this->__requestedWidth;\n \n if ($heightRatio < $widthRatio) {\n $optimalRatio = $heightRatio;\n } else {\n $optimalRatio = $widthRatio;\n }\n \n $this->__optimalHeight = $this->__originalImageHeight / $optimalRatio;\n $this->__optimalWidth = $this->__originalImageWidth / $optimalRatio;\n \n }", "public function get_image_width()\n {\n }", "function cropImage($param=array())\r\n {\r\n $ret = array(\r\n 'msg' => false,\r\n 'sts' => false,\r\n );\r\n\r\n $final_size = $param['final_size'];\r\n #$filename = $final_size.'-'.$param['img_newname'];\r\n $filename = $param['img_newname'];\r\n $target_dir = $param['dest_path'];\r\n $target_name = $target_dir.$filename;\r\n $source_name = $param['img_real'];\r\n \r\n //get size from real image \r\n $size = getimagesize($source_name);\r\n $targ_w = $param['w'];\r\n $targ_h = $param['h'];\r\n\r\n //get size from ratio\r\n $final_size = explode(\"x\", $final_size);\r\n $final_w = $final_size[0];\r\n $final_h = $final_size[1];\r\n \r\n if($final_w==='auto' && $final_h==='auto'){ //detect if width and height ratio is \"auto\" then readjust width and height size\r\n $final_w = $targ_w;\r\n $final_h = $targ_h;\r\n }elseif($final_w==='auto'){ //detect if width ratio is \"auto\" then readjust width size\r\n $final_w = intval(($final_size[1] * $targ_w) / $targ_h);\r\n }elseif($final_h==='auto'){ //detect if height ratio is \"auto\" then readjust height size\r\n $final_h = intval(($final_size[0] * $targ_h) / $targ_w);\r\n }\r\n //end\r\n \r\n \r\n $jpeg_quality = 90;\r\n $img_r = imagecreatefromjpeg($source_name);\r\n $dst_r = ImageCreateTrueColor( $final_w, $final_h );\r\n \r\n imagecopyresized(\r\n $dst_r, $img_r, \r\n 0,0, \r\n $param['x'],$param['y'], \r\n $final_w,$final_h,\r\n $param['w'],$param['h']\r\n );\r\n \r\n imagejpeg($dst_r,$target_name,$jpeg_quality);\r\n #$this->send_to_server( array($target_name) );\r\n $url_target_name = str_replace('/data/shopkl/_assets/', 'http://klimg.com/kapanlagi.com/klshop/', $target_name);\r\n \r\n\t\t\t\r\n //find image parent url and dir path from config\r\n //reset($this->imgsize['article']['size']);\r\n //$first_key = key($this->imgsize['article']['size']);\r\n //end find\r\n $ret['sts'] = true;\r\n $ret['filename'] = $filename;\r\n $ret['msg'] = '<div class=\"alert alert-success\">Image is cropped and saved in <a href=\"'. $url_target_name .'?'.date('his').'\" target=\"_blank\">'.$target_name.' !</a></div>';\r\n \r\n return $ret;\r\n }", "function getWidth() {\r\n\t\treturn imagesx($this->image);\r\n\t}", "public static function calculateScaleDimensions($source, $targetSize)\n {\n // Get size of image (handle different param-possibilities)\n if (is_string($source)) {\n $sourceSize = @getimagesize($source);\n } else if ($source instanceof Imagick) {\n $sourceSize = $source->getImageGeometry();\n $source = null;\n } else {\n $sourceSize = $source;\n $source = null;\n }\n\n if (!$sourceSize) return false;\n\n $w = null;\n if (isset($sourceSize[0])) $w = $sourceSize[0];\n if (isset($sourceSize['width'])) $w = $sourceSize['width'];\n\n $h = null;\n if (isset($sourceSize[1])) $h = $sourceSize[1];\n if (isset($sourceSize['height'])) $h = $sourceSize['height'];\n\n if (!$w || !$h) return false;\n\n $originalSize = array($w, $h);\n\n // get output-width\n $outputWidth = 0;\n if (isset($targetSize[0])) $outputWidth = $targetSize[0];\n if (isset($targetSize['width'])) $outputWidth = $targetSize['width'];\n\n // get output-height\n $outputHeight = 0;\n if (isset($targetSize[1])) $outputHeight = $targetSize[1];\n if (isset($targetSize['height'])) $outputHeight = $targetSize['height'];\n\n // get crop-data\n $crop = isset($targetSize['crop']) ? $targetSize['crop'] : null;\n\n // get cover\n $cover = isset($targetSize['cover']) ? $targetSize['cover'] : true;\n\n if ($outputWidth == 0 && $outputHeight == 0) {\n if ($crop) {\n return array(\n 'width' => $crop['width'],\n 'height' => $crop['height'],\n 'rotate' => null,\n 'crop' => array(\n 'x' => $crop['x'],\n 'y' => $crop['y'],\n 'width' => $crop['width'],\n 'height' => $crop['height']\n ),\n );\n } else {\n // Handle keep original\n return array(\n 'width' => $originalSize[0],\n 'height' => $originalSize[1],\n 'rotate' => null,\n 'crop' => array(\n 'x' => 0,\n 'y' => 0,\n 'width' => $originalSize[0],\n 'height' => $originalSize[1]\n ),\n 'keepOriginal' => true,\n );\n }\n }\n\n // Check if image has to be rotated\n $rotate = null;\n if (Kwf_Registry::get('config')->image->autoExifRotate\n && $source\n && function_exists('exif_read_data')\n && isset($sourceSize['mime'])\n && ($sourceSize['mime'] == 'image/jpg'\n || $sourceSize['mime'] == 'image/jpeg')\n ) {\n try {\n $exif = exif_read_data($source);\n if (isset($exif['Orientation'])) {\n switch ($exif['Orientation']) {\n case 6:\n $originalSize = array($h, $w);\n $rotate = 90;\n case 8:\n $originalSize = array($h, $w);\n $rotate = -90;\n }\n }\n } catch (ErrorException $e) {\n $rotate = null;\n }\n }\n\n // Calculate missing dimension\n $calculateWidth = $originalSize[0];\n $calculateHeight = $originalSize[1];\n if ($crop) {\n $calculateWidth = $crop['width'];\n $calculateHeight = $crop['height'];\n }\n\n if ($cover) { // image will always have defined size\n\n if ($outputWidth == 0) {\n if (isset($targetSize['aspectRatio'])) {\n $outputWidth = round($outputHeight * $targetSize['aspectRatio']);\n } else {\n $outputWidth = round($outputHeight * ($calculateWidth / $calculateHeight));\n }\n if ($outputWidth <= 0) $outputWidth = 1;\n }\n if ($outputHeight == 0) {\n if (isset($targetSize['aspectRatio']) && $targetSize['aspectRatio']) {\n $outputHeight = round($outputWidth * $targetSize['aspectRatio']);\n } else {\n $outputHeight = round($outputWidth * ($calculateHeight / $calculateWidth));\n }\n if ($outputHeight <= 0) $outputHeight = 1;\n }\n if (!$crop) { // crop from complete image\n $crop = array();\n // calculate crop depending on target-size\n if (($outputWidth / $outputHeight) >= ($originalSize[0] / $originalSize[1])) {\n $crop['width'] = $originalSize[0];\n $crop['height'] = $originalSize[0] * ($outputHeight / $outputWidth);\n } else {\n $crop['height'] = $originalSize[1];\n $crop['width'] = $originalSize[1] * ($outputWidth / $outputHeight);\n }\n // calculate x and y of crop\n $xDiff = $originalSize[0] - $crop['width'];\n $crop['x'] = $xDiff > 0 ? $xDiff / 2 : 0;\n $yDiff = $originalSize[1] - $crop['height'];\n $crop['y'] = $yDiff > 0 ? $yDiff / 2 : 0;\n } else {\n $oldCrop['width'] = $crop['width'];\n $oldCrop['height'] = $crop['height'];\n if (($outputWidth / $outputHeight) >= ($crop['width'] / $crop['height'])) {\n $crop['width'] = $crop['width'];\n $crop['height'] = $crop['width'] * ($outputHeight / $outputWidth);\n } else {\n $crop['height'] = $crop['height'];\n $crop['width'] = $crop['height'] * ($outputWidth / $outputHeight);\n }\n $xDiff = $oldCrop['width'] - $crop['width'];\n $crop['x'] += $xDiff > 0 ? $xDiff / 2 : 0;\n $yDiff = $oldCrop['height'] - $crop['height'];\n $crop['y'] += $yDiff > 0 ? $yDiff / 2 : 0;\n }\n\n } elseif (!$cover) { // image keeps aspectratio and will not be scaled up\n\n // calculateWidth is cropWidth if existing else originalWidth.\n // prevent image scale up\n if (!$crop) {\n $crop = array(\n 'x' => 0,\n 'y' => 0,\n 'width' => $originalSize[0],\n 'height' => $originalSize[1]\n );\n }\n if ($calculateWidth <= $outputWidth && $calculateHeight <= $outputHeight) {\n $outputWidth = $calculateWidth;\n $outputHeight = $calculateHeight;\n } else {\n if ($calculateWidth < $outputWidth) {\n $outputWidth = $calculateWidth;\n }\n if ($calculateHeight < $outputHeight) {\n $outputHeight = $calculateHeight;\n }\n }\n $widthRatio = $outputWidth ? $calculateWidth / $outputWidth : null;\n $heightRatio = $outputHeight ? $calculateHeight / $outputHeight : null;\n if ($widthRatio > $heightRatio) {\n $outputWidth = $calculateWidth / $widthRatio;\n $outputHeight = $calculateHeight / $widthRatio;\n } else if ($heightRatio > $widthRatio) {\n $outputWidth = $calculateWidth / $heightRatio;\n $outputHeight = $calculateHeight / $heightRatio;\n }\n\n }\n\n $outputWidth = round($outputWidth);\n if ($outputWidth <= 0) $outputWidth = 1;\n $outputHeight = round($outputHeight);\n if ($outputHeight <= 0) $outputHeight = 1;\n\n $ret = array(\n 'width' => round($outputWidth),\n 'height' => round($outputHeight),\n 'rotate' => $rotate,\n 'crop' => $crop\n );\n\n //Set values to match original-parameters when original won't change\n if ($ret['crop']['x'] == 0\n && $ret['crop']['y'] == 0\n && $ret['crop']['width'] == $originalSize[0]\n && $ret['crop']['height'] == $originalSize[1]\n && $ret['width'] == $originalSize[0]\n && $ret['height'] == $originalSize[1]\n ) {\n $ret['rotate'] = null;\n $ret['keepOriginal'] = true;\n }\n\n return $ret;\n }", "abstract public function calculateCropBoxCoordinates();", "public function getImageWidth()\n {\n return $this->imageWidth;\n }", "function _image_get_preview_ratio($w, $h)\n {\n }", "private function _addOmittedCanvasDimension() {\n\t\t$sourceWidth = $this->params['sourceWidth'];\n\t\t$sourceHeight = $this->params['sourceHeight'];\n\t\t$sourceRatio = $sourceWidth / $sourceHeight;\n\n\t\tif (\n\t\t\tempty($this->params['w']) &&\n\t\t\tempty($this->params['h'])\n\t\t) {\n\t\t\t$this->params['w'] = $sourceWidth;\n\t\t\t$this->params['h'] = $sourceHeight;\n\t\t} elseif (empty($this->params['h'])) {\n\t\t\tif (\n\t\t\t\t!$this->params['grow'] &&\n\t\t\t\t$this->params['w'] > $sourceWidth\n\t\t\t) {\n\t\t\t\t$this->params['h'] = $sourceHeight;\n\t\t\t} else {\n\t\t\t\t$this->params['h'] = $this->params['w'] / $sourceRatio;\n\t\t\t}\n\t\t} elseif (empty($this->params['w'])) {\n\t\t\tif (\n\t\t\t\t!$this->params['grow'] &&\n\t\t\t\t$this->params['h'] > $sourceHeight\n\t\t\t) {\n\t\t\t\t$this->params['w'] = $sourceWidth;\n\t\t\t} else {\n\t\t\t\t$this->params['w'] = $this->params['h'] * $sourceRatio;\n\t\t\t}\n\t\t}\n\t}", "public function intrinsic_ratio()\n {\n $w = intval($this->r_width);\n $h = intval($this->r_height);\n return $h / $w;\n }", "public function getWidth()\n {\n if (!isset($this->width)) {\n $this->width = ps_get_value($this->document->resource, \"imagewidth\", $this->id);\n }\n\n return $this->width;\n }", "public function getImageWidth(): int\n {\n return $this->imageWidth;\n }", "public function crop()\n {\n $this->_pid = $this->_request->getInput('pid');\n $imgUrl = $this->_request->getInput('imgUrl');\n $imgInfo = new SplFileInfo($imgUrl);\n $cropParams = $this->_request->getAllPostInput();\n $cropParams['img_final_dir'] = '/images/properties/';\n $cropParams['image_out'] = $this->_pid . '-' . uniqid() . '.' . $imgInfo->getExtension();\n\n $this->_imageOut = $cropParams['img_final_dir'] . $cropParams['image_out'];\n\n if($this->_cropper->crop($cropParams))\n {\n return true;\n }\n return false;\n }", "public function getImageSize()\n {\n return (($this->isWrapped() || $this->isTemp()) ?\n getimagesizefromstring($this->getRaw())\n : getimagesize($this->getPathname())\n );\n }", "public function getImageWidth()\n\t{\n\t\treturn $this->imageWidth;\n\t}", "public function getWidth() {\n return Image::make($this->file)->width();\n }", "function getWidth() \n {\n return imagesx($this->image);\n }", "public function getCroppedImage($image, $w, $h, $x=false, $y=false) {\n\t\t$source = $image->getSource();\n\t\tif ($source->type != 'Local') {\n\t\t\t// ignore crop for remote sources at the moment\n\t\t\treturn $image->url;\n\t\t}\n\n\t\t$sourcePath = $source->settings['path'];\n\t\t$folderPath = $image->getFolder()->path;\n\n\t\t$imagePath = $sourcePath . $folderPath . $image->filename;\n\n\t\tif (!file_exists($imagePath)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlist($imgW, $imgH) = getimagesize($imagePath);\n\n\t\tif ($w == $imgW && $h == $imgH) {\n\t\t\treturn $image->url;\n\t\t}\n\n\t\t$x = false;\n\t\t$y = false;\n\n\t\tif (isset($image->focalPoint)) {\n\t\t\tif (isset($image->focalPoint['x'])) {\n\t\t\t\t$x = $image->focalPoint['x'];\n\t\t\t}\n\t\t\tif (isset($image->focalPoint['y'])) {\n\t\t\t\t$y = $image->focalPoint['y'];\n\t\t\t}\t\t\t\n\t\t}\n\n\t\tif ($x === false) {\n\t\t\t$x = round($imgW / 2);\n\t\t}\n\t\tif ($y === false) {\n\t\t\t$y = round($imgH / 2);\n\t\t}\t\t\n\n\t\t$wOut = $w;\n\t\t$hOut = $h;\n\n\t\t$imgRatio = $imgW / $imgH;\n\t\t$cropRatio = $w / $h;\n\n\t\tif ($w > $h && $imgRatio < $cropRatio) { // crop as portrait\n\t\t\t$cropScale = $imgW / $w;\n\n\t\t\t$w *= $cropScale;\n\t\t\t$h *= $cropScale;\n\n\t\t\t$cropX = 0;\n\t\t\t$cropY = $y - $h/2;\n\n\t\t\t// focus point bounds checking\n\t\t\tif ($cropY < 0) {\n\t\t\t\t$cropY = 0;\n\t\t\t}\n\t\t\tif ($cropY + $h > $imgH) {\n\t\t\t\t$cropY = $imgH - $h;\n\t\t\t}\n\t\t}\n\t\telse { // crop as landscape\n\t\t\t$cropScale = $imgH / $h;\n\n\t\t\t$w *= $cropScale;\n\t\t\t$h *= $cropScale;\n\n\t\t\t$cropY = 0;\n\t\t\t$cropX = $x - $w/2;\n\n\t\t\t// focus point bounds checking\n\t\t\tif ($cropX < 0) {\n\t\t\t\t$cropX = 0;\n\t\t\t}\n\t\t\tif ($cropX + $w > $imgW) {\n\t\t\t\t$cropX = $imgW - $w;\n\t\t\t}\n\t\t}\n\t\treturn $this->cropImage($imagePath, $cropX, $cropY, $w, $h, $wOut, $hOut);\t\n\t}", "public static function limitFit()\n {\n return new CropMode(CropMode::LIMIT_FIT);\n }", "function cs_getimagesize($imagePath, $maxWidth = 0, $maxHeight = 0)\r\n{\r\n\t$use_curl = false;\r\n\tif (strtolower(substr($imagePath, 0, 7)) == 'http://'\r\n\t\t\t|| strtolower(substr($imagePath, 0, 6) == 'ftp://'))\r\n\t\t$use_curl = true;\n\t/* use curl if available, we can set decent timeouts for it */\r\n\tif ($use_curl && function_exists('curl_version') && function_exists('gd_info'))\n\t{\n\t\t$file_contents = cs_curl_contents($imagePath);\n\r\n\t\tif ($file_contents === false)\n\t\t\treturn false;\n\t\t$new_image = imagecreatefromstring($file_contents);\n\t\tif ($new_image !== false)\n\t\t{\n\t\t\t$size = array();\n\t\t\t$size[0] = imagesx($new_image);\n\t\t\t$size[1] = imagesy($new_image);\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}\n\telse\n\t\t$size = getimagesize($imagePath);\r\n\t\n\tif ($size === false)\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\tif ($maxWidth > 0)\r\n\t{\r\n\t\tif ($maxHeight > 0)\r\n\t\t{\r\n\t\t\t/* both matter */\r\n\t\t\tif ($size[0] > $maxWidth)\r\n\t\t\t{\r\n\t\t\t\tif ($size[1] > $maxHeight)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((1.0*$size[0] / $maxWidth ) > (1.0*$size[1] / $maxHeight))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/* width is the important factor */ \r\n\t\t\t\t\t\t$size[1] = (int) ($size[1] * (1.0*$maxWidth / $size[0]));\r\n\t\t\t\t\t\t$size[0] = $maxWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/* height is the important factor */ \r\n\t\t\t\t\t\t$size[0] = (int) ($size[0] * (1.0*$maxHeight / $size[1]));\r\n\t\t\t\t\t\t$size[1] = $maxHeight;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t/* only width */\r\n\t\t\t\t\tif ($size[0] > $maxWidth)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$size[1] = (int) ($size[1] * (1.0*$maxWidth / $size[0]));\r\n\t\t\t\t\t\t$size[0] = $maxWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif ($size[1] > $maxHeight)\r\n\t\t\t\t{\r\n\t\t\t\t\t/* only height */\r\n\t\t\t\t\t$size[0] = (int) ($size[0] * (1.0*$maxHeight / $size[1]));\r\n\t\t\t\t\t$size[1] = $maxHeight;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/* only width matters */\r\n\t\t\tif ($size[0] > $maxWidth)\r\n\t\t\t{\r\n\t\t\t\t$size[1] = (int) ($size[1] * (1.0*$maxWidth / $size[0]));\r\n\t\t\t\t$size[0] = $maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif ($maxHeight > 0)\r\n\t\t{\r\n\t\t\t/* only height matters */\r\n\t\t\tif ($size[1] > $maxHeight)\r\n\t\t\t{\r\n\t\t\t\t$size[0] = (int) ($size[0] * (1.0*$maxHeight / $size[1]));\r\n\t\t\t\t$size[1] = $maxHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* else if both are 0, we don't need to do anything */\r\n\t}\r\n\treturn $size;\r\n}", "public static function calculateFitDimensions(int $src_w, int $src_h, int $dst_w, int $dst_h, bool $overflow = false): array\n\t{\n\t\t$src_x = $src_y = $dst_x = $dst_y = 0;\n\n\t\tif ($overflow) {\n\t\t\tif (($src_w / $src_h) > ($dst_w / $dst_h)) {\n\t\t\t\t// TOO WIDE\n\t\t\t\t$use_width = $dst_w * ($src_h / $dst_h);\n\t\t\t\t$use_height = $src_h;\n\t\t\t\t$src_x = ($src_w - $use_width) / 2;\n\t\t\t\t$src_y = 0;\n\t\t\t\t$scale = ($use_width / $src_w) * 100;\n\t\t\t} elseif (($src_w / $src_h) < ($dst_w / $dst_h)) {\n\t\t\t\t// TOO TALL\n\t\t\t\t$use_width = $src_w;\n\t\t\t\t$use_height = $dst_h * ($src_w / $dst_w);\n\t\t\t\t$src_x = 0;\n\t\t\t\t$src_y = ($src_h - $use_height) / 2;\n\t\t\t\t$scale = ($use_height / $src_h) * 100;\n\t\t\t} else {\n\t\t\t\t$src_x = 0;\n\t\t\t\t$src_y = 0;\n\t\t\t\t$use_width = $dst_w;\n\t\t\t\t$use_height = $dst_h;\n\t\t\t\t$scale = 100;\n\t\t\t}\n\n\t\t\t$src_w = $use_width;\n\t\t\t$src_h = $use_height;\n\t\t} else {\n\t\t\tif (($src_w / $src_h) > ($dst_w / $dst_h)) {\n\t\t\t\t// TOO WIDE\n\t\t\t\t$use_width = $dst_w;\n\t\t\t\t$use_height = ($src_h / $src_w) * $dst_w;\n\t\t\t\t$dst_x = 0;\n\t\t\t\t$dst_y = ($dst_h - $use_height) / 2;\n\t\t\t\t$scale = ($use_height / $src_h) * 100;\n\t\t\t} elseif (($src_w / $src_h) < ($dst_w / $dst_h)) {\n\t\t\t\t// TOO TALL\n\t\t\t\t$use_width = ($src_w / $src_h) * $dst_h;\n\t\t\t\t$use_height = $dst_h;\n\t\t\t\t$dst_x = ($dst_w - $use_width) / 2;\n\t\t\t\t$dst_y = 0;\n\t\t\t\t$scale = ($use_width / $src_w) * 100;\n\t\t\t} else {\n\t\t\t\t$src_x = 0;\n\t\t\t\t$src_y = 0;\n\t\t\t\t$use_width = $dst_w;\n\t\t\t\t$use_height = $dst_h;\n\t\t\t\t$scale = 100;\n\t\t\t}\n\n\t\t\t$dst_w = $use_width;\n\t\t\t$dst_h = $use_height;\n\t\t}\n\n\t\treturn [\n\t\t\t'dst_w' => $dst_w,\n\t\t\t'dst_h' => $dst_h,\n\t\t\t'src_w' => $src_w,\n\t\t\t'src_h' => $src_h,\n\t\t\t'src_x' => $src_x,\n\t\t\t'src_y' => $src_y,\n\t\t\t'dst_x' => $dst_x,\n\t\t\t'dst_y' => $dst_y,\n\t\t\t'scale' => $scale,\n\t\t];\n\t}", "function logonscreener_image_scale_and_crop($image, $source_width, $source_height) {\n global $screen_width, $screen_height;\n\n // Phase 1: Scale.\n $scale = max($screen_width / $source_width, $screen_height / $source_height);\n $scaled_width = (int) round($source_width * $scale);\n $scaled_height = (int) round($source_height * $scale);\n\n if ($scale != 1) {\n logonscreener_log(\"Scale = $scale. Scaled width = $scaled_width. Scaled height = $scaled_height.\");\n\n $res2 = imagecreatetruecolor($scaled_width, $scaled_height);\n imagefill($res2, 0, 0, imagecolorallocate($res2, 255, 255, 255));\n if (!imagecopyresampled($res2, $image, 0, 0, 0, 0, $scaled_width, $scaled_height, $source_width, $source_height)) {\n logonscreener_log('Scale did not worked out. HZ.');\n return FALSE;\n }\n\n // Destroy the original image and update image object.\n imagedestroy($image);\n $image = $res2;\n }\n\n // Phase 2: Crop.\n if ($scaled_width != $screen_width || $scaled_height != $screen_height) {\n $screen_width = (int) $screen_width;\n $screen_height = (int) $screen_height;\n\n $x = ($scaled_width - $screen_width) / 2;\n $y = ($scaled_height - $screen_height) / 2;\n logonscreener_log(\"Crop source X = $x. Crop source Y = $y.\");\n\n $res = imagecreatetruecolor($screen_width, $screen_height);\n imagefill($res, 0, 0, imagecolorallocate($res, 255, 255, 255));\n if (!imagecopyresampled($res, $image, 0, 0, $x, $y, $screen_width, $screen_height, $screen_width, $screen_height)) {\n logonscreener_log('Crop did not worked out. HZ.');\n return FALSE;\n }\n\n // Destroy the original image and update image object.\n imagedestroy($image);\n $image = $res;\n }\n\n return $image;\n}", "function flexibleCropper($source_location, $desc_location=null,$crop_size_w=null,$crop_size_h=null)\n\t{\n\t list($src_w, $src_h) = getimagesize($source_location);\n\n\t $image_source = imagecreatefromjpeg($source_location);\n\t $image_desc = imagecreatetruecolor($crop_size_w,$crop_size_h);\n\n\t/*\n\t if ($crop_size_w>$crop_size_h) {$my_crop_size_w=null;}\n\t elseif ($crop_size_h>$crop_size_w)\n\t {$my_crop_size_h=null;\n\n\t if (is_null($my_crop_size_h) and !is_null($my_crop_size_w))\n\t { $my_crop_size_h=$src_h*$my_crop_size_w/$src_w; }\n\t elseif (!is_null($my_crop_size_h))\n\t { $my_crop_size_w=$src_w*$my_crop_size_h/$src_h; }\n\t*/\n\n\t if ($src_w<$src_h) {$my_crop_size_h=$src_h*$crop_size_w/$src_w;} else {$my_crop_size_h=$crop_size_h;}\n\t if ($src_h<$src_w) {$my_crop_size_w=$src_w*$crop_size_h/$src_h;} else {$my_crop_size_w=$crop_size_w;}\n\t// echo \"($my_crop_size_w-$my_crop_size_h)\";\n\t if ($my_crop_size_w>$crop_size_w) {$additional_x=round(($crop_size_w-$my_crop_size_w)/2);} else {$additional_x=0;}\n\t if ($my_crop_size_h>$crop_size_h) {$additional_y=round(($crop_size_h-$my_crop_size_h)/2);} else {$additional_y=0;}\n\n\t $off_x=round($src_w/2)-round($my_crop_size_w/2);\n\t $off_y=round($src_h/2)-round($my_crop_size_h/2)+$additional_y;\n\t $off_w=(round($src_w/2)+round($my_crop_size_w/2))-$off_x;\n\t $off_h=(round($src_h/2)+round($my_crop_size_h/2))-$off_y;\n\n\t imagecopyresampled($image_desc, $image_source,$additional_x, $additional_y, $off_x, $off_y, $my_crop_size_w, $my_crop_size_h, $off_w, $off_h);\n\n\t if (!is_null($desc_location))\n\t imagejpeg($image_desc, $desc_location,100);\n\t else\n\t imagejpeg($image_desc);\n\t}", "public function ratio()\r\n {\r\n if (is_null($this->ratio)) {\r\n $this->ratio = $this->width() / 64;\r\n }\r\n\r\n return $this->ratio;\r\n }", "public static function cropValues($options)\n {\n\n // calculate new height for original image based crop ratio\n if ($options['fit'] == 'width') {\n $width = $options['originalWidth'];\n $height = floor($options['originalWidth'] / $options['ratio']);\n\n $heightHalf = floor($height / 2);\n\n // calculate focus for original image\n $focusX = floor($width * 0.5);\n $focusY = floor($options['originalHeight'] * $options['focusY']);\n\n $x1 = 0;\n $y1 = $focusY - $heightHalf;\n\n // $y1 off canvas?\n $y1 = ($y1 < 0) ? 0 : $y1;\n $y1 = ($y1 + $height > $options['originalHeight']) ? $options['originalHeight'] - $height : $y1;\n\n }\n\n // calculate new width for original image based crop ratio\n if ($options['fit'] == 'height') {\n $width = $options['originalHeight'] * $options['ratio'];\n $height = $options['originalHeight'];\n\n $widthHalf = floor($width / 2);\n\n // calculate focus for original image\n $focusX = floor($options['originalWidth'] * $options['focusX']);\n $focusY = $height * 0.5;\n\n $x1 = $focusX - $widthHalf;\n $y1 = 0;\n\n // $x1 off canvas?\n $x1 = ($x1 < 0) ? 0 : $x1;\n $x1 = ($x1 + $width > $options['originalWidth']) ? $options['originalWidth'] - $width : $x1;\n }\n\n $x2 = floor($x1 + $width);\n $y2 = floor($y1 + $height);\n\n return [\n 'x1' => $x1,\n 'x2' => $x2,\n 'y1' => $y1,\n 'y2' => $y2,\n 'width' => floor($width),\n 'height' => floor($height),\n ];\n }", "public function getGridSize();", "function guy_imagedims($src) {\n\tif (substr($src,0,1)=='/') $src = \nsubstr_replace($src,$_SERVER['DOCUMENT_ROOT'].'/',0,1);\n\tif (is_file($src)) {\n\t\t$wh = @GetImageSize($src);\n\t\treturn $wh[3];\n\t}\n\treturn '';\n}", "public function intrinsic_ratio()\n {\n return ($this->slide_video_dimensions['height'] / $this->slide_video_dimensions['width']);\n }", "public function width()\r\n {\r\n if (is_null($this->width)) {\r\n $this->width = imagesx($this->image);\r\n }\r\n\r\n return $this->width;\r\n }", "function imgcrop(){\n\t\t$id = $this->session->userdata(SESSION_CONST_PRE.'userId');\n\t\t$dir_path = './assets/uploads/students/';\n\t\n\t\t$file_path = $dir_path . \"/Profile.small.jpg\";\n\t\t$src = $dir_path .'Profile.jpg';\n\t\tif(file_exists($file_path)){\n\t\t\t$src = $dir_path .'Profile.small.jpg';\n\t\t}\n\t\n\t\t$imgW = $_POST['w'];\n\t\t$imgH = $_POST['h'];\n\t\t$imgY1 = $_POST['y'];\n\t\t$imgX1 = $_POST['x'];\n\t\t$cropW = $_POST['w'];\n\t\t$cropH = $_POST['h'];\n\t\n\t\t$jpeg_quality = 100;\n\t\n\t\t//$img_r = imagecreatefromjpeg($src);\n\t\t$what = getimagesize($src);\n\t\t//list($imgInitW, $imgInitH, $type, $what) = getimagesize($src);\n\t\t$imgW = $imgInitW = $what[0];\n\t\t$imgH = $imgInitH = $what[1];\n\t\tswitch(strtolower($what['mime']))\n\t\t{\n\t\t\tcase 'image/png':\n\t\t\t\t$img_r = imagecreatefrompng($src);\n\t\t\t\t$source_image = imagecreatefrompng($src);\n\t\t\t\t$type = '.png';\n\t\t\t\tbreak;\n\t\t\tcase 'image/jpeg':\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$source_image = imagecreatefromjpeg($src);\n\t\t\t\t$type = '.jpeg';\n\t\t\t\tbreak;\n\t\t\tcase 'image/jpg':\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$source_image = imagecreatefromjpeg($src);\n\t\t\t\t$type = '.jpg';\n\t\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\t$img_r = imagecreatefromgif($src);\n\t\t\t\t$source_image = imagecreatefromgif($src);\n\t\t\t\t$type = '.gif';\n\t\t\t\tbreak;\n\t\t\tdefault: die('image type not supported');\n\t\t}\n\t\n\t\t$resizedImage = imagecreatetruecolor($imgW, $imgH);\n\t\timagecopyresampled($resizedImage, $source_image, 0, 0, 0, 0, $imgW,\n\t\t$imgH, $imgInitW, $imgInitH);\n\t\n\t\n\t\t$dest_image = imagecreatetruecolor($cropW, $cropH);\n\t\timagecopyresampled($dest_image, $source_image, 0, 0, $imgX1, $imgY1, $cropW,\n\t\t$cropH, $cropW, $cropH);\n\t\n\t\n\t\timagejpeg($dest_image, $dir_path.'Profile.small.jpg', $jpeg_quality);\n\t\n\t}", "public function get_center_crop_offset( $size ) {\n\t\t\t// Return the whole image.\n\t\t\t$offset = 0;\n\t\t\t$width = $size['width'];\n\t\t\t$height = $size['height'];\n\t\t\tif ( 100 !== $height && preg_match( '/^(\\d+)px$/i', $height, $matches ) ) {\n\t\t\t\t$height = $matches[1];\n\t\t\t\tif ( ! empty( $this->args['attachment_id'] ) ) {\n\t\t\t\t\t$attachment_meta = wp_get_attachment_metadata( $this->args['attachment_id'], true );\n\t\t\t\t\tif ( ! empty( $attachment_meta['height'] ) && ! empty( $attachment_meta['width'] ) ) {\n\t\t\t\t\t\t$new_size = wp_constrain_dimensions( $attachment_meta['width'], $attachment_meta['height'], $width, 9999 );\n\t\t\t\t\t\tif ( $new_size[1] > $height ) {\n\t\t\t\t\t\t\t$offset = floor( ( $new_size[1] - $height ) / 2.00 );\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\treturn $offset;\n\t\t}", "protected function resize_crop_image($max_width, $max_height, $source_file, $dst_dir, $quality = 80)\n {\n $imgsize = getimagesize($source_file);\n $width = $imgsize[0];\n $height = $imgsize[1];\n $mime = $imgsize['mime'];\n \n switch($mime){\n case 'image/gif':\n $image_create = \"imagecreatefromgif\";\n $image = \"imagegif\";\n break;\n \n case 'image/png':\n $image_create = \"imagecreatefrompng\";\n $image = \"imagepng\";\n $quality = 7;\n break;\n \n case 'image/jpeg':\n $image_create = \"imagecreatefromjpeg\";\n $image = \"imagejpeg\";\n $quality = 80;\n break;\n \n default:\n return false;\n break;\n }\n \n $dst_img = imagecreatetruecolor($max_width, $max_height);\n $src_img = $image_create($source_file);\n \n $width_new = $height * $max_width / $max_height;\n $height_new = $width * $max_height / $max_width;\n //if the new width is greater than the actual width of the image, then the height is too large and the rest cut off, or vice versa\n if($width_new > $width){\n //cut point by height\n $h_point = (($height - $height_new) / 2);\n //copy image\n imagecopyresampled($dst_img, $src_img, 0, 0, 0, $h_point, $max_width, $max_height, $width, $height_new);\n }else{\n //cut point by width\n $w_point = (($width - $width_new) / 2);\n imagecopyresampled($dst_img, $src_img, 0, 0, $w_point, 0, $max_width, $max_height, $width_new, $height);\n }\n \n $image($dst_img, $dst_dir, $quality);\n \n if($dst_img)imagedestroy($dst_img);\n if($src_img)imagedestroy($src_img);\n }", "public static function fit()\n {\n return new CropMode(CropMode::FIT);\n }", "function _crop_image_resource($img, $x, $y, $w, $h)\n {\n }", "function build_cropCanvas($cropConf=array())\r\n {\r\n $conf['imgSrc'] = (isset($cropConf['imgSrc'])) ? $cropConf['imgSrc'] : false;\r\n $conf['uniqueID'] = (isset($cropConf['uniqueID'])) ? $cropConf['uniqueID'] : false;\r\n $conf['cropSize'] = (isset($cropConf['cropSize'])) ? $cropConf['cropSize'] : false;\r\n $conf['imgUrl'] = (isset($cropConf['imgUrl'])) ? $cropConf['imgUrl'] : false;\r\n $conf['submitUrl'] = (isset($cropConf['submitUrl'])) ? $cropConf['submitUrl'] : false;\r\n $conf['include_freeResize'] = (isset($cropConf['include_freeResize'])) ? $cropConf['include_freeResize'] : false;\r\n $conf['ajaxSubmit'] = (isset($cropConf['ajaxSubmit'])) ? $cropConf['ajaxSubmit'] : false;\r\n \r\n foreach($conf as $key=>$c)\r\n if($c==false && $key!='ajaxSubmit') return 'Insufficient Parameter options';\r\n \r\n #echo $conf['imgSrc'];\r\n $size = getimagesize($conf['imgSrc']);\r\n $img_name = explode(\"/\", $conf['imgSrc']);\r\n $img_name = end($img_name);\r\n \r\n //img size option\r\n $option = $img_dest = $savePath = '';\r\n foreach($conf['cropSize']['size'] as $key=>$i)\r\n {\r\n #$option .= '<option value=\"'.$i.'\">'.$i.'</option>';\r\n $img_dest .= 'img_dest[\"'.$i.'\"] = \"'.$conf['cropSize']['path'][$key].'\"; '; \r\n if(!$savePath) $savePath = $conf['cropSize']['path'][$key] . (($conf['uniqueID']) ? $conf['uniqueID'].'/' : '');\r\n }\r\n #$option .= '<option value=\"200x100\">200x100</option>';\r\n if($conf['include_freeResize']) $option .= '<option value=\"free\">Free Size</option>';\r\n //end \r\n #echo '<pre>'; print_r($img_dest); echo '</pre>';\r\n \r\n $content = '\r\n <div style=\"min-width:700px; padding:10px 0 10px 30px;\">\r\n <form id=\"frCrop\" action=\"'.$conf['submitUrl'].'\" method=\"POST\">\r\n <div class=\"row-fluid\">\r\n <div class=\"span4\">\r\n <h3>Cropping Setting</h3> \r\n <label>Cropped Image size : </label>\r\n <select name=\"cSize\" id=\"cSize\">'.$option.'</select>\r\n <input type=\"hidden\" name=\"img_newName\" value=\"'.$img_name.'\" />\r\n <input type=\"hidden\" name=\"uniqueID\" value=\"'.$conf['uniqueID'].'\" />\r\n \r\n <input type=\"hidden\" id=\"x\" name=\"x\" />\r\n \t\t<input type=\"hidden\" id=\"y\" name=\"y\" />\r\n \t\t<input type=\"hidden\" id=\"w\" name=\"w\" />\r\n \t\t<input type=\"hidden\" id=\"h\" name=\"h\" />\r\n <input type=\"hidden\" id=\"img_real\" name=\"img_real\" value=\"'.$conf['imgUrl'].'\" />\r\n <label>Cropped Image destination : </label> \r\n <input type=\"hidden\" name=\"dest_path\" id=\"dest_path\" value=\"'.$savePath.'\" />\r\n \r\n <div class=\"alert\">select image size then drag mouse inside image area to crop !</div>\r\n <input type=\"button\" value=\"Crop\" name\"crop\" id\"Savecrop\" class=\"btn btn-primary\" onclick=\"act_cropSave()\" />\r\n <span id=\"sp-loadCrop\" class=\"hide\"><img src=\"/media/img/loading.gif\" alt=\"loading\" /> loading..</span>\r\n </div>\r\n <div style=\"float:left; width:600px; margin-left:20px;\">\r\n <img src=\"'.$conf['imgUrl'].'\" id=\"cropbox\" width=\"600\" />\r\n </div>\r\n </div>\r\n </form>\r\n <br class=\"clear\" />\r\n </div>\r\n <script>\r\n function initCrop(){ \r\n var img_dest = new Array(); \r\n '.$img_dest.'\r\n var snil = $(\"#cSize\").val();\r\n nil = snil.split(\"x\");\r\n \r\n var jcrop_api = $.Jcrop(\\'#cropbox\\', { \r\n trueSize: ['.$size[0].','.$size[1].'],\r\n aspectRatio: nil[0] / nil[1],\r\n onSelect: updateCoords\r\n });\r\n \r\n $(\"#cSize\").bind(\"change\", function(){\r\n var snil = $(this).val();\r\n nil = snil.split(\"x\");\r\n alert(nil);\r\n jcrop_api.setOptions({\r\n aspectRatio: nil[0] / nil[1]\r\n });\r\n $(\"#dest_path\").val( img_dest[snil] );\r\n });\r\n \r\n ' . (($conf['ajaxSubmit']) ? ('\r\n $(\"#frCrop\").ajaxForm({\r\n dataType: \"json\", \r\n beforeSubmit: function(){\r\n $(\"#sp-loadCrop\").show();\r\n }, \r\n success: function(data){\r\n //alert(data);\r\n $(\".alert\").replaceWith(data.msg);\r\n $(\"#sp-loadCrop\").hide();\r\n } \r\n });\r\n ') : '') . '\r\n \r\n function updateCoords(c)\r\n \t\t\t{\r\n \t\t\t\t$(\"#x\").val(c.x);\r\n \t\t\t\t$(\"#y\").val(c.y);\r\n \t\t\t\t$(\"#w\").val(c.w);\r\n \t\t\t\t$(\"#h\").val(c.h);\r\n \t\t\t};\r\n \r\n \t\t\tfunction checkCoords()\r\n \t\t\t{\r\n \t\t\t\tif (parseInt($(\"#w\").val())) return true;\r\n \t\t\t\talert(\"Please select a crop region then press submit.\");\r\n \t\t\t\treturn false;\r\n \t\t\t};\r\n }\r\n </script>\r\n ';\r\n \r\n return $content;\r\n }", "public function _set_new_size_auto()\n {\n if (empty($this->source_width) || empty($this->source_height)) {\n if ( ! $this->SILENT_MODE) {\n trigger_error('Missing source image sizes!', E_USER_WARNING);\n }\n return false;\n }\n $k1 = $this->source_width / $this->limit_x;\n $k2 = $this->source_height / $this->limit_y;\n $k = $k1 >= $k2 ? $k1 : $k2;\n if ($this->reduce_only && $k1 <= 1 && $k2 <= 1) {\n $this->output_width = $this->source_width;\n $this->output_height = $this->source_height;\n } else {\n $this->output_width = round($this->source_width / $k, 0);\n $this->output_height = round($this->source_height / $k, 0);\n }\n return true;\n }", "public function getImgSize() {\n\t\t$this->imgSize = getimagesize($this->imgUri);\n\t}", "public function getProjectionFilter()\n {\n return $this->projection_filter;\n }", "public function getProjectionFilter()\n {\n return $this->projection_filter;\n }", "private function _setCrop()\n {\n if (isset($this->crop) && $this->crop && $this->bbox_rubberband && $this->_isResize()) {\n\n $bbox_rubberband = explode(',', $this->bbox_rubberband);\n\n //lower-left coordinate\n $ll_point = new \\stdClass();\n $ll_point->x = $bbox_rubberband[0];\n $ll_point->y = $bbox_rubberband[3];\n $ll_coord = $this->pix2Geo($ll_point);\n\n //upper-right coordinate\n $ur_point = new \\stdClass();\n $ur_point->x = $bbox_rubberband[2];\n $ur_point->y = $bbox_rubberband[1];\n $ur_coord = $this->pix2Geo($ur_point);\n\n //set the size as selected\n $width = abs($bbox_rubberband[2]-$bbox_rubberband[0]);\n $height = abs($bbox_rubberband[3]-$bbox_rubberband[1]);\n\n $this->map_obj->setSize($width, $height);\n if ($this->_isResize() && $this->_download_factor > 1) {\n $this->map_obj->setSize($this->_download_factor*$width, $this->_download_factor*$height);\n }\n\n //set the extent to match that of the crop\n $this->map_obj->setExtent($ll_coord->x, $ll_coord->y, $ur_coord->x, $ur_coord->y);\n }\n }", "public function resize_crop_image($max_width, $max_height, $source_file, $dst_dir, $quality = 80)\n {\n $imgsize = getimagesize($source_file);\n $width = $imgsize[0];\n $height = $imgsize[1];\n $mime = $imgsize['mime'];\n\n switch ($mime) {\n case 'image/gif':\n $image_create = 'imagecreatefromgif';\n $image = 'imagegif';\n break;\n\n case 'image/png':\n $image_create = 'imagecreatefrompng';\n $image = 'imagepng';\n $quality = 7;\n break;\n\n case 'image/jpeg':\n $image_create = 'imagecreatefromjpeg';\n $image = 'imagejpeg';\n $quality = 80;\n break;\n\n default:\n return false;\n }\n\n $dst_img = imagecreatetruecolor($max_width, $max_height);\n $src_img = $image_create($source_file);\n\n $width_new = $height * $max_width / $max_height;\n $height_new = $width * $max_height / $max_width;\n //if the new width is greater than the actual width of the image, then the height is too large and the rest cut off, or vice versa\n if ($width_new > $width) {\n //cut point by height\n $h_point = (($height - $height_new) / 2);\n //copy image\n imagecopyresampled($dst_img, $src_img, 0, 0, 0, $h_point, $max_width, $max_height, $width, $height_new);\n } else {\n //cut point by width\n $w_point = (($width - $width_new) / 2);\n imagecopyresampled($dst_img, $src_img, 0, 0, $w_point, 0, $max_width, $max_height, $width_new, $height);\n }\n\n $image($dst_img, $dst_dir, $quality);\n\n if ($dst_img) {\n imagedestroy($dst_img);\n }\n if ($src_img) {\n imagedestroy($src_img);\n }\n }", "function cropImage($CurWidth, $CurHeight, $iSize, $DestFolder, $SrcImage, $Quality, $ImageType) { \n\t//Check Image size is not 0\n\tif($CurWidth <= 0 || $CurHeight <= 0) \n\t{\n\t\treturn false;\n\t}\n\t\n\t//abeautifulsite.net has excellent article about \"Cropping an Image to Make Square bit.ly/1gTwXW9\n\tif($CurWidth>$CurHeight)\n\t{\n\t\t$y_offset = 0;\n\t\t$x_offset = ($CurWidth - $CurHeight) / 2;\n\t\t$square_size \t= $CurWidth - ($x_offset * 2);\n\t}else{\n\t\t$x_offset = 0;\n\t\t$y_offset = ($CurHeight - $CurWidth) / 2;\n\t\t$square_size = $CurHeight - ($y_offset * 2);\n\t}\n\t\n\t$NewCanvas \t= imagecreatetruecolor($iSize, $iSize);\t\n\t\n\tif(strtolower($ImageType) == 'image/png') {\n\t\t// Saves Alpha\n\t\timagealphablending($NewCanvas, false);\n\t\timagesavealpha($NewCanvas,true);\n\t\t$transparent = imagecolorallocatealpha($NewCanvas, 255, 255, 255, 127);\n\t\timagefilledrectangle($NewCanvas, 0, 0, $square_size, $square_size, $transparent);\n\t}\n\t\n\tif(imagecopyresampled($NewCanvas, $SrcImage, 0, 0, $x_offset, $y_offset, $iSize, $iSize, $square_size, $square_size))\n\t{\n\t\tswitch(strtolower($ImageType))\n\t\t{\n\t\t\tcase 'image/png':\n\t\t\t\timagepng($NewCanvas,$DestFolder);\n\t\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\timagegif($NewCanvas,$DestFolder);\n\t\t\t\tbreak;\t\t\t\n\t\t\tcase 'image/jpeg':\n\t\t\tcase 'image/pjpeg':\n\t\t\t\timagejpeg($NewCanvas,$DestFolder,$Quality);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//Destroy image, frees memory\t\n\t\tif(is_resource($NewCanvas)) {imagedestroy($NewCanvas);} \n\t\treturn true;\n\t} \n}", "public function executeCrop(sfWebRequest $request)\n {\n $this->hasPermissionsForSelect();\n \n $selection = aMediaTools::getSelection();\n $id = $request->getParameter('id');\n $index = array_search($id, $selection);\n if ($index === false)\n {\n $this->forward404();\n }\n $cropLeft = floor($request->getParameter('cropLeft'));\n $cropTop = floor($request->getParameter('cropTop'));\n $cropWidth = floor($request->getParameter('cropWidth'));\n $cropHeight = floor($request->getParameter('cropHeight'));\n $width = floor($request->getParameter('width'));\n $height = floor($request->getParameter('height'));\n $imageInfo = aMediaTools::getAttribute('imageInfo');\n $imageInfo[$id]['cropLeft'] = $cropLeft;\n $imageInfo[$id]['cropTop'] = $cropTop;\n $imageInfo[$id]['cropWidth'] = $cropWidth;\n $imageInfo[$id]['cropHeight'] = $cropHeight;\n $imageInfo[$id]['width'] = $width;\n $imageInfo[$id]['height'] = $height;\n aMediaTools::setAttribute('imageInfo', $imageInfo);\n return $this->renderTemplate();\n }", "public function getDimensions()\n {\n $imageDimension = getimagesize($this->image);\n\n $width = $imageDimension[0];\n $height = $imageDimension[1];\n\n foreach($this->effect as $effect)\n {\n if($effect instanceof PictureEffect)\n {\n $modified = $effect->getNewDimensions($width, $height);\n\n $width = $modified['w'];\n $height = $modified['h'];\n }\n }\n\n return array(\n 'w' => $width,\n 'h' => $height,\n );\n }", "public function getHeight() {\n return imagesy($this->image);\n }", "public function getAspectRatio()\n {\n return $this->aspectRatio;\n }", "public static function minimumFit()\n {\n return new CropMode(CropMode::MINIMUM_FIT);\n }", "function imageToCanvas ($_image, $_canvasWidth, $_canvasHeight, $color='white' ,$extension, $forceScale=false)\n{\n if (is_string($_image)) {\n if (is_file($_image)) {\n if($extension==\"jpg\" || $extension==\"jpeg\" ){\n\t\t\t\t$_image = imagecreatefromjpeg($_image);\n\t\t\t}\n\t\t\telse if($extension==\"png\"){\n\t\t\t\t$_image = imagecreatefrompng($_image);\n\t\t\t}else {\n\t\t\t\t$_image = imagecreatefromgif($_image);\n\t\t\t}\n } else {\n return \"Incorrect imagepath >> No file here \" . $_image;\n }\n } \n \n $width = imagesx($_image);\n $height = imagesy($_image);\n $image_aspect_ratio = $width / $height;\n $canvas_aspect_ratio = $_canvasWidth / $_canvasHeight;\n \n if($forceScale == 'true')\n {\n // scale by height\n if ($image_aspect_ratio < $canvas_aspect_ratio) {\n $new_height = $_canvasHeight;\n $new_width = ($new_height/$height) * $width;\n } \n // scale by width\n else {\n $new_width = $_canvasWidth;\n $new_height = ($new_width/$width) * $height;\n }\n }\n else\n {\n if($width > $_canvasWidth)\n {\n $new_width = $_canvasWidth;\n $new_height = ($new_width/$width) * $height;\n }\n elseif($height > $_canvasHeight)\n {\n $new_height = $_canvasHeight;\n $new_width = ($new_height/$height) * $width;\n }\n else\n {\n $new_height = $height;\n $new_width = $width;\n } \n }\n \n # offset values (ie. center the resized image to canvas)\n $xoffset = ($_canvasWidth - $new_width) / 2;\n $yoffset = ($_canvasHeight - $new_height) / 2;\n \n $image_resized = imagecreatetruecolor($_canvasWidth, $_canvasHeight);\n \n # fill colour\n\tif ($color == 'white'){\n\t $fill_color = imagecolorallocate($image_resized, 255, 255, 255);\n\t}else if ($color == 'black'){\n\t\t$fill_color = imagecolorallocate($image_resized, 0, 0, 0);\n\t}else if ($color == 'tran'){\t\t\n\t\t$black = imagecolorallocate($image_resized, 0, 0, 0);\n\t\timagecolortransparent($fill_color, $black);\n\t\t//$fill_color = imagecolortransparent($image_resized);\n\t\t//$fill_color = $image_resized;\n\t}\n imagefill($image_resized, 0, 0, $fill_color);\n imagecopyresampled($image_resized, $_image, $xoffset, $yoffset, 0, 0, $new_width, $new_height, $width, $height);\n \n imagedestroy($_image);\n return $image_resized;\n}", "public function getHeight()\n {\n return imagesy($this->image);\n }", "protected function getPageWidth()\n {\n return $this->inchToPoint(2.125);\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 imagecropper($source_path, $max_width, $max_height, $bili) {\n $source_info = getimagesize($source_path); //获取原始图片信息\n $source_width = $source_info[0]; //获取原始图片的宽度\n $source_height = $source_info[1]; //获取原始图片的高度\n $source_mime = $source_info['mime']; //获取原始图片的文件类型\n\n //先计算出要裁剪后的图片尺寸是多大\n if($source_width<=$max_width) { //1、如果原始图片的宽,小于最大允许的宽\n $newwidth = $source_width;\n $newheight = $source_width*$bili;\n }elseif($source_height<=$max_height) {//2、如果原始图片的高,小于最大允许的高\n $newheight = $source_height;\n $newwidth = $newheight/$bili;\n }else {\n $b1 = $max_width/$source_width;\n $b2 = $max_height/$source_height;\n $b3 = $b1<$b2 ? $b1 : $b2;\n $newwidth = ceil($source_width*$b3);\n $newheight = ceil($source_height*$b3);\n }\n\n $target_width = $newwidth>$newheight ? $newwidth : $newheight;\n $target_height = $newwidth<$newheight ? $newwidth : $newheight;\n\n if($target_width*$bili>$target_height) {\n $target_width = $target_height/$bili;\n }\n if($target_height*$bili>$target_width) {\n $target_height = $target_width/$bili;\n }\n\n $source_ratio = $source_height / $source_width;\n $target_ratio = $target_height / $target_width;\n\n if ($source_ratio > $target_ratio) {\n $cropped_width = $source_width;\n $cropped_height = $source_width * $target_ratio;\n $source_x = 0;\n $source_y = ($source_height - $cropped_height) / 2;\n }elseif ($source_ratio < $target_ratio) {\n $cropped_width = $source_height / $target_ratio;\n $cropped_height = $source_height;\n $source_x = ($source_width - $cropped_width) / 2;\n $source_y = 0;\n }else {\n $cropped_width = $source_width;\n $cropped_height = $source_height;\n $source_x = 0;\n $source_y = 0;\n }\n\n switch ($source_mime) {\n case 'image/gif':\n $source_image = imagecreatefromgif($source_path);\n break;\n case 'image/jpeg':\n $source_image = imagecreatefromjpeg($source_path);\n break;\n case 'image/png':\n $source_image = imagecreatefrompng($source_path);\n break;\n default:\n return false;\n break;\n }\n\n $target_image = imagecreatetruecolor($target_width, $target_height);\n $cropped_image = imagecreatetruecolor($cropped_width, $cropped_height);\n\n // 裁剪\n imagecopy($cropped_image, $source_image, 0, 0, $source_x, $source_y, $cropped_width, $cropped_height);\n // 缩放\n imagecopyresampled($target_image, $cropped_image, 0, 0, 0, 0, $target_width, $target_height, $cropped_width, $cropped_height);\n\n imagejpeg($target_image,$source_path);\n imagedestroy($source_image);\n imagedestroy($target_image);\n imagedestroy($cropped_image);\n}", "function fiorello_mikado_max_image_width_srcset() {\n\t\treturn 1920;\n\t}", "function crop( $x = 0, $y = 0, $w = 0, $h = 0 )\n\t{\n\t\tif( $w == 0 || $h == 0 )\n\t\t\treturn FALSE;\n\t\t\n\t\t//create a target canvas\n\t\t$new_im = imagecreatetruecolor ( $w, $h );\n\t\n\t\t//copy and resize image to new canvas\n\t\timagecopyresampled( $new_im, $this->im, 0, 0, $x, $y, $w, $h, $w, $h );\n\t\t\n\t\t//delete the old image handle\n\t\timagedestroy( $this->im );\n\t\t\n\t\t//set the new image as the current handle\n\t\t$this->im = $new_im;\n\t}", "public function height()\r\n {\r\n if (is_null($this->height)) {\r\n $this->height = imagesy($this->image);\r\n }\r\n\r\n return $this->height;\r\n }", "public final function getWidth()\n {\n return $this->googleVisualization->getWidth();\n }", "public static function scale()\n {\n return new CropMode(CropMode::SCALE);\n }", "function generatePreview ($dst_w = 650, $dst_h = 485, $mode) {\n $this->previewToolkit = ImageToolkit::factory($this->getImagePath ());\n if ($mode == true) {\n $mode = 'crop';\n }\n else {\n $mode = 'ratio';\n }\n $this->previewToolkit->setDestSize ($dst_w, $dst_h, $mode);\n\n // If the generation is not needed, returns the file path to the original image\n if ($this->_needPreview($this->previewToolkit) == false) {\n return $this->getImagePath ();\n }\n\n $final = luxbum::getPreviewImage($this->dir, $this->file, $dst_w, $dst_h);\n \n // Generate the preview is the preview is not yet generated\n if (!is_file ($final)) {\n files::createDir ($this->previewDir);\n $this->previewToolkit->createThumb ($final);\n }\n \n return $final;\n }", "private function _getResizeSize() {\n\t\t$width = $height = 0;\n\n\t\tif (Configure::check('GalleryOptions.Pictures.resize_to.0')) {\n\t\t\t$width = Configure::read('GalleryOptions.Pictures.resize_to.0');\n\t\t}\n\n\t\tif (Configure::check('GalleryOptions.Pictures.resize_to.1')) {\n\t\t\t$height = Configure::read('GalleryOptions.Pictures.resize_to.1');\n\t\t}\n\n\t\t$crop = Configure::read('GalleryOptions.Pictures.resize_to.2');\n\t\t$action = $crop ? \"crop\" : \"\";\n\n\t\treturn array(\n\t\t\t'width' => $width,\n\t\t\t'height' => $height,\n\t\t\t'action' => $action\n\t\t);\n\t}", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getImageSize()\n {\n return $this->ImageSize;\n }", "public function calculateSize($crop_width, $crop_height)\n {\n $original_aspect = $this->width / $this->height;\n $crop_aspect = $crop_width / $crop_height;\n\n if ($original_aspect >= $crop_aspect) {\n // If image is wider than thumbnail (in aspect ratio sense)\n $new_width = $this->width / ($this->height / $crop_height);\n $new_height = $crop_height;\n } else {\n // If the thumbnail is wider than the image\n $new_width = $crop_width;\n $new_height = $this->height / ($this->width / $crop_width);\n }\n\n return array(\n 'x' => 0 - ($new_width - $crop_width) / 2, // Center the image horizontally\n 'y' => 0 - ($new_height - $crop_height) / 2, // Center the image vertically\n 'new_width' => $new_width,\n 'new_height' => $new_height\n );\n }", "public static function reduceImage($image, $final_width, $final_height, $quality, $save_image_as)\r\n {\r\n\r\n ## prepare image\r\n\t\t$img_dim = getimagesize($image);\r\n\t\t$ext = image_type_to_extension($img_dim[2]);\r\n ## get the width x, and the height y.\r\n list($x, $y) = $img_dim; //getimagesize($image);\r\n $f_size = self::resizeImage($final_width, $final_height,$image);\r\n\r\n ## create a blank canvas where the new resized image is going to be layered.\r\n //$canvas = imagecreatetruecolor($this->x, $this->y);\r\n $canvas = imagecreatetruecolor($f_size['width'], $f_size['height']);\r\n ## use code below in production server.\r\n //$canvas = @imagecreatetruecolor($img_width, $img_height);\r\n\t\tswitch($ext){\r\n\t\t\tcase '.jpeg':\r\n\t\t\t## prepare and create the new reduce image using the source file\r\n\t\t\t$preparedImage = imagecreatefromjpeg($image);\r\n\t\t\tbreak;\r\n\t\t\tcase '.jpg':\r\n\t\t\t## prepare and create the new reduce image using the source file\r\n\t\t\t$preparedImage = imagecreatefromjpeg($image);\r\n\t\t\tbreak;\r\n\t\t\tcase '.png':\r\n\t\t\t$preparedImage = imagecreatefrompng($image);\r\n\t\t\tbreak;\r\n\t\t\tcase '.bmp':\r\n\t\t\t$preparedImage = imagecreatefromwbmp($image);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n \r\n\r\n ## generate the new reduced image.\r\n ## actually, this process will draw the reduce image on top of the canvas\r\n imagecopyresampled($canvas, $preparedImage, 0, 0, 0, 0, $f_size['width'], $f_size['height'],\r\n $x, $y);\r\n\r\n ## lastly save the new image\r\n imagejpeg($canvas, $save_image_as, $quality);\r\n\r\n ## free up some menory\r\n imagedestroy($canvas);\r\n imagedestroy($preparedImage);\r\n\r\n return true; //$save_image_as;\r\n\r\n\r\n }", "public static function getImageSize($url)\n\t{\n\t\tstatic $rootPath = '';\n\t\tstatic $pathLength = 0;\n\t\tstatic $rootUrl = '';\n\t\tstatic $rootLength = 0;\n\t\tstatic $protocoleRelRootUrl = '';\n\t\tstatic $protocoleRelRootLength = 0;\n\n\t\tif (empty($rootPath))\n\t\t{\n\t\t\t$rootUrl = Juri::root();\n\t\t\t$rootLength = JString::strlen($rootUrl);\n\t\t\t$protocoleRelRootUrl = str_replace(array('https://', 'http://'), '//', $rootUrl);\n\t\t\t$protocoleRelRootLength = JString::strlen($protocoleRelRootUrl);\n\t\t\t$rootPath = JUri::base(true);\n\t\t\t$pathLength = JString::strlen($rootPath);\n\t\t\tif (JFactory::getApplication()->isAdmin())\n\t\t\t{\n\t\t\t\t$rootPath = str_replace('/administrator', '', $rootPath);\n\t\t\t}\n\t\t}\n\n\t\t// default values ?\n\t\t$dimensions = array('width' => 0, 'height' => 0);\n\n\t\t// build the physical path from the URL\n\t\tif (substr($url, 0, $rootLength) == $rootUrl)\n\t\t{\n\t\t\t$cleanedPath = substr($url, $rootLength);\n\t\t}\n\t\telse if (substr($url, 0, 2) == '//' && substr($url, 0, $protocoleRelRootLength) == $protocoleRelRootUrl)\n\t\t{\n\t\t\t// protocol relative URL\n\t\t\t$cleanedPath = substr($url, $protocoleRelRootLength);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cleanedPath = $url;\n\t\t}\n\n\t\t$cleanedPath = !empty($rootPath) && substr($cleanedPath, 0, $pathLength) == $rootPath ? substr($url, $pathLength) : $cleanedPath;\n\t\t$imagePath = JPATH_ROOT . '/' . $cleanedPath;\n\t\tif (file_exists($imagePath))\n\t\t{\n\t\t\t$imageInfos = getimagesize($imagePath);\n\t\t\tif (!empty($imageInfos))\n\t\t\t{\n\t\t\t\t$dimensions = array('width' => $imageInfos[0], 'height' => $imageInfos[1]);\n\t\t\t}\n\t\t}\n\t\treturn $dimensions;\n\t}", "private function intern_resize_crop($newWidth, $newHeight)\n\t{\n\t\t/*\n\t\t * Crop-to-fit PHP-GD\n\t\t * http://salman-w.blogspot.com/2009/04/crop-to-fit-image-using-aspphp.html\n\t\t *\n\t\t * Resize and center crop an arbitrary size image to fixed width and height\n\t\t * e.g. convert a large portrait/landscape image to a small square thumbnail\n\t\t *\n\t\t * Modified by Fry\n\t\t */\n\t\t$desired_aspect_ratio = $newWidth / $newHeight;\n\n\t\tif ($this->srcAspectRatio > $desired_aspect_ratio) {\n\t\t\t/*\n\t\t\t * Triggered when source image is wider\n\t\t\t */\n\t\t\t$temp_height = $newHeight;\n\t\t\t$temp_width = ( int ) ($newHeight * $this->srcAspectRatio);\n\t\t} else {\n\t\t\t/*\n\t\t\t * Triggered otherwise (i.e. source image is similar or taller)\n\t\t\t */\n\t\t\t$temp_width = $newWidth;\n\t\t\t$temp_height = ( int ) ($newWidth / $this->srcAspectRatio);\n\t\t}\n\n\t\t/*\n\t\t * Resize the image into a temporary GD image\n\t\t */\n\n\t\t$tempImage = imagecreatetruecolor($temp_width, $temp_height);\n\t\timagecopyresampled(\n\t\t\t$tempImage,\t\t\t\t\t$this->srcImage,\n\t\t\t0, 0,\t\t\t0, 0,\n\t\t\t$temp_width, $temp_height,\t$this->srcWidth, $this->srcHeight\n\t\t);\n\n\t\t/*\n\t\t * Copy cropped region from temporary image into the desired GD image\n\t\t */\n\n\t\t$x0 = ($temp_width - $newWidth) / 2;\n\t\t$y0 = ($temp_height - $newHeight) / 2;\n\t\t$this->newImage = imagecreatetruecolor($newWidth, $newHeight);\n\t\timagecopy(\n\t\t\t$this->newImage,\t$tempImage,\n\t\t\t0, 0,\t$x0, $y0,\n\t\t\t$newWidth, $newHeight\n\t\t);\n\t\timagedestroy($tempImage);\n\t}", "function image_resize ( $args ) { /*\r\n\t\t * Changelog\r\n\t\t *\r\n\t\t * Version 3, July 20, 2007\r\n\t\t * - Cleaned\r\n\t\t *\r\n\t\t * Version 2, August 12, 2006\r\n\t\t * - Changed it to use $args\r\n\t\t */\r\n\t\t\r\n\t\t// Set default variables\r\n\t\t$image = $width_old = $height_old = $width_new = $height_new = $canvas_width = $canvas_height = $canvas_size = null;\r\n\t\t\r\n\t\t$x_old = $y_old = $x_new = $y_new = 0;\r\n\t\t\r\n\t\t// Exract user\r\n\t\textract($args);\r\n\t\t\r\n\t\t// Read image\r\n\t\t$image = image_read($image,false);\r\n\t\tif ( empty($image) ) { // error\r\n\t\t\ttrigger_error('no image was specified', E_USER_WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Check new dimensions\r\n\t\tif ( empty($width_new) || empty($height_new) ) { // error\r\n\t\t\ttrigger_error('Desired/new dimensions not found', E_USER_WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Do old dimensions\r\n\t\tif ( empty($width_old) && empty($height_old) ) { // Get the old dimensions from the image\r\n\t\t\t$width_old = imagesx($image);\r\n\t\t\t$height_old = imagesy($image);\r\n\t\t}\r\n\t\t\r\n\t\t// Do canvas dimensions\r\n\t\tif ( empty($canvas_width) && empty($canvas_height) ) { // Set default\r\n\t\t\t$canvas_width = $width_new;\r\n\t\t\t$canvas_height = $height_new;\r\n\t\t}\r\n\t\t\r\n\t\t// Let's force integer values\r\n\t\t$width_old = intval($width_old);\r\n\t\t$height_old = intval($height_old);\r\n\t\t$width_new = intval($width_new);\r\n\t\t$height_new = intval($height_new);\r\n\t\t$canvas_width = intval($canvas_width);\r\n\t\t$canvas_height = intval($canvas_height);\r\n\t\t\r\n\t\t// Create the new image\r\n\t\t$image_new = imagecreatetruecolor($canvas_width, $canvas_height);\r\n\t\t\r\n\t\t// Resample the image\r\n\t\t$image_result = imagecopyresampled(\r\n\t\t\t/* the new image */\r\n\t\t\t$image_new,\r\n\t\t\t/* the old image to update */\r\n\t\t\t$image,\r\n\t\t\t/* the new positions */\r\n\t\t\t$x_new, $y_new,\r\n\t\t\t/* the old positions */\r\n\t\t\t$x_old, $y_old,\r\n\t\t\t/* the new dimensions */\r\n\t\t\t$width_new, $height_new,\r\n\t\t\t/* the old dimensions */\r\n\t\t\t$width_old, $height_old);\r\n\t\t\r\n\t\t// Check\r\n\t\tif ( !$image_result ) { // ERROR\r\n\t\t\ttrigger_error('the image failed to resample', E_USER_WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// return\r\n\t\treturn $image_new;\r\n\t}", "public static function crop()\n {\n return new CropMode(CropMode::CROP);\n }", "function resize_crop_image($max_width, $max_height, $source_file, $dst_dir, $quality=80){\r\n $imgsize = getimagesize($source_file);\r\n $width = $imgsize[0];\r\n $height = $imgsize[1];\r\n $mime = $imgsize['mime'];\r\n\r\n switch($mime){\r\n case 'image/gif':\r\n $image_create = \"imagecreatefromgif\";\r\n $image = \"imagegif\";\r\n break;\r\n\r\n case 'image/png':\r\n $image_create = \"imagecreatefrompng\";\r\n $image = \"imagepng\";\r\n //$quality = 7;\r\n break;\r\n\r\n case 'image/jpeg':\r\n $image_create = \"imagecreatefromjpeg\";\r\n $image = \"imagejpeg\";\r\n break;\r\n\r\n default:\r\n return false;\r\n break;\r\n }\r\n\r\n $dst_img = imagecreatetruecolor($max_width, $max_height);\r\n $src_img = $image_create($source_file);\r\n\r\n $width_new = $height * $max_width / $max_height;\r\n $height_new = $width * $max_height / $max_width;\r\n //if the new width is greater than the actual width of the image, then the height is too large and the rest cut off, or vice versa\r\n if($width_new > $width){\r\n //cut point by height\r\n $h_point = (($height - $height_new) / 2);\r\n //copy image\r\n imagecopyresampled($dst_img, $src_img, 0, 0, 0, $h_point, $max_width, $max_height, $width, $height_new);\r\n }else{\r\n //cut point by width\r\n $w_point = (($width - $width_new) / 2);\r\n imagecopyresampled($dst_img, $src_img, 0, 0, $w_point, 0, $max_width, $max_height, $width_new, $height);\r\n }\r\n\r\n //$image($dst_img, $dst_dir, $quality);\r\n imagejpeg($dst_img, $dst_dir, $quality);\r\n\r\n if($dst_img)imagedestroy($dst_img);\r\n if($src_img)imagedestroy($src_img);\r\n}", "public function getPreviewPixelWidthUnwrapped()\n {\n return $this->readWrapperValue(\"preview_pixel_width\");\n }", "private function get_signature_image_width() {\n\t\t$width = FrmField::get_option( $this->field, 'size' );\n\t\treturn $this->get_signature_image_dimension( $width, 'size' );\n\t}", "public function image_reproportion()\n\t{\n\t\tif (($this->width === 0 && $this->height === 0) OR $this->orig_width === 0 OR $this->orig_height === 0\n\t\t\tOR ( ! ctype_digit((string) $this->width) && ! ctype_digit((string) $this->height))\n\t\t\tOR ! ctype_digit((string) $this->orig_width) OR ! ctype_digit((string) $this->orig_height))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Sanitize\n\t\t$this->width = (int) $this->width;\n\t\t$this->height = (int) $this->height;\n\n\t\tif ($this->master_dim !== 'width' && $this->master_dim !== 'height')\n\t\t{\n\t\t\tif ($this->width > 0 && $this->height > 0)\n\t\t\t{\n\t\t\t\t$this->master_dim = ((($this->orig_height/$this->orig_width) - ($this->height/$this->width)) < 0)\n\t\t\t\t\t\t\t? 'width' : 'height';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->master_dim = ($this->height === 0) ? 'width' : 'height';\n\t\t\t}\n\t\t}\n\t\telseif (($this->master_dim === 'width' && $this->width === 0)\n\t\t\tOR ($this->master_dim === 'height' && $this->height === 0))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->master_dim === 'width')\n\t\t{\n\t\t\t$this->height = (int) ceil($this->width*$this->orig_height/$this->orig_width);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->width = (int) ceil($this->orig_width*$this->height/$this->orig_height);\n\t\t}\n\t}", "private function getWorkingImageHeight()\n {\n return imagesy($this->workingImageResource);\n }", "public function calcRatio()\n {\n // round to 5DP (0.1px for a 10k image)\n $this->ratio = round($this->loaded_width / $this->loaded_height, 5);\n // orientation\n $this->orientation = 'x';\n if ($this->loaded_width < $this->loaded_height) {\n $this->orientation = 'y';\n }\n }", "public function fit()\n\t{\n\t\t// Load image\n\t\tif( $this->im == NULL) $this->im = imagecreatefromstring( file_get_contents( $this->imageFilePath ) );\n\n\t\tif($this->resizeFlag)\n\t\t{\n\t\t\t$newWidth=$this->width;\n\t\t\t$newHeight=$this->height;\n\t\n\t\t\t$t=imagecreatetruecolor($newWidth,$newHeight);\n\t\t\timagecopyresampled($t,$this->im,0,0,0,0,$newWidth,$newHeight,imagesx($this->im),imagesy($this->im));\n\t\t\timagedestroy($this->im);\n\t\t\t$this->im=$t;\n\t\t\t//imagedestroy($t);\t\n\t\t\t$this->debug[]=\"[RESIZE] TRUE -> $newWidth $newHeight\";\n\t\t}\n\n\t\t// Counter to keep track of iterations\n\t\t$cc = 0;\n\n\t\t// Use the buffer NOT the filesystem to compute intermediate image size\n\t\tob_start();\n\n\t\t// Loop forever\n\t\twhile( true )\n\t\t{\n\t\t\t// Empty buffer\n\t\t\tob_clean();\n\n\t\t\t// Keep track of previous quality setting\n\t\t\t$this->cq = $this->q;\n\n\t\t\t// Create and fill buffer with image with current quality setting\n\t\t\timagejpeg( $this->im, NULL, $this->cq );\n\n\t\t\t// Compute current image size from size of buffer\n\t\t\t$currentSize = strlen( ob_get_contents() );\n\n\t\t\t// Some debug\n\t\t\t$this->debug[] = \" \" . $this->low . \" >>> \" . $this->cq . \" <<< \" . $this->high . \" [ $currentSize / \" . $this->targetSize . \" ]\";\n\n\t\t\t// Break loop if target size is reached - very rare!\n\t\t\tif ( $currentSize == $this->targetSize )\n\t\t\t\tbreak;\n\n\t\t\t// If size > target then change quality range\n\t\t\tif ( $currentSize > $this->targetSize )\n\t\t\t{\n\t\t\t\t$this->high = $this->q;\n\t\t\t\t$this->q = ( $this->q + $this->low ) / 2;\n\t\t\t}\n\n\t\t\t// If size < target then change quality range\n\t\t\tif ( $currentSize < $this->targetSize )\n\t\t\t{\n\t\t\t\t$this->low = $this->q;\n\t\t\t\t$this->q = ( $this->q + $this->high ) / 2;\n\t\t\t}\n\n\t\t\t// Break loop if high/low gap below precision AND size is < target size\n\t\t\tif ( ( ( $this->high - $this->low ) < $this->precision ) && ( $currentSize <= $this->targetSize ) )\n\t\t\t\tbreak;\n\n\t\t\t// Break loop of counter has reached maximum iterations - target size either to low/high\n\t\t\tif ( $cc == $this->maxIterations )\n\t\t\t\tbreak;\n\n\t\t\t// Continue loop incrementing counter\n\t\t\t$cc++;\n\t\t}\n\n\t\t// Final debug\n\t\t$this->debug[] = \"Final Quality Setting = \" . $this->cq;\n\n\t\t// Disable buffer\n\t\tob_end_clean();\n\t}", "function getHeight() {\r\n\t\treturn imagesy($this->image);\r\n\t}" ]
[ "0.57293326", "0.5340515", "0.52046746", "0.5099397", "0.5029074", "0.4978582", "0.4871412", "0.4766708", "0.4755078", "0.47048938", "0.46771646", "0.46687528", "0.46630624", "0.4653845", "0.46502748", "0.46243185", "0.46205023", "0.45872632", "0.45673963", "0.45664427", "0.45538938", "0.45272222", "0.45248044", "0.450332", "0.4472308", "0.4471775", "0.44716612", "0.44703448", "0.44572333", "0.44243103", "0.44196293", "0.44183317", "0.43925372", "0.43869367", "0.43767437", "0.43669248", "0.43640152", "0.43409288", "0.43390948", "0.43363726", "0.43306953", "0.4324961", "0.42958888", "0.4254898", "0.4254003", "0.42465723", "0.4226002", "0.42190567", "0.42185837", "0.42075562", "0.4190776", "0.41874978", "0.418717", "0.4183365", "0.41782832", "0.41697484", "0.4169723", "0.41598815", "0.4155438", "0.41375044", "0.41375044", "0.41342992", "0.41258797", "0.4118395", "0.41144896", "0.4102542", "0.40963966", "0.4092481", "0.40924183", "0.40859392", "0.408356", "0.4077453", "0.40734616", "0.4058622", "0.405361", "0.40495723", "0.40324393", "0.40245748", "0.40238073", "0.40139282", "0.40112484", "0.40082684", "0.40082684", "0.40082684", "0.40082684", "0.40056244", "0.39997238", "0.3997035", "0.3995293", "0.39883596", "0.39796093", "0.3979147", "0.39777204", "0.39749992", "0.39643222", "0.3963416", "0.39625135", "0.39612374", "0.39582407", "0.39563262" ]
0.7326923
0
/Paso 1: Se analiza la variable $param. si es un entero suponemos que es el id del blog. si es una cadena suponemos que es el nombre del blog,por lo que obtendremos el blog a partir de su nombre. Se obtiene el id del blog
private function getBlogFromParam($param){ // P 1 if (is_numeric($param) ){ $blog_id=$param; $blogs= $this->getDoctrine()->getEntityManager() ->createQuery('SELECT b FROM AcmeBlogBundle:Blog b WHERE b.blog_id=:blog_id') ->setParameter('blog_id', $blog_id) ->getResult(); }else if ( is_string($param) && !empty($param) ){ $blog_name=$param; $blogs= $this->getDoctrine()->getEntityManager() ->createQuery('SELECT b FROM AcmeBlogBundle:Blog b WHERE b.blog_name=:blog') ->setParameter('blog', $blog_name) ->getResult(); } $blog=$blogs[0]; return $blog; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_blog_post($blog_id, $post_id)\n {\n }", "public function for_blog($blog_id = '')\n {\n }", "public function article()\n\t{\n//\t\t$this->load->database();\n//\t\t$this->load->library(\"vendor/FluentPDO/FluentPDO\", array(\"pdo\"=>$this->db->conn_id));\n//\t\t//$query = $this->fluentpdo->from('M_admin')->where('admin_id = ?', 'admin')->getQuery();\n//\t\t$statement = $this->fluentpdo->from('M_admin')->where(array(\"admin_id LIKE\" => \"%dmin%\"))->order(\"admin_id desc\");\n//\n//\t\t$param = $statement->getParameters();\n//\t\t$sql = $statement->getQuery();\n//\t\techo $sql;\n//\t\tprint_r($param);\n//\t\t$res = $this->db->query($sql, $param)->result();\n//\t\tprint_r($res);\n//\t\t//foreach($query as $row) {\n\t\t\t//print_r($row);\n\t\t//}\n//phpinfo();\nprint_r($_REQUEST);\n $this->load->model(\"Blog_Model\");\n\t\t$res = $this->Blog_Model->getById(2);\n\n $in = array();\n $in[\"blog_id\"] = 1;\n $res = $this->Blog_Model->get($in);\n print_r($res);\n\n\t\t$this->load->view('welcome_message');\n\t}", "function blog($id){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT fqdn_blog FROM utilisateur WHERE id_utilisateur = :id\");\n\t\t$req->execute(array(\"id\"=>$id));\n\n\t\twhile($results = $req->fetch()){\n\t\t\t$result = $results[\"fqdn_blog\"];\n\t\t}\n\n\t\treturn $result;\n\t}", "public function get_edit_blog($blog_id = \"\", $title_url = \"\")\n\t{\t\t\t\t \t\t\t\t\t\t\t\n\t\t$result = $this->db->from(\"blog\")\n\t\t\t\t\t->join(\"category\",\"category.category_id\",\"blog.category_id\")\t\t\t\t\t\t\n\t\t\t\t\t->where(array(\"blog_id\" => $blog_id, \"url_title\" => $title_url))\n\t\t\t\t\t->get();\n\t\treturn $result;\n\t}", "function get_id_from_blogname($slug)\n {\n }", "public function showBlog($id){\n\t\t$sql = \"SELECT * FROM blogs where id = :id\";\n\t\t\n\t\t$u = $this->dbcon->prepare($sql);\n\t\t$u->bindParam(':id', $id);\n\t\t$u->execute();\n\t\t$blog = $u->fetch(PDO::FETCH_OBJ);\n\t\treturn $blog;\n\n\t}", "public function blogAction()\n {\n\n \t$blogId = $this->_request->getParam(2);\n $page = $this->_request->getParam(3);\n\n $blog = Data::factory($blogId, Blog::ITEM_TYPE);\n\t\tif(empty($blog)){\n throw new Lib_Exception_NotFound(\"Blog '$blogId' not found\");\n }\n\n Zend_Registry::set('Category', $blog->getCategory());\n Zend_Registry::set('SubCategory', $blog->getSubCategory());\n\n $table = new Blog_Post();\n $select = $table->select();\n $select->where(\"blogId = $blog->id\");\n\n // Regular users only see valid posts\n if(!$blog->isEditableBy($this->_user, $this->_acl)){\n \t$select->where(\"status = '\".Data::VALID.\"'\");\n }\n $select->order(\"date DESC\");\n\n $posts = $this->_helper->dataPaginator($select, $page, 'commonviews/pagination.phtml', BLOGPOSTS_PER_PAGE);\n\n $this->view->blog = $blog;\n $this->view->dataType = 'Blog_Post';\n $this->view->posts = $posts;\n \n if($this->_user->getId() == $blog->getSubmitter()->getId()){\n \t$this->_useAdditionalContent = false;\n \t$this->_helper->layout->setLayout('one-column');\n } else {\n \t$this->_useAdditionalContent = true;\n \t$this->_helper->layout->setLayout('two-columns');\n \t$this->view->wrapperIsCard = true;\n }\n \n \n }", "function edit($rqst, $param)\n {\n \\App::go('login');\n\n //Checando se a rota está correta\n if (!isset($param['id'])) {\n \\App::go($this->blogLink);\n }\n\n //USER\n $user = User::this();\n\n //$user->getMe();\n $user->getById(7);\n $aID = $param['id'] == 'new'\n || (is_numeric($param['id'])\n && $param['id'] == 0)\n ? 0\n : $param['id'];\n \n $page = $aID == 0 ? 'new' : 'edit';\n\n $article = new Model\\Article($aID);\n $base = new Model\\Base;\n\n $aID = $article->get('id') + 0;\n\n //Se não existir, cria um novo artigo.\n $data['blogName'] = $this->blogName;\n $data['authorName'] = $user->get('name');\n $data['authorFoto'] = _URL.'media/user/'.$user->get('id').'/1.jpg';\n $data['authorLink'] = _URL.'perfil'; //'user/'.$user->get('login');\n $data['authorPubData'] = date(\"d/m/Y à\\s H:i\", strtotime($article->get('pubdate')));\n $data['articleTitle'] = $article->get('title');\n $data['articleResume'] = $article->get('resume');\n $data['articleContent'] = $article->get('content');\n $data['articleLink'] = $article->get('link');\n $data['articleViewLink'] = $this->blogArticleLink.$article->get('link');\n\n //Select CATEGORIES\n $data['categoria']['data'] = $base->getCategories();\n $data['categoria']['default'] = $article->get('category');\n\n //Select STATUS\n $data['status']['data'] = $base->getStatus();\n $data['status']['default'] = $article->get('status');\n\n //Tags\n $data['articleTags'] = $article->get('tags');\n\n //$this->styles = ['source/font-awesome.min'];\n $this->scripts = ['blog/2'];\n\n //Send page to user\n $this->sendPage('page_'.$page, $data, ['aType'=>$page, 'aID'=>$aID, 'uID'=>$user->get('id'), 'pageLink'=>$article->get('link')]);\n }", "function get_current_blog_id()\n {\n }", "public function buscar($param){\n $where = \" true \";\n /*if ($param<>NULL){\n if (isset($param['id']))\n $where.=\" and id =\".$param['id'];\n if (isset($param['descrip']))\n $where.=\" and descrip ='\".$param['descrip'].\"'\";\n }*/\n $arreglo = Menu::listar($where); \n return $arreglo;\n \n \n \n \n }", "function refresh_blog_details($blog_id = 0)\n {\n }", "function add_blog($id,$blog,$status){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `fqdn_blog` = '$blog' WHERE `id_utilisateur` = $id\");\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `status_blog` = '$status' WHERE `id_utilisateur` = $id\");\n\t\t\n\t\t$req->closeCursor();\n\t}", "function selectBlog($shortname) {\n global $blogid, $archivelist;\n $blogid = intval($blogid);\n if (!($blogid > 0)) {\n $blogid = getBlogIDFromName($shortname);\n }\n\n // also force archivelist variable, if it is set\n if ($archivelist) {\n $archivelist = $blogid;\n }\n}", "function SingleBlog(){\n\t\t$query = \"SELECT id, title, content, readperm, commentperm, date, category FROM blog_content WHERE id='\".$this->bid.\"' AND uid='\".$this->id.\"'\";\n\t\t$result = mysqli_query($conn, $query);\n\t\t$result = mysqli_query($conn, $query);\n\t\t$total_entries = mysqli_num_rows($result);\n\t\tif($total_entries == 0){\n\t\t\techo \"<div class='side-body-bg'>\\n\";\n\t\t\techo \"<span class='scapmain'>Error: No Blog postings found.</span>\\n\";\n\t\t\techo \"</div>\\n\";\n\t\t}\n\t\telse {\n\t\t\t$row = mysqli_fetch_array($result);\n\t\t\t$subline = \"Posted by \".$this->uname.\" on mm/dd/yyyy\";\n\t\t\techo \"<div class='side-body-bg'>\\n\";\n\t\t\techo \"<span class='scapmain'><a href='/blogs/\".$this->uname.\"/\".$row['id'].\"-\".stripslashes(CleanFileName($row['title'])).\"/'>\".stripslashes($row['title']).\"</a></span>\\n\";\n\t\t\techo \"<br />\\n\";\n\t\t\techo \"<span class='poster'>$subline</span>\\n\";\n\t\t\techo \"</div>\\n\";\n\t\t\techo \"<div class='tbl'>\".$row['content'].\"</div>\\n\";\n\t\t\techo \"<br />\\n\";\n\t\t}\n\t}", "public function findPost($id, $sanitize, $author = null)\n{\n \n $idsanitized = $this->filteringId($sanitize, $id, 'sql');\n \n if (!empty($author)) {\n \n $sql = \"SELECT ID, \n media_id, \n post_author,\n \t \t\t post_date, \n post_modified, \n post_title,\n \t \t\t post_slug, \n post_content, \n post_summary, \n post_keyword, \n post_tags,\n post_status,\n \t \t\t post_type, \n comment_status\n \t \t\t FROM tbl_posts\n \t \t\t WHERE ID = :ID AND post_author = :author\n \t\t\t AND post_type = 'blog'\";\n \n $data = array(':ID' => $idsanitized, ':author' => $author);\n \n } else {\n \n $sql = \"SELECT ID, \n media_id, \n post_author,\n \t \t\t post_date, \n post_modified, \n post_title,\n \t \t\t post_slug, \n post_content, \n post_summary, \n post_keyword, \n post_tags,\n post_status,\n \t \t\t post_type, \n comment_status\n \t \t\t FROM tbl_posts\n \t \t\t WHERE ID = :ID AND post_type = 'blog'\";\n \n $data = array(':ID' => $idsanitized);\n \n }\n \n $this->setSQL($sql);\n \n $postDetail = $this->findRow($data);\n\n return (empty($postDetail)) ?: $postDetail;\n \n}", "public function updateBlogbyId($id , $title , $desc , $author){\r\n\r\n $query = 'UPDATE `blog_tbl` SET `title`=:title,`description`=:description,`updated_at`=:updated_at,`author`=:author WHERE id = :id';\r\n\r\n $stmt = $this->_db->prepare($query);\r\n\r\n $update = date(\"Y-m-d h:i:s\");\r\n\r\n $stmt->bindParam(':title',$title);\r\n\r\n $stmt->bindParam(':description',$desc);\r\n\r\n $stmt->bindParam(':updated_at',$update);\r\n\r\n $stmt->bindParam(':author',$author);\r\n\r\n $stmt->bindParam(':id',$id);\r\n\r\n $stmt->execute();\r\n\r\n header(\"Location:index.php\");\r\n }", "public function column_id($blog)\n {\n }", "function blog($pid)\n{\n\n\t$pname=mysql_fetch_array(mysql_query(\"select blog from manage_property where pid='$pid'\"));\n\t return $pname['blog'];\n}", "function getAuthor($param) {\n global $author;\n $author = \"\";\n $authorCount = 1;\n for($i = 0; $i < strlen('$str'); $i++) {\n if($str[$i] != \":\" && $authorCount == $param && $activeAuthor) {\n $author .= $str[$i];\n $author = \"Charlie\";\n } else if($str[$i] == \":\") {\n $authorCount++;\n $activeAuthor = false;\n $activeMsg = true;\n } else if($str[$i] == \"*\") {\n $activeAuthor = true;\n $activeMsg = false;\n }\n }\n }", "function giveSpecificPost($postURL) {\n //$postURL gotten from http://miguelamigotgonzalez.com/blog.php?post=[$postURL]\n $postTitle = urldecode($postURL);\n global $DBH;\n $STH = $DBH->prepare('SELECT id, title, date, description, post FROM blogPosts WHERE title = :passTitle');\n $STH->bindParam(':passTitle', $postTitle);\n $STH->execute();\n $result = $STH->fetchAll();\n \n foreach($result as $newEntry) {\n //Save information to an array\n $id = $newEntry[id];\n $title = $newEntry[title];\n $date = $newEntry[date];\n $desc = $newEntry[description];\n $post = $newEntry[post];\n }\n \n //Variables above contain the information of the last blogpost\n $output = formatPost($id, $title, $date, $desc, $post);\n return $output;\n}", "public function getPost($param);", "public function blogpostActionGet($slug) : object\n {\n $page = $this->app->page;\n $title = \"BlogPost: ${slug}\";\n $db = $this->app->db;\n $filter = new MyTextFilter();\n\n $db->connect();\n $sql = <<<EOD\nSELECT\n *,\n DATE_FORMAT(COALESCE(updated, published), '%Y-%m-%dT%TZ') AS published_iso8601,\n DATE_FORMAT(COALESCE(updated, published), '%Y-%m-%d') AS published\nFROM content\nWHERE \n slug = ?\n AND type = ?\n AND (deleted IS NULL OR deleted > NOW())\n AND published <= NOW()\nORDER BY published DESC\n;\nEOD;\n $content = $db->executeFetch($sql, [$slug, \"post\"]);\n if (!($content)) {\n $page->add(\"cms/404\");\n } elseif ($content->filter) {\n $text = $content->data;\n $filters = explode(\",\", $content->filter);\n $filteredText = $filter->parse($text, $filters);\n $content->data = $filteredText;\n }\n $page->add(\"cms/blogpost\", [\n \"content\" => $content\n ]);\n return $page->render([\n \"title\" => $title\n ]);\n }", "function choose_primary_blog()\n {\n }", "function get_post_id($slug = '', $display = true) {\n\tif($slug == '') { $slug = $_GET['page']; }\n\t\n\tinclude('connect.php');\t\t\n\t\n\t$get = $db->prepare('SELECT id FROM posts WHERE slug = :slug');\n\t$get->execute(array(':slug' => $slug));\n\t\n\t$return = $get->fetch(PDO::FETCH_OBJ);\t\t\n\t\n\tif($display) echo $return->id;\n\treturn $return->id;\n}", "function get_blog_by_title($db, $title)\n\t{\n\t\tif(is_string($title))\n\t\t{\n\t\t\t$sql = sprintf(\"SELECT * FROM articles WHERE title LIKE '%s'\", \n\t\t\t\t\t\t\t\tmysqli_real_escape_string($db, $title));\n\n\t\t\t$result = mysqli_query($db, $sql);\n\n\t\t\tif(!$result || mysqli_num_rows($result) === 0)\n\t\t\t\treturn NULL;\n\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t\tthrow new Exception(\"String parameter required.\");\n\t}", "public function switch_to_blog($blog_id)\n {\n }", "public function getParam($param);", "public function detail($slug){\n $data['obj_category_videos'] = $this->nav_videos();\n \n //get data catalog\n $params_categogory_id = array(\n \"select\" =>\"category_id,name\",\n \"where\" => \"slug like '%$slug%' and category.type = 2\");\n $obj_category = $this->obj_category->get_search_row($params_categogory_id);\n $category_id = $obj_category->category_id;\n \n $url = explode(\"/\",uri_string());\n $slug_2 = $url[2];\n \n //GET DATA BLOG \n $params = array(\"select\" =>\"blog.title,\n blog.date,\n blog.slug,\n blog.img,\n blog.img_2,\n blog.date,\n blog.content,\n category.name as category_name,\n category.slug as category_slug,\n blog.blog_id\",\n \"where\" => \"blog.slug = '$slug_2' and blog.category_id = $category_id and blog.active = 1 and blog.status_value = 1\",\n \"join\" => array('category, blog.category_id = category.category_id'),\n \"order\" => \"blog.blog_id DESC\",);\n $data['obj_blog'] = $this->obj_blog->get_search_row($params);\n //SEND DATA META OG FACEBOOK\n $data['meta_title_blog'] = $data['obj_blog']->title;\n $data['meta_description_blog'] = \"Aprende todo lo que necesitas saber acerca del mundo financiero y las criptomonedas. Visita nuestro blog y entérate al respecto.\";\n $data['meta_img_blog'] = site_url().\"static/cms/img/blog/\".$data['obj_blog']->img;\n $title_blog = $data['obj_blog']->title;\n \n \n //get rand blog\n $params = array(\n \"select\" =>\"blog.title,\n blog.date,\n blog.slug,\n blog.img,\n blog.date,\n blog.content,\n category.name as category_name,\n category.slug as category_slug,\n blog.blog_id\",\n \"where\" => \"blog.category_id = $category_id and blog.active = 1 and blog.status_value = 1\",\n \"join\" => array('category, blog.category_id = category.category_id'),\n \"order\" => \"rand()\",\n \"limit\" => \"6\");\n $data['obj_blog_rand'] = $this->obj_blog->search($params);\n \n //SEND DATA TITLE\n $data['title'] = \"Blog | \". $obj_category->name.\" | \".$title_blog;\n $this->load->view('blog_detail',$data);\n\t}", "function get_users_of_blog($id = '')\n {\n }", "function status_blog($id){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT status_blog FROM utilisateur WHERE id_utilisateur = :id\");\n\t\t$req->execute(array(\"id\"=>$id));\n\n\t\twhile($results = $req->fetch()){\n\t\t\t$result = $results[\"status_blog\"];\n\t\t}\n\n\t\treturn $result;\n\t}", "function show_blog_id($data){\n$this->db->select('*');\n$this->db->from('blog_post');\n$this->db->where('id', $data);\n$query = $this->db->get();\n$result = $query->result();\nreturn $result;\n}", "public function show($blogid, $id)\n {\n return $id;\n }", "function giveSpecificDescription($descParam){\n //Retrieve that specific $descParam (it's a title)\n global $DBH;\n $STH = $DBH->prepare('SELECT id, title, date, description, post FROM blogPosts WHERE title = :passTitle');\n $STH->bindParam(':passTitle', $descParam);\n $STH->execute();\n $result = $STH->fetchAll();\n \n foreach($result as $newEntry) {\n //Save information to an array\n \n //$id = $newEntry[id];\n //$title = $newEntry[title];\n //$date = $newEntry[date];\n $desc = $newEntry[description];\n //$post = $newEntry[post];\n }\n \n return $desc;\n}", "function get_one_post(){\n global $db;\n $req = $db->query(\"SELECT * FROM articles WHERE articles.id ='{$_GET['id']}'\");\n $result = $req->fetchObject();\n return $result;\n}", "public function buscar($param){\n //verEstructura($param);\n $where = \" true \";\n if ($param<>NULL){\n if (isset($param['idinscripcion']))\n $where.=\" and idinscripcion =\".$param['idinscripcion'];\n if (isset($param['cofecha']))\n $where.=\" and cofecha =\".$param['cofecha'];\n if (isset($param['idusuario']))\n $where.=\" and idusuario =\".$param['idusuario'];\n }\n $arreglo = inscripcion::listar($where);\n return $arreglo;\n }", "function build_param($param)\n\t{\n\t\t$string_param = NULL;\n\n\t\tif($param!=null){\n\n\t\t\tif(isset($param->id_jadwal)) $string_param .= \" id_jadwal LIKE '%\".$param->id_jadwal.\"%' \";\n\t\t}\n\n\t\treturn $string_param;\n\t}", "public function edit($id = null) \n\t\t{\n\t\t\t$this->Blog->id = $id;//post id\n\t\t\t\n\t\t\t$usrid = $this->Auth->user('id');//user id\n\t\t\tif($usrid >0)\n\t\t\t{ \n\t\t\t\t$ids = $usrid;\n\t\t\t\t\n\t\t\t\t$this->loadModel('User');//loads the model users\n\t\t\t\t\n\t\t\t\t$name=$this->User->find('first',array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'fields'=>'name',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions'=> array('User.id' => $ids)));\t\n\t\t\t\t$this->set('name', $name);//name of the logged user\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ids = 0;\n\t\t\t}\n\t\t\t$this->set('id',$id);\n\t\t\t\n\t\t\tif ($this->request->is('get')) \n\t\t\t{\n\t\t\t\t$this->request->data = $this->Blog->read();\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$update['id']=$this->Blog->id;\n\t\t\t\t$update['title']=htmlentities($this->data['Blog']['title']);\n\t\t\t\t$update['comments']=htmlentities($this->data['Blog']['comments']);\t\n\t\t\t\t\n\t\t\t\tif($this->Blog->save($update)) \n\t\t\t\t{\n\t\t\t\t\t$this->Session->setFlash('Your post has been updated.');\n\t\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$this->Session->setFlash('Unable to update your post.');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function getBlog() {}", "function SelectBlog ($query)\n{\n\t$count = 0;\n\t$array = '';\n\ttry \n\t{\n\t\t// First Connect to the database\n\t\t$pdo = new PDO(\"mysql:host=\" . DB_SERVER . \";dbname=\". DB_NAME . \";charset=utf8\" , DB_USER, DB_PASS);\n\t}\n\tcatch (PDOException $e)\n\t{\n\t\techo \"Error Connecting to Source:\" . $e->getMessage();\n\t}\n\t\n\t$pdo->exec(\"set names utf8\");\t\t// Added for security\n\t\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n\t$sth = $pdo->query($query);\n\t$sth->setFetchMode(PDO::FETCH_ASSOC);\n\n\t$result = $sth->fetchAll();\n\t \n\t// Put everything you find in an array\n\tif(count($result) > 0) \n\t{\n\t\t$r = array();\n\t\t$array = array();\n\t\tforeach($result as $r) \n\t\t{\n\t\n\t\t\t$array[$count]['content_id'] \t= $r['content_id'];\n\t\t\t$array[$count]['title'] \t\t= $r['title'];\n\t\t\t$array[$count]['text'] \t\t\t= $r['text'];\n\t\t\t$array[$count]['category_type']\t= $r['category_type'];\n\t\t\t$array[$count]['date'] \t\t\t= $r['date'];\n\t\t\t$array[$count]['user_id'] \t\t= $r['user_id'];\n\t\t\t$array[$count]['ip_address'] \t= $r['ip_address'];\n\t\t\t$array[$count]['TitleId'] \t= $r['TitleId'];\n\n\t\t\t$count++;\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n\tif ($array == null)\n\t{\n\t\t// This is incase the user inserts an invalid page number\n\t\t// Just redirect them back to the index page\n\t\t//redirect_to(\"http://localhost/GhostBanditsAttackV2/root/index.php\");\n\t\treturn null;\n\t}\n\t\n\treturn $array;\t// Everything in the array gets pushed to this return value\n}", "function get_blog_permalink($blog_id, $post_id)\n {\n }", "public function add_blog($title , $desc , $author){\r\n $date = date(\"H\");\r\n $query = \"INSERT INTO blog_tbl (title, description, author) VALUES (? , ? , ?)\";\r\n $stmt = $this->_db->prepare($query);\r\n $stmt->execute([$title,$desc,$author]);\r\n header(\"Location:index.php\");\r\n exit();\r\n }", "function get_blog_id_from_url($domain, $path = '/')\n {\n }", "function config_get_curr_blog_id () {\n\n\t\t global $current_blog;\n\n\t\t if ( isset( $current_blog ) ) {\n\n\t\t\t return $current_blog->blog_id;\n\t\t }\n\t\t else {\n\n\t\t\t return 1;\n\t\t }\n\t}", "public function edit_blog()\n\t{\n\t\tif($this->uri->segment(3)===False)\n\t\t{\n\t\t\t$blog_id = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$blog_id = $this->uri->segment(3);\n\t\t}\n\t\t//echo $testimonial_id;die;\n\n\t\t$result['data'] = $this->Blog_Modal->get_blog_data($blog_id);\n\t\t$result['cat_result']=$this->Blog_Modal->get_blogcat_data();\n\t\t$this->load->view('admin/update_blog',$result);\n\n\t}", "private function blogList()\r\n {\r\n if($this->uri->get(0)==\"delete\")\r\n {\r\n $id = $this->uri->get(1);\r\n $blog = $this->em->find(\"Blog\",$id);\r\n if($blog)\r\n $this->em->delete($blog);\r\n }\r\n $query = $this->em->createQuery(\"SELECT b FROM Blog\");\r\n $query->execute();\r\n $this->blogs = $query->getResultList();\r\n $this->render(\"listblog.phpf\");\r\n \r\n }", "static function get_post_by_id($post){\n\t\treturn self::$db->where('token_id',$post)->get('blog')->results();\n\t}", "public function showPostById($id, $sanitize)\n{\n $sql = \"SELECT p.ID, p.media_id, p.post_author,\n p.post_date, p.post_modified, p.post_title,\n p.post_slug, p.post_content, p.post_summary, \n p.post_keyword, p.post_tags,\n p.post_status, p.post_type, p.comment_status, u.user_login\n \t\t FROM tbl_posts AS p\n \t\t INNER JOIN tbl_users AS u ON p.post_author = u.ID\n \t\t WHERE p.ID = :ID AND p.post_type = 'blog'\";\n \n $sanitized_id = $this->filteringId($sanitize, $id, 'sql');\n \n $this->setSQL($sql);\n \n $postById = $this->findRow([':ID' => $sanitized_id]);\n \n return (empty($postById)) ?: $postById;\n \n}", "public function index($slug = '') {\n// $data = '*';\n// $contition_array = array('status' => 'publish');\n// $this->data['blog_detail'] = $this->common->select_data_by_condition('blog', $contition_array, $data, $sortby, $orderby, $limit, $offset, $join_str = array(), $groupby = '');\n\n $this->load->view('blogdata/index', $this->data);\n }", "public function saveBlogEntry ( $blog_title, $blog_entry ){\r\n // using placeholders to beef up form security\r\n $sql = \"INSERT INTO blog_entry_table (blog_title, blog_text)\r\n VALUES( ?, ?)\";\r\n // create an array with dynamic data: follow the order above\r\n $data = array($blog_title, $blog_entry);\r\n $statement = $this->makeStatement( $sql, $data ); \r\n \r\n // return the blog_id of the last saved blog_entry\r\n return $this->database->lastInsertId();\r\n }", "public function updateBlogPost() {\r\n\r\n\t\t$getid = $_GET['id'];\r\n\t\t$updtitle = $_POST['admblogtitle'];\r\n\t\t$updintro = $_POST['admblogintro'];\r\n\t\t$updcontent = $_POST['admblogcontent'];\r\n\r\n\t\ttry {\r\n\t\t\t// PDO initialiseren met attributes\r\n\t\t\t$stmt = new PDO(\"mysql:host=localhost;dbname=demo\", 'root', '');\r\n\t\t\t$stmt->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n\t\t\t// query om post op te halen\r\n\t\t\t$query = $stmt->prepare(\r\n\t\t\t\t\t\"UPDATE `evdnl_blog_posts_yc` SET title='$updtitle', intro='$updintro', content='$updcontent' WHERE `id` = '$getid' LIMIT 1;\r\n\t\t\t\t\t UPDATE `evdnl_blog_posts_yc` SET modify_date=CURRENT_TIMESTAMP WHERE `id` = '$getid' LIMIT 1\"\r\n\t\t\t\t\t);\r\n\t\t\t$query->execute();\r\n\r\n\t\t\techo $stmt->rowCount() . \" records UPDATED successfully\";\r\n\r\n\t\t\t// header aanroepen om leeg formulier te tonen\r\n\t\t}\r\n\t\tcatch (PDOException $e) {\r\n\t\t\t$e->getMessage();\r\n\t\t}\r\n\t}", "public function get_id_from_blogname() {\n global $json_api;\n\n $this->_verify_admin();\n\n extract( $_REQUEST );\n\n if(!isset($blogname))\n $json_api->error(__(\"You must send the 'blogname' parameter.\"));\n\n $blog_id = get_id_from_blogname( $blogname );\n\n return array( \"blog_id\" => $blog_id );\n }", "static public function mdlIngresarBlog($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(id_categoriablog, id_subcategoriablog, num_visitas, estrellas, fecha, title, description, keywords, descripcioncorta, titulo, ruta, estado, descripcionlarga, imagen, video) VALUES (:id_categoriablog, :id_subcategoriablog, :num_visitas, :estrellas, :fecha, :title, :description, :keywords, :descripcioncorta, :titulo, :ruta, :estado, :descripcionlarga, :imagen, :video)\");\n\n\t\t$stmt->bindParam(\":id_categoriablog\", $datos[\"id_categoriablog\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_subcategoriablog\", $datos[\"id_subcategoriablog\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":num_visitas\", $datos[\"num_visitas\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":estrellas\", $datos[\"estrellas\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":fecha\", $datos[\"fecha\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":title\", $datos[\"title\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":description\", $datos[\"description\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":keywords\", $datos[\"keywords\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":descripcioncorta\", $datos[\"descripcioncorta\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":titulo\", $datos[\"titulo\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":ruta\", $datos[\"ruta\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":estado\", $datos[\"estado\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":descripcionlarga\", $datos[\"descripcionlarga\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":imagen\", $datos[\"imagen\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":video\", $datos[\"video\"], PDO::PARAM_STR);\n\t\t\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}", "public function showPostBySlug($slug)\n{\n \n $sql = \"SELECT p.ID, p.media_id, p.post_author,\n p.post_date, p.post_modified, p.post_title,\n p.post_slug, p.post_content, p.post_summary, \n p.post_keyword, p.post_tags,\n p.post_status, p.post_type, p.comment_status, u.user_login\n FROM tbl_posts AS p\n INNER JOIN tbl_users AS u ON p.post_author = u.ID\n WHERE p.post_slug = :slug AND p.post_type = 'blog'\";\n\n $this->setSQL($sql);\n\n $postBySlug = $this->findRow([':slug' => $slug]);\n\n return (empty($postBySlug)) ?: $postBySlug;\n \n}", "public function process($param)\n {\n // Nastavení šablony\n $this->view = 'info';\n\n if($param[0] == \"published\"){\n $this->controller = new PublishedController;\n }\n else{\n $this->controller = new ArticleController;\n }\n $this->controller->process($param);\n\n $this->head['title'] = $this->controller->head['title'];\n }", "function au_show_entry(){\n\n\t// Praise the big $aulis\n\tglobal $aulis;\n\n\t// We can't access this file, if not from index.php, so let's check\n\tif(!defined('aulis'))\n\t\theader(\"Location: index.php\");\n\n\t// We need to decrypt the blog id, if numeric\n\tif(isset($_GET['id']) and is_numeric($_GET['id']))\n\t\t$entry_id = au_decrypt_blog_id($_GET['id']);\n\t// No id...\n\telse\n\t\t$entry_id = 0;\n\n\t// Try to obtain the entry from the big (or small, it all depends) database\n\tif($aulis['blog']['entry'] = au_get_blog_entry($entry_id)){\n\n\t\t// Prepare some url inputs\n\t\t$aulis['blog']['url_input'] = array(\n\t\t\t\"app\" => \"blogentry\",\n\t\t\t\"id\" => $aulis['blog']['entry']->entry_id,\n\t\t\t\"title\" => $aulis['blog']['entry']->blog_name\n\t\t);\n\n\t\t// Load the template\n\t\tau_load_template(\"blog_entry\");\n\n\t}\n\n\t// Bummer... we have to dissappoint them :'(\n\telse\n\t\tau_error_box(BLOG_NOT_FOUND);\n\n}", "public function editActionPost($slug) : object\n {\n $db = $this->app->db;\n $filter = new MyTextFilter();\n $response = $this->app->response;\n $request = $this->app->request;\n $session = $this->app->session;\n $title = \"Ändra ${slug}\";\n $doSave = $request->getPost(\"doSave\");\n $doDelete = $request->getPost(\"doDelete\");\n $doBack = $request->getPost(\"doBack\");\n $params = [\n \"contentTitle\" => $request->getPost(\"contentTitle\"),\n \"contentPath\" => $request->getPost(\"contentPath\"),\n \"contentSlug\" => $request->getPost(\"contentSlug\"),\n \"contentData\" => $request->getPost(\"contentData\"),\n \"contentType\" => $request->getPost(\"contentType\"),\n \"contentFilter\" => $request->getPost(\"contentFilter\"),\n \"contentPublish\" => $request->getPost(\"contentPublish\"),\n \"contentId\" => $request->getPost(\"contentId\")\n ];\n\n if (isset($doSave)) {\n $db->connect();\n $sql = \"SELECT slug, id FROM content;\";\n $slugs = $db->executeFetchAll($sql);\n if (!$params[\"contentPath\"]) {\n $params[\"contentPath\"] = null;\n }\n if (!$params[\"contentSlug\"]) {\n $params[\"contentSlug\"] = slugify($params[\"contentTitle\"]);\n foreach ($slugs as $s) {\n if ($s->slug == $params[\"contentSlug\"] && $s->id != (int)$params[\"contentId\"]) {\n $session->set(\"existError\", true);\n $session->set(\"title\", $params[\"contentTitle\"]);\n $session->set(\"adminid\", $params[\"contentId\"]);\n return $response->redirect(\"cms/edit/${slug}\");\n }\n }\n }\n if ($params[\"contentSlug\"]) {\n foreach ($slugs as $s) {\n if ($s->slug == $params[\"contentSlug\"] && $s->id != $params[\"contentId\"]) {\n $session->set(\"existError\", true);\n $session->set(\"title\", $params[\"contentTitle\"]);\n $session->set(\"adminid\", $params[\"contentId\"]);\n return $response->redirect(\"cms/edit/${slug}\");\n }\n }\n }\n if ($params[\"contentFilter\"]) {\n $text = $params[\"contentData\"];\n $filters = explode(\",\", $params[\"contentFilter\"]);\n $filteredText = $filter->parse($text, $filters);\n $params[\"contentData\"] = $filteredText;\n }\n $db->connect();\n $sql = \"UPDATE content SET title=?, path=?, slug=?, data=?, type=?, filter=?, published=? WHERE id = ?;\";\n $db->execute($sql, array_values($params));\n return $response->redirect(\"cms/admin\");\n } elseif (isset($doDelete)) {\n $db->connect();\n $sql = \"UPDATE content SET deleted=NOW() WHERE id=?;\";\n $db->execute($sql, [$params[\"contentId\"]]);\n return $response->redirect(\"cms/admin\");\n } elseif (isset($doBack)) {\n return $response->redirect(\"cms/admin\");\n }\n }", "function DBParameter($param)\n\t{\n\t\tif (empty($this->settings[$param])) return false;\n\t\t$sql = $this->settings[$param][1];\n\t\treturn $this->_DBParameter($sql);\n\t}", "function install_blog($blog_id, $blog_title = '')\n {\n }", "public function getCurrentBlogId()\n {\n return $this->wpDatabase->blogid;\n }", "function getBlogPost($blogPostId){\n $result = dbQuery('\n SELECT * \n FROM viewpost\n WHERE blogPostId = :blogPostId\n ', \n array(\n 'blogPostId' => $blogPostId\n ))->fetch();\n return $result;\n }", "public function get_blog_details($blog_url = \"\")\n\t{ \n\t\t\t\t\t\t\n\t\t$result = $this->db->from(\"blog\")\n\t\t\t\t\t\t->join(\"category\",\"category.category_id\",\"blog.category_id\")\t\t\t\t\t\t\n\t\t\t\t\t\t->where(array(\"blog.url_title\" => $blog_url)) \t\t\t\t\t\n\t\t\t\t\t\t->get(); \n\t\treturn $result;\n\t}", "public function edit(Blog $blog)\n {\n //\n }", "public function consultarPost($idPost){\n\n\t\ttry {\n \n\t\t\t$con = new PDO(\"mysql:host=localhost;dbname=forum;charset=utf8\", \"root\", \"\");\n\n \t\t$resultSet = $con->prepare(\"SELECT pos.nomePost,\n \t\t\t\t\t\t\t\t\t\t pos.descricao,\n \t\t\t\t\t\t\t\t\t\t date_format(pos.dataPost, '%d/%m/%Y') as dataPost,\n \t\t\t\t\t\t\t\t\t\t usu.nickname,\n \t\t\t\t\t\t\t\t\t\t usu.nome,\n \t\t\t\t\t\t\t\t\t\t usu.perfil,\n \t\t\t\t\t\t\t\t\t\t usu.foto,\n \t\t\t\t\t\t\t\t\t\t usu.assinatura,\n \t\t\t\t\t\t\t\t\t\t date_format(usu.dataRegistro, '%d/%m/%Y') as dataRegistro,\n \t\t\t\t\t\t\t\t\t\t usu.id_usuario,\n\t\t\t\t\t\t\t\t\t\t\t pos.id_post\n \t\t\t\t\t\t\t\t\t\t FROM tb_posts pos, \n\t \t\t\t\t\t\t\t\t\t\t tb_usuario usu\n \t\t\t\t\t\t\t\t\t\t WHERE pos.tb_usuario_id_usuario = usu.id_usuario\n \t\t\t\t\t\t\t\t\t\t AND pos.tb_topicos_id_topico = ?\" );\n\n\t\t\t$resultSet->bindParam(1, $idPost); // parametro bind se quizesse utilizar like seria // $resultSet->bindParam(1, $nome . “%”);\n\n\t\t\tif($resultSet->execute()){ // executa o select\n\t\t\t\tif($resultSet->rowCount() > 0){ // consulta retornou mais que 1 registro\n\t\t\t\t\twhile($row = $resultSet->fetch(PDO::FETCH_OBJ)){\n \t\t\t\t\t\t\n \t\t\t\t\t$postagem = New Postagem();\n \t\t\t\t\t$postagem->setNomePost($row->nomePost);\n \t\t\t\t\t$postagem->setDescricao($row->descricao);\n\t\t\t\t\t$postagem->setDataPost($row->dataPost);\n\t\t\t\t\t$postagem->setNickName($row->nickname);\n\t\t\t\t\t$postagem->setNome($row->nome);\n\t\t\t\t\t$postagem->setPerfil($row->perfil);\n\t\t\t\t\t$postagem->setAssinatura($row->assinatura);\n\t\t\t\t\t$postagem->setDataRegistro($row->dataRegistro);\n\t\t\t\t\t$postagem->setIdUsuario($row->id_usuario);\n\t\t\t\t\tif(empty($row->foto)){\n\t\t\t\t\t\t$postagem->setFoto('./imagens/usuarios/alien.png');\n\t\t\t\t\t}else{\n\t\t\t\t\t $postagem->setFoto($row->foto);\n\t\t\t\t\t}\n\t\t\t\t\t\t$postagem->setIdPost($row->id_post);\n\n\t\t\t\t\t}\n } \n }\n \n return $postagem;\n\n \t} \n \tcatch (Exception $e) {\n \t\tUtil::alerta($e->getMessage());\n \t}\n\n\t}", "function SelectSearchById ($Id)\n{\n\t$count = 0;\n\t$array = array();\n\t\n\ttry \n\t{\n\t\t// First Connect to the database\n\t\t$pdo = new PDO(\"mysql:host=\" . DB_SERVER . \";dbname=\". DB_NAME . \";charset=utf8\" , DB_USER, DB_PASS);\n\t}\n\tcatch (PDOException $e)\n\t{\n\t\techo \"Error Connecting to Source:\" . $e->getMessage();\n\t}\n\t\n\t$pdo->exec(\"set names utf8\");\t\t// Added for security\n\t\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t$sth = $pdo->prepare(\"SELECT * from content_blog WHERE content_id = :Content\");\n\t$sth->setFetchMode(PDO::FETCH_ASSOC);\n\t$sth->execute(array(\n\t\t\t\t':Content' => $Id\n\t\t\t\t));\n\n\t//$result = $sth->fetch(); // Use fetchAll() if you want all results, or just iterate over the statement, since it implements Iterator\n\n\t$result = $sth->fetchAll();\n\t \n\t// Put everything you find in an array\n\tif(count($result > 0)) \n\t{\n\t\tforeach($result as $r) \n\t\t{\n\t\t\t\n\t\t\t$array[$count] = array();\n\t\t\t$array[$count]['content_id'] \t= $r['content_id'];\n\t\t\t$array[$count]['title'] \t\t= $r['title'];\n\t\t\t$array[$count]['text'] \t\t\t= $r['text'];\n\t\t\t$array[$count]['category_type']\t= $r['category_type'];\n\t\t\t$array[$count]['date'] \t\t\t= $r['date'];\n\t\t\t$array[$count]['user_id'] \t\t= $r['user_id'];\n\t\t\t$array[$count]['ip_address'] \t= $r['ip_address'];\n\t\t\t$array[$count]['TitleId'] \t\t= $r['TitleId']; \n\n\t\t\t$count++;\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n\tif ($array == null)\n\t{\n\t\t// This is incase the user inserts an invalid page number\n\t\t// Just redirect them back to the index page\n\t\t// redirect_to(\"\");\t\n\t\treturn null;\n\t}\n\t\n\treturn $array;\t// Everything in the array gets pushed to this return value\n}", "function InsertBlog($ContentId, $Title, $Text, $Date, $Category, $OwnerId, $IpAddress, $ProxyIp, $TitleId)\n{\t\n\t// First Connect to the database\n\t$pdo = new PDO(\"mysql:host=\" . DB_SERVER . \";dbname=\". DB_NAME . \";charset=utf8\" , DB_USER, DB_PASS);\n\t \n\t$pdo->exec(\"set names utf8\");\t\t// Added for security\n\t\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n\t$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t\n\ttry\n\t{\n\t\t// Insert into the Blog Database\n\t\t$sth = $pdo->prepare(\"INSERT INTO content_blog (content_id, title, text, date, category_type, user_id, ip_address, proxy_ip, TitleId) \n\t\t\tVALUES(:Content_Id, :Title, :Text, :Date, :Category, :OwnerId, :IpAddress, :ProxyIp, :titleid)\");\n\t\t\n\t\t// The values\n\t\t$sth->execute(array(\n\t\t\n\t\t\t\"Content_Id\" => $ContentId,\n\t\t\t\"Title\" => $Title,\n\t\t\t\"Text\" => $Text,\n\t\t\t\"Date\" => $Date,\n\t\t\t\"Category\" => $Category,\n\t\t\t\"OwnerId\" => $OwnerId,\n\t\t\t\"IpAddress\" => $IpAddress,\n\t\t\t\"ProxyIp\" => $ProxyIp,\n\t\t\t\"titleid\" => $TitleId\n\t\t\t));\n\t\t\t\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\t// Report an error\n\t\techo $e->getMessage();\n\t}\n\t\n\t// Clear everything\n\t$pdo = null;\n\t$sth = null;\n}", "public static function getBlogItemById($id) {\n $id = intval($id);\n\n if ($id) {\n\n $db = Db::getConnection();\n\n $result = $db->query('SELECT * FROM news WHERE id=' . $id);\n $result->setFetchMode(PDO::FETCH_ASSOC);\n\n $blogItem = $result->fetch();\n\n return $blogItem;\n }\n }", "private function getParameterFromNewsBlogWithIdFromDb($res)\n {\n $params = null;\n if (isset($res) && !empty($res)) {\n $params = array(\n 'id' => htmlentities($res->id, null, 'UTF-8'),\n 'slug' => htmlentities($res->slug, null, 'UTF-8'),\n 'url' => htmlentities($res->url, null, 'UTF-8'),\n 'type' => htmlentities($res->type, null, 'UTF-8'),\n 'title' => htmlentities($res->title, null, 'UTF-8'),\n 'data' => htmlentities($res->data, null, 'UTF-8'),\n 'filter' => $res->filter,\n 'author' => htmlentities($res->author, null, 'UTF-8'),\n 'category' => $res->category,\n 'published' => htmlentities($res->published, null, 'UTF-8'),\n 'deleted' => htmlentities($res->deleted, null, 'UTF-8')\n );\n }\n\n return $params;\n }", "function update_blog_details($blog_id, $details = array())\n {\n }", "public function editAction()\n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (!$id) {\n return $this->redirect()->toRoute('blog', array(\n 'action' => 'add'\n ));\n }\n\n // Get the Blog with the specified id. An exception is thrown\n // if it cannot be found, in which case go to the index page.\n try {\n $blog = $this->getBlogTable()->getBlog($id);\n }\n catch (\\Exception $ex) {\n return $this->redirect()->toRoute('blog', array(\n 'action' => 'index'\n ));\n }\n\n $form = new BlogForm();\n $form->bind($blog);\n $form->get('submit')->setAttribute('value', 'Edit');\n\n $request = $this->getRequest();\n if ($request->isPost()) {\n $form->setInputFilter($blog->getInputFilter());\n $form->setData($request->getPost());\n\n if ($form->isValid()) {\n $this->getBlogTable()->saveBlog($blog);\n\n // Redirect to list of Blogs\n return $this->redirect()->toRoute('blog');\n }\n }\n\n return array(\n 'id' => $id,\n 'form' => $form,\n );\n }", "function active_blog($id,$status){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `status_blog` = '$status' WHERE `id_utilisateur` = $id\");\n\t\t\n\t\t$req->closeCursor();\n\t}", "function build_param($param)\n\t{\n\t\t$string_param = NULL;\n\n\t\tif($param!=null){\n\n\t\t\tif(isset($param->user_id)) $string_param .= \" user.user_id LIKE '%\".$param->user_id.\"%' \";\n\t\t}\n\n\t\treturn $string_param;\n\t}", "function update_blog_sql($arr,$id)\n {\n $id = (int)$id;\n mysql_query(\"UPDATE \".$this->prefix.\"blogs SET\n title = '\".$this->safe_import($arr['title']).\"',\n comments = '\".$this->safe_import($arr['comments']).\"',\n postdate = '\".$arr['timestamp'].\"',\n allow = '\".(isset($arr['allow']) ? 1 : 0).\"',\n notify = '\".(isset($arr['notify']) ? 1 : 0).\"'\n WHERE id = '$id'\n LIMIT 1\n \") or die(mysql_error());\n }", "function cleanParameter($param) {\r\n global $db;\r\n $returnVal = mysqli_real_escape_string($db, $param);\r\n return ($returnVal);\r\n }", "public function getblogId(): Uuid {\n\t\treturn ($this->blogId);\n\t}", "public function buscar($param)\r\n {\r\n\r\n $where = \" true \";\r\n if ($param <> NULL) {\r\n if (isset($param['idusuario']))\r\n $where .= \" and idusuario='\" . $param['idusuario'] . \"'\";\r\n if (isset($param['idrol']))\r\n $where .= \" and idrol ='\" . $param['idrol'] . \"'\";\r\n }\r\n\r\n $arreglo = UsuarioRol::listar($where, \"\");\r\n return $arreglo;\r\n }", "public function getBlog($blogId)\n {\n $em = $this->getDoctrine()->getManager();\n\n $blog = $em->getRepository('BloggerBlogBundle:Blog')->find($blogId);\n\n if(!$blog)\n {\n throw $this->createNotFoundException('Unable to find blog post.');\n }\n\n return $blog;\n }", "static function get_post_by_cat_id($post){\n\t\treturn self::$db->where('cat_id',$post)->get('blog')->row();\n\t}", "public function get_blogs_by_id($id)\n { \n parent::con();\n\n $sql=sprintf(\"select * from blogs as b where b.id_blogs = %s;\",parent::comillas_inteligentes($id));\n\n $res=mysql_query($sql);\n while ($reg=mysql_fetch_assoc($res))\n {\n $this->blogi[]=$reg;\n }\n return $this->blogi;\n \n mysql_free_result($reg);\n \n }", "function refresh_blog_details( $blog_id = 0 ) {\n\t$blog_id = (int) $blog_id;\n\tif ( ! $blog_id ) {\n\t\t$blog_id = get_current_blog_id();\n\t}\n\n\tclean_blog_cache( $blog_id );\n}", "function add_article($title_article, $short_article, $article, $date_article, $id_category_article, $id_user, $commentaire)\n{\n global $connection;\n // insert dans la table articles\n $sql_ins = \"INSERT INTO blog_articles(title_article, short_article, article, create_article, comment) VALUES (:title_article,:short_article,:article,:create_article, :comment)\";\n\n $sth = $connection->prepare($sql_ins);\n $sth->execute(array(\n ':title_article' => $title_article,\n ':short_article' => $short_article,\n ':article' => $article,\n ':create_article' => $date_article,\n ':comment' => $commentaire\n\n\n ));\n // recuperation de id_article\n $id_article = $connection->lastInsertId();\n\n $id_user = $_SESSION[\"id_user\"];\n // appel la function pour passer les id\n add_liaison($id_article, $id_category_article, $id_user);\n\n\n return $id_article;\n}", "function wp_cache_switch_to_blog($blog_id)\n {\n }", "public function column_blogname($blog)\n {\n }", "public function get_blog_id_from_url() {\n global $json_api;\n\n $this->_verify_admin();\n\n extract($_REQUEST);\n\n if(!isset($domain))\n $json_api->error(__(\"You must send the 'domain' parameter.\"));\n\n if(!isset($path))\n $path = '/';\n\n if( $blog_id = get_blog_id_from_url( $domain, $path ) )\n return array( \"blog_id\" => $blog_id );\n else\n $json_api->error(__(\"No blogs were found for this user.\"));\n }", "static function get_post_by_slug($slug){\n\t\treturn self::$db->where('slug',$slug)->get('blog')->row();\n\t}", "function switch_blog( $blog_id ) {\n\t\t$this->reset();\n\t\t$this->_blog_id = $blog_id;\n\t}", "function getPostId($id){\n\t\t$this->db->from('posts');\n\t\t$this->db->select('id,titulo,cuerpo');\n\t\t$this->db->where('id',$id);\n\t\t$data=$this->db->get();\n\t\tif ($data->num_rows() > 0) {\n\t\t\treturn $data->result();\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function getSinglePost ( $slug ) {\n\n\t$connection = connectDB();\n\t$fecha_actual = date(\"Y-m-d\");\n\t$tabla = 'noticias';\n\n\t$query = \"SELECT * FROM \" .$tabla;\n\t$query .= \" WHERE post_url='\" . $slug . \"'\";\n\t$query .= \" AND post_fecha <= '\". $fecha_actual. \"'\";\n\t$query .= \" LIMIT 1\";\n\n\t$result = mysqli_query($connection, $query);\n\n\tif ( $result->num_rows == 0 ) {\n\t\tgetTemplate( '404' );\n\t} else {\n\n\t\t$post = mysqli_fetch_array($result);\n\n\t}\n\n\treturn $post;\n}", "public function edit($param)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$id = (int) $param['id'];\n\t\t\t$this->data = User::find($id);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tprint $e->getMessage();\n\t\t}\n\t}", "public function findMediaBlog($mediaId)\n{\n\n $sql = \"SELECT ID, media_filename, media_caption, media_type, media_target, \n media_user, media_access, media_status \n FROM tbl_media\n WHERE ID = :ID \n AND media_target = 'blog'\n AND media_access = 'public'\n AND media_status = '1'\";\n \n $this->setSQL($sql);\n\n $item = $this->findRow([':ID' => (int)$mediaId]);\n\n return (empty($item)) ?: $item;\n\n}", "function blogName(){\r\n\t\tglobal $conn;\r\n\t\t$result = $conn->query('SELECT name FROM blog LIMIT 1');\r\n\t\tif($result instanceof mysqli_result)\r\n\t\t\tif($result->num_rows > 0)\r\n\t\t\t\treturn $result->fetch_object()->name;\t\t\t\t\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "function getTitleSEO($identifiant)\r\n{\r\n\tglobal $pdo;\r\n\t\r\n\t$SQL = \"SELECT * FROM pas_seo WHERE page = '$identifiant'\";\r\n\t$reponse = $pdo->query($SQL);\r\n\t$req = $reponse->fetch();\r\n\t\r\n\treturn $req['title'];\r\n}", "function PreparedDeleteBlog ($ContentId)\n{\n\t$pdo = new PDO(\"mysql:host=\" . DB_SERVER . \";dbname=\". DB_NAME . \";charset=utf8\" , DB_USER, DB_PASS);\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\n\ttry\n\t{\n\t\t$sth = $pdo->prepare(\"DELETE FROM content_blog\n\t\t\t\t\t\t\tWHERE content_id = :Content_Id\") ;\n\t\t\t\n\t\t$sth->execute(array(\n\t\t\t\n\t\t\t\t\"Content_Id\" => $ContentId\n\t\t\t\t\n\t\t\t\t));\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\t// Report an error\n\t\techo $e->getMessage();\n\t}\n\t\n\t// Clear Everything\n\t$pdo = null;\n\t$sth = null;\n}", "public function show(Blog $blog)\n {\n //\n }", "public function show(Blog $blog)\n {\n //\n }", "public function detail(){\n\t\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t\t$record = $this->modelGetRecord($id);\n\t\t\t//load view\n\t\t\tinclude \"Views/BlogsDetailView.php\";\n\t\t}", "public function GetAuthorPostByid($id){\n\t\t$this->db->where('Id', $id);\n\t\t$query=$this->db->get('tblauthorpost');\n\t\tif($query->num_rows()==1)\n\t\t{\n\t\t\treturn $query->result();\n\t\t}\n\t\telse{\n\t\t\tredirect('home');\n\t\t}\n\t}", "public function add($id=null) \n\t\t{\t\t\t\n\t\t\tif ($this->request->is('post')) \n\t\t\t{\t\n\t\t\t\n\t\t\t\t$insert['user_id']=$this->data['Blog']['user_id'];\n\t\t\t\t$insert['title']=htmlentities($this->data['Blog']['title']);\n\t\t\t\t$insert['comments']=htmlentities($this->data['Blog']['comments']);\t\n\t\t\t\n\t\t\t\t$this->Blog->create();\n\t\t\t\t \n\t\t\t\tif ($this->Blog->save($insert)) \n\t\t\t\t{\n\t\t\t\t\t$this->Session->setFlash('Your post has been saved.');\n\t\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$this->Session->setFlash('Unable to add your post.');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function wp_cache_switch_to_blog($blog_id)\r\n\t{\r\n\t\tglobal $wp_object_cache;\r\n\t\treturn $wp_object_cache->switch_to_blog((int)$blog_id);\r\n\t}", "function update_blog_id() {\n\t$table = 'blog_tags';\n\t$query = \"SELECT `blog_id` FROM `\" . $table . \"` WHERE `blog_id` not in ('2006-03-02:next-door')\";\n\t$result = mysql_query($query);\n\twhile ($row = mysql_fetch_array($result)) {\n\t\t$loc = strrchr($row[0],\"/\");\n\t\t$loc = substr($loc,1);\n\t\t$date = strrchr($row[0],\",\");\n\t\t$date = substr($date,1,10);\n\t\t$id = $date . \":\" . $loc;\n\t\t$query = \"update `\" . $table . \"` set `blog_id` = '\" . $id . \"' where `blog_id` = '\" . $row[0] . \"'\";\n\t\tprint $query . '<br />';\n\t\tmysql_query($query);\n\t}\n}" ]
[ "0.64192086", "0.6385089", "0.6243699", "0.61947244", "0.6075175", "0.606344", "0.6032463", "0.6031012", "0.59944624", "0.5955123", "0.5897971", "0.5868819", "0.5804248", "0.5778227", "0.57528985", "0.5746672", "0.5736558", "0.57284915", "0.57063586", "0.570587", "0.5699835", "0.56590414", "0.560766", "0.56045514", "0.5594849", "0.5587064", "0.5568773", "0.55654955", "0.55566883", "0.5548251", "0.5536837", "0.55176455", "0.5507061", "0.5506765", "0.55062145", "0.5487877", "0.54767764", "0.54724044", "0.54651314", "0.5446296", "0.5446079", "0.5433292", "0.5431749", "0.5429221", "0.5426023", "0.5424115", "0.54006374", "0.5395229", "0.5377515", "0.53772104", "0.5374135", "0.536422", "0.535711", "0.5349652", "0.5346543", "0.5344757", "0.53406817", "0.53361094", "0.53329736", "0.532859", "0.53132415", "0.5306418", "0.53051704", "0.52946126", "0.5292375", "0.5292317", "0.52905977", "0.5279329", "0.5277794", "0.52718925", "0.5269845", "0.52639425", "0.52579284", "0.5251167", "0.52486193", "0.52450866", "0.5244657", "0.5244645", "0.52407277", "0.5240699", "0.5234371", "0.5229552", "0.5227527", "0.51986206", "0.51860905", "0.51852185", "0.518139", "0.51750207", "0.5174954", "0.5174878", "0.5174787", "0.5172592", "0.5172484", "0.51719147", "0.51719147", "0.5170026", "0.51693314", "0.5168422", "0.51681423", "0.51673615" ]
0.81319106
0
On convertit l'argument en nombre entier.
public function setUsers_IdUsers($users_idusers){ $users_idusers = (int) $users_idusers; // On vérifie ensuite si ce nombre est bien strictement positif. if ($users_idusers > 0){ // Si c'est le cas, c'est tout bon, on assigne la valeur à l'attribut correspondant. $this->_users_idusers = $users_idusers; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function broj()\n {\n $parametar = func_get_args();\n foreach ($parametar as $broj) {\n if (is_int($broj)) {\n echo $broj.' je broj<br>';\n } else {\n echo $broj.' je string <br>';\n }\n }\n }", "public function getArg(){\n return (string)$this->arg;\n }", "function ola(){\n\n$argumentos = func_get_args();// recupera todos os argumentos da variavel que é um array \nreturn $argumentos;\n}", "protected function reemplazaParametro(){\n\t\t$vector=func_get_arg(0);\n\t\t$params=$this->dato;\n//\t\tprint_r($params);\n//\t\techo \"<br>\";\n\t\t$cant=sizeof($params);\n\t\t$accion=$vector[0];\n\t\tif (sizeof($params)!=0){\n\t\t\t$claves=array_keys($params);\n//\t\tfor($x=1;$x<$cant;$x++){\n\t\t\tforeach($claves as $clave){\n\t\t\t\t$str=\"#\".($clave).\"#\";\n\t\t\t\t$accion=str_replace($str,$params[$clave],$accion);\n\t\t\t}\n\t\t}\n\t\treturn $accion;\n\t}", "function nombreCampo($result, $indice){\n\t return mysql_field_name($result, $indice);\t\n\t}", "public function getArgumento()\n\t\t{\n\t\t\treturn $this->argumento;\n\t\t}", "private function setGivenArgumentAmount(): int {\n return $_SERVER['argc'] - 1;\n }", "public function prepareArguments() {}", "public function asignarNombre($nombre){\n$this->nombre = self::mensaje().$nombre;\n}", "protected function setArgument()\n {\n $this->set('primary_key', false);\n $this->set('length', $this->argument);\n $this->set('autoincrement', false);\n $this->set('unsigned', false);\n $this->set('not_null', false);\n }", "function macro_get_plain_argument($number)\n{\n return isset($_SERVER['argv'][$number]) ? $_SERVER['argv'][$number] : null;\n}", "public function setIDfromArgV() {}", "public function getArgument(string $name);", "public function getArgumentNames() {}", "abstract public static function args();", "function construir_id_def_base($nombre_fuente)\n\t{\n\t\treturn $this->get_instancia()->get_id().' '.$this->get_id().' '.$nombre_fuente;\n\t}", "protected function ponerNombre(){\r\n\t\t$time=$this->time;\r\n\t\t\tif ($this->nombreUnicoImagen=='default') {\r\n\t\t\t\tfor ($i=0; $i <$this->cantidad ; $i++) { \r\n\t\t\t\t$this->nombreImagenes[$i]=$time.'-to_'.($i+1).'_and_'.$this->cantidad;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor ($i=0; $i <$this->cantidad ; $i++) { \r\n\t\t\t\t\t$this->nombreImagenes[$i]=$this->nombreUnicoImagen.'-'.$time.'-to_'.($i+1).'_and_'.$this->cantidad;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}", "function getArguments() ;", "public function incrementArgumentPosition()\n {\n $this->argument++;\n }", "function NUMERO_LUNES($_ARGS) {\r\n\tlist($ap, $mp)=SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t$dias_del_mes = DIAS_DEL_MES($periodo_inicio);\r\n\t\r\n\tif (($primer_dia_semana == 0 || $primer_dia_semana == 6) && $dias_del_mes == 31) $lunes = 5;\r\n\telseif ($primer_dia_semana == 1 && ($dias_del_mes == 30 || $dias_del_mes == 31)) $lunes = 5;\r\n\telseif ($primer_dia_semana == 2 && ($dias_del_mes == 29 || $dias_del_mes == 30 || $dias_del_mes == 31)) $lunes = 5;\r\n\telse $lunes = 4;\r\n\t\r\n\treturn $lunes;\r\n}", "function testeNomes($name, $middleName, $lastName) {\n \n // here we get the values of the parameters\n $nomes = func_get_args();\n \n var_dump($nomes);\n \n // and here we loop through the values and print each one\n foreach ($nomes as $nome) {\n echo $nome . PHP_EOL;\n }\n \n}", "abstract protected function arguments(): array;", "public function __construct($n){\n\t\t$this -> name = $n;\n\t}", "private function _arginfo(EntityArgument $argument) {\n static $types = [\n Types::BOOLEAN => 'IS_BOOL',\n Types::STRING => 'IS_STRING',\n Types::INT => 'IS_LONG',\n Types::DOUBLE => 'IS_DOUBLE',\n Types::RESOURCE => 'IS_RESOURCE'\n ];\n switch($argument->cast) {\n case Types::BOOLEAN:\n case Types::STRING:\n case Types::INT:\n case Types::DOUBLE:\n case Types::RESOURCE:\n return \"ZEND_ARG_TYPE_INFO({$argument->isRef()}, {$argument->name}, {$types[$argument->cast]}, {$argument->allowsNull()})\";\n case Types::OBJECT:\n return \"ZEND_ARG_OBJ_INFO({$argument->isRef()}, {$argument->name}, \\\"\".addslashes($argument->instance_of).\"\\\", {$argument->allowsNull()})\";\n case Types::ARR:\n return \"ZEND_ARG_ARRAY_INFO({$argument->isRef()}, {$argument->name}, {$argument->allowsNull()})\";\n default:\n return \"ZEND_ARG_INFO({$argument->isRef()}, {$argument->name})\";\n }\n }", "public function campo($nombre) {}", "public function arguments(): array;", "public function getFirstArgument();", "private function buildParameter(\\Phalcon\\Di\\DiInterface $container, int $position, array $argument)\n {\n }", "static public function mdlActualizarArgumento($valor){\n\n\t\t$sql=\"UPDATE\n maestrajf\n SET\n argumento = argumento + 1\n WHERE codigo = :valor\";\n\n $stmt=Conexion::conectar()->prepare($sql);\n\n $stmt->bindParam(\":valor\", $valor, PDO::PARAM_STR);\n\n\t\tif ($stmt->execute()) {\n\n\t\t\treturn \"ok\";\n\t\t} else {\n\n\t\t\treturn \"error\";\n\t\t}\n\n\t\t$stmt=null;\n\n }", "public final function asigNombre($nombre){\r\n $this->nombre=$nombre;\r\n }", "function bonjour(string $prenom, $nomDeFamille= \"\")//l'ordre des arguments est important, c'est ce qu'il y a entre parenthèses\n{\n \n echo '<h1>';\n echo \"Bonjour $prenom $nomDeFamille!\";\n echo '</h1>';\n}", "function retorno($nombre,$apellido)\n {\n if( is_string($nombre) && is_string($apellido) )\n {\n //filter_vars()\n $dame = $nombre. \"<br>\". $apellido;\n return $dame;\n }\n else\n {\n return \"Ingresaste mal los datos. tienen que ser caractéres alfabéticos\";\n }\n\n }", "protected function generate_arg($number, $type)\n {\n $arg = \"arg\" . $number;\n\n $this->xml->startElement($arg);\n $this->xml->writeAttribute(\"type\", $type);\n $this->xml->text($this->token);\n\n $this->xml->endElement();\n }", "function nombrecampo($numcampo){return mysqli_field_name($this->Consulta_ID, $numcampo);}", "function nombrecampo($numcampo) {\r\n\r\n return mysql_field_name($this->Consulta_ID, $numcampo);\r\n\r\n}", "function training_menu_arguments($arg1 = NULL, $arg2 = NULL) {\n $output = '';\n if (!empty($arg1)) {\n $output .= t('Argument 1=%arg', array('%arg' => $arg1)) . '</br>';\n }\n if (!empty($arg2)) {\n $output .= t('Argument 2=%arg', array('%arg' => $arg2));\n }\n\n return $output;\n}", "public function __construct()\n {\n $this->arguments = func_get_args();\n }", "public function getIdParameter(): string;", "public function nombreCampo($numcampo) {\n\t\t$meta = $this->query->getColumnMeta($numcampo);\n\t\t$resultado = false;\n\t\tif ($meta !==false){\n\t\t\t$resultado = $meta['name'];\n\t\t}\n\t\treturn $resultado;\n\t}", "protected function getArguments()\n {\n\n }", "public function getNamedStringArgument($name);", "public function callback_number( $args ) {\n $this->callback_text( $args );\n }", "public function __construct($argument1)\n {\n }", "function nombremescorto($idmes){\n\t$nombremescorto = \"\";\n\tswitch ($idmes) {\n\t\tcase 1:\n\t\t\t$nombremescorto = \"ENE\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$nombremescorto = \"FEB\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\t$nombremescorto = \"MAR\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\t$nombremescorto = \"ABR\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\t$nombremescorto = \"MAY\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\t$nombremescorto = \"JUN\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\t$nombremescorto = \"JUL\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\t$nombremescorto = \"AGO\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\t$nombremescorto = \"SEP\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\t$nombremescorto = \"OCT\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\t$nombremescorto = \"NOV\";\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\t$nombremescorto = \"DIC\";\n\t\t\tbreak;\n\n\t}\n\treturn $nombremescorto;\n}", "public function ingresar_nombre($nombre,$username = ' la massa')\n {\n $this -> nombre = $nombre . $username; \n }", "function jour_precedent($jour,$mois,$annee){\n\t$jour--;\n\tif($jour==0){\n\t\t$mois--;\n\t\t$jour=$nbrjour[$mois-1];\n\t}\n\treturn $_SERVER['PHP_SELF'].\"?j=\".$jour.\"&m=\".$mois.\"&a=\".$annee;\n}", "public function getArgument()\n {\n return 'help';\n }", "public function stringTipoContacto($parametro)\n{\n\n if (is_numeric($parametro)==TRUE) {\n # code...\n if ($parametro==0) {\n # code...\n return 'Cliente';\n }\n elseif ($parametro==1) {\n # code...\n return 'Provedor';\n }\n\n elseif ($parametro==2) {\n # code...\n return 'Cliente y Provedor';\n }\n }\n else\n {\n return \"Error En Parámetro :/\";\n }\n}", "function mes($mes){\n $meses = array(\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\");\n $nombre = $meses[$mes-1];\n return $nombre;\n }", "public function number($len){ }", "function creaChampionnatNbRencontre($nb_equipe)\n{\n if($nb_equipe==4){$nb_rencontre=5;}\n else if($nb_equipe==6){$nb_rencontre=8;}\n else if($nb_equipe==8){$nb_rencontre=15;}\n else if($nb_equipe==12){$nb_rencontre=19;}\n else if($nb_equipe==16){$nb_rencontre=31;}\n else if($nb_equipe==24){$nb_rencontre=39;}\n else if($nb_equipe==32){$nb_rencontre=63;}\n \n return $nb_rencontre;\n}", "abstract public function ingresar_nombre($nombre);", "function Numero_a_mes($Ingresomes_c){\t\n$me = $Ingresomes_c;\nif($me=='01') $mes='Ene';\nif($me=='02') $mes='Feb';\nif($me=='03') $mes='Mar';\nif($me=='04') $mes='Abr';\nif($me=='05') $mes='May';\nif($me=='06') $mes='Jun';\nif($me=='07') $mes='Jul';\nif($me=='08') $mes='Ago';\nif($me=='09') $mes='Sep';\nif($me=='10') $mes='Oct';\nif($me=='11') $mes='Nov';\nif($me=='12') $mes='Dic';\n$cadena = (\"$mes\");\nreturn $cadena;\n}", "public function getParameterName();", "public function initializeArguments() {}", "public function initializeArguments() {}", "public function initializeArguments() {}", "public function initializeArguments() {}", "public function answer($argument1)\n {\n }", "public function __construct(public string $nombre, public int $precio, public bool $disponible){}", "function callback_number(array $args)\n {\n }", "private function getArgumentString()\n {\n if (!is_null($this->getArguments()))\n {\n return $this->getArguments();\n }\n $strOut = \"\";\n if (count($this->getChildArguments())) {\n foreach ($this->getChildArguments() as $key => $argument) {\n $strOut .= ($key == 0 ? \"\": \" , \") . \"\\\"\" . $argument . \"\\\"\";\n }\n }\n return $strOut;\n }", "public function __construct($nombre=\"Invitado\"){\n\t\t\t$this->nombre=$nombre;\n\t\t\t$this->distanciaRecorrida=0;\n\n\t\t}", "function full_passed($argumento) { \n $findArg = $this->passed($argumento); \n if ($findArg) {\n if (count($this->parsed[$findArg]) > 1) {\n return $findArg; \n }\n }\n \n return 0; \n }", "public function getArguments() {}", "public function getArguments() {}", "public function getArguments() {}", "public function getArguments() {}", "function test($par1, $par2){\n echo func_num_args() . '<br>'; // 3\n print_r(func_get_args()) . '<br>'; // Array ( [0] => Ceyhun [1] => Bahadır [2] => Çelik )\n echo func_get_arg(2); // Çelik\n }", "abstract protected function get_args();", "public function getNumero_chambre()\n{\nreturn $this->numero_chambre;\n}", "public function pasaje_abonado();", "function get_full_passed($argumento) { \n $findArg = $this->full_passed($argumento); \n\n if ($findArg) {\n return $this->parsed[$findArg][1];\n } \n\n return; \n }", "function metabox_id_fix($args){\r\n\t\treturn ( $args['plain'] ? $args['id'] : \"$this->options_name[\" . $args['id'] . \"]\" );\r\n\t}", "function palabraDescubierta($coleccionLetras){\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n}", "abstract function &getArgumentControl();", "function training_menu_arguments_preprocessing($arg) {\n if (!empty($arg)) {\n return '<div>' . $arg . '</div>';\n }\n else{\n return MENU_NOT_FOUND;\n }\n}", "abstract public function getArguments(): array;", "function __construct($Nome,$Idade,$Profissao,$Salario){\n #aqui trabalhamos da seguinte forma o atributo da classe recebera o conteudo da váriavel no se for string\n $this->Nome = (string) $Nome;\n $this->Idade = (int) $Idade;\n $this->Profissao = (string) $Profissao;\n $this->Salario = (float) $Salario;\n echo \"O objeto {$this->Nome} foi iniciado!\";\n }", "public function __construct($nombre, $numero) {\n\t\t\t$this->nombre = $nombre;\n\t\t\t$this->numero = $numero;\n\n\t\t\techo \"En el constructor Deportista\";\n\t\t\techo \"<br/>\";\n\t\t}", "public function setArgument(string $name, $value);", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "public function getArgumentPrefix() {}", "function formatear_mes($parametro){\n\n\t\t/* Declaro variables personalizadas para que queden claros los datos */\n\t\t$mes = substr($parametro, 5, 2);\n\t\t$anno = substr($parametro, 0, 4);\n\t\t\n\t\t/* Generamos el formato */\n\t\t$temp = $mes.\"/\".$anno;\n\t\t\n\t\treturn $temp;\n\t}", "public function getParamDirect($name = \"\");", "private function prepareArgs(){\n\t\t$nro_arguments \t = $this->webPathNumber + 3;\n\t\t$this->argsArray = array_slice(explode('/',$this->uri), $nro_arguments);\n\t}", "function convert_uuid_to_nom(&$liste_option, $uuid) {\n\t//connexion a base de donnees\n\t$connexion = fonctions_standards_sgbd::creer_connexion_liste_option ( $liste_option );\n\t$db_source = fonctions_standards_sgbd::recupere_db_source ( $connexion, true );\n\t//extraction des noms a partir des uuids\n\t$requete_sql = $db_source->requete_select_base ( \"\", $uuid );\n\tforeach ( $requete_sql as $row ) {\n\t\t$nom = $row ['name'];\n\t}\n\t$db_source->close ();\n\t\n\treturn $nom;\n}", "public function __construct($numero = NULL, $nom = NULL, $description = NULL, $type = NULL, $temperature = NULL, $duree=NULL, $nbre_donnee=NULL,$etat=NULL ) {\n // valeurs nulles si pas de passage de parametres\n if (!is_null($numero)) {\n $this->numero= $numero;\n $this->nom = $nom;\n $this->description = $description;\n $this->type = $type;\n $this->temperature = $temperature;\n $this->duree = $duree;\n $this->nbre_donnee = $nbre_donnee;\n $this->etat = $etat;\n \n \n \n \n }\n }", "function generar_numdmes($m){\n\tswitch ($m) {\n\t\tcase \"enero\": $m = \"01\"; break;\n\t\tcase \"febrero\": $m = \"02\"; break;\n\t\tcase \"marzo\": $m = \"03\"; break;\n\t\tcase \"abril\": $m = \"04\"; break;\n\t\tcase \"mayo\": $m = \"05\"; break;\n\t\tcase \"junio\": $m = \"06\"; break;\n\t\tcase \"julio\": $m = \"07\"; break;\n\t\tcase \"agosto\": $m = \"08\"; break;\n\t\tcase \"setiembre\": $m = \"09\"; break;\n\t\tcase \"octubre\": $m = \"10\"; break;\n\t\tcase \"noviembre\": $m = \"11\"; break;\n\t\tcase \"diciembre\": $m = \"12\"; break;\n\t\tdefault:\n\t\tprint \"<br/>Error: $m no tiene respuesta<br/>\"; break;\n\t}\n\treturn $m;\n}", "public function hasProperArgumentName(): void\n {\n $filter = new RestrictByTypeFilter(RestrictByTypeFilter::MUNICIPALITY_NAME);\n\n $this->assertEquals('type', $filter->name());\n }", "function numero()\r\n {\r\n \r\n $numrec = $this->db->query(\"SELECT * FROM parametros\")->result_array();\r\n return $numrec;\r\n }", "public function testArgument() {\n $view = Views::getView('test_view');\n foreach (['en' => 'John', 'xx-lolspeak' => 'George'] as $langcode => $name) {\n $view->setDisplay();\n $view->displayHandlers->get('default')->overrideOption('arguments', [\n 'langcode' => [\n 'id' => 'langcode',\n 'table' => 'views_test_data',\n 'field' => 'langcode',\n ],\n ]);\n $this->executeView($view, [$langcode]);\n\n $expected = [\n ['name' => $name],\n ];\n $this->assertIdenticalResultset($view, $expected, ['views_test_data_name' => 'name']);\n $view->destroy();\n }\n }", "function __construct()\r\n {\r\n $this->field_names = func_get_args();\r\n }", "function NUMERO_LUNES_FECHA($_ARGS) {\r\n\t$_FECHA_EGRESO = FECHA_EGRESO($_ARGS);\r\n\t\r\n\tif (ESTADO($_ARGS) == \"A\") {\r\n\t\tif ($_ARGS['FECHA_INGRESO'] <= $_ARGS['DESDE']) {\r\n\t\t\tif ($_ARGS['FECHA_INGRESO'] < $_ARGS['HASTA']) list($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['HASTA']);\r\n\t\t\telse list($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']);\r\n\r\n\t\t\tlist($ap, $mp) = SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t$dia_inicio = 1;\r\n\t\t\t$dia_fin = DIAS_DEL_MES(\"$de-$me-$ae\");\r\n\t\t} else {\r\n\t\t\tlist($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['HASTA']);\r\n\t\t\tlist($ai, $mi, $di) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']); $periodo_inicio = \"$di-$mi-$ai\";\t$diai = (int) $di;\r\n\t\t\t\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t\r\n\t\t\tif ($dia_semana == 1) {\r\n\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t} else {\r\n\t\t\t\tif ($dia_semana == 0) $restar_dia_semana = $diai - 7;\r\n\t\t\t\telse $restar_dia_semana = $diai - $dia_semana;\r\n\t\t\t\t\r\n\t\t\t\tif ($restar_dia_semana < 1) $dia_inicio = (int) $di;\r\n\t\t\t\telse {\r\n\t\t\t\t\t$diferencia_dias = $dia_semana - 1;\r\n\t\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t\t\t$dia_inicio -= $diferencia_dias;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$dia_fin = DIAS_DEL_MES(\"$de-$me-$ae\");\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tlist($ae, $me, $de) = SPLIT('[/.-]', $_FECHA_EGRESO);\r\n\t\t\r\n\t\tif ($_ARGS['FECHA_INGRESO'] <= $_ARGS['DESDE']) {\r\n\t\t\tlist($ap, $mp) = SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t$dia_inicio = 1;\r\n\t\t\t$dia_fin = (int) $de;\r\n\t\t} else {\t\r\n\t\t\tlist($ai, $mi, $di) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']); $periodo_inicio = \"$di-$mp-$ap\";\t$diai = (int) $di;\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t\r\n\t\t\tif ($dia_semana == 1) {\r\n\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t} else {\r\n\t\t\t\tif ($dia_semana == 0) $restar_dia_semana = $diai - 7;\r\n\t\t\t\telse $restar_dia_semana = $diai - $dia_semana;\r\n\t\t\t\t\r\n\t\t\t\tif ($restar_dia_semana < 1) $dia_inicio = (int) $di;\r\n\t\t\t\telse {\r\n\t\t\t\t\t$diferencia_dias = $dia_semana - 1;\r\n\t\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t\t\t$dia_inicio -= $diferencia_dias;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$dia_fin = (int) $de;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$lunes = 0;\r\n\tfor ($dia=$dia_inicio; $dia<=$dia_fin; $dia++) {\r\n\t\tif ($dia_semana == 7) $dia_semana = 0;\r\n\t\tif ($dia_semana == 1) $lunes++;\r\n\t\t$dia_semana++;\r\n\t}\r\n\treturn $lunes;\r\n}", "function mois_precedent($mois,$annee){\n\t$mois--;\n\tif($mois==0){\n\t\t$annee--;\n\t\t$mois=12;\n\t}\n\treturn $_SERVER['PHP_SELF'].\"?m=$mois&a=$annee\";\n}", "function agregarJuego($coleccionJuegos,$puntos,$indicePalabra){\n $coleccionJuegos[] = array(\"puntos\"=> $puntos, \"indicePalabra\" => $indicePalabra); \n return $coleccionJuegos;\n}", "public function nombre($nombre)\n {\n $primero=\"Ruta \";\n $segundo=\"External \";\n $tercero=\"Diario\";\n if(stripos($nombre,\"internal\"))\n {\n $segundo=\"Internal \";\n $nuevoNombre=$primero.$segundo.$tercero;\n }\n if(stripos($nombre,\"external\"))\n {\n $segundo=\"External \";\n $nuevoNombre=$primero.$segundo.$tercero;\n }\n if(stripos($nombre,'rerate') || stripos($nombre, \"RR\"))\n {\n $tercero=\"RR\";\n $nuevoNombre=$primero.$segundo.$tercero;\n }\n if(stripos($nombre,'GMT'))\n {\n $tercero=\"Hora\";\n $nuevoNombre=$primero.$segundo.$tercero;\n }\n if(stripos($nombre,\"Hrs\"))\n {\n $nuevoNombre=$nombre;\n }\n// $nuevoNombre=$primero.$segundo.$tercero;\n return $nuevoNombre; \n }", "function ci_e_inflect($num, $none, $one, $many){\n\techo ci_inflect($num, $none, $one, $many);\n}" ]
[ "0.61186206", "0.5790956", "0.5765394", "0.5723772", "0.5597524", "0.554368", "0.5508008", "0.5478448", "0.5467999", "0.54500663", "0.54330766", "0.54152846", "0.5404272", "0.5283685", "0.52699155", "0.5269712", "0.52336997", "0.5219622", "0.5209155", "0.5198158", "0.5180301", "0.51655", "0.5156106", "0.5150675", "0.5142781", "0.5124861", "0.5122829", "0.51199394", "0.5117128", "0.5115003", "0.5112413", "0.5095932", "0.5091757", "0.50828373", "0.50812775", "0.50746423", "0.50712657", "0.5069781", "0.5069133", "0.50670797", "0.5059142", "0.5055314", "0.5042485", "0.5042308", "0.50329465", "0.5022931", "0.5018112", "0.50164795", "0.50157666", "0.50116503", "0.50114906", "0.5007134", "0.50021166", "0.5001771", "0.5000358", "0.5000358", "0.5000358", "0.49998042", "0.49994004", "0.49909925", "0.49901164", "0.49811977", "0.4971343", "0.49670562", "0.49597207", "0.49597207", "0.49597207", "0.49597207", "0.4954263", "0.49529895", "0.49511003", "0.49358356", "0.49320108", "0.49280798", "0.4920175", "0.4918612", "0.49179927", "0.4914597", "0.49137077", "0.4894861", "0.489212", "0.4889703", "0.4889703", "0.4889703", "0.4889703", "0.48894477", "0.4881131", "0.48785523", "0.48782638", "0.48739794", "0.48738396", "0.48718452", "0.48635352", "0.48628768", "0.48616847", "0.48558635", "0.48535186", "0.48486528", "0.48210073", "0.48189917", "0.48183957" ]
0.0
-1
On convertit l'argument en nombre entier.
public function setStatus_IdStatus($status_idstatus){ $status_idstatus = (int) $status_idstatus; // On vérifie ensuite si ce nombre est bien strictement positif. if ($status_idstatus > 0){ // Si c'est le cas, c'est tout bon, on assigne la valeur à l'attribut correspondant. $this->_status_idstatus = $status_idstatus; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function broj()\n {\n $parametar = func_get_args();\n foreach ($parametar as $broj) {\n if (is_int($broj)) {\n echo $broj.' je broj<br>';\n } else {\n echo $broj.' je string <br>';\n }\n }\n }", "public function getArg(){\n return (string)$this->arg;\n }", "function ola(){\n\n$argumentos = func_get_args();// recupera todos os argumentos da variavel que é um array \nreturn $argumentos;\n}", "protected function reemplazaParametro(){\n\t\t$vector=func_get_arg(0);\n\t\t$params=$this->dato;\n//\t\tprint_r($params);\n//\t\techo \"<br>\";\n\t\t$cant=sizeof($params);\n\t\t$accion=$vector[0];\n\t\tif (sizeof($params)!=0){\n\t\t\t$claves=array_keys($params);\n//\t\tfor($x=1;$x<$cant;$x++){\n\t\t\tforeach($claves as $clave){\n\t\t\t\t$str=\"#\".($clave).\"#\";\n\t\t\t\t$accion=str_replace($str,$params[$clave],$accion);\n\t\t\t}\n\t\t}\n\t\treturn $accion;\n\t}", "function nombreCampo($result, $indice){\n\t return mysql_field_name($result, $indice);\t\n\t}", "public function getArgumento()\n\t\t{\n\t\t\treturn $this->argumento;\n\t\t}", "private function setGivenArgumentAmount(): int {\n return $_SERVER['argc'] - 1;\n }", "public function prepareArguments() {}", "public function asignarNombre($nombre){\n$this->nombre = self::mensaje().$nombre;\n}", "protected function setArgument()\n {\n $this->set('primary_key', false);\n $this->set('length', $this->argument);\n $this->set('autoincrement', false);\n $this->set('unsigned', false);\n $this->set('not_null', false);\n }", "function macro_get_plain_argument($number)\n{\n return isset($_SERVER['argv'][$number]) ? $_SERVER['argv'][$number] : null;\n}", "public function setIDfromArgV() {}", "public function getArgument(string $name);", "public function getArgumentNames() {}", "abstract public static function args();", "function construir_id_def_base($nombre_fuente)\n\t{\n\t\treturn $this->get_instancia()->get_id().' '.$this->get_id().' '.$nombre_fuente;\n\t}", "protected function ponerNombre(){\r\n\t\t$time=$this->time;\r\n\t\t\tif ($this->nombreUnicoImagen=='default') {\r\n\t\t\t\tfor ($i=0; $i <$this->cantidad ; $i++) { \r\n\t\t\t\t$this->nombreImagenes[$i]=$time.'-to_'.($i+1).'_and_'.$this->cantidad;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor ($i=0; $i <$this->cantidad ; $i++) { \r\n\t\t\t\t\t$this->nombreImagenes[$i]=$this->nombreUnicoImagen.'-'.$time.'-to_'.($i+1).'_and_'.$this->cantidad;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}", "function getArguments() ;", "public function incrementArgumentPosition()\n {\n $this->argument++;\n }", "function NUMERO_LUNES($_ARGS) {\r\n\tlist($ap, $mp)=SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t$dias_del_mes = DIAS_DEL_MES($periodo_inicio);\r\n\t\r\n\tif (($primer_dia_semana == 0 || $primer_dia_semana == 6) && $dias_del_mes == 31) $lunes = 5;\r\n\telseif ($primer_dia_semana == 1 && ($dias_del_mes == 30 || $dias_del_mes == 31)) $lunes = 5;\r\n\telseif ($primer_dia_semana == 2 && ($dias_del_mes == 29 || $dias_del_mes == 30 || $dias_del_mes == 31)) $lunes = 5;\r\n\telse $lunes = 4;\r\n\t\r\n\treturn $lunes;\r\n}", "function testeNomes($name, $middleName, $lastName) {\n \n // here we get the values of the parameters\n $nomes = func_get_args();\n \n var_dump($nomes);\n \n // and here we loop through the values and print each one\n foreach ($nomes as $nome) {\n echo $nome . PHP_EOL;\n }\n \n}", "abstract protected function arguments(): array;", "public function __construct($n){\n\t\t$this -> name = $n;\n\t}", "private function _arginfo(EntityArgument $argument) {\n static $types = [\n Types::BOOLEAN => 'IS_BOOL',\n Types::STRING => 'IS_STRING',\n Types::INT => 'IS_LONG',\n Types::DOUBLE => 'IS_DOUBLE',\n Types::RESOURCE => 'IS_RESOURCE'\n ];\n switch($argument->cast) {\n case Types::BOOLEAN:\n case Types::STRING:\n case Types::INT:\n case Types::DOUBLE:\n case Types::RESOURCE:\n return \"ZEND_ARG_TYPE_INFO({$argument->isRef()}, {$argument->name}, {$types[$argument->cast]}, {$argument->allowsNull()})\";\n case Types::OBJECT:\n return \"ZEND_ARG_OBJ_INFO({$argument->isRef()}, {$argument->name}, \\\"\".addslashes($argument->instance_of).\"\\\", {$argument->allowsNull()})\";\n case Types::ARR:\n return \"ZEND_ARG_ARRAY_INFO({$argument->isRef()}, {$argument->name}, {$argument->allowsNull()})\";\n default:\n return \"ZEND_ARG_INFO({$argument->isRef()}, {$argument->name})\";\n }\n }", "public function campo($nombre) {}", "public function arguments(): array;", "public function getFirstArgument();", "private function buildParameter(\\Phalcon\\Di\\DiInterface $container, int $position, array $argument)\n {\n }", "static public function mdlActualizarArgumento($valor){\n\n\t\t$sql=\"UPDATE\n maestrajf\n SET\n argumento = argumento + 1\n WHERE codigo = :valor\";\n\n $stmt=Conexion::conectar()->prepare($sql);\n\n $stmt->bindParam(\":valor\", $valor, PDO::PARAM_STR);\n\n\t\tif ($stmt->execute()) {\n\n\t\t\treturn \"ok\";\n\t\t} else {\n\n\t\t\treturn \"error\";\n\t\t}\n\n\t\t$stmt=null;\n\n }", "public final function asigNombre($nombre){\r\n $this->nombre=$nombre;\r\n }", "function bonjour(string $prenom, $nomDeFamille= \"\")//l'ordre des arguments est important, c'est ce qu'il y a entre parenthèses\n{\n \n echo '<h1>';\n echo \"Bonjour $prenom $nomDeFamille!\";\n echo '</h1>';\n}", "function retorno($nombre,$apellido)\n {\n if( is_string($nombre) && is_string($apellido) )\n {\n //filter_vars()\n $dame = $nombre. \"<br>\". $apellido;\n return $dame;\n }\n else\n {\n return \"Ingresaste mal los datos. tienen que ser caractéres alfabéticos\";\n }\n\n }", "protected function generate_arg($number, $type)\n {\n $arg = \"arg\" . $number;\n\n $this->xml->startElement($arg);\n $this->xml->writeAttribute(\"type\", $type);\n $this->xml->text($this->token);\n\n $this->xml->endElement();\n }", "function nombrecampo($numcampo){return mysqli_field_name($this->Consulta_ID, $numcampo);}", "function nombrecampo($numcampo) {\r\n\r\n return mysql_field_name($this->Consulta_ID, $numcampo);\r\n\r\n}", "function training_menu_arguments($arg1 = NULL, $arg2 = NULL) {\n $output = '';\n if (!empty($arg1)) {\n $output .= t('Argument 1=%arg', array('%arg' => $arg1)) . '</br>';\n }\n if (!empty($arg2)) {\n $output .= t('Argument 2=%arg', array('%arg' => $arg2));\n }\n\n return $output;\n}", "public function __construct()\n {\n $this->arguments = func_get_args();\n }", "public function getIdParameter(): string;", "public function nombreCampo($numcampo) {\n\t\t$meta = $this->query->getColumnMeta($numcampo);\n\t\t$resultado = false;\n\t\tif ($meta !==false){\n\t\t\t$resultado = $meta['name'];\n\t\t}\n\t\treturn $resultado;\n\t}", "protected function getArguments()\n {\n\n }", "public function getNamedStringArgument($name);", "public function callback_number( $args ) {\n $this->callback_text( $args );\n }", "public function __construct($argument1)\n {\n }", "function nombremescorto($idmes){\n\t$nombremescorto = \"\";\n\tswitch ($idmes) {\n\t\tcase 1:\n\t\t\t$nombremescorto = \"ENE\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$nombremescorto = \"FEB\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\t$nombremescorto = \"MAR\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\t$nombremescorto = \"ABR\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\t$nombremescorto = \"MAY\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\t$nombremescorto = \"JUN\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\t$nombremescorto = \"JUL\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\t$nombremescorto = \"AGO\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\t$nombremescorto = \"SEP\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\t$nombremescorto = \"OCT\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\t$nombremescorto = \"NOV\";\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\t$nombremescorto = \"DIC\";\n\t\t\tbreak;\n\n\t}\n\treturn $nombremescorto;\n}", "public function ingresar_nombre($nombre,$username = ' la massa')\n {\n $this -> nombre = $nombre . $username; \n }", "function jour_precedent($jour,$mois,$annee){\n\t$jour--;\n\tif($jour==0){\n\t\t$mois--;\n\t\t$jour=$nbrjour[$mois-1];\n\t}\n\treturn $_SERVER['PHP_SELF'].\"?j=\".$jour.\"&m=\".$mois.\"&a=\".$annee;\n}", "public function getArgument()\n {\n return 'help';\n }", "public function stringTipoContacto($parametro)\n{\n\n if (is_numeric($parametro)==TRUE) {\n # code...\n if ($parametro==0) {\n # code...\n return 'Cliente';\n }\n elseif ($parametro==1) {\n # code...\n return 'Provedor';\n }\n\n elseif ($parametro==2) {\n # code...\n return 'Cliente y Provedor';\n }\n }\n else\n {\n return \"Error En Parámetro :/\";\n }\n}", "function mes($mes){\n $meses = array(\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\");\n $nombre = $meses[$mes-1];\n return $nombre;\n }", "public function number($len){ }", "function creaChampionnatNbRencontre($nb_equipe)\n{\n if($nb_equipe==4){$nb_rencontre=5;}\n else if($nb_equipe==6){$nb_rencontre=8;}\n else if($nb_equipe==8){$nb_rencontre=15;}\n else if($nb_equipe==12){$nb_rencontre=19;}\n else if($nb_equipe==16){$nb_rencontre=31;}\n else if($nb_equipe==24){$nb_rencontre=39;}\n else if($nb_equipe==32){$nb_rencontre=63;}\n \n return $nb_rencontre;\n}", "abstract public function ingresar_nombre($nombre);", "function Numero_a_mes($Ingresomes_c){\t\n$me = $Ingresomes_c;\nif($me=='01') $mes='Ene';\nif($me=='02') $mes='Feb';\nif($me=='03') $mes='Mar';\nif($me=='04') $mes='Abr';\nif($me=='05') $mes='May';\nif($me=='06') $mes='Jun';\nif($me=='07') $mes='Jul';\nif($me=='08') $mes='Ago';\nif($me=='09') $mes='Sep';\nif($me=='10') $mes='Oct';\nif($me=='11') $mes='Nov';\nif($me=='12') $mes='Dic';\n$cadena = (\"$mes\");\nreturn $cadena;\n}", "public function getParameterName();", "public function initializeArguments() {}", "public function initializeArguments() {}", "public function initializeArguments() {}", "public function initializeArguments() {}", "public function answer($argument1)\n {\n }", "public function __construct(public string $nombre, public int $precio, public bool $disponible){}", "function callback_number(array $args)\n {\n }", "private function getArgumentString()\n {\n if (!is_null($this->getArguments()))\n {\n return $this->getArguments();\n }\n $strOut = \"\";\n if (count($this->getChildArguments())) {\n foreach ($this->getChildArguments() as $key => $argument) {\n $strOut .= ($key == 0 ? \"\": \" , \") . \"\\\"\" . $argument . \"\\\"\";\n }\n }\n return $strOut;\n }", "public function __construct($nombre=\"Invitado\"){\n\t\t\t$this->nombre=$nombre;\n\t\t\t$this->distanciaRecorrida=0;\n\n\t\t}", "function full_passed($argumento) { \n $findArg = $this->passed($argumento); \n if ($findArg) {\n if (count($this->parsed[$findArg]) > 1) {\n return $findArg; \n }\n }\n \n return 0; \n }", "public function getArguments() {}", "public function getArguments() {}", "public function getArguments() {}", "public function getArguments() {}", "function test($par1, $par2){\n echo func_num_args() . '<br>'; // 3\n print_r(func_get_args()) . '<br>'; // Array ( [0] => Ceyhun [1] => Bahadır [2] => Çelik )\n echo func_get_arg(2); // Çelik\n }", "abstract protected function get_args();", "public function getNumero_chambre()\n{\nreturn $this->numero_chambre;\n}", "public function pasaje_abonado();", "function get_full_passed($argumento) { \n $findArg = $this->full_passed($argumento); \n\n if ($findArg) {\n return $this->parsed[$findArg][1];\n } \n\n return; \n }", "function metabox_id_fix($args){\r\n\t\treturn ( $args['plain'] ? $args['id'] : \"$this->options_name[\" . $args['id'] . \"]\" );\r\n\t}", "function palabraDescubierta($coleccionLetras){\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n}", "abstract function &getArgumentControl();", "function training_menu_arguments_preprocessing($arg) {\n if (!empty($arg)) {\n return '<div>' . $arg . '</div>';\n }\n else{\n return MENU_NOT_FOUND;\n }\n}", "abstract public function getArguments(): array;", "function __construct($Nome,$Idade,$Profissao,$Salario){\n #aqui trabalhamos da seguinte forma o atributo da classe recebera o conteudo da váriavel no se for string\n $this->Nome = (string) $Nome;\n $this->Idade = (int) $Idade;\n $this->Profissao = (string) $Profissao;\n $this->Salario = (float) $Salario;\n echo \"O objeto {$this->Nome} foi iniciado!\";\n }", "public function __construct($nombre, $numero) {\n\t\t\t$this->nombre = $nombre;\n\t\t\t$this->numero = $numero;\n\n\t\t\techo \"En el constructor Deportista\";\n\t\t\techo \"<br/>\";\n\t\t}", "public function setArgument(string $name, $value);", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "public function getArgumentPrefix() {}", "function formatear_mes($parametro){\n\n\t\t/* Declaro variables personalizadas para que queden claros los datos */\n\t\t$mes = substr($parametro, 5, 2);\n\t\t$anno = substr($parametro, 0, 4);\n\t\t\n\t\t/* Generamos el formato */\n\t\t$temp = $mes.\"/\".$anno;\n\t\t\n\t\treturn $temp;\n\t}", "public function getParamDirect($name = \"\");", "private function prepareArgs(){\n\t\t$nro_arguments \t = $this->webPathNumber + 3;\n\t\t$this->argsArray = array_slice(explode('/',$this->uri), $nro_arguments);\n\t}", "function convert_uuid_to_nom(&$liste_option, $uuid) {\n\t//connexion a base de donnees\n\t$connexion = fonctions_standards_sgbd::creer_connexion_liste_option ( $liste_option );\n\t$db_source = fonctions_standards_sgbd::recupere_db_source ( $connexion, true );\n\t//extraction des noms a partir des uuids\n\t$requete_sql = $db_source->requete_select_base ( \"\", $uuid );\n\tforeach ( $requete_sql as $row ) {\n\t\t$nom = $row ['name'];\n\t}\n\t$db_source->close ();\n\t\n\treturn $nom;\n}", "public function __construct($numero = NULL, $nom = NULL, $description = NULL, $type = NULL, $temperature = NULL, $duree=NULL, $nbre_donnee=NULL,$etat=NULL ) {\n // valeurs nulles si pas de passage de parametres\n if (!is_null($numero)) {\n $this->numero= $numero;\n $this->nom = $nom;\n $this->description = $description;\n $this->type = $type;\n $this->temperature = $temperature;\n $this->duree = $duree;\n $this->nbre_donnee = $nbre_donnee;\n $this->etat = $etat;\n \n \n \n \n }\n }", "function generar_numdmes($m){\n\tswitch ($m) {\n\t\tcase \"enero\": $m = \"01\"; break;\n\t\tcase \"febrero\": $m = \"02\"; break;\n\t\tcase \"marzo\": $m = \"03\"; break;\n\t\tcase \"abril\": $m = \"04\"; break;\n\t\tcase \"mayo\": $m = \"05\"; break;\n\t\tcase \"junio\": $m = \"06\"; break;\n\t\tcase \"julio\": $m = \"07\"; break;\n\t\tcase \"agosto\": $m = \"08\"; break;\n\t\tcase \"setiembre\": $m = \"09\"; break;\n\t\tcase \"octubre\": $m = \"10\"; break;\n\t\tcase \"noviembre\": $m = \"11\"; break;\n\t\tcase \"diciembre\": $m = \"12\"; break;\n\t\tdefault:\n\t\tprint \"<br/>Error: $m no tiene respuesta<br/>\"; break;\n\t}\n\treturn $m;\n}", "public function hasProperArgumentName(): void\n {\n $filter = new RestrictByTypeFilter(RestrictByTypeFilter::MUNICIPALITY_NAME);\n\n $this->assertEquals('type', $filter->name());\n }", "function numero()\r\n {\r\n \r\n $numrec = $this->db->query(\"SELECT * FROM parametros\")->result_array();\r\n return $numrec;\r\n }", "public function testArgument() {\n $view = Views::getView('test_view');\n foreach (['en' => 'John', 'xx-lolspeak' => 'George'] as $langcode => $name) {\n $view->setDisplay();\n $view->displayHandlers->get('default')->overrideOption('arguments', [\n 'langcode' => [\n 'id' => 'langcode',\n 'table' => 'views_test_data',\n 'field' => 'langcode',\n ],\n ]);\n $this->executeView($view, [$langcode]);\n\n $expected = [\n ['name' => $name],\n ];\n $this->assertIdenticalResultset($view, $expected, ['views_test_data_name' => 'name']);\n $view->destroy();\n }\n }", "function __construct()\r\n {\r\n $this->field_names = func_get_args();\r\n }", "function NUMERO_LUNES_FECHA($_ARGS) {\r\n\t$_FECHA_EGRESO = FECHA_EGRESO($_ARGS);\r\n\t\r\n\tif (ESTADO($_ARGS) == \"A\") {\r\n\t\tif ($_ARGS['FECHA_INGRESO'] <= $_ARGS['DESDE']) {\r\n\t\t\tif ($_ARGS['FECHA_INGRESO'] < $_ARGS['HASTA']) list($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['HASTA']);\r\n\t\t\telse list($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']);\r\n\r\n\t\t\tlist($ap, $mp) = SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t$dia_inicio = 1;\r\n\t\t\t$dia_fin = DIAS_DEL_MES(\"$de-$me-$ae\");\r\n\t\t} else {\r\n\t\t\tlist($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['HASTA']);\r\n\t\t\tlist($ai, $mi, $di) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']); $periodo_inicio = \"$di-$mi-$ai\";\t$diai = (int) $di;\r\n\t\t\t\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t\r\n\t\t\tif ($dia_semana == 1) {\r\n\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t} else {\r\n\t\t\t\tif ($dia_semana == 0) $restar_dia_semana = $diai - 7;\r\n\t\t\t\telse $restar_dia_semana = $diai - $dia_semana;\r\n\t\t\t\t\r\n\t\t\t\tif ($restar_dia_semana < 1) $dia_inicio = (int) $di;\r\n\t\t\t\telse {\r\n\t\t\t\t\t$diferencia_dias = $dia_semana - 1;\r\n\t\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t\t\t$dia_inicio -= $diferencia_dias;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$dia_fin = DIAS_DEL_MES(\"$de-$me-$ae\");\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tlist($ae, $me, $de) = SPLIT('[/.-]', $_FECHA_EGRESO);\r\n\t\t\r\n\t\tif ($_ARGS['FECHA_INGRESO'] <= $_ARGS['DESDE']) {\r\n\t\t\tlist($ap, $mp) = SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t$dia_inicio = 1;\r\n\t\t\t$dia_fin = (int) $de;\r\n\t\t} else {\t\r\n\t\t\tlist($ai, $mi, $di) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']); $periodo_inicio = \"$di-$mp-$ap\";\t$diai = (int) $di;\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t\r\n\t\t\tif ($dia_semana == 1) {\r\n\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t} else {\r\n\t\t\t\tif ($dia_semana == 0) $restar_dia_semana = $diai - 7;\r\n\t\t\t\telse $restar_dia_semana = $diai - $dia_semana;\r\n\t\t\t\t\r\n\t\t\t\tif ($restar_dia_semana < 1) $dia_inicio = (int) $di;\r\n\t\t\t\telse {\r\n\t\t\t\t\t$diferencia_dias = $dia_semana - 1;\r\n\t\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t\t\t$dia_inicio -= $diferencia_dias;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$dia_fin = (int) $de;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$lunes = 0;\r\n\tfor ($dia=$dia_inicio; $dia<=$dia_fin; $dia++) {\r\n\t\tif ($dia_semana == 7) $dia_semana = 0;\r\n\t\tif ($dia_semana == 1) $lunes++;\r\n\t\t$dia_semana++;\r\n\t}\r\n\treturn $lunes;\r\n}", "function mois_precedent($mois,$annee){\n\t$mois--;\n\tif($mois==0){\n\t\t$annee--;\n\t\t$mois=12;\n\t}\n\treturn $_SERVER['PHP_SELF'].\"?m=$mois&a=$annee\";\n}", "function agregarJuego($coleccionJuegos,$puntos,$indicePalabra){\n $coleccionJuegos[] = array(\"puntos\"=> $puntos, \"indicePalabra\" => $indicePalabra); \n return $coleccionJuegos;\n}", "public function nombre($nombre)\n {\n $primero=\"Ruta \";\n $segundo=\"External \";\n $tercero=\"Diario\";\n if(stripos($nombre,\"internal\"))\n {\n $segundo=\"Internal \";\n $nuevoNombre=$primero.$segundo.$tercero;\n }\n if(stripos($nombre,\"external\"))\n {\n $segundo=\"External \";\n $nuevoNombre=$primero.$segundo.$tercero;\n }\n if(stripos($nombre,'rerate') || stripos($nombre, \"RR\"))\n {\n $tercero=\"RR\";\n $nuevoNombre=$primero.$segundo.$tercero;\n }\n if(stripos($nombre,'GMT'))\n {\n $tercero=\"Hora\";\n $nuevoNombre=$primero.$segundo.$tercero;\n }\n if(stripos($nombre,\"Hrs\"))\n {\n $nuevoNombre=$nombre;\n }\n// $nuevoNombre=$primero.$segundo.$tercero;\n return $nuevoNombre; \n }", "function ci_e_inflect($num, $none, $one, $many){\n\techo ci_inflect($num, $none, $one, $many);\n}" ]
[ "0.61186206", "0.5790956", "0.5765394", "0.5723772", "0.5597524", "0.554368", "0.5508008", "0.5478448", "0.5467999", "0.54500663", "0.54330766", "0.54152846", "0.5404272", "0.5283685", "0.52699155", "0.5269712", "0.52336997", "0.5219622", "0.5209155", "0.5198158", "0.5180301", "0.51655", "0.5156106", "0.5150675", "0.5142781", "0.5124861", "0.5122829", "0.51199394", "0.5117128", "0.5115003", "0.5112413", "0.5095932", "0.5091757", "0.50828373", "0.50812775", "0.50746423", "0.50712657", "0.5069781", "0.5069133", "0.50670797", "0.5059142", "0.5055314", "0.5042485", "0.5042308", "0.50329465", "0.5022931", "0.5018112", "0.50164795", "0.50157666", "0.50116503", "0.50114906", "0.5007134", "0.50021166", "0.5001771", "0.5000358", "0.5000358", "0.5000358", "0.49998042", "0.49994004", "0.49909925", "0.49901164", "0.49811977", "0.4971343", "0.49670562", "0.49597207", "0.49597207", "0.49597207", "0.49597207", "0.4954263", "0.49529895", "0.49511003", "0.49358356", "0.49320108", "0.49280798", "0.4920175", "0.4918612", "0.49179927", "0.4914597", "0.49137077", "0.4894861", "0.489212", "0.4889703", "0.4889703", "0.4889703", "0.4889703", "0.48894477", "0.4881131", "0.48785523", "0.48782638", "0.48739794", "0.48738396", "0.48718452", "0.48635352", "0.48628768", "0.48616847", "0.48558635", "0.48535186", "0.48486528", "0.48210073", "0.48189917", "0.48183957" ]
0.0
-1
Displays profile form. IS NOT USED IN DEMO
public function indexAction(){ $this->view->display('usermanagement/profile/profile_form.tpl'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function profileForm(){\r\n\t\t$this->view('profileForm');\r\n\t}", "public function profileForm()\n {\n return view('turtle::auth.profile');\n }", "function displayEditProfilePage() {\n\t\t\n\t\tglobal $firstName, $lastName, $age, $email, $visibility, $visibilities;\n\t\t\n\t\tprintf(\"<div class='post'>\");\n\t\tprintf(\"<h1> Edit Profile </h1>\");\n\t\t\n\t\t//edit profile form\n\t\tprintf('<form action=\"submitEditProfile.php\" method=\"post\" enctype=\"multipart/form-data\">');\n\t\tprintf('<br> First Name: <input type=\"text\" name=\"firstName\" value=\"%s\"/>', $firstName);\n\t\tprintf('<br> Last Name: <input type=\"text\" name=\"lastName\" value=\"%s\"/>', $lastName);\n\t\tprintf('<br> Age: <input type=\"text\" name=\"age\" value=\"%s\"/>', $age);\n\t\tprintf('<br> Email: <input type=\"text\" name=\"email\" value=\"%s\"/>', $email);\n\t\tprintf('<br> Type: <select name=\"type\"> <option value=\"client\">Client</option> <option value=\"nutritionist\">Nutritionist</option> </select>');\n\t\tprintf('<br> Visibility: <select name=\"visibility\">');\n\t\tforeach ($visibilities as &$level) {\n\t\t\tprintf('<option value=\"%s\" ', $level);\n\t\t\tif ($level == $visibility) {\n\t\t\t\tprintf('selected');\n\t\t\t}\n\t\t\tprintf('>%s</option>', $level);\n\t\t}\n\t\tprintf('</select>');\n\t\n\t\t//photo upload and submission form\n\t\tprintf('<br> <input type=\"submit\" name=\"submit\" value=\"Submit\"> </form>');\n\t\tprintf('<form action=\"submitEditProfile.php\" method=\"post\" enctype=\"multipart/form-data\"> Photo:');\n\t\tprintf('<input type=\"file\" name=\"fileToUpload\" id=\"fileToUpload\">');\n\t\tprintf('<input type=\"submit\" name=\"submitPhoto\" value=\"submitPhoto\">');\n\t\tprintf('</form>');\n\t\tprintf('</div>');\n\t}", "public function profileForm()\n {\n return view('student.profile');\n }", "public function indexAction()\n {\n $identity = $this->_auth->getIdentity();\n $userId = $identity->getId();\n $userModel = new Model\\Users();\n $user = $userModel->getUser($userId);\n $form = new Form\\Profile();\n $form->populate($user->toArray());\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $result = $userModel->saveProfile($user, $form->getValues());\n if ($result) {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your profile saved.');\n $this->_helper->redirector->gotoUrlAndExit($this->getRequest()->getRequestUri());\n }\n }\n $this->view->profile = $form;\n }", "public function profile_edit() {\n $this->template->content = View::instance('v_users_profile_edit');\n $this->template->title = \"Edit Profile\";\n\n // Render the view\n echo $this->template;\n\n }", "public function editprofile() {\n // If user is not logged in redirect them to login\n if(!$this->user){\n \n die('Members Only <a href=\"/users/login\">Login</a>');\n\n }\n # Create a new View instance\n $this->template->content3=View::instance('v_users_editprofile'); \n # Page title \n $this->template->title= APP_NAME. \":: Edit Profile\";\n // add required js and css files to be used in the form\n $client_files_head=Array('/js/languages/jquery.validationEngine-en.js',\n '/js/jquery.validationEngine.js',\n '/css/validationEngine.jquery.css'\n );\n $this->template->client_files_head=Utils::load_client_files($client_files_head);\n\n\n # Pass information to the view instance\n # Render View \n echo $this->template;\n\n }", "public function Profile()\n\t{\n\t\t$user = $this->user;\n\t\t$profileForm = new CForm(array(\n\t\t\t'action'\t=> $this->request->CreateUrl('user/profile'),\n\t\t\t),\n\t\tarray(\n\t\t\t'acronym'\t=> new CFormElementText('Acronym', array(\n\t\t\t\t'readonly'\t=> true,\n\t\t\t\t'value'\t\t=> $this->user->GetAcronym(),\n\t\t\t\t)\n\t\t\t),\n\t\t\t'OldPw'\t\t=> new CFormElementPassword('OldPw',array(\n\t\t\t\t'label'\t\t=> 'Old Password',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'Pw'\t\t=> new CFormElementPassword('Pw', array(\n\t\t\t\t'label'\t\t=> 'Password',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'Pw2'\t\t=> new CFormElementPassword('Pw2', array(\n\t\t\t\t'label'\t\t=> 'Password again',\n\t\t\t\t)\n\t\t\t),\n\t\t\tnew CFormElementSubmit('doChangePassword', array(\n\t\t\t\t'value'\t\t=> 'Change password',\n\t\t\t\t'callback'\t=> array($this, 'DoChangePassword'),\n\t\t\t\t)\n\t\t\t),\n\t\t));\n\t\t\n\t\t$profileForm->SetValidation('OldPw',array('not_empty'));\n\t\t$profileForm->SetValidation('Pw',array('not_empty'));\n\t\t$profileForm->SetValidation('Pw2',array('not_empty'));\n\t\t\n\t\t$profileForm->Check();\n\t\t\n\t\t$userProfileForm = new CForm(array(\n\t\t\t'action'\t=> $this->request->CreateUrl('user/profile')), array(\n\t\t\t'Name'\t\t=> new CFormElementText('Name', array(\n\t\t\t\t'label'\t\t=> 'Name:*',\n\t\t\t\t'value'\t\t=> $user['name'],\n\t\t\t\t)\n\t\t\t),\n\t\t\t'Email'\t\t=> new CFormElementText('Email', array(\n\t\t\t\t'label'\t\t=> 'Email:*',\n\t\t\t\t'value'\t\t=> $user['email'],\n\t\t\t\t)\n\t\t\t),\n\t\t\tnew CFormElementSubmit('doSaveProfile', array(\n\t\t\t\t'value'\t\t=> 'Save',\n\t\t\t\t'callback'\t=> array($this, 'DoSaveProfile'),\n\t\t\t\t)\n\t\t\t),\n\t\t));\n\t\t\n\t\t$userProfileForm->SetValidation('Name',array('not_empty'));\n\t\t$userProfileForm->SetValidation('Email',array('not_empty'));\n\t\t\n\t\t$userProfileForm->Check();\n\t\t\n\t\t$this->views->SetTitle('Profile');\n\t\t$this->views->AddView('user/profile.tpl.php', array(\n\t\t\t'profileForm'\t\t=> $profileForm->GetHTML().$userProfileForm->GetHTMl(),\n\t\t\t'user'\t\t\t\t=> $this->user,\n\t\t\t'is_authenticated'\t=> $this->user['isAuthenticated'],\n\t\t\t),\n\t\t'primary'\n\t\t);\n\t}", "public function actionProfile()\n {\n $this->layout = 'headbar';\n $model = new User();\n $model = User::find()->where(['id' => 1])->one();\n $name = $model->name;\n $email = $model->email;\n $mobile = $model->contact;\n return $this->render('profile', [\n 'model' => $model,\n 'name' => $name,\n 'email' => $email,\n 'mobile' => $mobile,\n ]);\n }", "public function actionProfile()\r\n\t{\r\n\t\t//disable jquery autoload\r\n\t\tYii::app()->clientScript->scriptMap=array(\r\n\t\t\t'jquery.js'=>false,\r\n\t\t);\r\n\t\t$model = $this->loadUser();\r\n\t $this->render('profile',array(\r\n\t \t'model'=>$model,\r\n\t\t\t'profile'=>$model->profile,\r\n\t ));\r\n\t}", "function display_user_profile_fields() {\r\n global $wpdb, $user_id, $wpi_settings;\r\n $profileuser = get_user_to_edit($user_id);\r\n\r\n include($wpi_settings['admin']['ui_path'] . '/profile_page_content.php');\r\n }", "private function _displayEditProfile($tpl = null){\n JHtml::_('jresearchhtml.validation');\n $mainframe = JFactory::getApplication();\n $user = JFactory::getUser();\n \n \t//Get the model\n \t$model = $this->getModel();\n \t\n \t$form = $this->get('Form');\n // get the Data\n $data = $this->get('Data');\n\n if(empty($data)){\n JError::raiseWarning(1, JText::_('JRESEARCH_NOT_EXISTING_PROFILE'));\n return;\n }\n \n // Bind the Data\n $form->bind($data);\n\n $this->assignRef('form', $form);\n $this->assignRef('data', $data);\n\n $mainframe->triggerEvent('onBeforeRenderJResearchEntityForm', array($data, 'member'));\n \n parent::display($tpl);\n \n $mainframe->triggerEvent('onAfterRenderJResearchEntityForm', array($data, 'member'));\n }", "function showInputForm()\n {\n $user = common_current_user();\n\n $profile = $user->getProfile();\n\n $this->elementStart('form', array('method' => 'post',\n 'id' => 'form_ostatus_sub',\n 'class' => 'form_settings',\n 'action' => $this->selfLink()));\n\n $this->hidden('token', common_session_token());\n\n $this->elementStart('fieldset', array('id' => 'settings_feeds'));\n\n $this->elementStart('ul', 'form_data');\n $this->elementStart('li');\n $this->input('profile',\n // TRANS: Field label for a field that takes an OStatus user address.\n _m('Subscribe to'),\n $this->profile_uri,\n // TRANS: Tooltip for field label \"Subscribe to\".\n _m('OStatus user\\'s address, like [email protected] or http://example.net/nickname.'));\n $this->elementEnd('li');\n $this->elementEnd('ul');\n // TRANS: Button text.\n $this->submit('validate', _m('BUTTON','Continue'));\n\n $this->elementEnd('fieldset');\n\n $this->elementEnd('form');\n }", "public function profileAction() {\n $user = User::getCurrent();\n if (!$user instanceOf BaseUser) {\n throw new \\Exception (\"No current user in Profile action\");\n }\n $data = array();\n $user = $this->processPost($user);\n $formElements = array(\n 'uname'=>array('label'=>'User Name', 'name_segment'=>'uname',\n 'placeholder'=>'User Name',),\n 'email'=>array('label'=>'Email?', 'name_segment'=>'email',\n 'placeholder'=>'Email',),\n 'fname'=>array('label'=>'First Name', 'name_segment'=>'fname',\n 'placeholder'=>'Your First Name',),\n 'lname'=>array('label'=>'Last Name', 'name_segment'=>'lname',\n 'placeholder'=>'Your Last Name', ),\n 'profiles'=>array('input'=>'formset','subform'=>'profiles',\n 'name_segment'=>'profiles', 'class'=> 'doggy','create_label'=>'Create New',\n 'elements'=> array(\n 'profile_description'=>array('name_segment'=>'profile_description', \n 'data-stuff'=>'fromUserController', 'label' => 'Prof Desc',\n 'placeholder'=>\"Describe your profile\", ),\n 'profile_name'=>array('type'=>'text', 'name_segment'=>'profile_name',\n 'data-stuff'=>'fromUserController', 'label'=>'Prof Name',\n 'placeholder'=>\"Profile Name of Blue Blazer\", )\n ),\n ),\n );\n $formArgs = array('base_object'=>$user, 'elements'=>$formElements,\n 'name_segment'=>'user');\n $form = new BaseForm($formArgs);\n $form->bind($user);\n $data['form'] = $form;\n return $data;\n }", "public function profile() {\n\tif(!$this->user) {\n\t\tRouter::redirect(\"/users/login\");\n\t\t\n\t\t# Return will force this method to exit here so the rest of \n\t\t# the code won't be executed and the profile view won't be displayed.\n\t\treturn false;\n\t}\n \n # Setup view\n\t$this->template->content = View::instance('v_users_profile');\n\t$this->template->title = \"Profile of \".$this->user->first_name;\n \n #var_dump($this->user);\n \t\n\t# Render template\n\techo $this->template;\n }", "private function display()\n\t{\n\t\t//get member params\n\t\t$rparams = new \\Hubzero\\Config\\Registry($this->member->get('params'));\n\n\t\t//get profile plugin's params\n\t\t$params = $this->params;\n\t\t$params->merge($rparams);\n\n\t\t$xreg = null;\n\n\t\t$fields = Components\\Members\\Models\\Profile\\Field::all()\n\t\t\t->including(['options', function ($option){\n\t\t\t\t$option\n\t\t\t\t\t->select('*')\n\t\t\t\t\t->ordered();\n\t\t\t}])\n\t\t\t->where('action_edit', '!=', Components\\Members\\Models\\Profile\\Field::STATE_HIDDEN)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\tif (App::get('session')->get('registration.incomplete'))\n\t\t{\n\t\t\t$xreg = new \\Components\\Members\\Models\\Registration();\n\t\t\t$xreg->loadProfile($this->member);\n\n\t\t\t$check = $xreg->check('update');\n\n\t\t\t// Validate profile data\n\t\t\t// @TODO Move this to central validation model (e.g., registraiton)?\n\n\t\t\t// Compile profile data\n\t\t\t$profile = array();\n\t\t\tforeach ($fields as $field)\n\t\t\t{\n\t\t\t\t$profile[$field->get('name')] = $this->member->get($field->get('name'));\n\t\t\t}\n\n\t\t\t// Validate profile fields\n\t\t\t$form = new Hubzero\\Form\\Form('profile', array('control' => 'profile'));\n\t\t\t$form->load(Components\\Members\\Models\\Profile\\Field::toXml($fields, 'edit', $profile));\n\t\t\t$form->bind(new Hubzero\\Config\\Registry($profile));\n\n\t\t\tif (!$form->validate($profile))\n\t\t\t{\n\t\t\t\t$check = false;\n\n\t\t\t\tforeach ($form->getErrors() as $key => $error)\n\t\t\t\t{\n\t\t\t\t\tif ($error instanceof Hubzero\\Form\\Exception\\MissingData)\n\t\t\t\t\t{\n\t\t\t\t\t\t$xreg->_missing[$key] = (string)$error;\n\t\t\t\t\t}\n\n\t\t\t\t\t$xreg->_invalid[$key] = (string)$error;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If no errors, redirect to where they were going\n\t\t\tif ($check)\n\t\t\t{\n\t\t\t\tApp::get('session')->set('registration.incomplete', 0);\n\t\t\t\tApp::redirect($_SERVER['REQUEST_URI']);\n\t\t\t}\n\t\t}\n\n\t\t$view = $this->view('default', 'index')\n\t\t\t->set('params', $params)\n\t\t\t->set('option', 'com_members')\n\t\t\t->set('profile', $this->member)\n\t\t\t->set('fields', $fields)\n\t\t\t->set('completeness', $this->getProfileCompleteness($fields, $this->member))\n\t\t\t->set('registration_update', $xreg);\n\n\t\treturn $view\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->loadTemplate();\n\t}", "public function editprofile()\n {\n //make sure user is logged in\n Auth::checkAuthentication();\n $data = array('ajaxform'=>'load');\n \n //loads user data from session, gives save button(post)\n $this->View->render('user/editProfile',$data);\n }", "public function profile() {\r\n\r\n\t\t$this->input->set('view', 'childprofile');\r\n\r\n\t\treturn parent::display();\r\n\t}", "public function profileAction() {\r\n $user = $this->getCurUser();\r\n return $this->render('AlbatrossUserBundle:User:profile.html.twig', array(\r\n 'userInfo' => $user,\r\n )\r\n );\r\n }", "public function View_My_Profile()\n\t{\n\t\t$this->_CheckLogged();\n\t\t\n\t\t$this->_processInsert($this->instructors_model->getMyPostId(),'view');\n\t}", "public function 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 }", "public function profile()\n {\n if ($this->Session && $this->Permissions) {\n if($this->Session['admin'] == 1 || $this->Permissions['profielen'] == 'Y') {\n $data['Title'] = 'Gebruikers profiel';\n $data['Active'] = 4;\n $data['user'] = $this->user->getProfile();\n $data['logs'] = $this->Log->getUserLogs();\n $data['permissions'] = $this->rights->getUserRights();\n\n $this->load->view('components/admin_header', $data);\n $this->load->view('components/navbar_admin', $data);\n $this->load->view('admin/profile', $data);\n $this->load->view('components/footer');\n }\n } else {\n redirect('Admin', 'refresh');\n }\n }", "public function profile() {\n\t\tif($this->checkLoggedIn()) {\n\t\t\treturn $this->view->render('profile_view');\n\t\t}\n\t}", "public function profileAction()\n {\n // Fetch the current logged in user. It's always present, since the firewall denies anonymous logins\n $user = $this->get('security.context')->getToken()->getUser();\n\n // Create form\n $form = $this->createForm(new UserType(), $user);\n $form->remove('username');\n\n// //@TODO We must make sure that the password fields are optional!\n// foreach ($form->get('password')->getChildren() as $item) {\n// $item->setRequired(true);\n// }\n\n $request = $this->getRequest();\n if ($request->getMethod() == 'POST') {\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $factory = $this->get('security.encoder_factory');\n $encoder = $factory->getEncoder($user);\n $password = $encoder->encodePassword($user->getPassword(), $user->getSalt());\n $user->setPassword($password);\n\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($user);\n $em->flush();\n\n $this->get('session')->setFlash('notice', 'Your profile has been updated!');\n\n // Redirect - This is important to prevent users re-posting\n // the form if they refresh the page\n return $this->redirect($this->generateUrl('WygUserBundle_user_profile'));\n }\n }\n\n return $this->render('WygUserBundle:User:form.html.twig', array(\n 'form' => $form->createView(),\n 'user' => $user,\n 'mode' => 'edit',\n ));\n }", "public function displayRegisterForm()\n {\n // charger le HTML de notre template\n require OPROFILE_TEMPLATES_DIR . 'register-form.php';\n }", "public function index()\n {\n $data = [\n 'user' => user_info(),\n 'formProfile' => [\n 'method' => 'PUT',\n 'url' => URL::route('admin-profile-update', 'profile'),\n 'files' => true,\n ],\n 'formPassword' => [\n 'method' => 'PUT',\n 'url' => URL::route('admin-profile-update', 'password'),\n ],\n 'skins' => config('ahloo.skins'),\n ];\n\n return view('backend.profile', $data);\n }", "public function actionProfile()\n {\n $searchModel = new ProfileSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('profile', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function profile()\n\t{\n\t\t// echo $this->fungsi->user_login()->nik;\n\t\t$query = $this->user_m->get($this->fungsi->user_login()->nik);\n\t\t$data['data'] = $query->row();\n\t\t$this->template->load('template2', 'profile', $data);\n\t}", "public function myProfile()\n\t{\n\t\t//echo \"<pre>\";print_r($this->session->userdata());die;\n\t\tif($this->session->userdata('VB_USER_ID') == ''):\n\t\t\tredirect(base_url());\n\t\tendif;\n\t\t$this->layouts->set_title(stripcslashes('Profile | VBloggers'));\n\t\t$this->layouts->set_keyword(stripcslashes('Profile | VBloggers'));\n\t\t$this->layouts->set_description(stripcslashes('Profile | VBloggers'));\n\t\t\n\t\t$this->layouts->login_view('user/profile',array(),$data);\n\t}", "public function profile() {\n\n\n $userInfo = Auth::user();\n\n $User = User::find($userInfo->id);\n\n\n // show the edit form and pass the nerd\n return View::make('admin.profile.edit')\n ->with('User', $User);\n }", "function EditProfileForm() {\n\t\t$member = $this->Member();\n\t\t$show_openid = (isset($member->IdentityURL) && !empty($member->IdentityURL));\n\n\t\t$fields = $member ? $member->getForumFields($show_openid) : singleton('Member')->getForumFields($show_openid);\n\t\t$validator = $member ? $member->getForumValidator(false) : singleton('Member')->getForumValidator(false);\n\t\tif($holder = DataObject::get_one('ForumHolder', \"\\\"DisplaySignatures\\\" = '1'\")) {\n\t\t\t$fields->push(new TextareaField('Signature', 'Forum Signature'));\n\t\t}\n\n\t\t$form = new Form($this, 'EditProfileForm', $fields,\n\t\t\tnew FieldList(new FormAction(\"dosave\", _t('ForumMemberProfile.SAVECHANGES','Save changes'))),\n\t\t\t$validator\n\t\t);\n\n\t\tif($member && $member->hasMethod('canEdit') && $member->canEdit()) {\n\t\t\t$member->Password = '';\n\t\t\t$form->loadDataFrom($member);\n\t\t\treturn $form;\n\t\t}\n\n\t\treturn null;\n\t}", "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 profileAction() {\n\t\t$this->view->assign('account', $this->accountManagementService->getProfile());\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 actionProfile()\n {\n $id = Yii::$app->user->identity->id;\n $model = \\app\\models\\User::findOne(['id' => $id]);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('kv-detail-success', 'Perubahan disimpan');\n return $this->redirect(Yii::$app->request->referrer); \n }\n\n return $this->render('profile', ['model' => $model]);\n }", "public function profile()\n\t{\n\t\t$user = $this->userRepo->get(Auth::user()->id);\n\n\t\treturn View::make('user.profile', compact('user'))->withShowTab(Input::get('tab'));\n\t}", "public function updateProfile()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('profileEdit');\n\n return $this->loadPublicView('user.profile-edit', $breadCrumb['data']);\n }", "public function profileAction()\n {\n \tZend_Registry::set('Category', Category::COMMUNITY);\n Zend_Registry::set('SubCategory', SubCategory::USERS);\n\n $userId = $this->_request->getParam(2, null);\n if(empty($userId)){\n throw new Lib_Exception_NotFound(\"No user id found for profile page\");\n }\n\n if($userId == $this->_user->{User::COLUMN_USERID}){\n \tZend_Registry::set('Category', Category::ACCOUNT);\n\t\t\tZend_Registry::set('SubCategory', SubCategory::NONE);\n }\n\n $table = new User();\n $user = $table->find($userId)->current();\n if(empty($user)){\n throw new Lib_Exception_NotFound(\"User '$userId' could not be found for profile page\");\n }\n\n $blog = $user->getBlog();\n if(!$blog->isReadableBy($this->_user, $this->_acl)){\n $blog = null;\n \t}\n\n $album = $user->getProfileAlbum();\n if(!$album->isReadableBy($this->_user, $this->_acl)){\n $album = null;\n \t}\n\n $this->view->profilee = $user;\n $this->view->album = $album;\n $this->view->blog = $blog;\n $this->view->medias = $album->getItemSet();\n }", "public function profile()\n\t{\n\t\treturn view('admin.profile');\n\t}", "public function actionEdit()\n\t{\n\t\t$model = new ProfileForm;\n\t\t$model->load(Yii::app()->user->id);\n\n\t\tif (Cii::get($_POST, 'ProfileForm', NULL) !== NULL)\n\t\t{\n\t\t\t$model->attributes = $_POST['ProfileForm'];\n\t\t\t$model->password_repeat = $_POST['ProfileForm']['password_repeat'];\n\n\t\t\tif ($model->save())\n\t\t\t{\n\t\t\t\tYii::app()->user->setFlash('success', Yii::t('ciims.controllers.Profile', 'Your profile has been updated!'));\n\t\t\t\t$this->redirect($this->createUrl('profile/index', array(\n\t\t\t\t\t'id' => $model->id,\n\t\t\t\t\t'username' => $model->username\n\t\t\t\t)));\n\t\t\t}\n\t\t\telse\n\t\t\t\tYii::app()->user->setFlash('error', Yii::t('ciims.controllers.Profile', 'There were errors saving your profile. Please correct them before trying to save again.'));\n\t\t}\n\n\t\t$this->render('edit', array(\n\t\t\t'model' => $model\n\t\t));\n\t}", "public function profile() {\n $this->restrictToRoleId(2);\n \n // Exécute la view\n $this->show('user/profile');\n }", "public function actionProfile(){\r\r\n\t\t$attributes = Yii::app()->portfolio->getAttributes(Yii::app()->user->id);\r\r\n\t\tif(isset($_POST['Attribute'])){\r\r\n\t\t\tYii::app()->portfolio->saveAttributes($_POST['Attribute']);\r\r\n\t\t}\r\r\n\t\t$this->render('profile',array('attributes'=>$attributes));\r\r\n\t}", "public function show()\r\n\t{\r\n\t\t\r\n\t\t$model = $this->getProfileView();\r\n\t\t$data = array('model'=> $model);\r\n\t\t\r\n\t\treturn $this->render($data);\r\n\t\t\r\n\t}", "public function profile($params = null)\n\t{\n\t\t$this->loadModel(\"user\");\n\t\t// On set la variable a afficher sur dans la vue\n\t\t$this->set('title', 'Profil');\n\t\t// On fait de rendu de la vue login.php\n\t\t$this->render('profile');\n\t}", "function new_member_profile_form()\n {\n if ( ! Session::access('can_admin_members')) {\n return Cp::unauthorizedAccess();\n }\n\n Cp::$body_props = \" onload=\\\"document.forms[0].email.focus();\\\"\";\n\n $title = __('members.register_member');\n\n // Build the output\n $r = Cp::formOpen(['action' => 'C=Administration'.AMP.'M=members'.AMP.'P=register_member']);\n\n $r .= Cp::quickDiv('tableHeading', $title);\n $r .= Cp::div('box');\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.email'),\n Cp::input_text('email', '', '35', '32', 'input', '300px')\n );\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.password'),\n Cp::input_pass('password', '', '35', '32', 'input', '300px')\n );\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.password_confirm'),\n Cp::input_pass('password_confirm', '', '35', '32', 'input', '300px')\n );\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.screen_name'),\n Cp::input_text('screen_name', '', '40', '50', 'input', '300px')\n );\n\n $r .= '</td>'.PHP_EOL.\n Cp::td('', '45%', '', '', 'top');\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.email'),\n Cp::input_text('email', '', '35', '100', 'input', '300px')\n );\n\n // Member groups assignment\n if (Session::access('can_admin_mbr_groups')) {\n $query = DB::table('member_groups')\n ->select('group_id', 'group_name')\n ->orderBy('group_name');\n\n if (Session::userdata('group_id') != 1)\n {\n $query->where('is_locked', 'n');\n }\n\n $query = $query->get();\n\n if ($query->count() > 0)\n {\n $r .= Cp::quickDiv(\n 'paddingTop',\n Cp::quickDiv('defaultBold', __('account.member_group_assignment'))\n );\n\n $r .= Cp::input_select_header('group_id');\n\n foreach ($query as $row)\n {\n $selected = ($row->group_id == 5) ? 1 : '';\n\n // Only SuperAdmins can assigned SuperAdmins\n if ($row->group_id == 1 AND Session::userdata('group_id') != 1) {\n continue;\n }\n\n $r .= Cp::input_select_option($row->group_id, $row->group_name, $selected);\n }\n\n $r .= Cp::input_select_footer();\n }\n }\n\n $r .= '</div>'.PHP_EOL;\n\n // Submit button\n\n $r .= Cp::itemgroup( '',\n Cp::required(1).'<br><br>'.Cp::input_submit(__('cp.submit'))\n );\n $r .= '</form>'.PHP_EOL;\n\n\n Cp::$title = $title;\n Cp::$crumb = Cp::anchor(BASE.'?C=Administration'.AMP.'area=members_and_groups', __('admin.members_and_groups')).\n Cp::breadcrumbItem($title);\n Cp::$body = $r;\n }", "function displayForm() {\n\t\t$session = new SessionManager();\n\t\t$session->sessionLoad();\n\t\t$categorys = new CategoryModel();\n\t\t$rows = $categorys->readAll();\n\t\t$view = new View(\"view/uploadPic.php\");\n\t\t$upload_error = \"\";\n\t\tif( isset($_GET[\"error\"])){\n\t\t\t$upload_error = $_GET[\"error\"];\n\t\t}\n\t\t$view->upload_error = $upload_error;\n\t\t$view->rows = $rows;\n\t\t$view->isLogdin = $session->getIsLogdin();\n\t\t$view->userName = $session->username;\n\t\t$view->display();\n\t}", "function profileUser() {\n if (SSession::getInstance()->__isset(\"role\")) {\n $model = new UserModel;\n $result = $model->selectUser(SSession::getInstance()->mail);\n $this->view->show(\"profileView.php\", $result);\n } else {\n $this->view->show(\"indexView.php\");\n }\n }", "public function actionIndex() {\r\n $userID = $this->checkLogged();\r\n $user = new User;\r\n $user = $user->getUserById($userID);\r\n $username = $user->firstname;\r\n\r\n $mainCategories = $this->mainCategories;\r\n $brands = $this->brands;\r\n\r\n include_once ROOT . '/views/profile/profile.php';\r\n }", "function get_profile_form($user) {\n \n $language = $this->get_user_language($user);\n $options = NewsletterSubscription::instance()->get_options('profile', $language);\n\n $buffer = '';\n\n $buffer .= '<div class=\"tnp tnp-profile\">';\n $buffer .= '<form action=\"' . $this->build_action_url('ps') . '\" method=\"post\" onsubmit=\"return newsletter_check(this)\">';\n $buffer .= '<input type=\"hidden\" name=\"nk\" value=\"' . esc_attr($user->id . '-' . $user->token) . '\">';\n\n $buffer .= '<div class=\"tnp-field tnp-field-email\">';\n $buffer .= '<label>' . esc_html($options['email']) . '</label>';\n $buffer .= '<input class=\"tnp-email\" type=\"text\" name=\"ne\" required value=\"' . esc_attr($user->email) . '\">';\n $buffer .= \"</div>\\n\";\n\n\n if ($options['name_status'] >= 1) {\n $buffer .= '<div class=\"tnp-field tnp-field-firstname\">';\n $buffer .= '<label>' . esc_html($options['name']) . '</label>';\n $buffer .= '<input class=\"tnp-firstname\" type=\"text\" name=\"nn\" value=\"' . esc_attr($user->name) . '\"' . ($options['name_rules'] == 1 ? ' required' : '') . '>';\n $buffer .= \"</div>\\n\";\n }\n\n if ($options['surname_status'] >= 1) {\n $buffer .= '<div class=\"tnp-field tnp-field-lastname\">';\n $buffer .= '<label>' . esc_html($options['surname']) . '</label>';\n $buffer .= '<input class=\"tnp-lastname\" type=\"text\" name=\"ns\" value=\"' . esc_attr($user->surname) . '\"' . ($options['surname_rules'] == 1 ? ' required' : '') . '>';\n $buffer .= \"</div>\\n\";\n }\n\n if ($options['sex_status'] >= 1) {\n $buffer .= '<div class=\"tnp-field tnp-field-gender\">';\n $buffer .= '<label>' . esc_html($options['sex']) . '</label>';\n $buffer .= '<select name=\"nx\" class=\"tnp-gender\">';\n $buffer .= '<option value=\"f\"' . ($user->sex == 'f' ? ' selected' : '') . '>' . esc_html($options['sex_female']) . '</option>';\n $buffer .= '<option value=\"m\"' . ($user->sex == 'm' ? ' selected' : '') . '>' . esc_html($options['sex_male']) . '</option>';\n $buffer .= '<option value=\"n\"' . ($user->sex == 'n' ? ' selected' : '') . '>' . esc_html($options['sex_none']) . '</option>';\n $buffer .= '</select>';\n $buffer .= \"</div>\\n\";\n }\n\n // Profile\n for ($i = 1; $i <= NEWSLETTER_PROFILE_MAX; $i++) {\n if ($options['profile_' . $i . '_status'] == 0) {\n continue;\n }\n\n $buffer .= '<div class=\"tnp-field tnp-field-profile\">';\n $buffer .= '<label>' . esc_html($options['profile_' . $i]) . '</label>';\n\n $field = 'profile_' . $i;\n\n if ($options['profile_' . $i . '_type'] == 'text') {\n $buffer .= '<input class=\"tnp-profile tnp-profile-' . $i . '\" type=\"text\" name=\"np' . $i . '\" value=\"' . esc_attr($user->$field) . '\"' .\n ($options['profile_' . $i . '_rules'] == 1 ? ' required' : '') . '>';\n }\n\n if ($options['profile_' . $i . '_type'] == 'select') {\n $buffer .= '<select class=\"tnp-profile tnp-profile-' . $i . '\" name=\"np' . $i . '\"' .\n ($options['profile_' . $i . '_rules'] == 1 ? ' required' : '') . '>';\n $opts = explode(',', $options['profile_' . $i . '_options']);\n for ($j = 0; $j < count($opts); $j++) {\n $opts[$j] = trim($opts[$j]);\n $buffer .= '<option';\n if ($opts[$j] == $user->$field)\n $buffer .= ' selected';\n $buffer .= '>' . esc_html($opts[$j]) . '</option>';\n }\n $buffer .= '</select>';\n }\n\n $buffer .= \"</div>\\n\";\n }\n\n // Lists\n $lists = $this->get_lists_for_profile($language);\n $tmp = '';\n foreach ($lists as $list) {\n\n $tmp .= '<div class=\"tnp-field tnp-field-list\">';\n $tmp .= '<label><input class=\"tnp-list tnp-list-' . $list->id . '\" type=\"checkbox\" name=\"nl[]\" value=\"' . $list->id . '\"';\n $field = 'list_' . $list->id;\n if ($user->$field == 1) {\n $tmp .= ' checked';\n }\n $tmp .= '><span class=\"tnp-list-label\">' . esc_html($list->name) . '</span></label>';\n $tmp .= \"</div>\\n\";\n }\n\n if (!empty($tmp)) {\n $buffer .= '<div class=\"tnp-lists\">' . \"\\n\" . $tmp . \"\\n\" . '</div>';\n }\n\n $extra = apply_filters('newsletter_profile_extra', array(), $user);\n foreach ($extra as $x) {\n $buffer .= '<div class=\"tnp-field\">';\n $buffer .= '<label>' . $x['label'] . \"</label>\";\n $buffer .= $x['field'];\n $buffer .= \"</div>\\n\";\n }\n \n $local_options = $this->get_options('', $this->get_user_language($user));\n\n // Privacy\n $privacy_url = NewsletterSubscription::instance()->get_privacy_url();\n if (!empty($local_options['privacy_label']) && !empty($privacy_url)) {\n $buffer .= '<div class=\"tnp-field tnp-field-privacy\">';\n if ($privacy_url) {\n $buffer .= '<a href=\"' . $privacy_url . '\" target=\"_blank\">';\n }\n\n $buffer .= $local_options['privacy_label'];\n\n if ($privacy_url) {\n $buffer .= '</a>';\n }\n $buffer .= \"</div>\\n\";\n }\n\n $buffer .= '<div class=\"tnp-field tnp-field-button\">';\n $buffer .= '<input class=\"tnp-submit\" type=\"submit\" value=\"' . esc_attr($local_options['save_label']) . '\">';\n $buffer .= \"</div>\\n\";\n\n $buffer .= \"</form>\\n</div>\\n\";\n\n return $buffer;\n }", "public function showUpdateProfile()\n {\n return view('moderator.profile');\n }", "public function profile(){\n \n \n $this->load->model('profile_model');\n $data = $this->profile_model->admin_info();\n $this->load->view('admin/profile_content',$data);\n }", "public function editAction()\n {\n $profileRepoFactory = new Application_Factory_ProfileRepository();\n $profileModelFactory = new Application_Factory_ProfileModel();\n $profileForm = new Application_Form_Profile(['id' => 'edit-profile']);\n\n $profileForm->submit->setLabel(\"Save\");\n $profileRepo = $profileRepoFactory->createService();\n\n $this->view->profileForm = $profileForm;\n\n //GET request handler\n $visitEditProfilePage = !$this->getRequest()->isPost();\n if ($visitEditProfilePage) {\n $profileId = (int) $this->getParam('id', 0);\n $profileEntity = $profileRepo->findById($profileId);\n $profileForm->bindFromProfile($profileEntity);\n return; //render edit profile form\n }\n\n //POST request handler\n $postInvalidProfile = !$profileForm->isValid($this->getRequest()->getPost());\n if ($postInvalidProfile) {\n return; //represent profile form with error messages\n }\n\n //Persit filtered profile to persistent\n $profileRepo->save($profileModelFactory->createService($profileForm->getValues()));\n $this->_helper->redirector('index', 'profile', 'default');\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 profile()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('profile');\n\n return $this->loadPublicView('user.profile', $breadCrumb['data']);\n }", "public function profileAction()\n {\n if (!$this->auth->isAuthorizedVisitor()) {\n $this->response->setStatusCode(404);\n $this->flashSession->error(t(\"Sorry! We can't seem to find the page you're looking for.\"));\n\n $this->dispatcher->forward([\n 'controller' => 'posts',\n 'action' => 'index',\n ]);\n\n return;\n }\n\n $user = $this->userService->findFirstById($this->auth->getUserId());\n\n if (!$user || !$this->userService->isActiveMember($user)) {\n $this->response->setStatusCode(404);\n $this->flashSession->error(t('Attempt to access non-existent user.'));\n\n $this->dispatcher->forward([\n 'controller' => 'posts',\n 'action' => 'index',\n ]);\n\n return;\n }\n\n $form = new UserForm($user);\n\n if ($this->request->isPost()) {\n // Validate the form and assign the values from the user input\n $form->bind($this->request->getPost(), $user);\n\n if (!$form->isValid()) {\n $messages = [];\n $this->response->setStatusCode(400);\n foreach ($form->getMessages() as $message) {\n $messages[] = (string) $message->getMessage();\n }\n $this->flashSession->error(implode('<br>', $messages));\n } else {\n // @todo Process missed fields\n $user->setFirstname($this->request->getPost('firstname', 'striptags'));\n $user->setLastname($this->request->getPost('lastname', 'striptags'));\n $user->setEmail($this->request->getPost('email', 'email'));\n // $user->setUsername($this->request->getPost('username', 'striptags'));\n $user->setBirthdate($this->request->getPost('birthDate'));\n $user->setBio($this->request->getPost('bio', 'trim'));\n $user->setTwitter($this->request->getPost('twitter'));\n $user->setGithub($this->request->getPost('github'));\n\n if (!$user->save()) {\n $messages = [];\n $this->response->setStatusCode(400);\n foreach ($user->getMessages() as $message) {\n $messages[] = (string) $message->getMessage();\n }\n $this->flashSession->error(implode('<br>', $messages));\n return;\n }\n\n $this->response->setStatusCode(200);\n $this->flashSession->success(t('Profile successfully updated.'));\n $this->refreshAuthSession($user->toArray());\n }\n }\n\n $this->tag->setTitle(t('Edit Profile'));\n\n $this->view->setVars([\n 'form' => $form,\n 'object' => $user,\n 'email' => $user->getEmail(),\n ]);\n\n $script = '\n\n Dropzone.options.myAwesomeDropzone = {\n paramName: \"file\", // The name that will be used to transfer the file\n maxFilesize: 2, // MB\n maxfilesreached : 1,\n maxFiles: 1,\n maxThumbnailFilesize: 1,\n uploadMultiple: false,\n accept: function(file, done) {\n if (file.name == \"justinbieber.jpg\") {\n done(\"Naha, you dont.\");\n }\n else { done(); }\n }\n };\n\n\n ';\n\n $this->assets->addInlineJs($script);\n $this->assets->addInlineCss('#avatarUpload { border:1px; min-height:150px; padding:0px; } #avatarUpload .dz-message {margin:0px; padding:0 1rem} #avatarUpload .dz-preview {margin:0px; padding:0 1rem} ');\n\n\n }", "public function actionEditProfile()\n {\n $userID = $_GET['userid'];\n $data = $this->model->getUserProfile($userID);\n $this->view = new ViewIndex(\"EditProfile\", $data);\n $this->view->render();\n //$this->view->generate('viewEditProfile.php', 'viewTemplate.php', $data);\n }", "public function profile()\n {\n $view_data = [\n 'form_errors' => []\n ];\n // Check input data\n if ($this->input->is_post()) {\n $gender = '';\n\n if (!empty($this->input->post('sex'))) {\n $gender = $this->input->post('sex');\n }\n\n if(mb_strlen($this->input->post('nickname')) <= 10) {\n // Call API to register for parent\n $res = $this->_api('user')->update_profile([\n 'id' => $this->current_user->id,\n 'nickname' => $this->input->post('nickname'),\n 'sex' => $gender,\n ]);\n } else {\n $view_data['form_errors'] = ['nickname' => 'ニックネーム欄は10文字以内で入力してください'];\n }\n\n if (isset($res['result'])) {\n $this->session->set_flashdata('get_trophy', $res['result']['trophy']);\n $this->session->set_flashdata('get_point', $res['result']['point']);\n redirect('setting');\n return;\n } elseif (isset($res)) {\n // Show error if form is incorrect\n $view_data['form_errors'] = $res['invalid_fields'];\n }\n $view_data['post'] = $this->input->post();\n\n }\n\n $user_res = $this->get_current_user_detail();\n\n $view_data['user'] = $user_res['result'];\n\n $this->_render($view_data);\n }", "public function profileEdit()\n {\n\t$oUser = Auth::user();\n return view('profile_edit', ['oUser' => $oUser, 'active' => 'profile_link']);\n }", "public function create()\n {\n return view('user.profile_form_create');\n }", "public function _showForm()\n\t{\n\t\t$this->registry->output->setTitle( \"Log In\" );\n\t\t$this->registry->output->setNextAction( 'index&do=login' );\n\t\t$this->registry->output->addContent( $this->registry->legacy->fetchLogInForm() );\n\t\t$this->registry->output->sendOutput();\n\t\texit();\n\t}", "public function edit()\r\n\t{\r\n\t\t$model = $this->getProfileView();\r\n\t\t$data = array('model'=> $model);\r\n\t\t\r\n\t\treturn $this->render($data);\r\n\r\n\t}", "function index() \n { \n $data['profile_info'] = $this->tank_auth->get_user_by_id($this->tank_auth->get_user_id(),TRUE);\n $data['profile_detail'] = $this->tank_auth->get_user_profile_detail($this->tank_auth->get_user_id()); \t \n $this->_template($data,$templatename='profile'); \n }", "public function edit()\n {\n $this->setActiveSubMenu(Menu::SUB_MENU_EDIT_PROFILE->value);\n $auth = Auth::user()->find(\\auth()->id());\n\n if (Auth::user()->can('deactivateProfile', $auth)) {\n $destroyRoute = route('auth.destroy', [\\auth()->id()]);\n }\n\n return view('auth.profile', [\n 'user' => $auth,\n 'destroyRoute' => $destroyRoute ?? null,\n ]);\n }", "public function profile()\n\t{\n\t\t$data['user'] = $this->session->userdata('user');\n\t\t$data['admin'] = $this->Admin->getClientById($data['user'][\"user_id\"]);\n\t\t$data['title'] = \"Admin Profile\";\n\n\t\t$this->load->view('layouts/header.php', $data);\n\t\t$this->load->view('admin/index.php');\n\t\t$this->load->view('layouts/footer.php');\n\t}", "public function displayForm() {\n if (isset($_SESSION['user']) && ($_SESSION['level'] == \"admin\")){\n $this->page .= \"<h2>J'ajoute un utilisateur via un formulaire :</h2>\";\n $this->page .= \"<a class='btn btn-primary col-12 mt-3' href='index.php?controller=user&action=start'>Retour en arrière</a>\";\n $this->page .= file_get_contents('template/formUser.html');\n $this->page = str_replace('{action}','addDB', $this->page);\n $this->page = str_replace('{id}','', $this->page);\n $this->page = str_replace('{username}','', $this->page);\n $this->page = str_replace('{password}','', $this->page);\n $this->page = str_replace('{firstname}','', $this->page);\n $this->page = str_replace('{lastname}','', $this->page);\n $this->displayPage();\n } else {\n header ('location:index.php?controller=login&action=formLog');\n }\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function Edit_My_Profile()\n\t{\n\t\t$this->_CheckLogged();\n\t\t\n\t\t$this->_processInsert($this->instructors_model->getMyPostId());\n\t}", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function index()\n {\n $user = $this->getAuthenticatedUser();\n\n $this->setTitle(\"Profile - {$user->full_name}\");\n $this->addBreadcrumbRoute($user->full_name, 'admin::auth.profile.index');\n\n return $this->view('admin.profile.index', compact('user'));\n }", "public function profile()\n {\n return view('users.edit');\n }", "public function edit()\n {\n // 1.入力情報を取得\n $login_user = Auth::id();\n $users = DB::table('users')\n ->select('id', 'email', 'password', 'profile_image')\n ->where('id', $login_user)\n ->first();\n return view('mypage.profile-settings', compact('users'));\n }", "public function edit()\n {\n $id=session()->get('user')->id;\n \n $user = User::find($id);\n $form=[\n \"value\" => \"update\",\n \"name\" => \"Edit Profile\",\n \"submit\" => \"Save\"\n ];\n\n return view('profile.form',compact('user','form'));\n }", "public function _edit() {\n\t\t$this->tab_id = 'profile';\n\t\t$this->history = false;\n\n\t\t// only owner or admin\n\t\tif ($this->member->id !== $this->user->id && !$this->visitor->logged_in('admin')) {\n\t\t\turl::back('members');\n\t\t}\n\n\t\t$form_errors = array();\n\t\t$form_values = $this->member->as_array();\n\n\t\t// check post\n\t\tif (request::method() == 'post') {\n\t\t\t$post = array_merge($this->input->post(), $_FILES);\n\n\t\t\t$extra = array();\n\n\t\t\t// location\n\t\t\tif (empty($post['address_street']) && empty($post['address_city'])) {\n\n\t\t\t\t// empty address, clear location\n\t\t\t\t$extra['latitude'] = 0;\n\t\t\t\t$extra['longitude'] = 0;\n\n\t\t\t} else if ($post['address_street'] != $this->member->address_street || $post['address_city'] != $this->member->address_city) {\n\n\t\t\t\t// update location\n\t\t\t\tlist($extra['latitude'], $extra['longitude']) = Gmap::address_to_ll(implode(', ', array($post['address_street'], $post['address_zip'], $post['address_city'])));\n\n\t\t\t}\n\n\t\t\tif ($this->member->validate($post, true, $extra)) {\n\n\t\t\t\t// handle picture upload\n\t\t\t\tif (isset($post->image) && empty($post->image['error'])) {\n\t\t\t\t\t$image = Image_Model::factory('members.image', $post->image, $this->member->id);\n\t\t\t\t\tif ($image->id) {\n\t\t\t\t\t\t$this->member->add($image);\n\t\t\t\t\t\t$this->member->default_image_id = $image->id;\n\t\t\t\t\t\t$this->member->save();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\turl::redirect(url::user($this->member));\n\t\t\t} else {\n\t\t\t\t$form_errors = $post->errors();\n\t\t\t}\n\t\t\t$form_values = arr::overwrite($form_values, $post->as_array());\n\t\t}\n\n\t\t// City autocomplete\n\t\t$this->_autocomplete_city('address_city');\n\n\t\t// Date pickers\n\t\twidget::add('footer', html::script_source(\"$('input#dob').datepicker({ dateFormat: 'd.m.yy', firstDay: 1, changeFirstDay: false, showOtherMonths: true, showStatus: true, showOn: 'both', minDate: '-60Y', maxDate: 0 });\"));\n\n\t\tif (empty($errors)) {\n\t\t\twidget::add('main', View::factory('member/info_edit', array('values' => $form_values, 'errors' => $form_errors)));\n\t\t} else {\n\t\t\t$this->_error(Kohana::lang('generic.error'), $errors);\n\t\t}\n\n\t\t$this->_side_views();\n\t}", "public function pageProfile()\r\n {\r\n if (!user()) {\r\n $this->redirect('/login?r=' . urlencode('/profile'));\r\n }\r\n\r\n return $this->view('profile');\r\n }", "public function profile()\n {\n if (isset($_REQUEST['submit'])) {\n\n $fullname = $_POST['fullname'];\n\n $phone = $_POST['phone'];\n\n $username = $_POST['username'];\n\n $des = $_POST['des'];\n\n $user = $_POST['user'];\n\n\n //Checking for User login or not\n $change = $this->getChange($username, $fullname, $phone ,$des, $user);\n\n if ($change) {\n $success = 'Change profile successful!';\n echo \"<p><span class='error' style='color: green'>\" . $success . \"</span></p><br>\";\n } else {\n // Registration Failed\n $fail = 'Change profile failed. Account already not exits, please try again.';\n echo \"<p><span class='error' style='color: red;'>\" . $fail . \"</span></p><br>\";\n };\n }\n }", "public function profile() {\n //Tomamos el campo del ususario\n $user = Auth::user();\n //Retornamos la vista con el profile\n return view('admin.users.profile', ['user' => $user]);\n }", "public function form1_profil()\n\t{\n\t\t$uri_job = $this->uri->segment(3);\n\t\t\n\t\t$get_header\t\t\t\t= $this->db->get_where('header', array('header_is_displayed' \t\t\t=> 'Y'));\n\t\t// $get_job \t\t\t\t= $this->db->get_where('job', array('jobslug' => $uri_job));\n\t\t$get_job = $this->db->get_where('job', array('job_is_listjob' => 'Y', 'jobslug' \t=> $uri_job));\n\n\t\t$get_footer \t\t\t= $this->db->get_where('footer', array('footer_is_displayed' \t\t\t=> 'Y'));\n\n\t\t$data['get_header']\t\t= $get_header;\n\t\t$data['job']\t\t= $get_job;\n\t\t$data['get_footer']\t\t= $get_footer;\n\t\t$this->load->view('form1_profil', $data);\n\t}", "public function editprofile()\n\t\t{\n\t\t\tif(Auth::check()) {\n\t\t\t\t$userinfo = Auth::user();\n\t\t\t\treturn View::make('editprofile')->with('userinfo', $userinfo);\n\t\t\t} else {\n\t\t\t\tApp::abort(403);\n\t\t\t}\n\t\t}", "public function admin_profile() {\n\n // nothing done here, everything happens in the view\n\n $user = $this->User->findById($this->Auth->user('id'));\n $this->set(compact('user'));\n }", "public function myprofile() {\n \n \treturn view('backend.user.myprofile');\n\n }", "public function profile($user_name = NULL) {\n\n\n if(!$this->user){\n //Router::redirect('/');\n die('Members Only <a href=\"/users/login\">Login</a>');\n\n }\n\n $this->template->content=View::instance('v_users_profile'); \n // $content=View::instance('v_users_profile'); \n $this->template->title= APP_NAME. \" :: Profile :: \".$user_name;\n \n $q= 'Select * \n From users \n WHERE email=\"'.$user_name.'\"';\n $user= DB::instance(DB_NAME)->select_row($q);\n\n $this->template->content->user=$user;\n \n # Render View \n echo $this->template;\n\n \n }", "public function myProfile()\n {\n //make sure user is logged in\n Auth::checkAuthentication();\n \n //loads profile from session\n $this->View->render('user/myProfile'); \n }", "public function show()\n {\n $user_identifier = $this->session->userdata('identifier');\n $user_details = $this->user_m->read($user_identifier);\n $this->data['user_details'] = $user_details;\n $this->load_view('Profil Akun', 'user/profil');\n }", "function edit()\n\t{\n\t\t// Find the logged-in client details\n\t\t$userId = $this->Auth->user('id');\n\t\t$user = $this->User->findById($userId);\n\n\t\t// Save the POSTed data\n\t\tif (!empty($this->data)) {\n\t\t\t$this->data['User']['id'] = $userId;\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash(__('Profile has been updated', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Profile could not be saved. Please, try again.', true));\n\t\t\t}\n\t\t} else {\n\t\t\t// Set the form data (display prefilled data) \n\t\t\t$this->data = $user;\n\t\t}\n\n\t\t// Set the view variable\n\t\t$this->set(compact('user'));\n\t}", "public function profile()\n {\n return view('profile');\n }", "public function profile()\n {\n $user = User::get($_SESSION['id']);\n $page = Param::get('page_next', 'profile');\n $nextRank = $user->getRemainingCommentCount();\n $comment_count = $user->getCommentCount();\n\n switch ($page) {\n case 'profile':\n break;\n case 'profile_update':\n $new_username = Param::get('username');\n $new_password = Param::get('password');\n\n try {\n $user->updateProfile($new_username, $new_password);\n } catch (ValidationException $e) {\n $page = 'profile';\n }\n break;\n default:\n throw new PageNotFoundException('{$page} not found');\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }", "function profile()\n\t{\n\t\t$userId = $this->Auth->user('id');\n\t\t$user = $this->User->findById($userId);\n\n\t\t// Set the client information to display in the view\n\t\t$this->set(compact('user'));\n\t}", "public function profileHelpAction()\r\n {\r\n $frontendHostname = $this->getParameter(\"frontend_hostname\");\r\n $merchantHostname = $this->getParameter(\"merchant_hostname\");\r\n $supportMobile = $this->getParameter(\"support_contact_number\");\r\n return $this->render('YilinkerFrontendBundle:Profile:profile_help.html.twig', \r\n compact(\r\n \"frontendHostname\",\r\n \"merchantHostname\",\r\n \"supportMobile\"\r\n )\r\n );\r\n }", "public function profileEditAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n\n $editForm = $this->createProfileForm($user);\n\n return array(\n 'entity' => $user,\n 'edit_form' => $editForm->createView(),\n );\n }", "public function profile() {\n \t$data = array(\n \t\t'title' => \"PROFILE PAGE!\",\n \t\t'abstract' => \"Proin quis dui massa. Morbi scelerisque iaculis orci sed dictum. Suspendisse condimentum laoreet justo. Fusce imperdiet leo a dui rutrum, ac sollicitudin leo rutrum. Ut nec sapien ac turpis rhoncus fringilla non iaculis dolor. Morbi convallis purus nec elementum finibus. Morbi nisi ligula, interdum vitae est venenatis, accumsan efficitur leo. Donec dapibus nulla non lorem ullamcorper, quis rutrum erat hendrerit.\",\n \t\t'skills' => ['rails', 'github', 'mysql', 'laravel', 'seo', 'bla']\n \t);\n \t// return view(\"pages.profile\", compact('title'));\n \t\n \t// return view(\"pages.profile\")->with('title', $title);\n \treturn view(\"pages.profile\")->with($data);\n }", "public function panel()\n {\n $data = array('redirect' => Request::get('redirect') ? Request::get('redirect') : NULL);\n \n if (Session::userIsLoggedIn()) {\n $this->View->render('user/myProfile');\n } else {\n $this->View->render('user/smalllogin', $data);\n }\n }", "function displayProfile(){\n if(isConnect()){\n if (!isset($_GET['pseudo'])){\n $perso_data_arr = selectInfoUser($_SESSION['pseudo']);\n $list = searchCreatorDB($perso_data_arr['id']);\n $delete = \"<a class='badge badge-danger' href='./index.php?action=deleteMyProfile&profile=\".$_SESSION['pseudo'].\"'>Supprimer mon compte</a>\";\n unset($perso_data_arr['avatar'],$perso_data_arr['id'], $perso_data_arr['statut'], $perso_data_arr['password'], $perso_data_arr['datep'], $perso_data_arr['score']);\n }elseif (isset($_GET['pseudo']) && $_SESSION['statut'] == 'admin') {\n $perso_data_arr = selectInfoUser($_GET['pseudo']);\n $list = searchCreatorDB(selectInfoUser($perso_data_arr['id']));\n $delete = \"<a class='badge badge-danger' href='./index.php?action=deleteMyProfile&profile=\".$_GET['pseudo'].\"'>Supprimer le compte</a>\";\n }else{\n $perso_data_arr = selectInfoUser($_GET['pseudo']);\n $list = searchCreatorDB(selectInfoUser($perso_data_arr['id']));\n $delete = \"\";\n unset($perso_data_arr['avatar'],$perso_data_arr['id'], $perso_data_arr['statut'], $perso_data_arr['password'], $perso_data_arr['datep'], $perso_data_arr['score']);\n }\n $title = 'Profil';\n require('./view/profilePage.php');\n }\n}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->get('security.token_storage')->getToken()->getUser();\n $profile = $em->getRepository('AppBundle:UserProfile')->findOneBy(array('userId' => $user));\n\n if ($profile == null) {\n $profile = new UserProfile();\n $profile->setUserId($user);\n }\n\n return $this->render('custom_views/profile.html.twig', array(\n 'profile' => $profile,\n ));\n }", "public function profile()\n {\n return view('secretary.profile');\n }", "public function submit_form()\n\t{\n\t\tDisplay::message('user_profil_submit', ROOT . 'index.' . PHPEXT . '?p=profile&amp;module=contact', 'forum_profil');\n\t}", "public function showProfileView(){\n $this->initMobileMatching();\n $this->mobilematchingobj->initMatching($this->profileid);\n $this->doReporting();\n\n $vars = AeplayVariable::getArrayOfPlayvariables($this->profileid);\n $vars['user_play_id'] = $this->profileid;\n $this->data->scroll[] = $this->getImageScroll($vars);\n\n $this->getCurrentUserInfo( $vars );\n\n $this->profileCommentView( $vars );\n\n $ref_name = '';\n $cache_name = 'current-user-branch-' . $this->playid;\n $cached_value = Appcaching::getGlobalCache( $cache_name );\n\n if ( isset($_REQUEST['referring_branch']) ) {\n Appcaching::setGlobalCache( $cache_name, 'ref-my-matches' );\n $ref_name = 'ref-my-matches';\n } else if ( $cached_value ) {\n $ref_name = $cached_value;\n }\n\n $id = 'report';\n if ( $ref_name ) {\n $id = 'report|' . $ref_name;\n }\n\n // $this->data->footer[] = $this->getText( $id );\n $this->data->footer[] = $this->getTextbutton('{#report_user#}', array( 'id' => 'report', 'style' => 'report-user-button' ));\n\n if ($this->menuid == 'report') {\n $this->data->footer[] = $this->getText( '{#user_reported#}', array( 'text-align' => 'center', 'padding' => '0 5 8 5', 'font-size' => '13' ));\n }\n\n }" ]
[ "0.85509926", "0.8153118", "0.7744307", "0.7700736", "0.7577087", "0.75133556", "0.7401191", "0.73628086", "0.7347341", "0.7330649", "0.73043245", "0.72707087", "0.72047836", "0.71891284", "0.7182947", "0.71635914", "0.7157282", "0.7145787", "0.7132224", "0.710816", "0.7105449", "0.71014446", "0.7100113", "0.7069583", "0.7068144", "0.70470047", "0.6998082", "0.69896233", "0.698149", "0.6944509", "0.6923119", "0.69189274", "0.69182664", "0.69139427", "0.68986076", "0.68761176", "0.6861166", "0.68494934", "0.6823565", "0.6811192", "0.6796166", "0.67926323", "0.67802674", "0.6778198", "0.6773367", "0.6772997", "0.6772503", "0.6754783", "0.67370385", "0.67279917", "0.6723726", "0.67160887", "0.6713482", "0.6709461", "0.67033917", "0.67030865", "0.667542", "0.6653589", "0.66505563", "0.6630163", "0.6612777", "0.6611011", "0.6607228", "0.66066813", "0.6601635", "0.6585542", "0.6585542", "0.6585542", "0.6585542", "0.6585542", "0.6574712", "0.65584886", "0.65526474", "0.65449387", "0.6544837", "0.65445983", "0.65436465", "0.6543217", "0.65411866", "0.65317553", "0.6527824", "0.65118855", "0.65031445", "0.6502826", "0.6499503", "0.64924634", "0.64838207", "0.6478077", "0.6473515", "0.6470367", "0.6469355", "0.6468948", "0.6449409", "0.64462364", "0.64458716", "0.644057", "0.64336395", "0.643351", "0.64282656", "0.6427963" ]
0.8025389
2
Displays tab with form to modify user general user info (all except password)
public function generaldataformAction(){ $form = new Bel_Forms_Builder('registration_form','/usermanagement/profile/save'); $form->removeElement('user_password') ->removeElement('password2') ->removeElement('captcha'); $form->populateForm($this->_auth->toArray()); /*if($this->_request->getParam('error')){ $this->view->assign('messages',$this->_messages->getMessages()); }*/ $this->view->assign('form',$form); $this->view->display('forms/ajax.tpl'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function seun_edit_user_options() {\n\n\t\t\tglobal $user_id;\n\n\t\t\t$user_id = isset($user_id) ? (int) $user_id : 0;\n\n\t\t\tif ( ! current_user_can('edit_users') )\n\t\t\t\treturn;\n\n\t\t\tif ( ! ($userdata = get_userdata( $user_id ) ) )\n\t\t\t\treturn;\n\n\t\t\t$default_user_nicename = sanitize_title( $userdata->user_login );\n\n\t\t\techo '<h3>'.__('User Nicename', 'seun').'</h3>'\n\t\t\t\t.'<table class=\"form-table\">'.\"\\n\"\n\t\t\t\t\t.'<tr>'.\"\\n\"\n\t\t\t\t\t\t.'<th><label for=\"user_nicename\">'.__('User nicename/slug', 'seun').'</label></th>'.\"\\n\"\n\t\t\t\t\t\t.'<td>'\n\t\t\t\t\t\t\t.'<input id=\"user_nicename\" name=\"user_nicename\" class=\"regular-text code\" type=\"text\" value=\"'.sanitize_title($userdata->user_nicename, $default_user_nicename).'\"/> '\n\t\t\t\t\t\t\t.'<span class=\"description\">('.sprintf(__('Leave empty for default value: %s', 'seun'), $default_user_nicename).')</span> '\n\t\t\t\t\t\t\t.'<a href=\"'.get_author_posts_url($user_id).'\">'.__('Your Profile').'</a> '\n\t\t\t\t\t\t.\"</td>\\n\"\n\t\t\t\t\t.'</tr>'.\"\\n\"\n\t\t\t\t.'</table>'.\"\\n\";\n\n\t\t}", "function users_beforeForm($data,$db){\n\tif(empty($data->user['id'])){\n\t\tcommon_loadPhrases($data,$db,'users');\n\t\t$data->output['responseMessage']=\n\t\t\tsprintf($data->phrases['users']['requiresLogin'],$data->phrases['users']['updateProfile']);\n\t\treturn FALSE;\n\t}\n\t$data->output['editingField']=TRUE;\n}", "public function action_details()\n {\n \t\n\t\t$user_model = \\Pump\\Model\\Model_User::find($this->current_user->id);\n\n $form = \\Fieldset::forge('test', array(\n 'form_attributes' => array('class' => $this->form_type)\n ))->add_model('Pump\\Model\\Model_User', $user_model)->repopulate();\n \t\n \t//Set the password field to blank!\n \t$form->populate(array('password' => ''));\n\n \t//Add the conf password form item with validation\n \t$form->add('conf_password', \\Lang::get('field.conf_password'), \n \t\t\t\tarray('type' => 'password', 'class' => 'span6'))\n \t\t\t\t->add_rule('match_field', 'password');\n \t$form->add('old_password', \\Lang::get('field.old_password'),\n \t\t\t\tarray('type' => 'password', 'class' => 'span6'));\n\n \t//Get the validation instance\n\t\t$val = $form->validation();\n\n\n \tif (\\Input::method() == 'POST')\n \t{\n\t\t\t// Deal with messages\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif ($val->run())\n\t\t\t\t{\n\t\t\t\t\t//Validation was OK, so grab the values we want\n\t\t\t\t\t$user_data['email'] = $val->validated('email');\n\t\t\t\t\t\n\t\t\t\t\t//Is the password being changed\n\t\t\t\t\tif($val->validated('password'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$user_data['old_password'] = $val->validated('old_password');\n\t\t\t\t\t\t$user_data['password'] = $val->validated('password');\n\t\t\t\t\t}\n\n\t\t\t\t\tif(\\Auth::instance()->update_user($user_data))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Success\n\t\t\t\t\t\t\\Pump\\Core\\Messages::set(\\Lang::get('action.edit.success'), 'S');\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// It didnt update correctly (we notify here as there is password fields - so it might get confusing)\n\t\t\t\t\t\t\\Pump\\Core\\Messages::set(\\Lang::get('message.nothing_to_update'), 'I');\t\n\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$message = '';\n\t\t\t\t\n\t\t\t\t\t$errors = $val->error();\n\t\t\t\t\t//Loop validation errors to send back as info.\n\t\t\t\t\tforeach($errors as $error)\n\t\t\t\t\t{\n\t\t\t\t\t\t$message .= $error->get_message(false, '<p>', '</p>');\n\t\t\t\t\t}\n\t\t\t\t\t\\Pump\\Core\\Messages::set($message, 'E');\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (\\Orm\\ValidationFailed $e)\n\t\t\t{\n\t\t\t\t\\Pump\\Core\\Messages::set(\\Lang::get('action.edit.failure'), 'E');\n\t\t\t}\n\t\t\tcatch (\\Auth\\SimpleUserUpdateException $e)\n\t\t\t{\n\t\t\t\t\\Pump\\Core\\Messages::set(\\Lang::get('action.edit.failure'), 'E');\t\n\t\t\t}\n\t\t\tcatch (\\Auth\\SimpleUserWrongPassword $e)\n\t\t\t{\n\t\t\t\t\\Pump\\Core\\Messages::set(\\Lang::get('message.old_password_incorrect'), 'E');\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t$this->view = 'account/form';\n\t\t$this->page_title = \\Lang::get('form.title');\n\t\t$this->data['form'] = $form;\n }", "function display_user_profile_fields() {\r\n global $wpdb, $user_id, $wpi_settings;\r\n $profileuser = get_user_to_edit($user_id);\r\n\r\n include($wpi_settings['admin']['ui_path'] . '/profile_page_content.php');\r\n }", "public function displayForm() {\n if (isset($_SESSION['user']) && ($_SESSION['level'] == \"admin\")){\n $this->page .= \"<h2>J'ajoute un utilisateur via un formulaire :</h2>\";\n $this->page .= \"<a class='btn btn-primary col-12 mt-3' href='index.php?controller=user&action=start'>Retour en arrière</a>\";\n $this->page .= file_get_contents('template/formUser.html');\n $this->page = str_replace('{action}','addDB', $this->page);\n $this->page = str_replace('{id}','', $this->page);\n $this->page = str_replace('{username}','', $this->page);\n $this->page = str_replace('{password}','', $this->page);\n $this->page = str_replace('{firstname}','', $this->page);\n $this->page = str_replace('{lastname}','', $this->page);\n $this->displayPage();\n } else {\n header ('location:index.php?controller=login&action=formLog');\n }\n }", "public function edit() {\n $token = $this->require_authentication();\n $user = $token->getUser();\n require \"app/views/user/user_edit.phtml\";\n }", "public function actionEdit()\r\n {\r\n $userId = User::checkLogged();\r\n\r\n $user = User::getUserById($userId);\r\n\r\n // new user info valiables\r\n $name = $user['name'];\r\n $password = $user['password'];\r\n\r\n $result = false;\r\n\r\n // form processing\r\n if (isset($_POST['submit'])) {\r\n $name = $_POST['name'];\r\n $password = $_POST['password'];\r\n\r\n $errors = false;\r\n\r\n // validate fields\r\n if (!User::checkName($name))\r\n $errors[] = 'Имя должно быть длиннее 3-х символов';\r\n\r\n if (!User::checkPassword($password))\r\n $errors[] = 'Пароль должен быть длиннее 5-ти символов';\r\n\r\n // save new data \r\n if ($errors == false)\r\n\r\n $result = User::edit($userId, $name, $password);\r\n }\r\n\r\n // attach specified view\r\n require_once(ROOT . '/app/views/cabinet/edit.php');\r\n return true;\r\n }", "public function actionPersonal() {\n if (Yii::app()->user->isGuest)\n throw new CHttpException(403, Yii::t(\"UserAdminModule.front\", \"You are not authorized to perform this action.\"));\n\n $user = User::model()->active()->findByPk((int) Yii::app()->user->id);\n\n if (!$user)\n throw new CHttpException(403, Yii::t(\"UserAdminModule.front\", \"You are not authorized to perform this action.\"));\n\n\n //=========== Here you can implement some logic (like changing password) ===========\n //----------------------------------------------------------------------------------\n\n if (isset($_POST['User'])) {\n $user->attributes = $_POST['User'];\n\n // Additional check. Only superadmin can create superadmins\n if (User::isSuperAdmin()) {\n // Superadmin can't decrease his own access level\n if (Yii::app()->user->id == $id)\n $user->is_superadmin = 1;\n else\n $user->is_superadmin = $_POST['User']['is_superadmin'];\n }\n else {\n $user->is_superadmin = 0;\n }\n\n if ($user->save()) {\n Yii::app()->user->setFlash('profileSaved', Yii::t('ui', 'Profile updated!!'));\n $this->refresh();\n }\n }\n $this->render('personal', compact('user'));\n }", "function a_edit() {\n\t\tif (isset($_POST[\"btSubmit\"])) {\n\t\t\t$_POST['use_passw']=password_hash($_POST['use_passw'], PASSWORD_DEFAULT);\n\t\t\t$u=new User();\n\t\t\t$u->chargerDepuisTableau($_POST);\n\t\t\t$u->sauver();\n\t\t\theader(\"location:index.php?m=documents\");\n\t\t} else {\t\t\t\t\n\t\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t\t$u=new User($id);\n\t\t\textract($u->data);\t\n\t\t\trequire $this->gabarit;\n\t\t}\n\t}", "function display_user_edit_form($user, $id=false) {\r\n if (!($id === false)) {\r\n try {\r\n $userObject = new User($user->dbConn, $id);\r\n } catch (Exception $e) {\r\n $id = false;\r\n }\r\n if (intval($userObject->facility['id']) != $user->facility['id']) {\r\n echo \"You may only modify users under your own facility.\";\r\n return;\r\n }\r\n } \r\n echo \"<form action='user.php\".(($id === false) ? \"\" : \"?id=\".intval($id)).\"' method='POST' class='form-horizontal'>\\n\".(($id === false) ? \"\" : \"<input type='hidden' name='user[id]' value='\".intval($id).\"' />\").\"\r\n <fieldset>\r\n <div class='control-group'>\r\n <label class='control-label' for='user[name]'>Name</label>\r\n <div class='controls'>\r\n <input name='user[name]' type='text' class='input-xlarge' id='user[name]'\".(($id === false) ? \"\" : \" value='\".escape_output($userObject->name).\"'\").\">\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='user[password]'>Password</label>\r\n <div class='controls'>\r\n <input name='user[password]' type='password' class='input-xlarge' id='user[password]' />\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='user[password_confirmation]'>Confirm Password</label>\r\n <div class='controls'>\r\n <input name='user[password_confirmation]' type='password' class='input-xlarge' id='user[password_confirmation]' />\r\n </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='user[name]'>Email</label>\r\n <div class='controls'>\r\n <input name='user[email]' type='email' class='input-xlarge' id='user[email]'\".(($id === false) ? \"\" : \" value='\".escape_output($userObject->email).\"'\").\">\r\n </div>\r\n </div>\\n\";\r\n if ($user->isAdmin()) {\r\n echo \" <div class='control-group'>\r\n <label class='control-label' for='user[facility_id]'>Facility</label>\r\n <div class='controls'>\\n\";\r\n display_facility_dropdown($user->dbConn, \"user[facility_id]\", ($id === false) ? 0 : $userObject->facility['id']);\r\n echo \" </div>\r\n </div>\r\n <div class='control-group'>\r\n <label class='control-label' for='user[usermask][]'>Role(s)</label>\r\n <div class='controls'>\\n\";\r\n display_user_roles_select(\"user[usermask][]\", ($id === false) ? 0 : intval($userObject->usermask));\r\n echo \" </div>\r\n </div>\\n\";\r\n }\r\n echo \" <div class='form-actions'>\r\n <button type='submit' class='btn btn-primary'>\".(($id === false) ? \"Add User\" : \"Save changes\").\"</button>\r\n <a href='#' onClick='window.location.replace(document.referrer);' class='btn'>\".(($id === false) ? \"Go back\" : \"Discard changes\").\"</a>\r\n </div>\r\n </fieldset>\\n</form>\\n\";\r\n}", "function editusername()\n {\n // Auth::handleLogin() makes sure that only logged in users can use this action/method and see that page\n Auth::handleLogin();\n $this->view->render('login/editusername');\n }", "public function editPassword()\n {\n $this->load_view('Profil Akun', 'user/gantiPassword');\n }", "protected function edit() {\n\t\t// Make sure a user exists.\n\t\tif (empty($this->user)) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'The selected user was invalid.',\n\t\t\t\t'link' => 'management/users'\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\n\t\t// Prepare data for contents.\n\t\tnonce_generate();\n\t\t$data = array(\n\t\t\t'user' =>& $this->user\n\t\t);\n\t\t$this->title = 'Edit User: ' . $this->user['username'];\n\t\t$this->content = $this->View->getHtml('content-users-edit', $data, $this->title);\n\t}", "function user_edit($user_info)\n {\n }", "public static function edit_account() {\n\t\t$user_id = get_current_user_id();\n\t\t$form_id = ur_get_form_id_by_userid( $user_id );\n\t\t$enable_strong_password = ur_get_single_post_meta( $form_id, 'user_registration_form_setting_enable_strong_password' );\n\t\t$minimum_password_strength = ur_get_single_post_meta( $form_id, 'user_registration_form_setting_minimum_password_strength' );\n\n\t\tif ( 'yes' === $enable_strong_password || '1' === $enable_strong_password ) {\n\t\t\twp_enqueue_script( 'ur-password-strength-meter' );\n\t\t}\n\n\t\tur_get_template(\n\t\t\t'myaccount/form-edit-password.php',\n\t\t\tarray(\n\t\t\t\t'user' => get_user_by( 'id', get_current_user_id() ),\n\t\t\t\t'enable_strong_password' => $enable_strong_password,\n\t\t\t\t'minimum_password_strength' => $minimum_password_strength,\n\t\t\t)\n\t\t);\n\t}", "public function editinformation() \n {\n UserModel::authentication();\n \n //get the session user\n $user = UserModel::user();\n\n UserModel::update_profile();\n }", "public function userinfo()\n {\n if($user = $this->Session->read('user')){\n if(!empty($this->request->data)){\n //update thong tin\n }\n $this->set('user', $user);\n }else{\n $this->redirect(array('action' => 'login', ''));\n }\n }", "public function edituser(){\n\t\t$id = $this->uri->segment(3);\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/edit_londontec_users';\n\t\t$mainData = array(\n\t\t\t'pagetitle' => 'Edit Londontec users',\n\t\t\t'londontec_users' => $this->setting_model->Get_Single('londontec_users','user_id',$id)\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "static function password_forgot() {\n parent::password_forgot();\n view_var('user', globals('user'));\n }", "public function actionIndex()\n\t{\n\t\t$form=new User();\n\t\t$form->scenario = 'modify';\n\t\tif(!empty($_POST['user']))\n\t\t{\n\t\t\t$attributes = $_POST['user'];\n\t\t\t$form->attributes = $attributes;\n\t\t\t$form->validate();\n\n\t\t\t$uid = Yii::app()->user->id;\n\t\t\t$user = User::model()->findByPk($uid);\n\t\t\tif(md5($attributes['oldpassword']) != $user->password)\n\t\t\t{\n\t\t\t\t$form->addError('oldpassword', '旧密码错误');\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$user->password = $attributes['password'];\n\t\t\t\t$user->save();\n\t\t\t\t$this->refresh();\n\t\t\t\t//弹出提示框\n\t\t\t}\t\t\t\n\t\t}\n\t\t$data = array(\n\t\t\t'form' => $form,\n\t\t);\n\t\t$this->render('index',$data);\n\t}", "public function index(){\n\t\t\tif ($this->user->isUserLogged())\n\t\t\t\treturn $this->redirect('/account');\n\t\t\t\n\t\t\tif ($this->isPost) {\n\t\t\t\t$data = $this->getRequestData();\n\t\t\t\t\n\t\t\t\t$user_data = $this->user->getByField('username', $data['user']['username']);\n\t\t\t\t\n\t\t\t\tif (empty($user_data)) {\n\t\t\t\t\tNotifications::set('empty_user_data', 'User not found', Notifications::MESSAGE_ERROR);\n\t\t\t\t\treturn $this->reload();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->user->pushData($user_data);\n\t\t\t\t\n\t\t\t\tif (!$this->user->checkPassword($data['user']['password'])) {\n\t\t\t\t\tNotifications::set('wrong_user_password', 'Wrong user password', Notifications::MESSAGE_ERROR);\n\t\t\t\t\treturn $this->reload();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->user->storeSessionLoginData();\n\t\t\t\t\n\t\t\t\treturn $this->redirect('/account');\n\t\t\t}\n\t\t\t\n\t\t\t$formFields = FormUser::build(['username', 'password']);\n\t\t\t$this->assign('form_fields', $formFields);\n\t\t}", "public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }", "function addProfileFields($user) {\n\t\tif($this->checkPermissions()) {\n\t\t\techo '<h3>LePress Teacher</h3>';\n\t\t\techo '<table class=\"form-table\">';\n\t\t\techo '<tr>';\n\t\t\techo\t'<th><label for=\"lepress-organization\">'.__('Organization', lepress_textdomain).'</label></th>';\n\t\t\techo '<td><input type=\"text\" name=\"lepress-organization\" id=\"lepress-organization\" value=\"'.esc_attr( get_the_author_meta( 'lepress-organization', $user->ID)).'\" class=\"regular-text\"/><br />';\n\t\t\techo '<span class=\"description\">'.__('Your organization - university, college, high school, primary school etc..', lepress_textdomain).'</span></td>';\n\t\t\techo '</tr></table>';\n\t\t}\n\t}", "public function editPassword()\n\t{\n\t\t$data['active'] = 9;\n\t\t$this->load->view('skin/front_end/header_company_page_topbar');\n\t\t$this->load->view('skin/front_end/navbar_company_page', $data);\n\t\t$this->load->view('content_front_end/company_password_page');\n\t\t$this->load->view('skin/front_end/footer_company_page');\n\t}", "public function indexAction(){\n\t\t$this->view->display('usermanagement/profile/profile_form.tpl');\t\t\n\t}", "function profileForm(){\r\n\t\t$this->view('profileForm');\r\n\t}", "public function actionSettings()\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\n\t\t$record = SiteUser::model()->findByAttributes(array('id'=> Yii::app()->user->id));\n\t\t\n\t\tif($record===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('app', 'Internal server error.'));\n\n\t\t\n\t\tif(isset($_POST['SiteUser']))\n\t\t{\n\t\t\t$record->attributes=$_POST['SiteUser'];\n\t\t\n\t\t\t\n\n\t\t\tModeratorLogHelper::AddToLog('edited-user-'.$record->id,'Изменены данные пользователя '.$record->email,null,$record->id);\n\t\t\tif($record->save())\n\t\t\t\t$this->redirect(array('personal'));\n\t\t}\n\t\t\n\t\t$this->render('settings',array('user'=>$record));\n\t}", "function user_login_admin()\n{\n\t$Feul = new Feul;\n\tif(isset($Feul->first) && !isset($_GET['settings']))\n\t{\n\t\techo '<div class=\"error\"><a href=\"load.php?id=user_login&settings\">Кликните здесь</a>, чтобы выбрать метод хранения и другие параметры.</div>';\n\t}\n?>\t\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"../plugins/user-login/css/admin_style.css\" />\n\t<div style=\"width:100%;margin:0 -15px -15px -10px;padding:0px;\">\n\t\t<h3 class=\"floated\">Плагин регистрации пользователей</h3>\n\t\t<div class=\"edit-nav clearfix\">\n\t\t\t<p>\n\t\t\t\t<a href=\"load.php?id=user_login&help\">Помощь</a>\n\t\t\t\t<a href=\"load.php?id=user_login&settings\">Настройки</a>\n\t\t\t\t<a href=\"load.php?id=user_login&email=yes\">Письма</a>\n\t\t\t\t<a href=\"load.php?id=user_login&manage=yes\">Управление</a>\n\t\t\t</p>\n\t\t</div>\n\t</div>\n\t</div>\n\t<div class=\"main\" style=\"margin-top:-10px;\">\n\t<?php\n\tif(isset($_GET['email']))\n\t{\n\t\tif(isset($_POST['send-email']))\n\t\t{\t\n\t\t\tif(isset($_POST['send_all']))\n\t\t\t{\n\t\t\t\tif($Feul->Storage == 'XML')\n\t\t\t\t{\n\t\t\t\t\t$dir = SITEUSERSPATH.\"*.xml\";\n\t\t\t\t\t// Make Edit Form For Each User XML File Found\n\t\t\t\t\tforeach (glob($dir) as $file) \n\t\t\t\t\t{\n\t\t\t\t\t\t$xml = simplexml_load_file($file) or die(\"Unable to load XML file!\");\n\t\t\t\t\t\t$Feul->processEmailUser($xml->EmailAddress, $xml->Username, $_POST['email'], $_POST['subject'], $_POST['post-email-message']);\n\t\t\t\t\t}\n\t\t\t\t\techo '<div class=\"updated\">Письма успешно отправлены</div>';\n\t\t\t\t}\n\n\t\t\t\telseif($Feul->Storage == 'DB')\n\t\t\t\t{\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"SELECT * FROM \".$this->DB_Table_Name;\n\t\t\t\t\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$Feul->processEmailUser($row['EmailAddress'], $row['Username'], $_POST['email'], $_POST['subject'], $_POST['post-email-message']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '<div class=\"updated\">Письма успешно отправлены</div>';\n\t\t\t\t\t}\n\t\t\t\t\tcatch(PDOException $e)\n\t\t\t\t\t{\n\t\t\t\t\t\techo '<div class=\"error\">Ошибка: '.$e->getMessage().'</div>';\n\t\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$emails = $Feul->processEmailUser($_POST['email_to'], null, $_POST['email'], $_POST['subject'], $_POST['post-email-message']);\n\t\t\t\tif($emails != false)\n\t\t\t\t{\n\t\t\t\t\techo '<div class=\"updated\">Письма успешно отправлены</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tglobal $text_area_name;\n\t$text_area_name = 'post-email-message';\n\t?>\n\t\t<h3>Настройки писем для пользователей</h3>\n\t\t<form method=\"post\" action=\"load.php?id=user_login&email=yes&send-email=yes\">\n\t\t <div style=\"padding:10px;margin-bottom:15px;background-color:#f6f6f6;\">\n\t\t\t<p>\n\t\t\t\t<label for=\"from-email\">Адрес электронной почты в поле \"От\"</label>\n\t\t\t\t<input type=\"text\" name=\"email\" class=\"text\" value=\"<?php echo $Feul->getData('email'); ?>\" />\n\t\t\t</p>\n\t\t\t</div>\n\t\t\t<div style=\"padding:10px;margin-bottom:15px;background-color:#f6f6f6;\">\n\t\t\t<p>\n\t\t\t\t<label>Выбрать, чтобы отправить письма всем пользователям</label>\n\t\t\t\t<input type=\"checkbox\" name=\"send_all\" />\n\t\t\t</p>\n\t\t\t<p style=\"margin-top:-10px; margin-bottom:10px;\">\n\t\t\t\t<label>ИЛИ:</label>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label for=\"subject\">Введите адреса электронной почты получателей здесь. Разделять запятой.</label>\n\t\t\t\t<input style=\"width:100%!important;\" type=\"text\" name=\"email_to\" class=\"text\" value=\"\" />\n\t\t\t</p>\n\t\t\t</div>\n\t\t\t<div style=\"padding:10px;margin-bottom:15px;background-color:#f6f6f6;\">\n\t\t\t<p>\n\t\t\t\t<label for=\"subject\">Тема электронного письма</label>\n\t\t\t\t<input style=\"width:50%!important;\" type=\"text\" name=\"subject\" class=\"text\" value=\"\" />\n\t\t\t</p>\n\t\t\t<label for=\"email-message\">Содержание письма:</label>\n\t\t\t<textarea name=\"post-email-message\"></textarea>\n\t\t\t<?php include(USERLOGINPATH . 'ckeditor.php'); ?>\n\t\t\t<br><br><input type=\"submit\" class=\"submit\" name=\"send-email\" value=\"Отправить\" />\n\t\t\t</div>\n\t\t</form>\n\t<?php\n\t}\n\telseif(isset($_GET['settings']))\n\t{\n\t\tif(isset($_POST['storage']))\n\t\t{\n\t\t\t$submit_settings = $Feul->processSettings();\n\t\t\tif($submit_settings == true)\n\t\t\t{\n\t\t\t\techo '<div class=\"updated\">Настройки плагина успешно сохранены!</div>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<div class=\"error\">Настройки не могут быть сохранены!</div>';\n\t\t\t}\n\t\t}\n\t\telseif(isset($_GET['create_db']))\n\t\t{\t\n\t\t\t$create_db = $Feul->createDB();\n\t\t\tif($create_db != false)\n\t\t\t{\n\t\t\t\techo '<div class=\"updated\">Создать базу данных</div>';\n\t\t\t}\n\t\t}\n\t\telseif(isset($_GET['create_tb']))\n\t\t{\n\t\t\t$check_table = $Feul->checkTable();\n\t\t\tif($check_table == '1')\n\t\t\t{\n\t\t\t\techo '<div class=\"error\">Таблица базы данных уже существует.</div>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$create_table = $Feul->createDBTable();\n\t\t\t\t$check_table_again = $Feul->checkTable();\n\t\t\t\tif($check_table_again == '1')\n\t\t\t\t{\n\t\t\t\t\techo '<div class=\"updated\">Таблица базы данных создана.</div>';\n\t\t\t\t}\n\t\t\t\telseif($check_table_again != 1)\n\t\t\t\t{\n\t\t\t\t\techo '<div class=\"error\">Таблица базы данных не может быть создана.</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t?>\t\t\t\n\t\t\t<form method=\"post\">\n\t\t\t<h2>Параметры хранения</h2>\n\t\t\t<p>\n\t\t\t\t<label>Выберите метод хранения</label>\n\t\t\t\t<input type=\"radio\" name=\"storage\" value=\"XML\" <?php if($Feul->Storage == 'XML') { echo ' CHECKED'; } ?> /> Файлы XML\n\t\t\t\t<br/>\n\t\t\t\t<input type=\"radio\" name=\"storage\" value=\"DB\" <?php if($Feul->Storage == 'DB') { echo ' CHECKED'; } ?> /> Базы данных\n\t\t\t</p>\n\t\t\t\n\t\t\t<h4>Настройки базы данных</h4>\n\t\t\t<p>\n\t\t\t\t<label>Хост</label>\n\t\t\t\t<input type=\"text\" class=\"text full\" name=\"db_host\" value=\"<?php if($Feul->DB_Host == '') { } else { echo $Feul->DB_Host; } ?>\" />\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label>Имя пользователя</label>\n\t\t\t\t<input type=\"text\" class=\"text full\" name=\"db_user\" value=\"<?php if($Feul->DB_User == '') { } else { echo $Feul->DB_User; } ?>\" />\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label>Пароль</label>\n\t\t\t\t<input type=\"text\" class=\"text full\" name=\"db_pass\" value=\"<?php if($Feul->DB_Pass == '') { } else { echo $Feul->DB_Pass; } ?>\" />\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label>Имя базы данных</label>\n\t\t\t\tВы можете выбрать любое имя базы данных. <strong>Если авто-создание не удается,</strong> вам придется добавить префикс db_name к имени пользователя mysql <br>(например: username_dbname)\n\t\t\t\t<input type=\"text\" class=\"text full\" name=\"db_name\" value=\"<?php if($Feul->DB_Name == '') { echo ''; } else { echo $Feul->DB_Name; } ?>\" />\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label>Имя таблицы базы данных</label>\n\t\t\t\tМы настоятельно рекомендуем оставить это 'users'<br/>\n\t\t\t\t<input type=\"text\" class=\"text full\" name=\"db_table_name\" value=\"<?php if($Feul->DB_Table_Name == '') { echo 'users'; } else { echo $Feul->DB_Table_Name; } ?>\" />\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label>Ошибки PDO (Сообщения об ошибках базы данных)</label>\n\t\t\t\t<input type=\"radio\" name=\"errors\" value=\"On\" <?php if($Feul->Errors == 'On') { echo ' CHECKED'; } ?> /> Включить\n\t\t\t\t<br/>\n\t\t\t\t<input type=\"radio\" name=\"errors\" value=\"Off\" <?php if($Feul->Errors == 'Off') { echo ' CHECKED'; } ?> /> Отключить\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input type=\"submit\" name=\"Feul_settings_form\" class=\"submit\" value=\"Сохранить\" />\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<a href=\"load.php?id=user_login&settings&create_db\">Попытаться создать базу данных</a><br/>\n\t\t\t\t<a href=\"load.php?id=user_login&settings&create_tb\">Попытаться создать таблицу базы данных</a>\n\t\t\t</p>\n\t\t\t</div>\n\t\t\t<div class=\"main\" style=\"margin-top:-10px;\">\n\t\t\t\t<h2>Настройки электронной почты</h2>\n\t\t\t\t<p>\n\t\t\t\t\t<label>Редактировать адрес электронной почты \"От\"</label>Этот адрес указывается в поле \"От\" в письме, высылаемом пользователю после регистрации:<br/>\n\t\t\t\t\t<input type=\"text\" name=\"post-from-email\" class=\"text full\" value=\"<?php echo $Feul->getData('email'); ?>\" />\n\t\t\t\t</p>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t<div class=\"main\" style=\"margin-top:-10px;\">\n\t\t\t<h2>CSS и предупреждение для незарегистрированных пользователей</h2>\n\t\t\t\t<p>\n\t\t\t\t\t<label>Редактировать CSS формы входа</label>\n\t\t\t\t\t<textarea name=\"post-login-container\" class=\"full\" style=\"height:300px;\">\n\t\t\t\t\t\t<?php echo $Feul->LoginCss; ?>\n\t\t\t\t\t</textarea>\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\t<label>Редактировать CSS сообщения после входа</label>\n\t\t\t\t\t<textarea name=\"post-welcome-box\" class=\"full\" style=\"height:300px;\">\n\t\t\t\t\t\t<?php echo $Feul->WelcomeCss; ?>\n\t\t\t\t\t</textarea>\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\t<label>Редактировать CSS формы регистрации</label>\n\t\t\t\t\t<textarea name=\"post-register-box\" class=\"full\" style=\"height:300px;\">\n\t\t\t\t\t\t<?php echo $Feul->RegisterCss; ?>\n\t\t\t\t\t</textarea>\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\t<label>Редактировать предупреждение</label>\n\t\t\t\t\t<textarea name=\"post-protected-message\">\n\t\t\t\t\t\t<?php global $text_area_name; $text_area_name = 'post-protected-message'; echo $Feul->ProtectedMessage; ?>\n\t\t\t\t\t</textarea>\n\t\t\t\t\t</p>\n\t\t\t\t<?php include(USERLOGINPATH . 'ckeditor.php'); ?>\n\t\t\t\t<p>\n\t\t\t\t\t<input type=\"submit\" name=\"Feul_settings_form\" class=\"submit\" value=\"Сохранить\" />\n\t\t\t\t</p>\n\t\t\t</form>\n\t\t\t<br/>\n\t\t\t<?php\n\t}\n\telseif(isset($_GET['edit_user']))\n\t{\n\t\tif(isset($_POST['Feul_edit_user']))\n\t\t{\n\t\t\tif($_POST['old_name'] != $_POST['usernamec'])\n\t\t\t{\n\t\t\t\t$change_name = $_POST['usernamec'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$change_name = null;\n\t\t\t}\n\n\t\t\t$posted_password = $_POST['nano'];\t\n\t\t\tif(isset($_POST['userpassword']))\n\t\t\t{\n\t\t\t\t$change_pass = $_POST['userpassword'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$change_pass = null;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($Feul->Storage == 'XML')\n\t\t\t{\n\t\t\t\t$Feul->processEditUser($_POST['old_name'], $posted_password, $_POST['useremail'], $change_pass, $change_name);\n\t\t\t}\n\t\t\telseif($Feul->Storage == 'DB')\n\t\t\t{\n\t\t\t\t$Feul->processEditDBUser($_POST['userID'], $_POST['usernamec'], $posted_password, $_POST['useremail']);\n\t\t\t}\n\t\t\tif($change_name != null)\n\t\t\t{\n\t\t\t\tprint '<meta http-equiv=\"refresh\" content=\"0;url=load.php?id=user_login&edit_user='.$change_name.'\">';\n\t\t\t}\n\t\t}\n\t\teditUser($_GET['edit_user']);\n\t}\n\telseif(isset($_GET['help']))\n\t{\n\t\tif(isset($_GET['convert']))\n\t\t{\n\t\t\t$convert = $Feul->convertXmlToDB();\n\t\t\techo '<div class=\"updated\">Пользователи успешно конвертированы</div>';\n\t\t}\n\t?>\n\t\t<h2>Информация о плагние:</h2>\n\n\t\t<h4>Функции</h4>\n\n\t\t<p>\n\t\t\t<label>Показать форму входа:</label>\n\t\t\t<?php highlight_string('<?php echo show_login_box(); ?>'); ?>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label>Показать приветствие:</label>\n\t\t\tЕсли пользователь вошел, по умолчанию отображается \"Добро пожаловать =Имя пользователя=\" и ссылка для выхода из системы.<br/>\n\t\t\t<?php highlight_string('<?php echo welcome_message_login(); ?>'); ?>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label>Показать форму регистрации:</label>\n\t\t\t<?php highlight_string('<?php user_login_register(); ?>'); ?>\n\t\t</p>\n\n\t\t<h4>Отображение контента только авторизованным пользователям</h4>\n\t\t<ol>\n\t\t\t<li>Вы можете блокировать доступ к определенной странице, выбрав \"Только для зарегистрированных\" в \"Свойствах\" этой страницы.<br/>\n\t\t\t\tЕсли страница \"Только для зарегистрированных\", пока пользователь не войдет в систему он будет видеть \"Предупреждение\", которое можно отредактировать <a href=\"load.php?id=user_login&settings\">здесь</a>\n\t\t\t</li><br/>\n\t\t\t<li>\n\t\t\t\tЕсли вы хотели бы разместить содержание приветствия или какой-либо код в шаблоне вам придется использовать немного PHP. <br/> Ниже приведен пример для показа \"Hello World\" только авторизированным пользователям.<br/>\n<pre>\n<?php highlight_string('<?php if(!empty($_SESSION[\\'LoggedIn\\']))\t{ ?>'); ?>\n\tHelo World\n<?php highlight_string('<?php } ?>'); ?>\n</pre>\n\t\t\t</li>\n\t\t</ol>\n\n\t\t<h4>Помощь и поддержка</h4>\n\t\t<p>\n\t\t\tЕсли вы обнаружили какие-либо баги/ошибки или нужна любая помощь, пожалуйста, посетите форум поддержки <a href=\"http://get-simple.info/forum/topic/2342/front-end-user-login-plugin-xml-ver-25/\">здесь</a>\n\t\t</p>\n\t\t</div>\n\n\t\t<div class=\"main\" style=\"margin-top:-10px;\">\n\t\t<h2>Преобразование файлов XML в базу данных</h2>\n\t\t<p>\n\t\t\tПосле клика на ссылке ниже файлы XML всех пользователей будут конвертированы в базу данных.<br/>\n\t\t\t<strong>Вы должны ввести все данные о базе данных на странице настроек, и база данных и таблицы должны быть созданы до преобразования.</strong><br/>\n\t\t\t<a href=\"load.php?id=user_login&help&convert\">Конвертировать XML в базу данных</a>\n\t\t</p>\n\t<?php\n\t}\n\telse\n\t{\n\t\tif(isset($_GET['manage']))\n\t\t{\n\t\t\tif(isset($_GET['adduser']))\n\t\t\t{\t\t\n\t\t\t\t$Add_User = $Feul->processAddUserAdmin($_POST['usernamec'],$_POST['userpassword'],$_POST['useremail']);\n\t\t\t\tif($Add_User == false) \n\t\t\t\t{\n\t\t\t\t\techo '<div class=\"error\">Имя пользователя уже создано.</div>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo '<div class=\"updated\">Пользователь успешно добавлен.</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (isset($_GET['deleteuser'])) \n\t\t\t{\n\t\t\t\tif($Feul->Storage == 'XML')\n\t\t\t\t{\n\t\t\t\t\t$deleteUser = $Feul->deleteUser($_GET['deletename']);\n\t\t\t\t}\t\t\t\n\t\t\t\telseif($Feul->Storage == 'DB')\n\t\t\t\t{\n\t\t\t\t\t$deleteUser = $Feul->deleteUser($_GET['deleteuser']);\n\t\t\t\t}\n\t\t\t\tif($deleteUser == true)\n\t\t\t\t{\n\t\t\t\t\techo '<div class=\"updated\" style=\"display: block;\">'.$_GET['deletename'].' успешно удален</div>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo '<div class=\"updated\" style=\"display: block;\"><span style=\"color:red;font-weight:bold;\">ОШИБКА!!</span> - Невозможно удалить пользователя.</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmanageUsers();\n\t}\n}", "function view_perm_users()\n\t{\n\t\t//-----------------------------------------\n\t\t// Check for a valid ID\n\t\t//-----------------------------------------\n\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$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $perms = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Нельзя произвести изменения в масках доступа этому ID, пожалуйста, попытайтесь еще раз\");\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get all members using that ID then!\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Сведения о пользователе\" , \"50%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Действие\" , \"50%\" );\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= \"<script language='javascript' type='text/javascript'>\n\t\t\t\t\t\t <!--\n\t\t\t\t\t\t function pop_close_and_stop( id )\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \topener.location = \\\"{$this->ipsclass->base_url}&section=content&act=mem&code=doform&mid=\\\" + id;\n\t\t\t\t\t\t \tself.close();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t //-->\n\t\t\t\t\t\t </script>\";\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Используется пользователями: \" . $perms['perm_name'] );\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, email, posts, org_perm_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'members',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"(org_perm_id IS NOT NULL AND org_perm_id != '')\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'name' ) );\n\t\t$outer = $this->ipsclass->DB->simple_exec();\n\n\t\twhile( $r = $this->ipsclass->DB->fetch_row($outer) )\n\t\t{\n\t\t\t$exp_pid = explode( \",\", $r['org_perm_id'] );\n\n\t\t\tforeach( explode( \",\", $r['org_perm_id'] ) as $pid )\n\t\t\t{\n\t\t\t\tif ( $pid == $this->ipsclass->input['id'] )\n\t\t\t\t{\n\t\t\t\t\tif ( count($exp_pid) > 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra = \"<li>Также используются: <em style='color:red'>\";\n\n\t\t\t\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'where' => \"perm_id IN (\".$this->ipsclass->clean_perm_string($r['org_perm_id']).\") AND perm_id <> {$this->ipsclass->input['id']}\" ) );\n\t\t\t\t\t\t$this->ipsclass->DB->simple_exec();\n\n\t\t\t\t\t\twhile ( $mr = $this->ipsclass->DB->fetch_row() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extra .= $mr['perm_name'].\",\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$extra = preg_replace( \"/,$/\", \"\", $extra );\n\n\t\t\t\t\t\t$extra .= \"</em>\";\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$extra = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<div style='font-weight:bold;font-size:11px;padding-bottom:6px;margin-bottom:3px;border-bottom:1px solid #000'>{$r['name']}</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <li>Сообщений: {$r['posts']}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <li>Email: {$r['email']}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $extra\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"&#149;&nbsp;<a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=remove_mask&amp;id={$r['id']}&amp;pid=$pid' title='Удалить эту маску доступа у пользователя (без удаления других масок доступа)'>Удалить эту маску</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <br />&#149;&nbsp;<a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=remove_mask&amp;id={$r['id']}&amp;pid=all' title='Удалить все дополнительные маски'>Удалить все дополнительные маски</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t <br /><br />&#149;&nbsp;<a href='javascript:pop_close_and_stop(\\\"{$r['id']}\\\");'>Изменить пользователя</a>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n\t\t$this->ipsclass->admin->print_popup();\n\t}", "function m_dspUserAccount()\n\t{\n\t\tif(!isset($_SESSION['userid']) || $_SESSION['userid']==\"\")\n\t\t{\n\t\t\t#URL TEMPER\n\t\t\t$this->libFunc->m_mosRedirect($this->m_safeUrl(SITE_URL.\"user/index.php?action=user.loginForm\"));\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\t#INTIALIZING TEMPLATES\n\t\t\t$this->ObTpl=new template();\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"\");\n\t\t\t$this->ObTpl->set_file(\"TPL_USER_FILE\", $this->userTemplate);\n\t\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"TPL_CURRENTINFO_BLK\",\"current_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_CURRENTINFO_BLK\",\"TPL_ORDERLISTMAIN_BLK\",\"orderlistmain_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_ORDERLISTMAIN_BLK\",\"TPL_ORDERLIST_BLK\",\"orderlist_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"TPL_EDITACCOUNT_BLK\",\"edit_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"TPL_CHANGEPASS_BLK\",\"changepass_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"countryblk\",\"countryblks\");\n\t\t\t$this->ObTpl->set_block(\"TPL_EDITACCOUNT_BLK\",\"BillCountry\",\"nBillCountry\");\n\t\t\t$this->ObTpl->set_block(\"TPL_EDITACCOUNT_BLK\",\"TPL_NEWSLETTER_BLK\",\"news_blk\");\n\t\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"stateblk\",\"stateblks\");\n\t\t\t#INTIALIZING\n\t\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\",SITE_URL);\n\n\t\t\t$this->ObTpl->set_var(\"news_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"current_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"edit_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"changepass_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"orderlistmain_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"orderlist_blk\",\"\");\n\t\t\t$this->ObTpl->set_var(\"BILL_STATE\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_STATE\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_STATENAME\",\"\");\n\n\t\t\t$this->obTpl->set_var(\"TPL_VAR_BREDCRUMBS\",\"&nbsp;&raquo;&nbsp;My Account\");\n\n\t\t\t$accountUrl=$this->libFunc->m_safeUrl(SITE_URL.\"user/index.php?action=user.home\");\n\t\t\tif(isset($this->request['msg']) && $this->request['msg']==1)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_PASSWORD_CHANGED);\n\t\t\t}\n\t\t\tif($this->err==1)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->errMsg);\n\t\t\t}\n\t\t\t\n\t\t\t#SAFE URLS\n\t\t\t$updateUrl=SITE_URL.\"user/index.php?action=user.home&mode=editDetails\";\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_UPDATEURL\",$this->libFunc->m_safeUrl($updateUrl));\n\t\t\t$changePassUrl=SITE_URL.\"user/index.php?action=user.home&mode=changePass\";\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHANGEPASSURL\",$this->libFunc->m_safeUrl($changePassUrl));\n\t\t\t$logoutUrl=SITE_URL.\"user/index.php?action=user.logout\";\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LOGOUTURL\",$this->libFunc->m_safeUrl($logoutUrl));\n\t\t\t$reportsUrl=SITE_URL.\"user/index.php?action=user.home&mode=reports\";\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_REPORTS_URL\",$this->libFunc->m_safeUrl($reportsUrl));\n\n\n\t\t\t#QUERY DATABASE\n\t\t\t$this->obDb->query = \"SELECT * FROM \".CUSTOMERS.\" where iCustmerid_PK = '\".$_SESSION['userid'].\"'\";\n\t\t\t$row_customer = $this->obDb->fetchQuery();\n\t\t\t$recordCount=$this->obDb->record_count;\n\t\t\tif($recordCount!=1)\n\t\t\t{\n\t\t\t\t$this->libFunc->m_sessionUnregister(\"userid\");\n\t\t\t\t$this->libFunc->m_sessionUnregister(\"username\");\n\t\t\t\t$retUrl=$this->libFunc->m_safeUrl(SITE_URL.\"user/index.php?action=user.home\");\n\t\t\t\t$_SESSION['referer']=$retUrl;\n\t\t\t\t$siteUrl=SITE_URL.\"user/index.php?action=user.loginForm\";\n\t\t\t\t$this->libFunc->m_mosRedirect($this->libFunc->m_safeUrl($siteUrl));\n\t\t\t\texit;\n\t\t\t}\t\t\t\t\t\n\t\t\t$this->obDb->query = \"SELECT iStateId_PK, vStateName FROM \".STATES.\" ORDER BY vStateName\";\n\t\t\t$row_state = $this->obDb->fetchQuery();\n\t\t\t$row_state_count = $this->obDb->record_count;\n\t\t\t\n\t\t\t$this->obDb->query = \"SELECT iCountryId_PK, vCountryName, vShortName FROM \".COUNTRY.\" ORDER BY iSortFlag,vCountryName\";\n\t\t\t$row_country = $this->obDb->fetchQuery();\n\t\t\t$row_country_count = $this->obDb->record_count;\n\n\t\t\t# Loading billing country list\t\t\n\t\t\tfor($i=0;$i<$row_country_count;$i++)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"k\", $row_country[$i]->iCountryId_PK);\n\t\t\t\t$this->ObTpl->parse('countryblks','countryblk',true);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_COUNTRY_VALUE\", $row_country[$i]->iCountryId_PK);\n\t\t\t\t\n\t\t\t\tif($row_customer[0]->vCountry> 0)\n\t\t\t\t{\n\t\t\t\t\tif($row_customer[0]->vCountry == $row_country[$i]->iCountryId_PK)\n\t\t\t\t\t\t$this->ObTpl->set_var(\"BILL_COUNTRY_SELECT\", \"selected=\\\"selected\\\"\");\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->ObTpl->set_var(\"BILL_COUNTRY_SELECT\", \"\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$row_customer[0]->vCountry = $row_country[$i]->iCountryId_PK;\n\t\t\t\t\tif($row_country[$i]->iCountryId_PK==251)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ObTpl->set_var(\"BILL_COUNTRY_SELECT\", \"selected=\\\"selected\\\"\");\n\t\t\t\t\t}\t\n\t\t\t\t}\t\n\t\t\t\t$this->ObTpl->set_var(\"TPL_COUNTRY_NAME\",$this->libFunc->m_displayContent($row_country[$i]->vCountryName));\n\t\t\t\t$this->ObTpl->parse(\"nBillCountry\",\"BillCountry\",true);\n\t\t\t}\n\t\t\tif(isset($row_customer[0]->vCountry) && $row_customer[0]->vCountry != '')\n\t\t\t\t$this->ObTpl->set_var('selbillcountid',$row_customer[0]->vCountry);\n\t\t\telse\n\t\t\t\t$this->ObTpl->set_var('selbillcountid',\"251\");\n\t\t\tif(isset($row_customer[0]->vState) && $row_customer[0]->vState != '')\n\t\t\t\t$this->ObTpl->set_var('selbillstateid',$row_customer[0]->vState);\n\t\t\telse\n\t\t\t\t$this->ObTpl->set_var('selbillstateid',\"0\");\n\t\t\t\n\t\t\t# Loading the state list here\n\t\t\t$this->obDb->query = \"SELECT C.iCountryId_PK as cid,S.iStateId_PK as sid,S.vStateName as statename FROM \".COUNTRY.\" C,\".STATES.\" S WHERE S.iCountryId_FK=C.iCountryId_PK ORDER BY C.vCountryName,S.vStateName\";\n\t\t\t$cRes = $this->obDb->fetchQuery();\n\t\t\t$country_count = $this->obDb->record_count;\n\n\t\t\tif($country_count == 0)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"countryblks\", \"\");\n\t\t\t\t$this->ObTpl->set_var(\"stateblks\", \"\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t$loopid=0;\n\t\t\t\tfor($i=0;$i<$country_count;$i++)\n\t\t\t\t{\n\t\t\t\t\tif($cRes[$i]->cid==$loopid)\n\t\t\t\t\t{\n\t\t\t\t\t\t$stateCnt++;\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$loopid=$cRes[$i]->cid;\n\t\t\t\t\t\t$stateCnt=0;\n\t\t\t\t\t}\n\t\t\t\t\t$this->ObTpl->set_var(\"i\", $cRes[$i]->cid);\n\t\t\t\t\t$this->ObTpl->set_var(\"j\", $stateCnt);\n\t\t\t\t\t$this->ObTpl->set_var(\"stateName\",$cRes[$i]->statename);\n\t\t\t\t\t$this->ObTpl->set_var(\"stateVal\",$cRes[$i]->sid);\n\t\t\t\t\t$this->ObTpl->parse('stateblks','stateblk',true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_FNAME\", $this->libFunc->m_displayContent($row_customer[0]->vFirstName));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LNAME\", $this->libFunc->m_displayContent($row_customer[0]->vLastName));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_EMAIL\", $this->libFunc->m_displayContent($row_customer[0]->vEmail));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PASS\", $this->libFunc->m_displayContent($row_customer[0]->vPassword));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ADDRESS1\", $this->libFunc->m_displayContent($row_customer[0]->vAddress1 ));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ADDRESS2\", $this->libFunc->m_displayContent($row_customer[0]->vAddress2 ));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CITY\", $this->libFunc->m_displayContent($row_customer[0]->vCity));\n\t\t\tif($row_customer[0]->vState>1)\n\t\t\t{\n\t\t\t\t$this->obDb->query = \"SELECT vStateName FROM \".STATES.\" where iStateId_PK = '\".$row_customer[0]->vState.\"'\";\n\t\t\t\t$row_state = $this->obDb->fetchQuery();\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_STATE\",\n\t\t\t\t$this->libFunc->m_displayContent($row_state[0]->vStateName));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_STATENAME\",\n\t\t\t\t$this->libFunc->m_displayContent($row_customer[0]->vStateName));\n\t\t\t}\n\t\t\t$this->obDb->query = \"SELECT vCountryName FROM \".COUNTRY.\" where iCountryId_PK = '\".$row_customer[0]->vCountry.\"' order by vCountryName\";\n\t\t\t\t$row_country = $this->obDb->fetchQuery();\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_COUNTRY\",\n\t\t\t\t$this->libFunc->m_displayContent($row_country[0]->vCountryName));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ZIP\",\n\t\t\t\t$this->libFunc->m_displayContent($row_customer[0]->vZip));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_COMPANY\",\n\t\t\t\t$this->libFunc->m_displayContent($row_customer[0]->vCompany));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PHONE\",\n\t\t\t\t$this->libFunc->m_displayContent($row_customer[0]->vPhone));\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_HOMEPAGE\",\n\t\t\t\t$this->libFunc->m_displayContent($row_customer[0]->vHomePage));\n\t\t\tif($row_customer[0]->iMailList==1)\n\t\t\t{\n\t\t\t\t$maillist=\"HTML\";\n\t\t\t}\n\t\t\telseif($row_customer[0]->iMailList==2)\n\t\t\t{\n\t\t\t\t$maillist=\"Plain text \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$maillist=\"None\";\n\t\t\t}\n\n\t\t\tif(MAIL_LIST==1)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_NEWSLETTER\",$maillist);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_NEWSLETTER\",$maillist.\"(opt-out)\");\n\t\t\t}\n\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SIGNUPDATE\",\n\t\t\t$this->libFunc->dateFormat1($row_customer[0]->tmSignupDate));\n\n\t\t\tif($row_customer[0]->iMailList==1)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHECK1\",\"selected=\\\"selected\\\"\");\n\t\t\t}\n\t\t\telseif($row_customer[0]->iMailList==2)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHECK2\",\"selected=\\\"selected\\\"\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHECK3\",\"selected=\\\"selected\\\"\");\n\t\t\t}\n\n\t\t\tif(!isset($this->request['mode']) || empty($this->request['mode']))\n\t\t\t{\n\t\t\t\t$this->m_displayInvoiceList();\n\t\t\t\t$this->ObTpl->parse(\"current_blk\",\"TPL_CURRENTINFO_BLK\");\n\t\t\t}\n\t\t\telseif($this->request['mode']==\"editDetails\")\n\t\t\t{\n\t\t\t\t#DISPLAY EDIT ACCOUNT FORM\n\t\t\t\t$this->obTpl->set_var(\"TPL_VAR_BREDCRUMBS\",\"&nbsp;&raquo;&nbsp;<a href=\".$accountUrl.\">My Account</a>&nbsp;&raquo;&nbsp;Update Information\");\n\t\t\t\tif(MAIL_LIST==1)\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->parse(\"news_blk\",\"TPL_NEWSLETTER_BLK\");\n\t\t\t\t}\n\t\t\t\t$this->ObTpl->parse(\"edit_blk\",\"TPL_EDITACCOUNT_BLK\");\n\t\t\t}\n\t\t\telseif($this->request['mode']==\"changePass\")\n\t\t\t{\n\t\t\t\t#DISPLAY CHANGEPASS FORM\n\t\t\t\t$this->obTpl->set_var(\"TPL_VAR_BREDCRUMBS\",\"&nbsp;&raquo;&nbsp;<a href=\".$accountUrl.\">My Account</a>&nbsp;&raquo;&nbsp;Change Password\");\n\t\t\t\t$this->ObTpl->parse(\"changepass_blk\",\"TPL_CHANGEPASS_BLK\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->m_displayInvoiceList();\n\t\t\t\t$this->ObTpl->parse(\"current_blk\",\"TPL_CURRENTINFO_BLK\");\n\t\t\t}\n\t\t\n\t\t\treturn($this->ObTpl->parse(\"return\",\"TPL_USER_FILE\"));\n\t\t}#END ELSE LOOP\n\t\n\t}", "public function profileWithPasswordAction($username){\n $this->profileEdit($username, true);\n }", "function area2()\r\n\t{\r\n\t\t$this->title = \"Edit Officer Account\";\r\n\t\t$this->border = 1;\r\n\r\n\t\t//get the user to edit\r\n\t\t$userid = util::getData(\"id\");\r\n\r\n\t\t//make sure this is a valid user\r\n\t\tif(!$this->canUpdateUser($userid))\r\n\t\t\treturn $this->PermissionError();\r\n\r\n\t\t//load the user's permissions\r\n\t\t$permissions = new dkpUserPermissions();\r\n\t\t$permissions->loadUserPermissions($userid);\r\n\r\n\t\t//load the user\r\n\t\t$account = new user();\r\n\t\t$account->loadFromDatabase($userid);\r\n\r\n\t\t//call the template\r\n\t\t$this->set(\"permissions\",$permissions);\r\n\t\t$this->set(\"tables\", $this->updater->GetTables());\r\n\t\t$this->set(\"account\", $account);\r\n\t\treturn $this->fetch(\"editofficeraccount.tmpl.php\");\r\n\t}", "function content() {\n echo \"\n <form action='' method='post'>\n <input name='token' type='hidden' value='{$this->params['editToken']}'>\n <input name='editId' type='hidden' value='{$this->params['editId']}'>\n <label for='username'>Username</label>\n <input name='username' placeholder='Username' id='username' type='text' value='{$this->params['username']}'>\n <label for='password'>Password</label>\n <input name='password' placeholder='Replace password (Optional)' id='password' type='password'>\n <label for='role'>Role</label>\n <select name='role' id='role' {$this->params['rolePower']}>\n <option value='1' {$this->params['isAdmin']}>Admin</option>\n <option value='2' {$this->params['isAgent']}>Agent</option>\n </select>\n <input type='submit' value='Edit Account'>\n </form>\n \";\n }", "public function accountAction()\n {\n \tif(!in_array($this->_user->{User::COLUMN_STATUS}, array(User::STATUS_BANNED, User::STATUS_PENDING, User::STATUS_GUEST))){\n \t\t$this->_forward('homepage');\n \t\treturn;\n \t}\n \t$this->view->registerForm = new User_Form_Register();\n \t$this->view->loginForm = new User_Form_Login();\n }", "function user()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\tJRequest::setVar( 'view', 'auteur' );\n\t\tJRequest::setVar( 'layout', 'default' );\n\t\tJRequest::setVar('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "function mystery_process_user_info_form() {\n\n\tglobal $_MYSTERY;\n\t\n\t// set elements in the data array and update the session\n\t\n\t$_SESSION['user_first_name'] = $data['user_first_name'] = $_REQUEST['user_first_name'];\n\t$_SESSION['user_last_name'] = $data['user_last_name'] = $_REQUEST['user_last_name'];\n\t$_SESSION['user_email'] = $data['user_email'] = $_REQUEST['user_email'];\n\tif ($_MYSTERY['allow_username_changes'] == 'yes') {\n\t\t$_SESSION['user_username'] = $data['user_username'] = $_REQUEST['user_username'];\n\t}\n\t\n\t// check to see if the passwords match and are set. If not, display error and the form again\n\t\n\tif ($_REQUEST['password_one'] != '') {\n\t\t\n\t\t// user want's to change password\n\t\n\t\tif ($_REQUEST['password_one'] != $_REQUEST['password_two']) {\n\t\n\t\t\tmystery_display_user_error('Your passwords do not match. Please try again.');\n\t\t\tmystery_display_user_info_form();\n\t\t\treturn;\n\t\t\n\t\t} else {\n\t\t\n\t\t\t// passwords match, add to the update data array\n\t\t\t$data['user_password'] = md5($_REQUEST['password_one']);\n\t\t\n\t\t}\n\t\n\t}\n\t\n\t// prepare the rest of the items for the update query\n\t\n\t$table = $_MYSTERY['table_prefix'] . 'users';\n\t$key = 'user_id';\n\t$key_value = $_SESSION['user_id'];\n\t\n\t// perform the update query\n\t\n\tif (mystery_update_query($table, $data, $key, $key_value)) { \n\t\n\t\tmystery_display_user_feedback('Update Successful!');\n\t\t\n\t\techo '\n\t\t<p>Your personal information was updated successfully. Any username/password change\n\t\twill take effect at your next login.</p>\n\t\t\n\t\t<p><a href=\"' , $_SERVER['SCRIPT_NAME'] , '\">Return to the Main Menu</a></p>\n\t\t';\n\t\n\t} else {\n\n\t\tmystery_display_user_error('Could not update Personal Information.');\n\t\t\n\t\tmystery_display_admin_contact_info();\n\n\t}\n\n}", "function displayAdminForm($nameValue, $emailValue, $userValue, $adminValue) {\r\n displayUserForm(\"processAdminUpdate.php\", \"updateForm\", \"Update\",\r\n \"Name\", $nameValue,\r\n \"Email\", $emailValue,\r\n \"User name\", $userValue,\r\n \"Password\", \"Confirm Password\",\r\n false, $adminValue);\r\n}", "function displayUpdateForm($nameValue, $emailValue, $userValue) {\r\n displayUserForm(\"processUpdate.php\", \"updateForm\", \"Update\",\r\n \"Name\", $nameValue,\r\n \"Email\", $emailValue,\r\n \"Username\", $userValue,\r\n \"Password\", \"Confirm Password\",\r\n false, -1);\r\n}", "public function editAction() {\n $uid = $this->getInput('uid');\n $userInfo = Admin_Service_User::getUser(intval($uid));\n list(, $groups) = Admin_Service_Group::getAllGroup();\n $this->assign('userInfo', $userInfo);\n $this->assign('groups', $groups);\n $this->assign('status', $this->status);\n $this->assign(\"meunOn\", \"sys_user\");\n }", "function changepassword() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n $this->viewData['hash'] =User::userid();\n // Render the action with template\n $this->renderWithTemplate('users/changepassword', 'AdminPageBaseTemplate');\n }", "public function displayRegisterForm()\n {\n // charger le HTML de notre template\n require OPROFILE_TEMPLATES_DIR . 'register-form.php';\n }", "public function mainDisplay(){\n\t\tif (isset($_REQUEST['action']) and $_REQUEST['action'] == 'deleteUser' and \\Settings::ALLOW_USER_DELETION){\n\t\t\t?>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-10 col-md-offset-1\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-8 col-md-offset-2 text-center\">\n\t\t\t\t\t\t\t<div class=\"alert alert-danger alert-block\">\n\t\t\t\t\t\t\t\t<h3>Attention !! Vous allez supprimer <?php echo ($this->user->getId() == $GLOBALS['cUser']->getId()) ? 'votre compte' : 'le compte '.$this->user->getName(); ?> !!</h3>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<p>Confirmez-vous cet acte irrécupérable ?</p>\n\t\t\t\t\t\t\t<div class=\"\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$form = new Form('deleteConfirmation');\n\t\t\t\t\t\t\t\t$form->addField(new Hidden('user', $this->user->getId()));\n\t\t\t\t\t\t\t\t$form->addField(new Button('action', 'confirmDeleteUser', 'Je confirme la suppression', null, 'btn-danger'));\n\t\t\t\t\t\t\t\t$form->addField(new LinkButton('cancel', $this->url, 'Annuler'));\n\t\t\t\t\t\t\t\t$form->display();\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}else{\n\t\t\t?>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-10 col-md-offset-1\">\n\t\t\t\t\t<div class=\"page-header\">\n\t\t\t\t\t\t<h1>Profil de <?php echo $this->user->getName(); ?></h1>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t\tif (strtolower(\\Settings::AUTH_MODE) == 'sql'){\n\t\t\t\t\t\t$this->accountFormItems();\n\t\t\t\t\t\t$this->passwordFormItems();\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t\t<?php $this->avatarFormItems(); ?>\n\t\t\t\t\t<?php $this->profileFormButtons(); ?>\n\t\t\t\t\t<?php $this->form->display(); ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}", "public function profile_edit() {\n $this->template->content = View::instance('v_users_profile_edit');\n $this->template->title = \"Edit Profile\";\n\n // Render the view\n echo $this->template;\n\n }", "public function editprofile() {\n // If user is not logged in redirect them to login\n if(!$this->user){\n \n die('Members Only <a href=\"/users/login\">Login</a>');\n\n }\n # Create a new View instance\n $this->template->content3=View::instance('v_users_editprofile'); \n # Page title \n $this->template->title= APP_NAME. \":: Edit Profile\";\n // add required js and css files to be used in the form\n $client_files_head=Array('/js/languages/jquery.validationEngine-en.js',\n '/js/jquery.validationEngine.js',\n '/css/validationEngine.jquery.css'\n );\n $this->template->client_files_head=Utils::load_client_files($client_files_head);\n\n\n # Pass information to the view instance\n # Render View \n echo $this->template;\n\n }", "function show_manual_form($type='reg', $errors=\"\")\n\t{\n\t\tif ( $type == 'lostpass' )\n\t\t{\n\t \tif ($errors != \"\")\n\t \t{\n\t \t\t$this->output .= $this->ipsclass->compiled_templates['skin_register']->errors( $this->ipsclass->lang[$errors]);\n\t \t}\n\t \t\n\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_register']->show_lostpass_form();\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Check for input and it's in a valid format.\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $this->ipsclass->input['uid'] AND $this->ipsclass->input['aid'] )\n\t\t\t{ \n\t\t\t\t$in_user_id = intval(trim(urldecode($this->ipsclass->input['uid'])));\n\t\t\t\t$in_validate_key = trim(urldecode($this->ipsclass->input['aid']));\n\t\t\t\t$in_type = trim($this->ipsclass->input['type']);\n\t\t\t\t\n\t\t\t\tif ($in_type == \"\")\n\t\t\t\t{\n\t\t\t\t\t$in_type = 'reg';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Check and test input\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\tif (! preg_match( \"/^(?:[\\d\\w]){32}$/\", $in_validate_key ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! preg_match( \"/^(?:\\d){1,}$/\", $in_user_id ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'data_incorrect' ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Attempt to get the profile of the requesting user\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => \"id=$in_user_id\" ) );\n\t\t\n\t\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\t\t\tif ( ! $member = $this->ipsclass->DB->fetch_row() )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_mem' ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Get validating info..\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$validate = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'validating', 'where' => \"member_id=$in_user_id and vid='$in_validate_key' and lost_pass=1\" ) );\n\t\t\t\t\n\t\t\t\tif ( ! $validate['member_id'] )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'auth_no_key' ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->output = str_replace( \"<!--IBF.INPUT_TYPE-->\", $this->ipsclass->compiled_templates['skin_register']->show_lostpass_form_auto($in_validate_key, $in_user_id), $this->output );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->output = str_replace( \"<!--IBF.INPUT_TYPE-->\", $this->ipsclass->compiled_templates['skin_register']->show_lostpass_form_manual(), $this->output );\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->ipsclass->vars['bot_antispam'])\n\t\t\t{\n\t\t\t\t// Set a new ID for this reg request...\n\t\t\t\t\n\t\t\t\t$regid = md5( uniqid(microtime()) );\n\t\t\t\t\n\t\t\t\tif( $this->ipsclass->vars['bot_antispam'] == 'gd' )\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Get 6 random chars\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$reg_code = strtoupper( substr( md5( mt_rand() ), 0, 6 ) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t// Set a new 6 character numerical string\n\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\n\t\t\t\t\t$reg_code = mt_rand(100000,999999);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Insert into the DB\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->do_insert( 'reg_antispam', array (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'regid' => $regid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'regcode' => $reg_code,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ip_address' => $this->ipsclass->input['IP_ADDRESS'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ctime' => time(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t}\n\t\t\t\t\t\t\t\n\t \tif ($this->ipsclass->vars['bot_antispam'] == 'gd')\n\t\t\t{\n\t\t\t\t$this->output = str_replace( \"<!--{REG.ANTISPAM}-->\", $this->ipsclass->compiled_templates['skin_register']->bot_antispam_gd( $regid ), $this->output );\n\t\t\t}\n\t\t\telse if ($this->ipsclass->vars['bot_antispam'] == 'gif')\n\t\t\t{\n\t\t\t\t$this->output = str_replace( \"<!--{REG.ANTISPAM}-->\", $this->ipsclass->compiled_templates['skin_register']->bot_antispam( $regid ), $this->output );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->output = $this->ipsclass->compiled_templates['skin_register']->show_dumb_form($type);\n\t\t}\n\t\t\n\t\t$this->page_title = $this->ipsclass->lang['activation_form'];\n\t\t$this->nav = array( $this->ipsclass->lang['activation_form'] );\n\t}", "public function user()\n\t{\n\t\t$this->validation_access();\n\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$pageActive = $this->uri->segment(5);\n\t\tif ($pageActive == 'settings'){\n\n\t\t\t$level = $this->user_model->getAttr('admin')['level'];\n\t\t\tif ($level == '1'){\n\t\t\t\t$levelName = 'Administrator';\n\t\t\t} else {\n\t\t\t\t$levelName = 'Karyawan';\n\t\t\t}\n\n\t\t\t$data = [\n\t\t\t\t\t\t'fullname' => $this->user_model->getAttr('admin')['fullname'],\n\t\t\t\t\t\t'level' => $levelName\n\t\t\t\t\t];\n\t\t\t$this->load->view('user_dashboard/myaccount_settings.php', $data);\n\t\t} else {\n\t\t\t$this->load->view('user_dashboard/myaccount_index.php');\n\t\t}\n\t\t\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "function user_login_edit()\n{\n\t$Feul = new Feul;\n\t$member_checkbox = '';\n\tif($Feul->showMembersPermBox() == true)\n\t{\n\t\t$member_checkbox = \"checked\";\t\n\t}\n\t?>\n\t\t<div style=\"margin-top:20px;\">\n\t\t\t<p>\n\t\t\t\t<label style=\"display:inline!important; margin-right:10px;\" for=\"member-only\">Только для зарегистрированных:</label>\n\t\t\t\t<input style=\"width:auto;\" type=\"checkbox\" value=\"yes\" name=\"member-only\" <?php echo $member_checkbox; ?> />\n\t\t\t</p>\n\t\t</div> \n\t<?php\n}", "public function actionEdit() {\n\n\t\t$userId = User::checkLogged();\n\t\t$user = User::getUserById($userId);\n\t\t$first_name = $user['first_name'];\n\t\t$last_name = $user['last_name'];\n\t\t$result = false;\n\n\t\tif (isset($_POST['submit'])) {\n\t\t\t$first_name = $_POST['first_name'];\n\t\t\t$last_name = $_POST['last_name'];\n\n\t\t\t$errors = array();\n\n\t\t\tif ($error = Validator::checkName($first_name)) $errors['first_name'] = $error;\n\t\t\tif ($error = Validator::checkName($last_name)) $errors['last_name'] = $error;\n\n\t\t\tif (empty($errors)) {\n\t\t\t\t$result = User::edit($userId, $first_name, $last_name);\n\t\t\t}\n\t\t}\n\t\t$pageTitle = \"Edit Details\";\n\t\trequire_once(ROOT . '/views/account/edit.php');\n\n\t\treturn true;\n\t}", "function showEditAccountPage($type, $user_id) {\n $active_tab = Utils::reqParam('active_tab', 'account_tab');\n\n $notifications_div = Utils::reqParam('selected', 'email');\n $publisher_div = Utils::reqParam('selected_pub_div', 'post');\n\n $user_account_data = User::getEmptyEditAccountData();\n $user_account_data = User::fillInEditAccountData($user_account_data);\n\n $password_data = User::getEmptyPasswordData();\n\n $seo_attributes = array('title' => '',\n 'keywords' => 'General Account Settings',\n 'description' => 'ShareBloc is a community of like-minded professionals who share, curate and discuss business content that matters.');\n $smarty_params = array(\n 'notifications' => Notification::$notifications,\n 'notify_weekly' => Utils::userData('notify_weekly'),\n 'notify_post_responded' => Utils::userData('notify_post_responded'),\n 'notify_comment_responded' => Utils::userData('notify_comment_responded'),\n 'notify_product_update' => Utils::userData('notify_product_update'),\n 'notify_daily' => Utils::userData('notify_daily'),\n 'notify_suggestion' => Utils::userData('notify_suggestion'),\n 'active_tab' => $active_tab,\n 'account_data' => $user_account_data,\n 'password_data' => $password_data,\n 'seo' => $seo_attributes,\n 'edit_type' => $type,\n 'init_image_upload' => true,\n 'notifications_div' => $notifications_div,\n 'publisher_div' => $publisher_div,\n 'categories_structure' => Utils::getCategoriesStructure(),\n 'autopost_allowed' => Utils::userData('f_auto_allowed'),\n );\n\n if (!isset($_SESSION['user_info']['my_url'])) {\n Log::$logger->error('Maybe not logged in user. Email: ' . $_SESSION['user_info']['email']);\n }\n\n Utils::$smarty->assign($smarty_params);\n Utils::$smarty->display('pages/user_edit.tpl');\n exit();\n}", "public function actionPersonal()\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\n\t\t$record = SiteUser::model()->findByAttributes(array('id'=> Yii::app()->user->id));\n\t\t$this->render('personal',array('user'=>$record));\n\t}", "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 formUserEdit($user_id){\n // Get the user to edit\n $target_user = UserLoader::fetch($user_id); \n \n // Access-controlled resource\n if (!$this->_app->user->checkAccess('uri_users') && !$this->_app->user->checkAccess('uri_group_users', ['primary_group_id' => $target_user->primary_group_id])){\n $this->_app->notFound();\n }\n \n $get = $this->_app->request->get();\n \n if (isset($get['render']))\n $render = $get['render'];\n else\n $render = \"modal\";\n \n // Get a list of all groups\n $groups = GroupLoader::fetchAll();\n \n // Get a list of all locales\n $locale_list = $this->_app->site->getLocales();\n \n // Determine which groups this user is a member of\n $user_groups = $target_user->getGroups();\n foreach ($groups as $group_id => $group){\n $group_list[$group_id] = $group->export();\n if (isset($user_groups[$group_id]))\n $group_list[$group_id]['member'] = true;\n else\n $group_list[$group_id]['member'] = false;\n }\n \n if ($render == \"modal\")\n $template = \"components/user-info-modal.html\";\n else\n $template = \"components/user-info-panel.html\";\n \n // Determine authorized fields\n $fields = ['display_name', 'email', 'title', 'password', 'locale', 'groups', 'primary_group_id'];\n $show_fields = [];\n $disabled_fields = [];\n $hidden_fields = [];\n foreach ($fields as $field){\n if ($this->_app->user->checkAccess(\"update_account_setting\", [\"user\" => $target_user, \"property\" => $field]))\n $show_fields[] = $field;\n else if ($this->_app->user->checkAccess(\"view_account_setting\", [\"user\" => $target_user, \"property\" => $field]))\n $disabled_fields[] = $field;\n else\n $hidden_fields[] = $field;\n }\n \n // Always disallow editing username\n $disabled_fields[] = \"user_name\";\n \n // Hide password fields for editing user\n $hidden_fields[] = \"password\";\n \n // Load validator rules\n $schema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-update.json\");\n $validators = new \\Fortress\\ClientSideValidator($schema, $this->_app->translator); \n \n $this->_app->render($template, [\n \"box_id\" => $get['box_id'],\n \"box_title\" => \"Edit User\",\n \"submit_button\" => \"Update user\",\n \"form_action\" => $this->_app->site->uri['public'] . \"/users/u/$user_id\",\n \"target_user\" => $target_user,\n \"groups\" => $group_list,\n \"locales\" => $locale_list,\n \"fields\" => [\n \"disabled\" => $disabled_fields,\n \"hidden\" => $hidden_fields\n ],\n \"buttons\" => [\n \"hidden\" => [\n \"edit\", \"enable\", \"delete\", \"activate\"\n ]\n ],\n \"validators\" => $validators->formValidationRulesJson()\n ]); \n }", "function edituseremail()\n {\n // Auth::handleLogin() makes sure that only logged in users can use this action/method and see that page\n Auth::handleLogin();\n $this->view->render('login/edituseremail');\n }", "public function setUserFields() {\n $fields = $this->dictionary->toArray();\n /* allow overriding of class key */\n if (empty($fields['class_key'])) $fields['class_key'] = 'modUser';\n\n $fields = $this->filterAllowedFields($fields);\n\n /* set user and profile */\n $this->user->fromArray($fields);\n $this->user->set('username',$fields[$this->controller->getProperty('usernameField','username')]);\n $this->user->set('active',0);\n $version = $this->modx->getVersionData();\n /* 2.1.x+ */\n if (version_compare($version['full_version'],'2.1.0-rc1') >= 0) {\n $this->user->set('password',$fields[$this->controller->getProperty('passwordField','password')]);\n } else { /* 2.0.x */\n $this->user->set('password',md5($fields[$this->controller->getProperty('passwordField','password')]));\n }\n $this->profile->fromArray($fields);\n $this->profile->set('email',$this->dictionary->get($this->controller->getProperty('emailField','email')));\n $this->profile->set('fullname',$fields[$this->controller->getProperty('fullnameField','fullname')]);\n $this->user->addOne($this->profile,'Profile');\n\n /* add user groups, if set */\n $userGroupsField = $this->controller->getProperty('usergroupsField','');\n $userGroups = !empty($userGroupsField) && array_key_exists($userGroupsField,$fields) ? $fields[$userGroupsField] : array();\n $this->setUserGroups($userGroups);\n }", "function getPage($sUserName) {\n\tglobal $default;\n\t$sToRender = renderHeading(_(\"Update user password\"));\n\t$sToRender .= \"<br>\\n\";\t\n\t$sToRender .= \"<table cellpadding=\\\"5\\\">\\n\";\n\t$sToRender .= \"<tr>\\n\";\n\t$sToRender .= \"<td bgcolor=\\\"6699FF\\\">\" . _(\"User name\") . \": </td>\\n\";\n\t$sToRender .= \"<td bgcolor=\\\"F5F6EE\\\">$sUserName</td>\\n\";\n\t$sToRender .= \"</tr>\\n\";\n\t$sToRender .= \"<tr>\\n\";\n\t$sToRender .= \"<td bgcolor=\\\"6699FF\\\">\" . _(\"New password\") . \": </td>\\n\";\n\t$sToRender .= \"<td><input type=\\\"password\\\" name=\\\"fNewPassword\\\"></td>\\n\";\n\t$sToRender .= \"</tr>\\n\";\n\t$sToRender .= \"<tr>\\n\";\n\t$sToRender .= \"<td bgcolor=\\\"6699FF\\\">\" . _(\"Confirm password\") . \": </td>\\n\";\n\t$sToRender .= \"<td bgcolor=\\\"F5F6EE\\\"><input type=\\\"password\\\" name=\\\"fNewPasswordConfirm\\\"></td>\\n\";\n\t$sToRender .= \"</tr>\\n\";\n\t$sToRender .= \"<tr>\\n\";\n\t$sToRender .= \"</tr>\\n\";\n\t$sToRender .= \"<tr>\\n\";\n\t$sToRender .= \"<td colspan=\\\"2\\\" align=\\\"right\\\">\";\n\t$sToRender .= \"<td align = right><input type=\\\"image\\\" src =\\\"\" . KTHtml::getUpdateButton() . \"\\\" value=\\\"Update\\\" border=\\\"0\\\"/>\";\n\t$sToRender .= \"<a href=\\\"$default->rootUrl/control.php?action=userManagement\\\"><img src =\\\"\" . KTHtml::getCancelButton() . \"\\\" value=\\\"cancel\\\" border=\\\"0\\\"/></a>\\n\";\n\t$sToRender .= \"</tr>\\n\";\n\t$sToRender .= \"</table>\\n\";\n\t\n\treturn $sToRender;\n\t\n}", "public function administration()\n {\n\t\t// user connecter\n\t\tif (!$this->isUserConnected()) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\t\t// user admin\n\t\tif ($this->getUserInfo('droit') != 'ARW' && $this->getUserInfo('droit') != 'MASTER') {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\treturn ;\n\t\t}\n\n $this->loadModel('user');\n\n $result = $this->getModel()->getAllUsersInfos();\n\n\t\t$arrobj = new ArrayObject($result);\n for($i = $arrobj->getIterator(); $i->valid(); $i->next())\n {\n \t$usersInfos[] = array(\n \t\t'subject' => $i->current()->subject->getUri(),\n \t\t'pseudo' => $i->current()->pseudo->getValue(),\n \t\t'givenName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'givenName'),\n \t\t'familyName' => $this->getModel()->getUserInfo($i->current()->pseudo->getValue(), 'familyName'),\n \t\t'droit' => $i->current()->droit->getValue()\n \t\t);\n }\n\n \t$this->set('userPseudo', $this->getUserInfo('pseudo'));\n\n \t$this->set('usersInfos', $usersInfos);\n\n // On set la variable a afficher sur dans la vue\n $this->set('title', 'Administration des utilisateurs');\n // On fait le rendu de la vue signup.php\n $this->render('adminUser');\n }", "public function formRegistrazionePrivato() {\n $this->smarty->display('reg_privato.tpl');\n }", "function __editUserModal()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //template file\n $this->data['template_file'] = PATHS_COMMON_THEME . 'users.modal.html';\n\n //get client id\n $user_id = $this->uri->segment(4);\n\n //flow control\n $next = true;\n\n /** CLIENT CHECK PERMISSION **/\n if (!$this->permissions->usersEdit($user_id)) {\n\n //permission denied\n $this->notifications('wi_notification', $this->permissions->reason);\n\n //halt\n $next = false;\n }\n\n //load from database\n if ($next) {\n $this->data['reg_fields'][] = 'profile';\n $this->data['fields']['profile'] = $this->users_model->userDetails($user_id);\n $this->data['debug'][] = $this->users_model->debug_data;\n\n //visibility - show table or show nothing found\n if (!empty($this->data['fields']['profile'])) {\n $this->data['visible']['wi_edit_user_details_table'] = 1;\n } else {\n $this->notifications('wi_notification', $this->data['lang']['lang_no_results_found']);\n }\n }\n }", "public function edit(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$user = $this->_map_posted_data();\n\t\t\t\t$user->set_user_id($_POST['id']);\n\t\t\t\t$this->userrepository->update($user);\n\t\t\t\theader(\"Location: index.php/admin/index/edit\");\n\t\t\t}else{\n\t\t\t\t$view_page = \"adminusersview/edit\";\n\t\t\t\t$id = $_GET['id'];\n\t\t\t\t$user = $this->userrepository->get_by_id($id);\n\t\t\t\tif(is_null($user)){\n\t\t\t\t\theader(\"Location: index.php/admin/index\");\n\t\t\t\t}\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t}\n\t\t}", "public function mtii_utilities_show_extra_profile_fields($user) {\n $gender = get_the_author_meta('gender', $user->ID);\n $gender_label = $gender=='' ? 'Pick a Gender' : $gender;\n $phone_number = get_the_author_meta('phone_number', $user->ID);\n $state_city = get_the_author_meta('state_city', $user->ID);\n ?>\n <h3><?php esc_html_e('Personal Information (for Mtii Utilities User)', 'mtii-utilities-josbiz'); ?></h3>\n\n <table class=\"form-table\">\n <tr>\n <th>\n <label for=\"gender\"><?php _e( 'Gender', 'mtii-utilities-josbiz') ?></label>\n <span class=\"description\"><?php esc_html_e('(required)', 'mtii-utilities-josbiz'); ?></span>\n </th>\n <td>\n <select name=\"gender\" id=\"gender\" class=\"input\">\n <option disabled value=\"<?php _e($gender, 'mtii-utilities-josbiz'); ?>\"><?php echo $gender_label; ?></option>\n <option value=\"<?php _e('Male', 'mtii-utilities-josbiz'); ?>\">Male</option>\n <option value=\"<?php _e('Female', 'mtii-utilities-josbiz'); ?>\">Female</option>\n </select>\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"phone_number\"><?php _e( 'Phone Number', 'mtii-utilities-josbiz') ?></label>\n <span class=\"description\"><?php esc_html_e('(required)', 'mtii-utilities-josbiz'); ?></span>\n </th>\n <td>\n <input\n type=\"number\" name=\"phone_number\" id=\"phone_number\" class=\"input\"\n value=\"<?php echo esc_attr(wp_unslash($phone_number)); ?>\" size=\"25\" />\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"state_city\"><?php _e( 'State/City', 'mtii-utilities-josbiz') ?></label>\n <span class=\"description\"><?php esc_html_e('(required)', 'mtii-utilities-josbiz'); ?></span>\n </th>\n <td>\n <input\n type=\"text\" name=\"state_city\" id=\"state_city\" class=\"input\"\n value=\"<?php echo esc_attr(wp_unslash($state_city)); ?>\" size=\"25\" />\n </td>\n </tr>\n </table>\n <?php\n }", "public function userAction()\n {\n \n $request = $this->getRequest();\n\n $inline\t= $request->getParam('inline');\n \n if($inline){\n\t $pix\t= Point_Model_Picture::getInstance();\n\t //$pix->makeThumbnail('');\n\t /*\n\t * Check if user is logged-in and act accordingly\n\t */\n\t $viewRenderer\t= Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer')->setNoRender(true);\n\t \t$viewRenderer->setResponseSegment('userPane');\n\t \t\n\t \t$auth\t= Zend_Auth::getInstance();\n\t \t$this->view->username = Point_Model_User::getInstance()->fullname();\n\t\n\t \tif ($auth->hasIdentity()){ // We are to render the login profile menu\n\t \t\n\t \t$this->_helper->viewRenderer->render('userminipane');\n\t \n\t } else { // render 'Sign in' page\n\t\t \n\t\t /* create the dialog for user */\n\t\t \t$this->_prepareLoginDialog();\n\t\t \t$this->_helper->viewRenderer->render('-login');\n\t }\n\t \n } else { // accidentally called!!!\n \t$this->_helper->viewRenderer->setNoRender();\n \t$this->_redirect('/');\n }\n \n $this->_helper->viewRenderer->setNoRender(true);\n// $this->_helper->layout->disableLayout();\n\n }", "public function Profile()\n\t{\n\t\t$user = $this->user;\n\t\t$profileForm = new CForm(array(\n\t\t\t'action'\t=> $this->request->CreateUrl('user/profile'),\n\t\t\t),\n\t\tarray(\n\t\t\t'acronym'\t=> new CFormElementText('Acronym', array(\n\t\t\t\t'readonly'\t=> true,\n\t\t\t\t'value'\t\t=> $this->user->GetAcronym(),\n\t\t\t\t)\n\t\t\t),\n\t\t\t'OldPw'\t\t=> new CFormElementPassword('OldPw',array(\n\t\t\t\t'label'\t\t=> 'Old Password',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'Pw'\t\t=> new CFormElementPassword('Pw', array(\n\t\t\t\t'label'\t\t=> 'Password',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'Pw2'\t\t=> new CFormElementPassword('Pw2', array(\n\t\t\t\t'label'\t\t=> 'Password again',\n\t\t\t\t)\n\t\t\t),\n\t\t\tnew CFormElementSubmit('doChangePassword', array(\n\t\t\t\t'value'\t\t=> 'Change password',\n\t\t\t\t'callback'\t=> array($this, 'DoChangePassword'),\n\t\t\t\t)\n\t\t\t),\n\t\t));\n\t\t\n\t\t$profileForm->SetValidation('OldPw',array('not_empty'));\n\t\t$profileForm->SetValidation('Pw',array('not_empty'));\n\t\t$profileForm->SetValidation('Pw2',array('not_empty'));\n\t\t\n\t\t$profileForm->Check();\n\t\t\n\t\t$userProfileForm = new CForm(array(\n\t\t\t'action'\t=> $this->request->CreateUrl('user/profile')), array(\n\t\t\t'Name'\t\t=> new CFormElementText('Name', array(\n\t\t\t\t'label'\t\t=> 'Name:*',\n\t\t\t\t'value'\t\t=> $user['name'],\n\t\t\t\t)\n\t\t\t),\n\t\t\t'Email'\t\t=> new CFormElementText('Email', array(\n\t\t\t\t'label'\t\t=> 'Email:*',\n\t\t\t\t'value'\t\t=> $user['email'],\n\t\t\t\t)\n\t\t\t),\n\t\t\tnew CFormElementSubmit('doSaveProfile', array(\n\t\t\t\t'value'\t\t=> 'Save',\n\t\t\t\t'callback'\t=> array($this, 'DoSaveProfile'),\n\t\t\t\t)\n\t\t\t),\n\t\t));\n\t\t\n\t\t$userProfileForm->SetValidation('Name',array('not_empty'));\n\t\t$userProfileForm->SetValidation('Email',array('not_empty'));\n\t\t\n\t\t$userProfileForm->Check();\n\t\t\n\t\t$this->views->SetTitle('Profile');\n\t\t$this->views->AddView('user/profile.tpl.php', array(\n\t\t\t'profileForm'\t\t=> $profileForm->GetHTML().$userProfileForm->GetHTMl(),\n\t\t\t'user'\t\t\t\t=> $this->user,\n\t\t\t'is_authenticated'\t=> $this->user['isAuthenticated'],\n\t\t\t),\n\t\t'primary'\n\t\t);\n\t}", "public function information_user()\n {\n //Model\n $username = $_SESSION['username'];\n $rs = $this->Nhansu->get_information_user($username);\n if ($rs) {\n $this->view(\"master_page\", [\n \"page\" => \"information_user\",\n \"url\" => \"../\",\n \"info_user\" => $rs,\n \"phongban\" => $this->Phongban->ListAll(),\n \"chucvu\" => $this->Chucvu->ListAll(),\n\n ]);\n }\n }", "function formUsers() {\n\t\t$output = $formField = \"\"; $status = 1;\n\t\t$getPopupValue[] = $fieldValue[] = \"\";\n\t\tif($this->popupFormID){\n\t\t\t$getPopupValue = $this->getValueDB([\"table\"=>$this->Params['table'],\"id\"=>$this->popupFormID]);\n\t\t\t$status = $getPopupValue['status'];\n\t\t}\n\t\t$varLists = ['username','password','staff_id','role','supervisor','unit'];\n\t\tforeach($varLists as $var){\n\t\t\t$fieldValue[$var] = (isset($getPopupValue[$var]) && $this->popupFormID) ? $getPopupValue[$var] : \"\";\n\t\t}\n\n\t\t$username = $this->inputGroup(['label'=>'Username','type'=>'text','id'=>'username','name'=>'username','placeholder'=>'Username','value'=>$fieldValue['username']]);//$this->Params['first_name']\n\t\t$password = $this->inputGroup(['label'=>'Password','type'=>'password','id'=>'password','name'=>'password','placeholder'=>'&bull;&bull;&bull;&bull;&bull;&bull;','value'=>'']);//$this->Params['middle_name']\n\t\t$staff_id = $this->inputGroup(['label'=>'Employee','type'=>'select','id'=>'staff_id','name'=>'staff_id','meta_key'=>'staffs','meta'=>'staffs','placeholder'=>'Select to link User to Employee','value'=>$fieldValue['staff_id']]);\n\t\t$role = $this->inputGroup(['label'=>'Access Role','type'=>'select','id'=>'role','name'=>'role','meta_key'=>'role','meta'=>'codebook','placeholder'=>'Select Access Role','value'=>$fieldValue['role']]);\n\n\t\t$supervisor = $this->inputGroup(['label'=>'Supervisor','type'=>'select','id'=>'supervisor','name'=>'supervisor','meta_key'=>'users','meta'=>'users','placeholder'=>'Select User\\'s Supervisor','value'=>$fieldValue['supervisor']]);\n\t\t$unit = $this->inputGroup(['label'=>'Deparment','type'=>'select','id'=>'unit','name'=>'unit','meta_key'=>'unit','meta'=>'codebook','placeholder'=>'Select User\\'s Department/Unit','value'=>$fieldValue['unit']]);\n\n\t\t$popUpTitle = str_replace(\"_\",\" \",$this->Params['table']);\n\t\t$formField .= \"<div class='x_panel no-padding'><div class='box_title'><h2 class='left capitalize'>{$popUpTitle} Information Details</h2></div><div class='x_content no-padding'>\";\n\t\t$formField .= \"\n\t\t\t<div class='one-fourth'>\n\t\t\t\t<div class='form-group no-padding item alignRight'>\n\t\t\t\t\t<div class='col-md-12 col-sm-12 col-xs-12 no-padding'>{$username}</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='form-group no-padding item alignRight'>\n\t\t\t\t\t<div class='col-md-12 col-sm-12 col-xs-12 no-padding'>{$password}</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class='three-fourth'>\n\t\t\t<div class='form-group no-padding item'>\n\t\t\t\t<div class='col-md-6 col-sm-6 col-xs-12 no-padding'>{$staff_id}</div>\n\t\t\t\t<div class='col-md-6 col-sm-6 col-xs-12 no-padding'>{$supervisor}</div>\n\t\t\t</div>\n\t\t\t<div class='form-group no-padding item'>\n\t\t\t\t<div class='col-md-6 col-sm-6 col-xs-12 no-padding'>{$role}</div>\n\t\t\t\t<div class='col-md-6 col-sm-6 col-xs-12 no-padding'>{$unit}</div>\n\t\t\t</div>\n\t\t</div>\n\t\t</div>\n\t\t</div>\n\t\t\";\n\t\t$output .= \"\n <form id='createRecords' data-toggle='validator' name='{$this->Params['meta']}' class='form-label-left input_mask' novalidate>\n\t\t\t\t<input type='hidden' name='action' id='action' value='createRecords' />\n\t\t\t\t<input type='hidden' name='table' id='table' value='{$this->Params['table']}' />\n\t\t\t\t<input type='hidden' name='theID' id='theID' value='{$this->Params['value']}' />\n\t\t\t\t{$formField}\n\t\t\t</form>\n \";\n\t\t$output .= \"<script>\n\t\t\t$(document).ready(function() {\n\t\t\t\twebshims.setOptions('forms-ext', {replaceUI: 'auto', types: 'number'});webshims.polyfill('forms forms-ext');\n\t\t\t\t$('.select2_single').each(function() {\n\t\t\t\t\t$(this).select2({\n\t\t\t\t\t\tplaceholder: $(this).attr('placeholder'),\n\t\t\t\t\t\tallowClear: false\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t$(':input').inputmask();\n\t\t\t});\n\n\t\t</script>\";\n\t\treturn $output;\n\t}", "public function updateForm($user) {\n if (isset($_SESSION['user']) && ($_SESSION['level'] == \"admin\" || $_SESSION['level'] == \"redacteur\")){\n $this->page .= \"<h2>Modification de l'Utilisateur :</h2>\";\n $this->page .= \"<a class='btn btn-primary col-12 mt-3' href='index.php?controller=user&action=start'>Retour en arrière</a>\";\n $this->page .= file_get_contents('template/formUser.html');\n $this->page = str_replace('{action}','updateDB', $this->page);\n $this->page = str_replace('{id}',\"<label class='d-none' for='id'>ID : </label>\n <input class='form-control d-none' id='id' type='text' name='id' value='\" .$user['id'] .\"' readonly><br>\", $this->page);\n $this->page = str_replace('{username}',$user['username'], $this->page);\n $this->page = str_replace('{password}',$user['password'], $this->page);\n $this->page = str_replace('{firstname}',$user['firstname'], $this->page);\n $this->page = str_replace('{lastname}',$user['lastname'], $this->page);\n\n $this->displayPage();\n } else {\n header ('location:index.php?controller=login&action=formLog');\n }\n }", "function displayRegForm() {\r\n displayUserForm(\"processRegistration.php\", \"registrationForm\", \"Register\",\r\n \"Your name\", \"\",\r\n \"Your email address\", \"\",\r\n \"Your chosen username\", \"\",\r\n \"Your chosen password\", \"Confirm your password\",\r\n true, -1);\r\n}", "public function user_settings()\n {\n\n //if existing user, go to settings\n if (Session::has('user'))\n {\n //remember url user is coming from\n Session::put('redirect', URL::previous());\n\n $user = Session::get('user');\n $failure = Session::get('failure');\n\n //specify whether user is new or not\n $user->new = 0;\n\n //get the grille's phone number, and put it in readable format\n $grille_num = Grille::where('id', $this->grille_id)->pluck('phone_number');\n $user->grille_number = '(' . substr($grille_num, 0, 3) . ') ' . substr($grille_num, 3, 3) \n . '-' . substr($grille_num, 6, 4);\n\n //format phone number to prefill\n $user->phone_formatted = '(' . substr($user->phone_number, 0, 3) . ') ' . substr($user->phone_number, 3, 3) \n . '-' . substr($user->phone_number, 6, 4);\n\n $this->layout->content = View::make('users.edit', ['user' => $user, 'failure' => $failure]);\n }\n //else redirect back to where came from\n else\n {\n try {\n return Redirect::back();\n }\n catch (Exception $e) {\n return Redirect::to('/');\n }\n\n }\n }", "public function manageAccountAction()\n {\n $errors = [];\n $preserved = [];\n if(!empty($_POST)){\n $userValidation = new UserValidation($_POST, ['fullname', 'address', 'contact']);\n $errors = $userValidation->getNamedErrors();\n\n $preserved = $_POST;\n\n if(empty($errors)){\n $user = Auth::getUser();\n $user->update($_POST);\n Extra::setMessageCookie(\"Profile updated successfully.\");\n $this->redirect(\"/manage-account/\");\n }\n }\n View::renderTemplate(\"LoggedUser/manage-account.html\", [\n 'errors' => $errors,\n 'preserved' => $preserved\n ]);\n }", "function display_password_form()\r\n{\r\n?>\r\n <br>\r\n <form action=\"change_passwd.php\" method=post>\r\n <table width=250 cellpadding=2 cellspacing=0 bgcolor=#cccccc>\r\n <tr><td>Старый пароль:</td>\r\n <td><input type=password name=old_passwd size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td>Новый пароль:</td>\r\n <td><input type=password name=new_passwd size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td>Повторите новый пароль:</td>\r\n <td><input type=password name=new_passwd2 size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td colspan=2 align=center><input type=submit value=\"Изменить пароль\">\r\n </td></tr>\r\n </table>\r\n <br>\r\n<?\r\n}", "function power_user_options_fields( $user ) {\n\n\tif ( current_user_can( 'edit_users', $user->ID ) ) {\n\t\tpower_meta_boxes()->show_meta_box( 'power-user-settings', $user );\n\t}\n\n}", "public function myAccount() {\n if ($this->_model->isLogged()) {\n $username = $_SESSION['user'];\n $email = $this->_model->getMailFromSessionUsername();\n $checked = $this->_model->getNotifsFromSessionUsername();\n $edit_success = \"<p class='flash_success'>\" . $this->_model->getFlash('edit_success') . \"</p>\";\n $edit_err = \"<p class='flash_err'>\" . $this->_model->getFlash('edit_err') . \"</p>\";\n $this->render('General.Account', compact('username', 'email', 'edit_success', 'edit_err', 'checked'));\n }\n else {\n $this->login();\n }\n }", "function users( $args ){\n \n // select toolbox\n if( $args['tool'] == null ){\n $tool = 'display';\n } else {\n $tool = $args['tool'];\n }\n \n // page title\n $this->view->add('page_title','Manage Garage Users');\n \n // use our fancy tool box\n if( $func = $this->users_toolbox($tool,$this) ) {\n \n // check fro success, default to no\n $success = false;\n \n // choose tool and execute\n $success = $func($this);\n }\n \n // add self link\n $this->view->add('self_link',\n $this->app->form_path('admin/users')\n );\n \n }", "function PrintEditForm($userid=0) {\n\t\t$session = &GetSession();\n\t\t$thisuser = $session->Get('UserDetails');\n\t\tif (!$thisuser->Admin()) {\n\t\t\tif ($userid != $thisuser->userid) {\n\t\t\t\t$GLOBALS['ErrorMessage'] = GetLang('NoAccess');\n\t\t\t\t$this->ParseTemplate('AccessDenied');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$user = &GetUser($userid);\n\t\t$GLOBALS['UserID'] = $user->userid;\n\t\t$GLOBALS['UserName'] = $user->username;\n\t\t$GLOBALS['FullName'] = $user->fullname;\n\t\t$GLOBALS['EmailAddress'] = $user->emailaddress;\n\n\t\t$GLOBALS['IgnoreSites'] = $user->ignoresites;\n\t\t$GLOBALS['IgnoreIPs'] = $user->ignoreips;\n\t\t$GLOBALS['IgnoreKeywords'] = $user->ignorekeywords;\n\n\t\t$timezone = $user->usertimezone;\n\t\t$GLOBALS['TimeZoneList'] = $this->TimeZoneList($timezone);\n\n\t\t$GLOBALS['FormAction'] = 'Action=Save&UserID=' . $user->userid;\n\n\t\t$this->ParseTemplate('User_Edit_Own');\n\t}", "public function formHandler()\n {\n $_SESSION['title'] = \"Caiman: Dashboard\";\n $this->allowAccessTo(array(1, 3));\n\n $oldPassword = null;\n $newPasswordRepeat = null;\n $newPassword = null;\n\n if (isset($_GET['e'])) {\n $this->e = filter_input(INPUT_GET, 'e', FILTER_SANITIZE_SPECIAL_CHARS);\n }\n // form update\n if ($this->e == \"updatePassword\") {\n $_SESSION['title'] = \"Caiman: Update password\";\n if (isset($_POST['oldPassword'])) {\n $oldPassword = filter_input(INPUT_POST, 'oldPassword', FILTER_SANITIZE_STRING);\n }\n if (isset($_POST['newPassword'])) {\n $newPassword = filter_input(INPUT_POST, 'newPassword', FILTER_SANITIZE_STRING);\n }\n if (isset($_POST['newPasswordRepeat'])) {\n $newPasswordRepeat = filter_input(INPUT_POST, 'newPasswordRepeat', FILTER_SANITIZE_STRING);\n }\n\n if (isset($oldPassword) && isset($newPassword) && isset($newPasswordRepeat)) {\n $_SESSION['user']->updatePassword($newPassword, $newPasswordRepeat, $oldPassword);\n }\n }\n\n // update if account if visible or not\n if ($this->e == \"updatePrivateAccount\") {\n\n if ($_SESSION['user']->idUser != -1) {\n $_SESSION['user']->updatePrivateAccount();\n header('Location:' . $_SERVER['HTTP_REFERER']);\n }\n }\n }", "function ibm_apim_theme_form_user_login_alter(&$form, &$form_state, $form_id) {\r\n\t\r\n\t$form['name']['#attributes']['placeholder'] = t('User Id');\r\n\t$form['name']['#attributes']['class'][] = 'login-form-inputs';\r\n\t$form['name']['#description'] = t('');\r\n\t$form['pass']['#attributes']['placeholder'] = t('Password');\r\n\t$form['pass']['#attributes']['class'][] = 'login-form-inputs';\r\n\t$form['pass']['#description'] = t('');\r\n\t$form['name']['#attributes']['required'] = 'required';\r\n $form['pass']['#attributes']['required'] = 'required';\r\n\t$form['actions']['submit']['#value'] = t('Log In');\r\n\t$form['actions']['submit']['#attributes']['class'] = array('btn', 'btn-info', 'continue', 'sandbox-login');\r\n\t\r\n\treturn $form;\r\n}", "public function _showForm()\n\t{\n\t\t$this->registry->output->setTitle( \"Log In\" );\n\t\t$this->registry->output->setNextAction( 'index&do=login' );\n\t\t$this->registry->output->addContent( $this->registry->legacy->fetchLogInForm() );\n\t\t$this->registry->output->sendOutput();\n\t\texit();\n\t}", "public function profileAction()\n {\n //Get session info\n $auth = $this->session->get('auth');\n\n //Query the active user\n $user = Users::findFirst($auth['id']);\n if ($user == false) {\n $this->_forward('index/index');\n }\n\n $request = $this->request;\n\n if (!$request->isPost()) {\n Tag::setDefault('name', $user->name);\n Tag::setDefault('email', $user->email);\n } else {\n\t //1)get all the input fields\n\t //2) if password fields are empty then do normal saving stuff\n\t //3)if password fields are not empty then match it with the database, then check the new password and retyped password fields. the save everything\n $name = $request->getPost('name', 'string');\n $email = $request->getPost('email', 'email');\n\t $currentPassword= $request->getPost('password');\n $newPassword= $request->getPost('newpassword');\n\t $repeatPassword= $request->getPost('repeatpassword');\n\t if ($currentPassword=='' && $newPassword=='' && $repeatPassword==''){\n\t\t$name = strip_tags($name);\n \t$user->name = $name;\n \t$user->email = $email;\n\t\tif ($user->save() == false) {\n \tforeach ($user->getMessages() as $message) {\n \t$this->flash->error((string) $message);\n\t }\n\t\t} else {\n $this->flash->success('Your profile information was updated successfully');\n }\t\t\n\t }else {\n\t\tif (sha1($currentPassword) != $user-> password){\n\t\t\t $this->flash->error(\"The current password is wrong\" );\n\t\t}else{ \n\t\t\tif ($newPassword != $repeatPassword){\n\t\t\t\t$this->flash->error('The new password does not match with retyped password');\n\t\t\t}elseif ($newPassword=='' && $repeatPassword==''){\n\t\t\t\t$this->flash->error('New password should not be empty');\n\t\t\t}elseif (strlen($newPassword) < 8 ){\n\t\t\t\t$this->flash->error('New password length should be not less than 8 characters');\n\t\t\t}else{\n\t\t\t\t$name = strip_tags($name);\n \t\t\t$user->name = $name;\n \t\t\t$user->email = $email;\n\t\t\t\t$user->password= sha1($newPassword);\n\t\t\t\tif ($user->save() == false) {\n \t\t\tforeach ($user->getMessages() as $message) {\n \t\t\t\t$this->flash->error((string) $message);\n \t\t\t}\n \t\t\t} else {\n \t\t\t$this->flash->success('Your profile information/password was updated successfully');\n \t\t\t }\n }\n\t\t}\n\t \n\t }\n\n }\n }", "private function displayEditUserForm($result)\n {\n\n if ($_POST['userEditSubmit']) {\n extract($_POST);\n } else {\n //Get the info to be changed\n $userInfo = $this->model->getUserInfo($_SESSION['userID']);\n //And extract it from their arrays\n extract($userInfo);\n }\n\n if (is_array($result)) {\n extract($result);\n }\n\n $select = new Select;\n $areaOpts = $select->fillAreaOptions();\n\n $html = '<div class=\"editPage\">';\n $html .= '<form id=\"register\" method=\"post\" action=\"' . $_SERVER['REQUEST_URI'] . '\">' . \"\\n\";\n\n $html .= '<input type=\"hidden\" name=\"userAccess\" id=\"userAccess\" value=\"' . $userAccess . '\"/>' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"userID\" id=\"userID\" value=\"' . $userID . '\"/>' . \"\\n\";\n\n $html .= '<p>Username</p>' . \"\\n\";\n $html .= '<input type=\"text\" name=\"userName\" id=\"userName\" value=\"' . $userName . '\" />' . \"\\n\";\n $html .= '<br />' . \"\\n\";\n\n $html .= '<p>Email</p>' . \"\\n\";\n $html .= '<p class=\"form-description\">' . $userEmail . '</p>' . \"\\n\";\n $html .= '<input type=\"text\" name=\"userEmail\" id=\"userEmail\" value=\"' . $userEmail . '\" />' . \"\\n\";\n $html .= '<br />' . \"\\n\";\n\n $html .= '<label for=\"userArea\">Area</label>' . \"\\n\";\n $area = ($area == \"\") ? $userArea : $area;\n $html .= $select->createSelect(\"userArea\", $areaOpts, $area);\n $html .= '<br />' . \"\\n\";\n\n $html .= '<br />' . \"\\n\";\n\n $html .= '<input type=\"submit\" name=\"userEditSubmit\" id=\"userEditSubmit\" value=\"Update Info\" />' . \"\\n\";\n\n $html .= '</form>' . \"\\n\";\n $html .= '</div>';\n\n return $html;\n\n }", "function viewProfile($iduser,$isadmin) {\n $this->getSmarty()->assign('pageName','User Control Panel');\n $this->getSmarty()->assign('pageTitle','User Control Panel');\n $this->getSmarty()->assign('iduser',$iduser);\n $this->getSmarty()->assign('isadmin',$isadmin);\n $this->getSmarty()->display('templates/user_ctrlPanel.tpl');\n }", "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}", "function new_member_profile_form()\n {\n if ( ! Session::access('can_admin_members')) {\n return Cp::unauthorizedAccess();\n }\n\n Cp::$body_props = \" onload=\\\"document.forms[0].email.focus();\\\"\";\n\n $title = __('members.register_member');\n\n // Build the output\n $r = Cp::formOpen(['action' => 'C=Administration'.AMP.'M=members'.AMP.'P=register_member']);\n\n $r .= Cp::quickDiv('tableHeading', $title);\n $r .= Cp::div('box');\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.email'),\n Cp::input_text('email', '', '35', '32', 'input', '300px')\n );\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.password'),\n Cp::input_pass('password', '', '35', '32', 'input', '300px')\n );\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.password_confirm'),\n Cp::input_pass('password_confirm', '', '35', '32', 'input', '300px')\n );\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.screen_name'),\n Cp::input_text('screen_name', '', '40', '50', 'input', '300px')\n );\n\n $r .= '</td>'.PHP_EOL.\n Cp::td('', '45%', '', '', 'top');\n\n $r .= Cp::itemgroup(\n Cp::required().NBS.__('account.email'),\n Cp::input_text('email', '', '35', '100', 'input', '300px')\n );\n\n // Member groups assignment\n if (Session::access('can_admin_mbr_groups')) {\n $query = DB::table('member_groups')\n ->select('group_id', 'group_name')\n ->orderBy('group_name');\n\n if (Session::userdata('group_id') != 1)\n {\n $query->where('is_locked', 'n');\n }\n\n $query = $query->get();\n\n if ($query->count() > 0)\n {\n $r .= Cp::quickDiv(\n 'paddingTop',\n Cp::quickDiv('defaultBold', __('account.member_group_assignment'))\n );\n\n $r .= Cp::input_select_header('group_id');\n\n foreach ($query as $row)\n {\n $selected = ($row->group_id == 5) ? 1 : '';\n\n // Only SuperAdmins can assigned SuperAdmins\n if ($row->group_id == 1 AND Session::userdata('group_id') != 1) {\n continue;\n }\n\n $r .= Cp::input_select_option($row->group_id, $row->group_name, $selected);\n }\n\n $r .= Cp::input_select_footer();\n }\n }\n\n $r .= '</div>'.PHP_EOL;\n\n // Submit button\n\n $r .= Cp::itemgroup( '',\n Cp::required(1).'<br><br>'.Cp::input_submit(__('cp.submit'))\n );\n $r .= '</form>'.PHP_EOL;\n\n\n Cp::$title = $title;\n Cp::$crumb = Cp::anchor(BASE.'?C=Administration'.AMP.'area=members_and_groups', __('admin.members_and_groups')).\n Cp::breadcrumbItem($title);\n Cp::$body = $r;\n }", "function userinfo($edit_id=0)\n {\n if(!$this->phpsession->get('ciAdmId')){ redirect($this->config->item('base_url').'r/k/admin'); }\n\n if($edit_id > 0){\n\t\t\t\t\t$user = $this->U_Model->getUserById($edit_id);\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t\t\t\t'edit_id' => $edit_id,\n\t\t\t\t\t\t\t\t\t\t'first_name' => $user->first_name,\n\t\t\t\t\t\t\t\t\t\t'last_name' => $user->last_name,\n\t\t\t\t\t\t\t\t\t\t'sm_image1' => $user->avtar_image,\n\t\t\t\t\t\t\t\t\t\t'email' => $user->email,\n\t\t\t\t\t\t\t\t\t\t'username' => $user->username,\n\t\t\t\t\t\t\t\t\t\t'gender' => $user->gender,\n\t\t\t\t\t\t\t\t\t\t'usertypeid' => $user->usertypeid,\n\t\t\t\t\t\t\t\t\t\t'country' => $user->country_id,\n\t\t\t\t\t\t\t\t\t\t'university' => $user->university,\n\t\t\t\t\t\t\t\t\t\t'address_two' => $user->address_two,\n\t\t\t\t\t\t\t\t\t\t'state' => $user->state,\n\t\t\t\t\t\t\t\t\t\t'city' => $user->city,\n\t\t\t\t\t\t\t\t\t\t'bio' => $user->bio,\n\t\t\t\t\t\t\t\t\t\t'zipcode' => $user->zipcode\n\t\t\t\t\t);\n\t\t\t\t$country_id = $user->country_id;\n\t\t\t\t$state = $user->state; \n } \n\n $this->load->view($this->config->item('base_template_dir').'/admin/user_billing');\n\n\n }", "public function editUser()\n {\n\n $this->displayAllEmployees();\n $new_data = [];\n $id = readline(\"Unesite broj ispred zaposlenika čije podatke želite izmjeniti: \");\n\n $this->displayOneEmployees( $id);\n\n foreach ( $this->employeeStorage->getEmployeeScheme() as $key => $singleUser) { //input is same as addUser method\n\n $userInput = readline(\"$singleUser : \");\n $validate = $this->validateInput($userInput, $key);\n\n while (!$validate)\n {\n $userInput = readline(\"Unesite ispravan format : \");\n $validate = $this->validateInput($userInput, $key);\n\n }\n if ($key === 'income'){\n $userInput = number_format((float)$userInput, 2, '.', '');\n }\n\n $new_data[$key] = $userInput;\n\n }\n $this->employeeStorage->updateEmployee($id, $new_data); //sends both id and data to updateEmployee so the chosen employee can be updated with new data\n\n echo \"\\033[32m\". \"## Izmjene za \". $new_data['name'].\" \". $new_data['lastname'].\" su upisane! \\n\\n\".\"\\033[0m\";\n\n }", "public function user()\n\t{\n\n\t\t$data['data_user'] = $this->model_admin->get_user();\n\t\t$data['halaman'] = 'view_user';\n\t\t$this->load->view('admin/page', $data);\n\t}", "static function displayLogInUser()\n {\n echo \"<div class='col-xs-6'><h1>Log Into Account</h1>\";\n echo \"<form role='form' method='post' action='login.php'>\";\n echo \"<label for='loginUser'>Username: </label>\";\n echo \"<input type='text' class='form-control' id='loginUser' name='usr' required>\";\n echo \"<label for='loginPass'>Password: </label>\";\n echo \"<input type='password' class='form-control' id='loginPass' name='pwd' required>\";\n echo \"<input type='hidden' name='action' value='login'><input type='submit' class='btn btn-default'>\";\n echo \"</form></div>\";\n }", "public function update_simple($f3) {\n \n if(!isset($_POST[\"password\"]))\n {\n LoggingUtility::LogActivity(\"Updated his own profile settings\",json_encode($f3->get('POST') ));\n }\n else\n {\n LoggingUtility::LogActivity(\"Updated his own password\");\n }\n\n $user = new User($f3->get('DB'));\n $user->edit($f3->get('POST.id'));\n \n if ($user->isFirstLogin()) {\n $f3->reroute('/');\n } else {\n $f3->reroute('/section/settings.profile');\n }\n }", "public function formLogin() {\n $this->view->addForm();\n }", "public function profileForm()\n {\n return view('turtle::auth.profile');\n }", "private function formLogin(){\n\t\tView::show(\"user/login\");\n\t}", "public function admin_extra_profile_fields( $user ) {\n\t\t$fields = $this->create_extra_profile_fields();\n\t\trequire_once( H3_MGMT_ABSPATH . '/templates/admin-profile.php' );\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 m_loginForm()\n\t{\n\t\t#INTIALIZING TEMPLATES\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_USER_FILE\", $this->userTemplate);\n\t\t$this->ObTpl->set_block(\"TPL_USER_FILE\",\"TPL_MSG_BLK\",\"msg_blk\");\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\",SITE_URL);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"\");\n\t\t$this->ObTpl->set_var(\"msg_blk\",\"\");\n\t\t$formUrl1=$this->libFunc->m_safeUrl(SITE_URL.\"user/index.php?action=user.checkLogin\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_FORMURL1\",$formUrl1);\n\t\n\t\t$formUrl2=$this->libFunc->m_safeUrl(SITE_URL.\"user/index.php?action=user.emailPass\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_FORMURL2\",$formUrl2);\t\n\n\t\t$signupUrl=$this->libFunc->m_safeUrl(SITE_URL.\"user/index.php?action=user.signupForm\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SIGNUPURL\",$signupUrl);\t\n\t\t\n\t\t#defining Language Variables.\n\t\t$this->ObTpl->set_var(\"LANG_VAR_CUSTOMERLOGIN\",LANG_CUSTOMERLOGIN);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_NOTREGISTERED\",LANG_NOTREGISTERED);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_EMAILADDRESS\",LANG_EMAILADDRESS);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_PASSWORD\",LANG_PASSWORD);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_LOSTPASSWORD\",LANG_LOSTPASSWORD);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_CUSTOMERLOGIN\",LANG_CUSTOMERLOGIN);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_SENDPASSWORD\",LANG_SENDPASSWORD);\n\t\tif($this->request[\"mode\"] == \"tc\"){\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_TRADE_REGISTER);\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\t\n\t\tif($this->err==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->errMsg);\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\n\t\tif(isset($this->request['msg']) && $this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_PASS_SENT);\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\t\telseif(isset($this->request['msg']) && $this->request['msg']==2)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_PASS_NOSENT);\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\t\telseif(isset($this->request['msg']) && $this->request['msg']==3)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"Password Changed.\");\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\t\tif(!isset($_COOKIE['email']))\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_EMAIL\",'email address');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_EMAIL\",$_COOKIE['email']);\n\t\t}\n\n\t\tif(!isset($_COOKIE['password']))\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PASS\",'password');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PASS\",$_COOKIE['password']);\n\t\t}\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_USER_FILE\"));\n\t}", "public function edit() {\n\t\t$userId = $this->uri->segment(3);\n\t\t$name = 'Juan Saluminag';\n\n\t\t$this->breadcrumbs->set(['Edit: ' . $name => 'members/edit/' . $userId]);\n\n\t\t$this->render('register');\n\t}", "function DisplayAdminPage() {\n \t$conn = new mysqli(\"localhost\",\"root\", \"password123\", \"ryan_db\");\n $sql = \"SELECT username, password FROM users ORDER BY username\";\n $result = $conn->query($sql);\n \techo(\"<table>\");\n \techo(\"<tr><td><strong>Username</strong></td><td><strong>Password</strong></td></tr>\");\n while($row = $result->fetch_assoc()){\n \techo \"<tr>\";\n \techo \"<td>\". $row[\"username\"].\"</td><td>\".$row[\"password\"].\"</td>\";\n \techo \"</tr>\";\n }\n \techo(\"</table>\");\n ?>\n \t\t<div>\n \t\t\t<form method = \"post\" action=\"<?php echo htmlspecialchars($_SERVER[\"PHP_SELF\"]);?>\">\n \t<input type=\"hidden\" value = \"2\" name=\"page\">\n \t<input id =\"logoutButton\" type=\"submit\" value=\"Logout\">\n \t\t\t</form>\n \t\t</div>\n \t<?php\n \n }", "public function edit() {\r\n \tif (isset($_SESSION['userid'])) {\n \t $user=$this->model->getuser($_SESSION['userid']);\n \t $this->view->set('user', $user[0]);\n \t $this->view->edit();\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }", "function handle_profile_form( int $user_id ) {\n\tif ( ! check_admin_referer( 'update-user_' . $user_id ) ) {\n\t\treturn;\n\t}\n\n\tif ( isset( $_POST['altis_telemetry_opt_in_toggle'] ) ) {\n\t\topt_in( true );\n\t} else {\n\t\topt_in( false );\n\t}\n}", "function account_panel()\n {\n // Tai cac file thanh phan\n $this->load->helper('user');\n $this->load->model('user_model');\n\n // Bien luu thong tin user da dang nhap hay chua\n $is_login = user_is_login();\n $this->data['is_login'] = $is_login;\n\n // Tao cac lien ket\n $user = user_get_account_info();\n $user = user_add_info($user);\n $user = site_create_url('account', $user);\n $user = UserFactory::auth()->user($user);\n // Luu cac bien gui den view\n $this->data['user'] = $user;\n $this->data['action_login'] = site_url('user/login') . '?fast=true';\n\n // Hien thi view\n $this->load->view('tpl::_widget/user/panel', $this->data);\n }", "public function editprofile()\n {\n //make sure user is logged in\n Auth::checkAuthentication();\n $data = array('ajaxform'=>'load');\n \n //loads user data from session, gives save button(post)\n $this->View->render('user/editProfile',$data);\n }", "public function actionSettings(){\n $user = Users::findOne(\\Yii::$app->user->getId());\n return $this->render('settings', ['user'=>$user]);\n }", "public function password_change()\n\t{\n\t\t$data['title'] = \"Change Password\";\n\t\t$this->load->view('admin/user/_header');\n\t\t$this->load->view('admin/user/_left_sideber');\n\t\t$this->load->view('admin/user/view_change_password');\n\t\t$this->load->view('admin/user/_footer');\n\t\t\t\n\t}" ]
[ "0.7131465", "0.6860549", "0.68521386", "0.68371993", "0.68045473", "0.6799309", "0.67683595", "0.67027986", "0.6702168", "0.669802", "0.6681281", "0.6630322", "0.6625303", "0.66234094", "0.66226363", "0.66103166", "0.6602528", "0.65986896", "0.6592318", "0.65896475", "0.6580679", "0.6554136", "0.65408015", "0.65056527", "0.6498339", "0.64717716", "0.64508986", "0.6434418", "0.63932174", "0.6392194", "0.6381655", "0.6378473", "0.63686615", "0.6355421", "0.6351293", "0.6342469", "0.6331912", "0.6331628", "0.6327881", "0.63172483", "0.63104445", "0.6310249", "0.6306092", "0.6300058", "0.62954307", "0.62947446", "0.6287274", "0.6279412", "0.6271655", "0.62687534", "0.6260878", "0.6236189", "0.62319064", "0.6227256", "0.6223291", "0.6222094", "0.6220977", "0.62202823", "0.62198955", "0.6216093", "0.6213154", "0.6211658", "0.6201401", "0.6198564", "0.6193833", "0.61901426", "0.61757976", "0.6173577", "0.6171039", "0.61699116", "0.61663955", "0.6166236", "0.61435103", "0.6137803", "0.61299", "0.61234397", "0.6121759", "0.6119548", "0.61132485", "0.6110492", "0.60927093", "0.60873425", "0.60862535", "0.608523", "0.6084606", "0.6083403", "0.608198", "0.6076096", "0.6075565", "0.6075255", "0.60734683", "0.6067515", "0.6065664", "0.60640675", "0.60598224", "0.6056756", "0.6055772", "0.60548633", "0.60531133", "0.60435426" ]
0.60832864
86
Saves general user info after validation (username, email validations). If user changes an email afddress acount is switched into inactive state and email is sent to new email address with instructions on how to activate account
public function saveAction(){ $request = $this->_request->getParams(); $oValidationHelper = new Helpers_Usermanagement_Validate(); $error = false; if(!$oValidationHelper->ifEmailAvailable($request['user_email'],$this->_auth->user_id)){ $error = true; $this->_messages->setMessage('User with such email already exists','error','user_email'); } if(!$oValidationHelper->ifUsernameAvailable($request['user_login'],$this->_auth->user_id)){ $this->_messages->setMessage('User with such username already exists','error','user_login'); $error = true; } if($this->_validator->validate('registration_form',$request) && !$error){ if($request['user_email']!=$this->_auth->user_email){ $request['user_confirmation_code'] = md5(time()+rand(10000,99999)); $request['user_active'] = 0; $this->_sendConfirmationEmail($request['user_email'],$request['user_login'],$request['user_confirmation_code']); $this->_messages->setMessage('WARNING!!! Your email has been changed and your account has been disabled. Instructions on how to activate account were sent to you','error'); } $request['user_id'] = $this->_auth->user_id; $oUsers = new Models_Usermanagement_Users(); $oUsers->updateEntry($request); $this->_messages->setMessage('Account has been updated'); $this->_redirect('/usermanagement/profile/generaldataform/'); }else{ foreach ( $this->_validator->getErrors () as $field=>$error ) { $this->_messages->setMessage ( $error, 'error' , $field); } $this->_redirect('/usermanagement/profile/generaldataform/?error=1'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveEmail()\n {\n $this->validate([\n 'email' => [\n 'sometimes',\n 'required',\n 'email',\n Rule::unique(shopper_table('users'), 'email')->ignore($this->customer_id),\n ],\n ]);\n\n $this->updateValue(\n 'email',\n $this->email,\n 'Customer Email address updated successfully.'\n );\n\n $this->emailUpdate = false;\n $this->emit('profileUpdate');\n }", "function email_revalidate_user_settings_save() {\n\t$email = get_input('email');\n\t$user_id = get_input('guid');\n\n\tif (!$user_id) {\n\t\t$user = elgg_get_logged_in_user_entity();\n\t} else {\n\t\t$user = get_entity($user_id);\n\t}\n\n\tif (!is_email_address($email)) {\n\t\tregister_error(elgg_echo('email:save:fail'));\n\t\treturn false;\n\t}\n\n\tif ($user) {\n\t\tif (strcmp($email, $user->email) != 0) {\n\t\t\tif (!get_user_by_email($email)) {\n\t\t\t\t$user->new_email = $email;\n\t\t\t\tset_input('email', $user->email);\n\t\t\t\temail_revalidate_request_validation($user->guid);\n\t\t\t} else {\n\t\t\t\tregister_error(elgg_echo('registration:dupeemail'));\n\t\t\t}\n\t\t} else {\n\t\t\tunset($user->new_email);\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tregister_error(elgg_echo('email:save:fail'));\n\t}\n\treturn false;\n}", "private function __saveBasicInfo() {\n\t\t$postData = $this->request->data['User'];\n\n\t\t$fields = array('username', 'first_name', 'last_name', 'email', 'gender', 'timezone');\n\t\t$data = array();\n\t\tforeach ($fields as $field) {\n\t\t\t$data[$field] = $postData[$field];\n\t\t}\n\n\t\t// convert dob\n\t\t$dob = $postData['date_of_birth'];\n\t\tlist($dobMonth, $dobDay, $dobYear) = explode('-', $dob);\n\t\t$formattedDob = sprintf('%s-%s-%s', $dobYear, $dobMonth, $dobDay);\n\t\t$data['date_of_birth'] = $formattedDob;\n\n\t\t$data['id'] = $userId = $this->Auth->user('id');\n\t\tif ($this->User->save($data)) {\n\t\t\t// save user photo\n\t\t\t$this->__saveUserPhoto($userId, $this->request->data['cropfileName']);\n\n\t\t\t// send email change notification if email is changed\n\t\t\t$sendEmailChangeNotification = ($postData['email'] !== $postData['old_email']) ? true : false;\n\t\t\tif ($sendEmailChangeNotification === true) {\n\t\t\t\t$this->__sendEmailChangeNotification($postData);\n\t\t\t}\n\n\t\t\t// set new data on session\n\t\t\t$this->Session->write('Auth', $this->User->read(null, $userId));\n\n\t\t\t// redirect with success message\n\t\t\t$this->Session->setFlash(__('Successfully updated the details.'), 'success');\n\t\t\t$this->redirect($this->referer());\n\t\t} else {\n\t\t\t// redirect with error message\n\t\t\t$this->Session->setFlash(__('Failed to update the details.'), 'error');\n\t\t}\n\t}", "function save_profile() {\n global $wpdb;\n\n // Get the current subscriber, fail if not found\n $user = $this->get_user_from_request(true);\n\n // Conatains the cleaned up user data to be saved\n $data = array();\n $data['id'] = $user->id;\n\n $options_profile = get_option('newsletter_profile', array());\n $options_main = get_option('newsletter_main', array());\n\n // Not an elegant interaction between modules but...\n $subscription_module = NewsletterSubscription::instance();\n\n if (!$this->is_email($_REQUEST['ne'])) {\n $user->alert = $this->options['profile_error'];\n return $user;\n }\n\n $email = $this->normalize_email(stripslashes($_REQUEST['ne']));\n $email_changed = ($email != $user->email);\n\n // If the email has been changed, check if it is available\n if ($email_changed) {\n $tmp = $this->get_user($email);\n if ($tmp != null && $tmp->id != $user->id) {\n // TODO: Move the label on profile setting panel\n $user->alert = $this->options['error'];\n return $user;\n }\n $data['status'] = Newsletter::STATUS_NOT_CONFIRMED;\n }\n\n // General data\n $data['email'] = $email;\n if (isset($_REQUEST['nn'])) {\n $data['name'] = $this->normalize_name(stripslashes($_REQUEST['nn']));\n if ($subscription_module->is_spam_text($data['name'])) {\n die();\n }\n }\n if (isset($_REQUEST['ns'])) {\n $data['surname'] = $this->normalize_name(stripslashes($_REQUEST['ns']));\n if ($subscription_module->is_spam_text($data['surname'])) {\n die();\n }\n }\n if ($options_profile['sex_status'] >= 1) {\n $data['sex'] = $_REQUEST['nx'][0];\n // Wrong data injection check\n if ($data['sex'] != 'm' && $data['sex'] != 'f' && $data['sex'] != 'n') {\n die('Wrong sex field');\n }\n }\n\n // Lists. If not list is present or there is no list to choose or all are unchecked.\n $nl = array();\n if (isset($_REQUEST['nl']) && is_array($_REQUEST['nl'])) {\n $nl = $_REQUEST['nl'];\n }\n\n // Every possible list shown in the profile must be processed\n $lists = $this->get_lists_for_profile();\n foreach ($lists as $list) {\n $field_name = 'list_' . $list->id;\n $data[$field_name] = in_array($list->id, $nl) ? 1 : 0;\n }\n\n // Profile\n for ($i = 1; $i <= NEWSLETTER_PROFILE_MAX; $i++) {\n // Private fields cannot be changed by the subscriber\n if ($options_profile['profile_' . $i . '_status'] == 0) {\n continue;\n }\n $data['profile_' . $i] = stripslashes($_REQUEST['np' . $i]);\n }\n\n\n // Feed by Mail service is saved here\n $data = apply_filters('newsletter_profile_save', $data);\n\n if ($user->status == TNP_User::STATUS_NOT_CONFIRMED) {\n $data['status'] = TNP_User::STATUS_CONFIRMED;\n }\n\n $user = $this->save_user($data);\n $this->add_user_log($user, 'profile');\n\n // Send the activation again only if we use double opt-in, otherwise it has no meaning\n // TODO: Maybe define a specific email for that and not the activation email\n if ($email_changed && $subscription_module->is_double_optin()) {\n $subscription_module->send_activation_email($user);\n // TODO: Move this option on new profile configuration panel\n $alert = $this->options['profile_email_changed'];\n }\n\n if (isset($alert)) {\n $user->alert = $alert;\n } else {\n // TODO: Move this label on profile settings panel\n $user->alert = $this->options['saved'];\n }\n return $user;\n }", "public function save()\n {\n $this->validate();\n $this->user->save();\n\n $this->toast('Your information has been updated!', 'success');\n }", "public function save()\n {\n if ($this->uid)\n {\n $query = sprintf('UPDATE %sUSER SET USERNAME = \"%s\", ' .\n 'PASSWORD = \"%s\", EMAIL_ADDR = \"%s\", IS_ACTIVE = %d ' .\n 'WHERE USER_ID = %d',\n DB_TBL_PREFIX,\n mysql_real_escape_string($this->username, $GLOBALS['DB']),\n mysql_real_escape_string($this->password, $GLOBALS['DB']),\n mysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n $this->isActive,\n $this->userId);\n mysql_query($query, $GLOBALS['DB']);\n }\n else\n {\n $query = sprintf('INSERT INTO %sUSER (USERNAME, PASSWORD, ' .\n 'EMAIL_ADDR, IS_ACTIVE) VALUES (\"%s\", \"%s\", \"%s\", %d)',\n DB_TBL_PREFIX,\n mysql_real_escape_string($this->username, $GLOBALS['DB']),\n mysql_real_escape_string($this->password, $GLOBALS['DB']),\n mysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n $this->isActive);\n mysql_query($query, $GLOBALS['DB']);\n\n $this->uid = mysql_insert_id($GLOBALS['DB']);\n }\n }", "function save_user_info ()\n{\n if (check_user_info()){\n $feedback = array ();\n // Retrieve datas from form\n $user_name = filter_var($_POST['user_name'],\n FILTER_SANITIZE_STRING);\n //$user_password = $_POST['user_password'];\n $user_email = filter_var($_POST['user_email'], \n FILTER_SANITIZE_EMAIL);\n $user_birthday = filter_var($_POST['user_birthday'], \n FILTER_SANITIZE_STRING);\n $user_nationality = utf8_encode(filter_var($_POST['user_nationality'], \n FILTER_SANITIZE_STRING));\n $user_lastname = utf8_encode(filter_var($_POST['user_lastname'], \n FILTER_SANITIZE_STRING));\n $user_firstname = utf8_encode(filter_var($_POST['user_firstname'], \n FILTER_SANITIZE_STRING));\n $user_gender = utf8_encode(filter_var($_POST['user_gender'], \n FILTER_SANITIZE_STRING));\n $user_password_hash = \n $_SESSION['user']->get_string_attribute('user_password_hash');\n \n /*if (isset($_POST['user_password_new'])) {\n $user_password_hash = password_hash($_POST['user_password_new'],\n PASSWORD_DEFAULT);\n }else {\n $user_password_hash = \n $_SESSION['user']->get_string_attribute('user_password_hash');\n }*/\n \t\n //Create an user object with it\n $parameters = array ('user_id' =>\n $_SESSION['user']->get_string_attribute('user_id'),\n\t\t\t'user_name' => $user_name,\n\t\t\t'user_email' => $user_email,\n\t\t\t'user_birthday' => $user_birthday,\n\t\t\t'user_nationality' => $user_nationality,\n\t\t\t'user_lastname' => $user_lastname,\n\t\t\t'user_firstname' => $user_firstname,\n 'user_password_hash' => $user_password_hash,\n \t'user_gender' => $user_gender);\n $user = new User ($parameters);\n \t\n // save new datas in database;\n if ($user->update_user_data()) {\n // Save them in the user session\n $_SESSION['user'] = $user;\n $feedback ['status'] = true;\n $_SESSION['feedback'] = $feedback;\n return true;\n } else {\n $feedback ['msg'] = 'The update of your profile information has failed';\n $feedback ['status'] = false;\n $_SESSION['feedback'] = $feedback;\n return false;\n }\n }else {\n return false;\n }\n}", "public function setting(){\n if (!isset($_SESSION['user_id']))\n redirects('users/login');\n\n //check if the post method is set\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n \n // Sanitize POST data\n // $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n // edit only personal information\n if (isset($_POST['update_personal_information'])){\n // Init data\n $data =[\n 'name' => trim($_POST['name']),\n 'username' => trim($_POST['username']),\n 'email' => trim($_POST['email']),\n 'name_error' => '',\n 'username_error' => '',\n 'email_error' => '',\n 'success_personal' => '',\n 'email_hash' => '',\n 'message' => '',\n 'title' => ''\n ];\n\n // set this varialble to 1 if some information has been updated to display success message\n $sign = 0;\n $email_sign = 0;\n\n // Validate Email\n if ($data['email'] != $_SESSION['email']) {\n if(empty($data['email'])){\n $data['email_error'] = 'Pleae enter email';\n } else {\n // check if valid email\n if (!filter_var($data['email'], FILTER_VALIDATE_EMAIL))\n $data['email_error'] = \"Please enter a valid email\";\n // Check email if exists\n if($this->userModel->findUserByEmail($data['email']))\n $data['email_error'] = 'Email is already taken';\n }\n }\n //valid username\n if ($data['username'] != $_SESSION['username']){\n if (preg_match('/\\s/',$data['username']) || !ctype_alnum($data['username'])){\n $data['username_error'] = 'Please enter a valid username';\n } else {\n // check the lenght of the username\n if (strlen($data['username']) < 6)\n $data['username_error'] = 'Username should be at least 6 characters';\n // check if the username is already taken\n if ($this->userModel->findUserByUsername($data['username']))\n $data['username_error'] = 'Username is already taken';\n }\n }\n // Validate Name\n if ($data['name'] != $_SESSION['name']){\n if(empty($data['name'])){\n $data['name_error'] = 'Pleae enter name';\n } else {\n if (!ctype_alnum($data['name']))\n $data['name_error'] = 'Please enter a valid name';\n }\n }\n // update the information \n if ($data['name'] != $_SESSION['name'] && empty($data['name_error']) && empty($data['username_error']) && empty($data['email_error'])){\n $this->userModel->updateName($data);\n $_SESSION['name'] = $data['name'];\n $sign = 1;\n }\n if ($data['username'] != $_SESSION['username'] && empty($data['name_error']) && empty($data['username_error']) && empty($data['email_error'])){\n $this->userModel->updateUsername($data);\n $_SESSION['username'] = $data['username'];\n $sign = 1;\n }\n if ($data['email'] != $_SESSION['email'] && empty($data['name_error']) && empty($data['username_error']) && empty($data['email_error'])){\n $hash = md5( rand(0,1000) );\n $data['email_hash'] = $hash;\n if ($this->userModel->updateEmail($data)){\n $link = URLROOT . '/users/emailVerification/' . $hash;\n $data['message'] = 'Please click on the link to verify your new email : ' . $link;\n $data['title'] = '[Camagru] Please verify your new email';\n $this->sendEmailnotification($data);\n $_SESSION['email'] = $data['email'];\n $sign = 1;\n $email_sign = 1;\n }\n }\n // if information has been updated and there is no error load the view with success\n if ($sign > 0){\n if ($email_sign > 0){\n $data['success_personal'] = '<h3>Your information has been updated</h3> <br>\n Please note that when you changed your email next time you will need to verify your email before login';\n $this->view('users/setting', $data);\n } else {\n $data['success_personal'] = '<h3>Your information has been updated</h3>';\n $this->view('users/setting', $data);\n }\n } else {\n // load the view with errors\n $this->view('users/setting', $data);\n }\n }\n\n // edit only password part\n elseif (isset($_POST['update_password'])){\n // Init data\n $data =[\n 'current_password' => trim($_POST['current_password']),\n 'password' => trim($_POST['new_password']),\n 'confirm_password' => trim($_POST['confirm_password']),\n 'email' => $_SESSION['email'],\n 'current_password_error' => '',\n 'new_password_error' => '',\n 'confirm_password_error' => '',\n 'success_password' => '',\n 'message' => 'title',\n 'title' => ''\n ];\n \n // Validate current password\n if(empty($data['current_password'])){\n $data['current_password_error'] = 'Please enter a password';\n }\n\n // check if the current password is correct\n if(empty($data['current_password_error'])){\n $loggedInUser = $this->userModel->login($_SESSION['username'], $data['current_password']);\n if ($loggedInUser == false){\n $data['current_password_error'] = 'Incorrect password';\n }\n }\n\n // Validate new password\n if(empty($data['password'])){\n $data['new_password_error'] = 'Please enter a password';\n } else {\n // Validate new password strength\n $uppercase = preg_match('@[A-Z]@', $data['password']);\n $lowercase = preg_match('@[a-z]@', $data['password']);\n $number = preg_match('@[0-9]@', $data['password']);\n if(!$uppercase || !$lowercase || !$number || strlen($data['password']) < 8)\n $data['new_password_error'] = 'Password should be at least 8 characters in length and should include at least one upper case letter, one number.';\n }\n\n // validate confirm_password\n if ($data['password'] != $data['confirm_password'])\n $data['confirm_password_error'] = 'Password does not match!';\n\n // check if the is no error \n if (empty($data['current_password_error']) && empty($data['new_password_error']) && empty($data['confirm_password_error'])){\n // update the password and print success message\n $this->userModel->updatePassword($data);\n // send email notification\n $data['message'] = 'We wanted to let you know that your Camagru password was reset. ';\n $data['title'] = '[Camagru] Your password was reset';\n $this->sendEmailnotification($data);\n $data['success_password'] = 'Your password has been updated';\n $this->view('users/setting', $data);\n } else {\n // load the view with the errors\n $this->view('users/setting', $data);\n }\n }\n\n // edit email notification\n elseif(isset($_POST['email_notification'])){\n // Init data\n $data =[\n 'success_notification' => '',\n ];\n \n if ($_POST['option'] == 1){\n if ($this->userModel->checkEmailNotificationStat($_SESSION['email']))\n $this->userModel->desactivateEmailNotification($_SESSION['email']);\n else\n $this->userModel->activateEmailNotification($_SESSION['email']);\n //update the current session\n $_SESSION['email_notif'] = ($this->userModel->checkEmailNotificationStat($_SESSION['email'])) ? 1 : 0;\n // load the view with success\n $data['success_notification'] = 'Your choice is updated thank you';\n $this->view('users/setting', $data);\n } else {\n // load the normal view\n $this->view('users/setting', $data);\n }\n }\n\n // load the simple view\n } else {\n $this->view('users/setting');\n }\n }", "function Users_user_updateemail()\n{\n if (!pnUserLoggedIn()) {\n return LogUtil::registerPermissionError();\n }\n\n if (!SecurityUtil::confirmAuthKey('Users')) {\n return LogUtil::registerAuthidError(pnModUrl('Users', 'user', 'changeemail'));\n }\n\n $uservars = pnModGetVar('Users');\n if ($uservars['changeemail'] <> 1) {\n return pnRedirect('Users', 'user', 'main');\n }\n\n $newemail = FormUtil::getPassedValue('newemail', '', 'POST');\n\n $checkuser = pnModAPIFunc('Users', 'user', 'checkuser',\n array('uname' => pnUserGetVar('uname'),\n 'email' => $newemail,\n 'agreetoterms' => true));\n\n // check email related errors only\n if (in_array($checkuser, array(-1, 2, 9, 11, 12))) {\n switch($checkuser)\n {\n case -1:\n $message = __('Sorry! You have not been granted access to this module.');\n break;\n case 2:\n $message = __('Sorry! The e-mail address you entered was incorrectly formatted or is unacceptable for other reasons. Please correct your entry and try again.');\n break;\n case 9:\n $message = __('Sorry! This e-mail address has already been registered, and it cannot be used again for creating another account.');\n break;\n case 11:\n $message = __('Sorry! Your user agent is not accepted for registering an account on this site.');\n break;\n case 12:\n $message = __('Sorry! E-mail addresses from the domain you entered are not accepted for registering an account on this site.');\n break;\n default:\n $message = __('Sorry! You have not been granted access to this module.');\n } // switch\n return LogUtil::registerError($message, null, pnModURL('Users', 'user', 'changeemail'));\n }\n\n // set the new email\n pnUserSetVar('email', $newemail);\n\n LogUtil::registerStatus(__('Done! Saved your e-mail address.'));\n return pnRedirect(pnModURL('Users', 'user', 'main'));\n}", "private function validateEmailUser(){\n $this->deleteDuplicateCode($this->_datPerson[personId]);\n $this->_code = rand(10000, 99999);\n $em = $this->getDoctrine()->getManager();\n $UserValidationEmail = new Uservalidationemail();\n $UserValidationEmail->setEmail($this->_datPerson[email]);\n $UserValidationEmail->setCode($this->_code);\n $UserValidationEmail->setDateregister(new \\DateTime());\n $UserValidationEmail->setData(json_encode($this->_datPerson));\n $UserValidationEmail->setPersonid($this->_datPerson[personId]);\n\n $em->persist($UserValidationEmail);\n $em->flush();\n }", "function setUserInformation()\r\n{\r\n global $sender ;\r\n global $message ;\r\n global $chemin ;\r\n global $query ;\r\n if(filter_var(strtolower($message), FILTER_VALIDATE_EMAIL) || preg_match(\"#^(none)#i\", $message))\r\n {\r\n sendTextMessage(\"Thank you for your answer to my question.Your setting is correctly set\");\r\n displayAllService();\r\n $query->addUser($sender,strtolower($message));\r\n file_put_contents($chemin,\"\");\r\n }\r\n else\r\n {\r\n sendTextMessage(\"Please provide a valid email or type none if you don't get one 😕 .\");\r\n }\r\n}", "protected function save() {\n $factory = I2CE_FormFactory::instance();\n if ($this->creatingNewUser()) {\n if ( !$this->hasPermission('task(users_can_edit)')) {\n return false;\n }\n if (!$this->userObj instanceof I2CE_User_Form || !($username = $this->userObj->username) ) {\n return false;\n }\n $accessMech = I2CE::getUserAccess();\n if ($accessMech->userExists($username,false)) {\n I2CE::raiseError(\"Trying to recreate existing user : \" .$username);\n return false;\n }\n if (I2CE_User::hasDetail('creator')) {\n $this->userObj->creator = $this->user->username;\n }\n }\n\n $username = $this->userObj->username;\n $password = $this->userObj->password;\n $parent = $this->userMapObj->getField(\"parent\")->getValue();\n $personObj = $factory->createContainer($parent);\n $personObj->populate();\n $emails = LBBoards_Module_Qualify::getPersonEmail($parent);\n $emails = implode(\",\", $emails);\n $fname = $personObj->getField(\"firstname\")->getValue();\n $body = \"Hi $fname<br> We have created your account on the License Board online system, your username is $username and your password is $password. Please change your password after first login\";\n $subject = \"Account For License Board Online System\";\n LBBoards_Module_Qualify::sendEmail($emails, $subject, $body);\n return parent::save();\n }", "private function saveUser(){\n\n if( ! $this->checkEmail() ){\n $password = password_hash($this->_userPassword, PASSWORD_DEFAULT);\n $request = $this->_connexion->prepare(\"INSERT INTO Users (user_name, user_email, user_password) VALUES (?, ?, ?)\");\n $request->execute(array($this->_userName, $this->_userEmail, $password));\n\n return $response = json_encode([\n 'status' => 'ok',\n 'message' => 'successfuly add'\n ]);\n }\n else{\n return $response = json_encode([\n 'status' => 'failed',\n 'message' => 'this email allready exist'\n ]);\n }\n\n }", "public function saveProfile()\n {\n if ($this->validate()) {\n $user = $this->user;\n\n $graph = Yii::$container\n ->get(\\common\\components\\Graph::class, [$this->user]);\n\n if ($this->timezone) {\n $user->timezone = $this->timezone;\n }\n if ($this->expose_graph) {\n $user->expose_graph = true;\n\n // generate behaviors graph image\n $checkins_last_month = (Yii::$container->get(\\common\\interfaces\\UserBehaviorInterface::class))\n ->getCheckInBreakdown();\n\n // if they haven't done a check-in in the last month this will explode\n // because $checkins_last_month is an empty array\n if ($checkins_last_month) {\n $graph->create($checkins_last_month, true);\n }\n } else {\n $user->expose_graph = false;\n // remove behaviors graph image\n $graph->destroy();\n }\n\n if ($this->send_email) {\n $user->send_email = true;\n $user->email_category = $this->email_category;\n $user->partner_email1 = $this->partner_email1;\n $user->partner_email2 = $this->partner_email2;\n $user->partner_email3 = $this->partner_email3;\n } else {\n $user->send_email = false;\n $user->email_category = 4; // default to \"Speeding Up\"\n $user->partner_email1 = null;\n $user->partner_email2 = null;\n $user->partner_email3 = null;\n }\n $user->save();\n return $user;\n }\n\n return null;\n }", "public function update_new_user(){\n\t\t$this->data[\"activationCode\"] = $this->make_activation_code();\n\t\tif( $this->send_email($this->get_activation_msg($this->data[\"activationCode\"])) ){\n\t\t\t$mysql = New Mysql();\n\t\t\treturn( $mysql->update_user($this->data[\"name\"], $this->data[\"lastname\"], $this->data[\"email\"], $this->data[\"password\"], $this->data[\"joinDate\"], $this->data[\"lastAccess\"], $this->data[\"activationCode\"]) );\n\t\t}\t\n\t}", "public function save() {\n\t\t$data = array(\n\t\t\t\t\"user\" => array(\n\t\t\t\t\t\t\"email\" => $this->_data[\"email\"],\n\t\t\t\t)\n\t\t);\n\t\t\n\t\t// kontrola zmeny hesla\n\t\tif (in_array(\"password\", $this->_changed)) $data[\"user\"][\"password\"] = $this->_data[\"password\"];\n\t\t\n\t\t// odeslani dat\n\t\t$response = $this->_connection->sendRequest(self::OBJECT, \"put\", $this->_data[$this->_identifier], $data, \"post\");\n\t}", "public function save() {\n\n if( isset( $_POST ) ) {\n // Set user id for add\n $id = null;\n // Set null if empty value\n $_POST['email'] = replace_empty_with_null( $_POST['email'] );\n // Update mode\n if( $_POST['userId'] != '' ) {\n // Set user id for update\n $id = $_POST['userId'];\n // Check if update password form is trigger\n if( isset( $_POST['password'] ) ) {\n $_POST['password'] = $this->user_model->hash( $_POST['password'] ); \n unset( $_POST['confirm_password'] ); \n } else {\n $_POST['firstName'] = ucfirst( $_POST['firstName'] );\n $_POST['surname'] = ucfirst( $_POST['surname'] );\n $_POST['initials'] = ucfirst( $_POST['initials'] );\n }\n } else {\n\n $_POST['password'] = $this->user_model->hash( $_POST['password'] );\n $_POST['firstName'] = ucfirst( $_POST['firstName'] );\n $_POST['surname'] = ucfirst( $_POST['surname'] );\n $_POST['initials'] = ucfirst( $_POST['initials'] );\n\n }\n \n $this->user_model->save( $_POST, $id );\n echo \"true\";\n } else {\n echo \"error\";\n }\n\n }", "public function email_must_be_unique_on_update()\n {\n User::factory()->create([\n 'email' => '[email protected]',\n ]);\n\n $this\n ->from(\"nova/resources/users/{$this->user->id}/edit\")\n ->put(\n \"nova-api/users/{$this->user->id}\",\n [\n 'email' => '[email protected]',\n ]\n )\n ->assertRedirect(\"nova/resources/users/{$this->user->id}/edit\")\n ->assertSessionHasErrors('email');\n }", "public function procEditAccount() {//IF time permits, re-implement using new User classes\r\n global $session;\r\n\r\n $edUserInfo = array(\"uid\"=>$_POST['uid'], \"username\"=>$_POST['username']);\r\n\r\n /* Account edit attempt */\r\n /* New Password error checking */\r\n if(isset($_POST['newpass']) && !empty($_POST['newpass'])) {\r\n if($_POST['newpass'] == $_POST['newpassconf']) {\r\n $edUserInfo['newpass'] = $session->hashPassword($_POST['newpass']);\r\n } else {\r\n $session->form->setError(\"newpassconf\", \"* Must match new password entered above\");\r\n }\r\n }\r\n\r\n /* Email error checking */\r\n if(isset($_POST['edemail']) && !empty($_POST['edemail'])) {\r\n $edUserInfo['edemail'] = stripslashes(trim($_POST['edemail']));\r\n } else {\r\n $session->form->setError(\"edemail\", \"* An email is required\");\r\n }\r\n\r\n $edUserInfo['edfname'] = $_POST['edfname'];\r\n $edUserInfo['edlname'] = $_POST['edlname'];\r\n\r\n if(isset($_POST['edbirthmonth']) && !empty($_POST['edbirthmonth']) &&\r\n isset($_POST['edbirthday']) && !empty($_POST['edbirthday']) &&\r\n isset($_POST['edbirthyear']) && !empty($_POST['edbirthyear'])) {\r\n /* Convert birthdate into timestamp */\r\n date_default_timezone_set('America/New_York');\r\n $edbirth = mktime(0, 0, 0, $_POST['edbirthmonth'], $_POST['edbirthday'],\r\n $_POST['edbirthyear']);\r\n $edUserInfo['edbirthdate'] = $edbirth;\r\n } else {\r\n $session->form->setError(\"edbirth\", \"* Must specifiy birthdate\");\r\n }\r\n\r\n $edUserInfo['edgender'] = $_POST['edgender'];\r\n $edUserInfo['edaddrline1'] = $_POST['edaddrline1'];\r\n $edUserInfo['edaddrline2'] = $_POST['edaddrline2'];\r\n $edUserInfo['edcity'] = $_POST['edcity'];\r\n $edUserInfo['edstate'] = $_POST['edstate'];\r\n $edUserInfo['edzip'] = $_POST['edzip'];\r\n $edUserInfo['edphone'] = $_POST['edphone'];\r\n $edUserInfo['edutype'] = $_POST['edutype'];\r\n\r\n /* Usertype error checking */\r\n $field = \"edutype\"; //Use field name for usertype\r\n if(($edUserInfo['uid'] == $session->uid) &&\r\n ($edUserInfo['edutype'] != ADMIN) && $session->database->getNumAdmins < 2) {\r\n $session->form->setError($field, \"* You are the only Administrator in the system<br />\");\r\n }\r\n\r\n if($session->form->num_errors == 0) { /* No errors exist */\r\n if($session->database->confirmUID($edUserInfo['uid'], DB_TBL_ADMINS)) {\r\n $user = new Administrator($edUserInfo);\r\n $retval = $user->update($edUserInfo);\r\n if(($retval == 0) && ($edUserInfo['edutype'] != ADMIN)) {\r\n if(!$user->updateUserType($edUserInfo['edutype'])) {\r\n $session->form->setError(\"edutype\", \"* Usertype has remained the same\");\r\n $retval = 1;\r\n }\r\n }\r\n } else if($session->database->confirmUID($edUserInfo['uid'], DB_TBL_TELLERS)) {\r\n $user = new Teller($edUserInfo);\r\n $retval = $user->update($edUserInfo);\r\n if(($retval == 0) && ($edUserInfo['edutype'] != TELLER)) {\r\n if(!$user->updateUserType($edUserInfo['edutype'])) {\r\n $session->form->setError(\"edutype\", \"* Usertype has remained the same\");\r\n $retval = 1;\r\n }\r\n }\r\n } else if($session->database->confirmUID($edUserInfo['uid'], DB_TBL_CUSTOMERS)) {\r\n $user = new Customer($edUserInfo);\r\n $retval = $user->update($edUserInfo);\r\n if(($retval == 0) && ($edUserInfo['edutype'] != CUSTOMER)) {\r\n if(!$user->updateUserType($edUserInfo['edutype'])) {\r\n $session->form->setError(\"edutype\", \"* Usertype has remained the same\");\r\n \t$retval = 1;\r\n }\r\n }\r\n } else {\r\n $session->form->setError(\"edutype\", \"* Invalid Usertype\");\r\n $retval = 1;\r\n }\r\n } else {\r\n \t$retval = 1;\r\n }\r\n\r\n /* Account edit successful */\r\n if(isset($retval) && ($retval == 0)) {\r\n $_SESSION['edituser'] = true;\r\n } else { /* Error found with form */\r\n $_SESSION['value_array'] = $_POST;\r\n $_SESSION['error_array'] = $session->form->getErrorArray();\r\n }\n header(\"Location: \".$session->referrer.\"?uid=\".$_POST['uid']);\r\n }", "function femail_user_add_validate($form, &$form_state){\n if(!valid_email_address($form_state['values']['femail_email'])){\n form_set_error('femail_email', t('Email address provided is not valid'));\n }\n // Check for existing entries.\n if(db_result(db_query(\"SELECT email FROM {femail_user_emails} WHERE email='%s' UNION SELECT mail FROM {users} WHERE mail='%s'\", $form_state['values']['femail_email'], $form_state['values']['femail_email']))){\n form_set_error('femail_email', t('Email is already in use on this site.'));\n }\n}", "function saveprofile() {\r\n $sesdata = array(\r\n 'is_logged_in' => true,\r\n 'guser' => '[email protected]'\r\n );\r\n $this->session->set_userdata($sesdata);\r\n // remove this block above once complete \r\n $this->load->library('form_validation');\r\n $this->form_validation->set_rules('email', 'Email', 'required|trim|valid_email');\r\n $this->form_validation->set_rules('work_phone', 'Work Phone', 'trim|callback_valid_workphone');\r\n if ($this->form_validation->run()) {\r\n\r\n if ($this->updateUserProfile()) {\r\n redirect('user/savefirm');\r\n } else {\r\n echo 'database Error saving User Profile!';\r\n }\r\n } else {\r\n $this->load->view('templates/header');\r\n $this->load->view('templates/topnav');\r\n $this->load->view('templates/blankleftnav');\r\n $this->load->view('pages/setupprofile');\r\n $this->load->view('templates/footer');\r\n }\r\n }", "public function p_signup() {\n\t\t$email_a = $_POST['email'];\n\n\t\t//check to ensure there is not already a user with that email (a duplicate)\n\t\t$q = \"SELECT users.email\n\t\t\t\tFROM users \n\t \tWHERE users.email = '\".$_POST['email'].\"'\n\t \t\";\n\t\t\t\n\t\t$email_validation = DB::instance(DB_NAME)->select_field($q);\n\n\t\t//validation of empty fields\n\n\t\tif (empty($_POST['first_name'])) {\n\t\t\tRouter::redirect(\"/users/signup/signup_error\");\n\n \t} elseif (empty($_POST['last_name'])) {\n \t\tRouter::redirect(\"/users/signup/signup_error\");\n \t\n \t} elseif (empty($_POST['email'])) {\n \tRouter::redirect(\"/users/signup/signuperror\");\n \t\n \t} elseif (empty($_POST['password'])) {\n \tRouter::redirect(\"/users/signup/signup_error\");\n \n //check for valid email syntax\t\n \t} elseif (!filter_var($email_a, FILTER_VALIDATE_EMAIL)) {\n \t\n\t\t\tRouter::redirect(\"/users/signup_invalid/signup_invalid\");\n\t\t\n \t} \n \t//check duplicate\n \telseif ($email_validation) {\n\t\t\t\t\n\t\t\tRouter::redirect(\"/users/signup_duplicate/signup_duplicate\");\n\t\t\n\t\t//signup the user and send info to DB\t\n\t\t} else {\n\n\t\t\t\t//1. insert the data into the DB\n\n\t\t\t\t$_POST['created'] = Time::now();\n\t\t\t\t$_POST['modified'] = Time::now();\n\t\t\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\t\t\t$_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\n\t\t\t\t$user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\n\t\t\t\t//2. get the user id in order to upload the default photo for the user\n\t\t\t\t//(Currently this is not working. Please see the open items and review items explanation in github readme).\n\n\t\t\t\t\t$q_userID = \"SELECT users.user_id\n\t\t\t\t\tFROM users \n\t\t \tWHERE users.email = '\".$_POST['email'].\"'\n\t\t \t\";\n\t\t\t\t\n\t\t\t\t\t$user_validation = DB::instance(DB_NAME)->select_field($q_userID);\n\t\t\t\t\n\t\t\t\t//2a. Insert a default pic for user. See error note in item 2 above.\n\t\t\t\t//This uploads a \"broken link. Since INNER JOIN is used on posts, \n\t\t\t\t//a profile picture is needed (even if the link is broken in the view).\n\n\t\t\t\t\t$data = Array('pic_id' => $user_validation,\n\t\t\t\t\t\t\t'user_id' => $user_validation,\n\t\t\t\t\t\t\t'created' => Time::now(),\n\t\t\t\t\t\t\t'picture' => \"/uploads/profiles/blank_profile.jpg\");\n\n\t\t\t\t\t$user_id = DB::instance(DB_NAME)->update_or_insert_row('profilePics', $data);\n\n\t\t\t\t\n\t\t\t\t//3. upon signup, give the user a token to continue directly to their page\n\n\t\t\t\t$q2 = \"SELECT token\n\t\t\t\t\tFROM users \n\t\t \tWHERE email = '\".$_POST['email'].\"'\n\t\t \tAND password = '\".$_POST['password'].\"'\";\n\n\t\t\t\t$token = DB::instance(DB_NAME)->select_field($q2);\n\n\t\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n\t\t\t\tRouter::redirect(\"/users/profile\");\n\t\t}\t\t\n\t\n\t}", "public function save() {\n\n $result = parent::save();\n\n // if this user has a new email we send an email to confirm\n if($this->new_email) {\n $this->email_verified = 'False';\n $this->sendConfirmEmail();\n }\n\n // make sure the user has the login role\n $login_role = new Model_Role(array('name' =>'login'));\n if(!$this->has('roles', $login_role)) {\n $this->add('roles',$login_role);\n }\n return $result;\n }", "function processRegistration() {\n\n $_SESSION['registerMsg'] = \"unknown\";\n\n/* ... setup and perform validation on the basic data the new account form should have provided us */\n $this->load->library( 'form_validation' );\n $this->form_validation->set_rules( \"r_email\", \"Email Address\", \"required|valid_email\" );\n $this->form_validation->set_rules( \"r_password\", \"Password\", \"required|min_length[8]|callback_checkPasswordComplexity\" );\n $this->form_validation->set_rules( \"passwordConf\", \"Password Confirmation\", \"required|matches[r_password]\" );\n $this->form_validation->set_rules( \"firstname\", \"First Name\", \"required\" );\n $this->form_validation->set_rules( \"lastname\", \"Last Name\", \"required\" );\n $this->form_validation->set_rules( \"homephone\", \"Home Phone\", \"required|exact_length[10]|numeric\" );\n $this->form_validation->set_rules( \"workphone\", \"Work Phone\", \"exact_length[10]|numeric\" );\n $this->form_validation->set_rules( \"cellphone\", \"Cell Phone\", \"exact_length[10]|numeric\" );\n $this->form_validation->set_rules( \"altemail\", \"Alternative Email\", \"valid_email\" );\n\n /* ... validate the information in the form */\n if ($this->form_validation->run()) {\n\n/* ... need to check to ensure we don't have an entry for this email account (since that is our unique key) */\n if (!$this->Model_Account->checkEmail( $this->input->post( 'r_email' ) )) {\n\n/* ... add the new user record to the database */\n $data = array(\n \"EmailAccount\" => $this->input->post( 'r_email' ),\n \"Password\" => md5( $this->input->post( 'r_password' ) ),\n \"FirstName\" => $this->input->post( 'firstname' ),\n \"LastName\" => $this->input->post( 'lastname' ),\n \"HomePhone\" => $this->input->post( 'homephone' ),\n \"WorkPhone\" => $this->input->post( 'workphone' ),\n \"CellPhone\" => $this->input->post( 'cellphone' ),\n \"AltEmail\" => $this->input->post( 'altemail' ),\n \"Status\" => 'ACTIVE',\n );\n $userId = $this->Model_Account->addAccount( $data );\n\n/* ... there are a few related tasks we need to take care of using the numeric user ID for this account */\n if ( $userId > 0) {\n\n/* ... see if we need to update any team contacts to use reference a known account, not just a stored email address */\n $this->Model_Team->contactArriving( $data['EmailAccount'], $userId );\n\n/* ... log the account into the website */\n $this->Model_Account->loginAccount( $userId );\n $_SESSION['registerMsg'] = \"valid\";\n\n/* ... send the account owner an email with the registration details */\n $this->Model_Account->sendRegistrationEmail( $userId, $this->input->post( 'r_password' ), TRUE );\n\n }\n\n }\n else {\n\n/* ... indicate that the form failed validation in some way -- this will help display appropriate field error messages */\n $_SESSION['registerMsg'] = \"invalid\";\n }\n\n }\n\n/* ... time to go */\n $this->register();\n return;\n }", "public function save()\n {\n if ($this->id)\n {\n $query = sprintf('UPDATE USERS SET USERNAME = \"%s\", ' .\n 'PASSWORD = \"%s\", EMAIL_ADDR = \"%s\", FIRST_NAME = \"%s\", LAST_NAME = \"%s\", IS_ACTIVE = %d ' .\n 'WHERE USER_ID = %d',\n mysql_real_escape_string($this->username, $GLOBALS['DB']),\n mysql_real_escape_string($this->password, $GLOBALS['DB']),\n mysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n mysql_real_escape_string($this->firstName, $GLOBALS['DB']),\n mysql_real_escape_string($this->lastName, $GLOBALS['DB']),\n $this->isActive,\n $this->id);\n mysql_query($query, $GLOBALS['DB']);\n }\n else\n {\n $query = sprintf('INSERT INTO USERS (USERNAME, PASSWORD, ' .\n 'EMAIL_ADDR, FIRST_NAME, LAST_NAME, IS_ACTIVE) VALUES (\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", %d)',\n mysql_real_escape_string($this->username, $GLOBALS['DB']),\n mysql_real_escape_string($this->password, $GLOBALS['DB']),\n mysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n mysql_real_escape_string($this->firstName, $GLOBALS['DB']),\n mysql_real_escape_string($this->lastName, $GLOBALS['DB']),\n $this->isActive);\n mysql_query($query, $GLOBALS['DB']);\n\n $this->id = mysql_insert_id($GLOBALS['DB']);\n }\n }", "public function store()\n {\n $user_identifier = $this->session->userdata('identifier');\n $data = [\n 'email' => $this->input->post('inputEmail'),\n 'name' => $this->input->post('inputName'),\n 'address' => $this->input->post('inputAddress'),\n 'phone' => $this->input->post('inputPhone')\n ];\n\n if ($this->user_m->updateDetails($user_identifier, $data)) {\n $this->flash_message('Profil Akun Berhasil di Update');\n } else {\n $this->flash_message('Profil Akun Gagal di Update');\n }\n redirect($this->data['user'].'/show');\n }", "function m_verifyInsertUser()\n\t{\n\t\t$this->errMsg=MSG_HEAD.\"<br />\";\n\t\t$data = implode(\",\",$this->request);\n\t\tif(CAPTCHA_REGISTRATION){\n\t\t\tif($_SESSION['image_auth_string'] != $this->request['cap_key']){\n\t\t\t\t$this->err=1;\n\t\t\t\t$this->errMsg.=MSG_INVALID_CAP_KEY.\"<br />\";\n\t\t\t}\n\t\t}\n\t\tif(!$this->libFunc->m_validEmailData($data)){\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_INVALID_EMAILDATA.\"<br />\";\n\t\t}\n\t\tif(empty($this->request['first_name']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_FIRSTNAME_EMPTY.\"<br />\";\n\t\t}\n\t\tif(empty($this->request['last_name']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_LASTNAME_EMPTY.\"<br>\";\n\t\t}\n\t\tif(empty($this->request['txtemail']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_EMAIL_EMPTY.\"<br>\";\n\t\t}\n\t\tif(!$this->libFunc->m_validateEmail($this->request['txtemail']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_INVALID_EMAILADDR.\"<br />\";\n\t\t}\n\t\tif(empty($this->request['address1']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_ADDRESS1_EMPTY.\"<br>\";\n\t\t}\n\n\t\tif(empty($this->request['city']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_CITY_EMPTY.\"<br>\";\n\t\t}\n\t\tif(empty($this->request['zip']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_ZIP_EMPTY.\"<br>\";\n\t\t}\n\t\tif(empty($this->request['phone']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_PHONE_EMPTY.\"<br>\";\n\t\t}\n\t\t#VALIDATING EXISTING OPTION TITLE\n\t\t//adding status check to allow for registration of a account that has already ordered once. Status signifies it was a auto generated account and shouldnt be used or is a yet to be verified account. Should consider making a seperate flag for account signalling that it is a autogenerated account.\n\t\t$this->obDb->query = \"SELECT iCustmerid_PK FROM \".CUSTOMERS.\" where vEmail = '\".$this->request['txtemail'].\"' AND iRegistered='1'\";\n\t\t$row_code = $this->obDb->fetchQuery();\n\t\tif($this->obDb->record_count != 0)\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg.=MSG_EMAIL_EXIST.\"<br>\";\n\t\t}\n\t\t\n\t\treturn $this->err;\n\t}", "function register_user($first_name, $last_name, $username, $password, $email){\n\n // call the escape function to escape the variable \n // to prevent sql injecction \n\n $first_name = escape($first_name); \n $last_name = escape($last_name);\n $username = escape($username);\n $password = escape($password);\n $email = escape($email);\n \n\n // if the user enters an email that is already taken \n // deny the registration\n\n if(email_exists($email)){\n \n return false; \n }\n\n // if the user enters a username that is already taken\n // deny the registration \n else if(username_exists($username)){\n\n return false; \n\n } \n else \n { // if the user information is verified proceed to insertion in the user table \n\n\n // encrypt the message using password to encrypt the message \n $password = password_hash($password, PASSWORD_BCRYPT, array('cost'=>12));\n\n $validation_code = md5($username . microtime()); // create random validation codes\n\n // insert the user information to the user table with the validation code\n // Also make sure that the user activation state is set to 0 for this moment \n $sql = \"INSERT INTO users(first_name, last_name, username, password ,validation_code, active, email)\";\n $sql.= \"VALUES('$first_name','$last_name','$username','$password','$validation_code',0, '$email')\";\n\n $result = query($sql); // send the information\n\n // send a link to the user email with the validation code\n $subject = \"Activate Account\";\n $msg = \"Please click the link below to activate your account \n \n <a href =\\\"\".Config::DEVELOPMENT_URL.\"/activate.php?email=$email&code=$validation_code\\\">\n \n LINK HERE</a>\"; \n \n \n // setup a email header \n $headers = \"From: noreply@localhost\";\n\n // send the link\n send_email($email, $subject, $msg, $headers);\n\n return true;\n \n }\n}", "private function register_user( $email, $company_name, $first_name, $last_name, $contact_phone, $mobile_phone, $job_title, $sector, $ftseIndex, $invTrust, $sec_name, $sec_email ) {\n\t\t$errors = new WP_Error();\n\t\t\n\t\t// Email as both email and user, only one needing validation\n\t\tif( !is_email( $email ) ) {\n\t\t\t$errors->add( 'email', $this->get_error_message( 'email' ) );\n\t\t\treturn $errors;\n\t\t}\n\t\t\n\t\tif( username_exists( $company_name ) ) {\n\t\t\t$errors->add( 'user_exists', $this->get_error_message( 'user_exists' ) );\n\t\t\treturn $errors;\n\t\t}\n\t\t\n\t\tif( email_exists( $email ) ) {\n\t\t\t$errors->add( 'email_exists', $this->get_error_message( 'email_exists' ) );\n\t\t\treturn $errors;\n\t\t}\n\t\t\n\t\t// Generate pass\n\t\t$password = wp_generate_password( 12, false );\n\t\t\n\t\t$user_data = array(\n\t\t\t'user_login'\t=> $company_name,\n\t\t\t'user_email'\t=> $email,\n\t\t\t'user_pass'\t\t=> $password,\n\t\t\t'nickname'\t\t=> $first_name . ' ' . $last_name,\n\t\t\t'first_name'\t=> $first_name,\n\t\t\t'last_name'\t\t=> $last_name\n\t\t);\n\t\t\n\t\t$user_id = wp_insert_user( $user_data );\n\t\t$this->wp_new_user_notification( $user_id, $password );\n\t\tupdate_user_meta( $user_id, 'company_name', $company_name );\n\t\tupdate_user_meta( $user_id, 'contact_phone', $contact_phone );\n\t\tupdate_user_meta( $user_id, 'mobile_phone', $mobile_phone );\n\t\tupdate_user_meta( $user_id, 'job_title', $job_title );\n\t\tupdate_user_meta( $user_id, 'sector', $sector );\n\t\tupdate_user_meta( $user_id, 'ftseIndex', $ftseIndex );\n\t\tupdate_user_meta( $user_id, 'invTrust', $invTrust );\n\t\tupdate_user_meta( $user_id, 'sec_name', $sec_name );\n\t\tupdate_user_meta( $user_id, 'sec_email', $sec_email );\n\t\t\n\t\treturn $user_id;\n\t}", "function setupUser($email, $hash, $pass, $passSalt){\n\t$conn = connectViaMysql();\n\t$email= mysqli_real_escape_string($conn, $email);\n\t$hash= mysqli_real_escape_string($conn, $hash);\n\t$pass= mysqli_real_escape_string($conn, $pass);\n\t$passSalt= mysqli_real_escape_string($conn, $passSalt);\n\ttry{\n \t\n\t\techo \"saving data\";\n\t\t\n\t\t//set active to 1 \n\t\t$activateQuery = \"UPDATE users SET active='1' WHERE email='\".$email.\"' AND hash='\".$hash.\"' AND active='0'\";\n\t\tmysqli_query($conn,$activateQuery) or die(mysqli_error($conn));\n\t\t\n\t\t//save password into database\n\t\t$activateQuery = \"UPDATE users SET cred='\".$pass. \"' WHERE email='\".$email.\"' AND hash='\".$hash.\"' AND active='1'\";\n\t\tmysqli_query($conn,$activateQuery) or die(mysqli_error($conn));\n\t\t$activateQuery = \"UPDATE users SET security='\".$passSalt. \"' WHERE email='\".$email.\"' AND hash='\".$hash.\"' AND active='1'\";\n\t\tmysqli_query($conn,$activateQuery) or die(mysqli_error($conn));\n\t\t\n\t\t// set temp stuff to 00000\n\t\t$activateQuery = \"UPDATE users SET hash='0000' WHERE email='\".$email.\"' AND cred='\".$pass.\"' AND active='1'\";\n\t\tmysqli_query($conn,$activateQuery) or die(mysqli_error($conn));\n\t\t\n\t\techo \"done saving data\";\n\t}catch(PDOException $e){\n echo 'Error: ' . $e->getMessage();\n }\n\tmysqli_close($conn);\n}", "public function onUserAfterSave($user, $isnew, $success, $msg) {\n\n //On new users only - this allows the admin to reset a users group after reg if needed.\n if ($isnew) {\n\n //set variables\n //get the user from the function argument\n $email = $user['email'];\n $email = strstr($email, '@');\n\n //get entered email addresses from Params\n $email1 = $this->params->get('email_1');\n $email2 = $this->params->get('email_2');\n $email3 = $this->params->get('email_3');\n $email4 = $this->params->get('email_4');\n $email5 = $this->params->get('email_5');\n $email6 = $this->params->get('email_6');\n $email7 = $this->params->get('email_7');\n $email8 = $this->params->get('email_8');\n $email9 = $this->params->get('email_9');\n $email10 = $this->params->get('email_10');\n\n\n //get entered groups from Params\n $group1 = $this->params->get('group_1');\n $group2 = $this->params->get('group_2');\n $group3 = $this->params->get('group_3');\n $group4 = $this->params->get('group_4');\n $group5 = $this->params->get('group_5');\n $group6 = $this->params->get('group_6');\n $group7 = $this->params->get('group_7');\n $group8 = $this->params->get('group_8');\n $group9 = $this->params->get('group_9');\n $group10 = $this->params->get('group_10');\n\n //Make ass-array, that ties emails with groups\n $list = array(\n \"$email1\" => \"$group1\",\n \"$email2\" => \"$group2\",\n \"$email3\" => \"$group3\",\n \"$email4\" => \"$group4\",\n \"$email5\" => \"$group5\",\n \"$email6\" => \"$group6\",\n \"$email7\" => \"$group7\",\n \"$email8\" => \"$group8\",\n \"$email9\" => \"$group9\",\n \"$email10\" => \"$group10\",\n );\n if (array_key_exists($email, $list)) {\n\n\n //get id from the function argument\n $user_id = $user['id'];\n //get the right group from the ass-array based on the email entered\n $group = $list[\"$email\"];\n\n //connect to DB object\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n\n //set the fields for the UPDATE query\n $fields = array(\n \"user_id = $user_id\",\n \"group_id = $group\"\n );\n //set the overall query\n $query->update($db->quoteName('#__user_usergroup_map'))->set($fields)->where(\"user_id=$user_id\");\n $db->setQuery($query);\n\n //execute the query\n $db->execute();\n }\n }\n }", "public function p_signup() {\n\n $q= 'Select email \n From users \n WHERE email=\"'.$_POST['email'].'\"';\n # see if the email exists\n $emailexists= DB::instance(DB_NAME)->select_field($q);\n \n # email exists, throw an error\n if($emailexists){ \n \n Router::redirect(\"/users/signup/error\"); \n \n }\n \n #requires all fields to be entered if java script is disabled, otherwise thow a different error\n \n elseif (!$_POST['email'] OR !$_POST['last_name'] OR !$_POST['first_name'] OR !$_POST['password']) {\n Router::redirect(\"/users/signup/error2\"); \n }\n # all is well , proceed with signup\n else{\n \n $_POST['created']= Time::now();\n $_POST['password']= sha1(PASSWORD_SALT.$_POST['password']); \n $_POST['token']= sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n # add user to the database and redirect to users login page \n $user_id=DB::instance(DB_NAME)->insert_row('users',$_POST);\n # Create users first Notebook\n $notebook['name']= $_POST['first_name'].' Notebook';\n $notebook['user_id']= $user_id;\n $notebook['created']= Time::now(); \n $notebook['modified']= Time::now(); \n DB::instance(DB_NAME)->insert_row('notebooks',$notebook); \n\n Router::redirect('/users/login');\n }\n \n }", "public function manageAccountAction()\n {\n $errors = [];\n $preserved = [];\n if(!empty($_POST)){\n $userValidation = new UserValidation($_POST, ['fullname', 'address', 'contact']);\n $errors = $userValidation->getNamedErrors();\n\n $preserved = $_POST;\n\n if(empty($errors)){\n $user = Auth::getUser();\n $user->update($_POST);\n Extra::setMessageCookie(\"Profile updated successfully.\");\n $this->redirect(\"/manage-account/\");\n }\n }\n View::renderTemplate(\"LoggedUser/manage-account.html\", [\n 'errors' => $errors,\n 'preserved' => $preserved\n ]);\n }", "function saveuser(){\n \t\t\tif (isset($_POST['UserID'])){\n \t\t\t\t$UserID = base64_decode($_POST['UserID']);\n \t\t\t\t$this->Users->UpdateUser($UserID);\n \t\t\t}else{\n \t\t\t\t$UserID = $this->Users->AddNewUser();\n \t\t\t\t$this->Users->AddUserToCompany($UserID);\n \t\t\t}\n \t\t\t$this->Flash->error(__('UserSaved', true));\n \t\t\t$this->Redirect('/users/edituser/'.base64_encode($UserID));\n \t\t}", "function _webform_edit_email_validate($element, &$form_state) {\r\n if ($form_state['values']['user_email']) {\r\n $form_state['values']['value'] = '%useremail';\r\n }\r\n}", "function save_user() {\n $this -> load -> library(array('form_validation', 'session'));\n $this -> form_validation -> set_rules('user_firstname', 'nombre', \"required|trim\");\n $this -> form_validation -> set_rules('user_lastname', 'apellido', \"required|trim\");\n $this -> form_validation -> set_rules('user_email', 'email', \"required|trim|valid_email\");\n $this -> form_validation -> set_rules('user_email2', 'confirmar email', \"required|trim|valid_email|matches[user_email]\");\n $this -> form_validation -> set_rules('user_password', 'contraseña', (!$this -> input -> post('user_id') ? 'required|' : '') . \"trim|min_length[4]\");\n $this -> form_validation -> set_rules('user_password2', 'confirmar contraseña', (!$this -> input -> post('user_id') || trim($this -> input -> post('user_password')) != '' ? 'required|' : '') . \"trim|matches[user_password]\");\n\n if ($this -> form_validation -> run() == TRUE) {\n if (trim($this -> input -> post('user_password')) == '')\n unset($_POST['user_password']);\n unset($_POST['user_password2']);\n unset($_POST['user_email2']);\n if (!$this -> input -> post('user_id'))\n $_POST['user_created'] = date('Y-m-d G:i:s');\n $data = $this -> basic -> save('users', 'user_id', $this -> input -> post());\n $response['js'] = 'window.top.location.href=\"' . site_url('front_login/perfil') . '\"';\n } else {\n $response['html'] = validation_errors();\n $response['error'] = '1';\n }\n\n echo json_encode($response);\n }", "function changeEmail() {\r\n\r\n\tglobal $SALT;\r\n\tglobal $DB;\r\n\tglobal $MySelf;\r\n\r\n\t// Are we allowed to change our email?\r\n\tif (!$MySelf->canChangeEmail()) {\r\n\t\tmakeNotice(\"You are not allowed to change your email. Ask your CEO to re-enable this feature for your account.\", \"error\", \"Forbidden\");\r\n\t}\r\n\r\n\t/*\r\n\t* At this point we know that the user who submited the\r\n\t* email change form is both legit and the form was not tampered\r\n\t* with. Proceed with the email-change.\r\n\t*/\r\n\r\n\t// its easier on the eyes.\r\n\t$email = sanitize($_POST[email]);\r\n\t$username = $MySelf->getUsername();\r\n\r\n\t// Update the Database. \r\n\tglobal $IS_DEMO;\r\n\tif (!$IS_DEMO) {\r\n\t\t$DB->query(\"update users set email = '$email', emailvalid = '0' where username = '$username'\");\r\n\t\tmakeNotice(\"Your email information has been updated. Thank you for keeping your records straight!\", \"notice\", \"Information updated\");\r\n\t} else {\r\n\t\tmakeNotice(\"Your email would have been changed. (Operation canceled due to demo site restrictions.)\", \"notice\", \"Email change confirmed\");\r\n\t}\r\n\r\n}", "function addUser($username, $email, $firstname, $lastname, $gender,$address1,$address2,$country, $contactnumber, $password) {\n\tif(hasNotSensitiveCharacters($username)){\n\t\tif(hasNotSensitiveCharacters($email)){\n\t\t\tif(hasNotSensitiveCharacters($firstname)){\n\t\t\t\tif(hasNotSensitiveCharacters($lastname)){\n\t\t\t\t\tif(hasNotSensitiveCharacters($gender)){\n\t\t\t\t\t\tif(hasNotSensitiveCharacters($address1)){\n\t\t\t\t\t\t\tif(hasNotSensitiveCharacters($address2)){\n\t\t\t\t\t\t\t\tif(hasNotSensitiveCharacters($country)){\n\t\t\t\t\t\t\t\t\tif(hasNotSensitiveCharacters($contactnumber)){\n\t\t\t\t\t\t\t\t\t\tif(hasNotSensitiveCharacters($password)){\n\t\t\t\t\t\t\t\t\t\t\tif($gender != \"Select a gender\" && $country != \"Select a country\"){\n\t\t\t\t\t\t\t\t\t\t\t\tif (!(isUserExistsByUsername($username) || isUserExistsByEmail($email))) { \t\t\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\t\tif(isNonFetchQuerySuccess(\"INSERT INTO user_profile_details (username, first_name, last_name,gender,address_line1,country,email,address_line2,picture_file_path,contact_number) VALUES ('$username', '$firstname','$lastname' , '$gender' , '$address1', '$country', '$email', '$address2', '', '$contactnumber')\")){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$password = encodeString($password);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (isAdminAlreadyExists($username)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisNonFetchQuerySuccess(\"INSERT INTO user_login (username, password , status) VALUES ('$username', '$password', 'NORMAL USER')\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisNonFetchQuerySuccess(\"INSERT INTO user_login (username, password , status) VALUES ('$username', '$password', 'ADMIN USER')\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION['firstSignIn'] = \"Successfully signed up! <br> Now you can login here\" ;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tredirect_to(\"home\");\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn \"Registration Failed\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t} else if (isUserExistsByUsername($username)) { \n\t\t\t\t\t\t\t\t\t\t\t\t\treturn \"Username is not available\";\n\t\t\t\t\t\t\t\t\t\t\t\t} else if (isUserExistsByEmail($email)) { \n\t\t\t\t\t\t\t\t\t\t\t\t\treturn \"Email already exists\";\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\treturn \"Password has Invalid characters\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\treturn \"Contact number has Invalid characters\";\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\treturn \"Country has Invalid characters\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn \"Address Line 2 has Invalid characters\";\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\treturn \"Address Line 1 has Invalid characters\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn \"Gender has Invalid characters\";\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn \"Last name has Invalid characters\";\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\treturn \"First name has Invalid characters\";\n\t\t\t}\n\t\t}else{\n\t\t\treturn \"Email has Invalid characters\";\n\t\t} \n\t} else{\n\t\treturn \"Username has Invalid characters\";\n\t}\n \n}", "public function setPersonalInfo($email)\r\n\t{\r\n\t\t$errors = array();\r\n\t\tif(!strlen($email))\r\n\t\t{\r\n\t\t\t$errors['email'] = 'Error: email is required';\r\n\t\t}else if(!filter_var($email, FILTER_VALIDATE_EMAIL)){\r\n\t\t\t$errors['email'] = 'Error: invalid email';\r\n\t\t}\r\n\r\n\t\tif(count($errors)) return $errors;\r\n\t\t\r\n\t\t$email = mysql_real_escape_string(stripslashes($email));\r\n\t\t\r\n\t\t$query = 'UPDATE users SET email=\"' . $email . '\" WHERE id=' . $this->user->id . ' LIMIT 1';\r\n\t\tmysql_query($query) or die('Bad SQL Query in updating personal info');\r\n\t\treturn true;\r\n\t}", "public function updatevaliduserdetails($email,$code,$txtFirstName,$txtLastName,$txtAddress1,$txtAddress2,$txtAddress3,$txtAddress4,$txtCity,$txtPin,$txtState){\n\t\tif($this->veryfyuser($email,$code)){\n\t\t\t$this->db->where('Email', $email);\n\t\t\t$this->db->where('UniqueKey', $code);\n\t\t\t$object=array(\n\t\t\t\t'FirstName' => $txtFirstName,\n\t\t\t\t'LastName' => $txtLastName,\n\t\t\t\t'Status' => '1'\n\t\t\t);\n\t\t\t$this->db->update('tbl_userdetails', $object);\n\n\t\t\t$obj=array(\n\t\t\t\t'email' => $email,\n\t\t\t\t'address1' => $txtAddress1,\n\t\t\t\t'address2' => $txtAddress2,\n\t\t\t\t'address3' => $txtAddress3,\n\t\t\t\t'address4' => $txtAddress4,\n\t\t\t\t'city' => $txtCity,\n\t\t\t\t'pin' => $txtPin,\n\t\t\t\t'state' => $txtState,\n\t\t\t\t'country' => 'India'\n\t\t\t);\n\t\t\t$this->db->insert('tbl_useraddress', $obj);\n\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public function postSaveuser(){\n\n $validator4 = Validator::make(Input::all(), User::$userRules);\n $userMail = Input::get('useremail');\n \n if ($validator4->passes()) {\n $user = new User;\n $user->email = Input::get('useremail');\n $user->fullname = Input::get('fullname');\n $user->userType = \"user\";\n $user->save();\n\n return Redirect::to('admin/userlist')->with('message', 'User added succesfully!');\n }else{\n return Redirect::to('admin/newuser')->with('message', 'The following errors occurred')\n ->withErrors($validator4)->withInput(); \n }\n }", "public function onUserBeforeSave($oldUser, $isNew, $newUser)\n {\n // Existing user (Update)\n // if(!$isNew)\n // {\n // // On user activation\n // if(isset($oldUser['activation']) &&\n // !empty($oldUser['activation']) &&\n // isset($oldUser['requireReset']) &&\n // $oldUser['requireReset'] == 0 &&\n // isset($newUser['activation']) &&\n // empty($newUser['activation']))\n // {\n // if ($customer = $this->_syncAccount($oldUser))\n // {\n // $account = $this->getObject('com://admin/nucleonplus.model.accounts')->id($oldUser['id'])->fetch();\n // $account->CustomerRef = $customer->CustomerRef;\n // $account->activate();\n // $account->save();\n\n // // Attempt to send success email\n // $emailSubject = \"Your Nucleon Plus Account has been activated\";\n // $emailBody = JText::sprintf(\n // 'PLG_NUCLEONPLUS_EMAIL_ACTIVATION_BODY',\n // $account->_name,\n // JUri::root()\n // );\n\n // $config = JFactory::getConfig();\n // $email = JFactory::getMailer()->sendMail($config->get('mailfrom'), $config->get('fromname'), $account->_email, $emailSubject, $emailBody);\n // if ($email !== true)\n // {\n // throw new Exception(JText::sprintf('PLG_NUCLEONPLUS_REGISTRATION_ACTIVATION_NOTIFY_SEND_MAIL_FAILED'));\n // return false;\n // }\n // }\n // }\n // }\n\n // New user (Registration)\n if ($isNew)\n {\n // Validate TOS\n if (isset($newUser['profile']['tos']) && $newUser['profile']['tos'] <> '1') {\n throw new Exception('You must agree to the Terms and Conditions');\n return false;\n }\n\n // Validate Sponsor ID field\n return $this->_validateSponsorId($newUser);\n }\n\n return true;\n }", "public function save(){\n\t\t\tif($this->uid){\n\t\t\t\t$query = sprintf('UPDATE %sUSER SET USERNAME = \"%s\",PASSWORD =\"%s\", EMAIL_ADDR =\"%s\", IS_ACTIVE = %d WHERE USER_ID = %d',DB_TBL_PREFIX,\n\t\t\t\t\t\tmysql_real_escape_string($this->username, $GLOBALS['DB']),\n\t\t\t\t\t\tmysql_real_escape_string($this->password, $GLOBALS['DB']),\n\t\t\t\t\t\tmysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n\t\t\t\t\t\t$this->isActive, $this->userId);\n\t\t\t\t\t return mysql_query($query, $GLOBALS['DB']);\n\t\t\t}else{\n\t\t\t\t// if the user has not registered yet\n\t\t\t\t$query = sprintf('INSERT INTO %USER (USERNAME, PASSWORD, EMAIL_ADDR, IS_ACTIVE) VALUES ( \"%s\",\"%s\", \"%s\", %d)',DB_TBL_PREFIX,\n\t\t\t\t\t\tmysql_real_escape_string($this->username, $GLOBALS['DB']),\n\t\t\t\t\t\tmysql_real_escape_string($this->password, $GLOBALS['DB']),\n\t\t\t\t\t\tmysql_real_escape_string($this->emailAddr, $GLOBALS['DB']),\n\t\t\t\t\t\t$this->isActive);\n\t\t\t\t\t\tif(mysql_query($query, $GLOBALS['DB'])){\n\t\t\t\t\t\t\t$this->uid = mysql_insert_id($GLOBALS['DB']);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t }", "public function p_signup() {\n\t#print_r($_POST);\n\n\t# Prevent SQL injection attacks by sanitizing user entered data\n\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t#encrypt\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t#can override password salt in application version in core config\n\n\t$_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\t#token salt, users email, random string then hashed\n\n\t$_POST['created'] = Time::now(); #could mimic different time\n\t$_POST['modified'] = Time::now(); #time stamp\n\n\t#check if the address is not in use in the system\n\t$q = \"SELECT email\n\tFROM users WHERE email = '\".$_POST['email'].\"'\";\n\n\t$email = DB::instance(DB_NAME)->select_field($q);\n\n\tif($email == $_POST['email'] && $_POST['email' != \"\"]){\t\n\n\t\t$address_in_use = \"The email address you have entered is already in use. Please pick another.\";\n\t\tRouter::redirect(\"/users/signup/error=$address_in_use\");\n\t}\n\n\tif($_POST['email'] == \"\" || $_POST['first_name'] == \"\" || $_POST['last_name'] == \"\" || $_POST['password'] == \"\" ){\n\n\t\t$required = \"All fields on this form are required.\";\n\t\tRouter::redirect(\"/users/signup/error: $required\");\n\t}\n\telse{\n\n\t\t$user_id = DB::instance(DB_NAME)->insert(\"users\", $_POST);\n\n\n\t\t# For now, just confirm they've signed up - we can make this fancier later\n\t\techo \"You're registered! Now go <a href='/users/login'>add issue</a>\";\n\t\tRouter::redirect(\"/users/login\");\n\t}\t\n}", "public function save_user(){\n $data = array();\n $data['last_name'] = $this->input->post('last_name');\n $data['first_name'] = $this->input->post('first_name');\n $data['user_email'] = $this->input->post('email');\n $data['password'] = md5($this->input->post('password'));\n $data['user_address'] = $this->input->post('user_address');\n $data['user_city'] = $this->input->post('user_city');\n $data['user_zip'] = $this->input->post('user_zip');\n $data['country'] = $this->input->post('user_country');\n $data['user_type'] = $this->input->post('user_type');\n $data['user_tel'] = $this->input->post('user_tel');\n $data['email_verified'] = 0;\n\n $this->db->select('user_email');\n $query = $this->db->get_where('users',array('user_email'=>$data['user_email']));\n $row_count = $query->num_rows();\n if($row_count > 0){\n \n $data_message['message'] = 'This email is already in use. Try forgot password to recover your login credential, if this email belongs to you.';\n $this->load->view('gen_views/success_message', $data_message);\n //var_dump($data_message);\n }else{\n return $this->db->insert('users',$data) ; \n } \n }", "public function ActivateUser()\n {\n if (false === $this->isActivateUserAllowed()) {\n return;\n }\n\n $oMailProfile = TDataMailProfile::GetProfile('new-registration');\n\n if (null === $oMailProfile) {\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $sMessageCode = 'ERROR_ACTIVATE_USER';\n $oMessageManager->AddMessage($sConsumerName, $sMessageCode);\n\n return;\n }\n\n $password = TTools::GenerateNicePassword();\n\n $oMailProfile->AddData('login', $this->oTable->sqlData['login']);\n $oMailProfile->AddData('name', $this->oTable->sqlData['firstname']);\n $oMailProfile->AddData('email', $this->oTable->sqlData['email']);\n $oMailProfile->AddData('password', $password);\n $oMailProfile->ChangeToAddress($this->oTable->sqlData['email'], $this->oTable->sqlData['name']);\n\n $bValidEmail = TTools::IsValidEMail($this->oTable->sqlData['email']);\n $sMessageCode = 'ERROR_ACTIVATE_USER';\n if ($bValidEmail) {\n $oMailProfile->SendUsingObjectView('TDataMailProfile', 'Core');\n\n $filterUtil = $this->getInputFilterUtil();\n $postData = $this->oTable->sqlData;\n foreach ($postData as $key => $value) {\n $valueOfKey = $filterUtil->getFilteredInput($key);\n if (null !== $valueOfKey) {\n $postData[$key] = $valueOfKey;\n }\n }\n\n $postData['crypted_pw'] = $password;\n $postData['crypted_pw_check'] = $password;\n $postData['allow_cms_login'] = '1';\n $this->Save($postData);\n $sMessageCode = 'SUCCESS_ACTIVATE_USER';\n }\n\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $oMessageManager->AddMessage($sConsumerName, $sMessageCode);\n }", "function user_set_email($user_id, $new_email)\n{\n\tif(strcmp($new_email,user_get_email($user_id)))\n\t{\n\t\t//check that no other user has it\n\t\tif(!user_email_exists($new_email))\n\t\t{\n\t\t\t//set it\n\t\t\t$sql=\"UPDATE \".PREFIX.\"user SET email='\".sql_safe($new_email).\"' WHERE id=\".sql_safe($user_id).\";\";\n\t\t\tif(mysql_query($sql))\n\t\t\t\tadd_message(\"New email set\");\n\t\t\telse\n\t\t\t\tadd_error(\"Email could not be set: \".mysql_error());\n\t\t}\n\t\telse\n\t\t\tadd_error(\"Email '$new_email' is already in use.\");\n\t}\n}", "static function password_expired_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n\n password_expired_email($user) ?\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você criar uma nova senha.\") :\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function updateEmail(){\n if(\n !empty($_POST['email'])){\n $email = $_POST['email'];\n $id = $_SESSION['userID'];\n $user = new User();\n $user->updateEmail($email, $id);\n }\n else {\n echo \"false\";\n }\n }", "public function save() {\n\t\tif (!$this->validate()) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach($this->attributeNames() as $name) {\n\t\t\tif ($name != 'password2') {\n\t\t\t\t$this->user->$name = $this->$name;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->getScenarioIsCreation()) {\n\t\t\t$this->user->isNewRecord = true;\n\t\t}\n\t\tif (!$this->user->save(false, $this->getSafeAttributeNames())) {\n\t\t\t$this->addError('', 'Save account failed');\n\t\t\treturn false;\n\t\t}\n\t\t$msg = $this->getScenarioIsCreation()\n\t\t\t? 'Add Account successfull' : 'Save Account successfull'; \n\t\tYii::app()->console->addSuccess($msg);\n\t\treturn true;\n\t}", "public function save()\n\t{\n\t\tif (!$this->validate())\n\t\t\treturn false;\n\n\t\t$this->user->password = $this->password;\n\n\t\t// Verify that this activation key can't be used again\n\t\t$this->user->activated = 1;\n\t\t$this->user->activation_key = NULL;\n\n\t\tif ($this->user->save())\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "function reset_email()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Reset email\n\t\tif ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_activated').' '.anchor('/auth/login/', 'Login'));\n\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_new_email_failed'));\n\t\t}\n\t}", "private static function register() {\n if ( !self::validatePost() ) {\n return;\n }\n\n if ( !self::validEmail($_POST['email']) ) {\n self::setError('E-Mail Adresse ist nicht g&uuml;ltig!<br>');\n return;\n }\n \n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $verified = md5($_POST['email'].$password.microtime(true));\n \n $result = Database::createUser($_POST['email'],$password,$verified);\n \n if ( $result === false || !is_numeric($result) ) {\n return;\n }\n \n $_SESSION['user']['id'] = $result;\n $_SESSION['user']['email'] = $_POST['email'];\n $_SESSION['user']['verified'] = $verified;\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n \n self::registerMail($verified);\n }", "function register_user(){\n\n\t\t\t$use_username = config_item('use_username');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\t$email_activation = config_item('email_activation');\n\n\t\t\t$this->form_validation->run('auth','add_user');\n\n\n\t\t\tif ($this->form_validation->run('auth','add_user')) {\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->admin_create_user(\n\t\t\t\t\t\t$use_username ? $this->form_validation->set_value('username') : '',\n\t\t\t\t\t\t$this->form_validation->set_value('email'),\n\t\t\t\t\t\t$this->form_validation->set_value('password'),\n\t\t\t\t\t\t$this->input->post('fullname'),\n\t\t\t\t\t\t$this->input->post('company'),\n\t\t\t\t\t\t$this->input->post('role'),\n\t\t\t\t\t\t$this->input->post('phone'),\n\t\t\t\t\t\t$email_activation\n\t\t\t\t\t\t))) {\t\t\t\t\t\t\t\t\t// success\n\n\t\t\t\t\t$data['site_name'] = config_item('company_name');\n\n\t\t\t\t\tif ($email_activation) {\t\t\t\t\t\t\t\t\t// send \"activate\" email\n\t\t\t\t\t\t$data['activation_period'] = config_item('email_activation_expire') / 3600;\n\n\t\t\t\t\t\t$this->_send_email('activate', $data['email'], $data);\n\n\t\t\t\t\t\tunset($data['password']); // Clear password (just for any case)\n\t\t\t\t\t\t$this->session->set_flashdata('response_status', 'success');\n $this->session->set_flashdata('message', lang('client_registered_successfully_activate'));\n \t\t\t\t\tredirect($this->input->post('r_url'));\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif (config_item('email_account_details') == 'TRUE') {\t// send \"welcome\" email\n\n\t\t\t\t\t\t\t$this->_send_email('welcome', $data['email'], $data);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tunset($data['password']); // Clear password (just for any case)\n\t\t\t\t\t\t$this->session->set_flashdata('response_status', 'success');\n\t\t\t\t\t\t$this->session->set_flashdata('message', lang('user_added_successfully'));\n\t\t\t\t\t\tredirect($this->input->post('r_url'));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t\t$this->session->set_flashdata('response_status', 'error');\n\t\t\t\t\t$this->session->set_flashdata('message', lang('client_registration_failed'));\n\t\t\t\t\t$this->session->set_flashdata('form_errors', $data['errors'][$k]);\n\t\t\t\t\tredirect($this->input->post('r_url'));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->session->set_flashdata('response_status', 'error');\n\t\t\t\t$this->session->set_flashdata('message', lang('client_registration_failed'));\n\t\t\t\t$this->session->set_flashdata('form_errors', validation_errors('<span style=\"color:red\">', '</span><br>'));\n\t\t\t\tredirect($this->input->post('r_url'));\n\t\t\t}\n\n\t}", "function updateEmail($userinfo, &$existinguser, &$status)\r\n {\r\n $db = JFusionFactory::getDatabase($this->getJname());\r\n $query = 'UPDATE #__user SET user_email ='.$db->quote($userinfo->email) .' WHERE user_id =' . $existinguser->userid;\r\n $db->setQuery($query);\r\n if (!$db->query()) {\r\n $status['error'][] = JText::_('EMAIL_UPDATE_ERROR') . $db->stderr();\r\n } else {\r\n\t $status['debug'][] = JText::_('EMAIL_UPDATE'). ': ' . $existinguser->email . ' -> ' . $userinfo->email;\r\n }\r\n }", "public function p_signup(){\n\t\tforeach($_POST as $field => $value){\n\t\t\tif(empty($value)){\n\t\t\t\tRouter::redirect('/users/signup/empty-fields');\n\t\t\t}\n\t\t}\n\n\t\t#check for duplicate email\n\t\tif ($this->userObj->confirm_unique_email($_POST['email']) == false){\n\t\t\t#send back to signup page\n\t\t\tRouter::redirect(\"/users/signup/duplicate\");\n\t\t}\n\n\t\t#adding data to the user\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\n\t\t#encrypt password\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t#create encrypted token via email and a random string\n\t\t$_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\n\t\t#Insert into the db\n\t\t$user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\n\t\t# log in the new user\n\n\t\tsetcookie(\"token\", $_POST['token'], strtotime('+2 weeks'), '/');\n\n\t\t# redirect to home\n\t\tRouter::redirect('/users/home');\n\t\t\n\t}", "public function edit_saveAccountInfo(){\n\t\tif($this->input->post('edit_user_info_submit') !== false){\n\t\t\t$this->form_validation->set_rules('edit_user_info_account_user_id', 'Account User Id', \t'required');\n\t\t\t$this->form_validation->set_rules('edit_user_info_fname', \t'Firstname', \t\t\t\t'required');\n\t\t\t$this->form_validation->set_rules('edit_user_info_lname', \t'Lastname', \t\t\t\t'required');\n\t\t\t\n\t\t\tif ($this->form_validation->run() == FALSE){\n\t\t\t}else{\n\t\t\t\t$account_user_id = protect($this->input->post('edit_user_info_account_user_id') ) ;\n\t\t\t\t\n\t\t\t\t$fname \t\t\t= protect($this->input->post('edit_user_info_fname') ) ;\n\t\t\t\t$lname \t\t\t= protect($this->input->post('edit_user_info_lname') ) ;\n\t\t\t\t$gender \t\t= protect($this->input->post('edit_user_info_gender') ) ;\n\t\t\t\t\n\t\t\t\t$previous_dob\t= protect($this->input->post('edit_user_info_prev_dob') ) ;\n\t\t\t\t\n\t\t\t\t$month\t\t\t= protect($this->input->post('edit_user_info_month') ) ;\n\t\t\t\t$day\t\t\t= protect($this->input->post('edit_user_info_day') ) ;\n\t\t\t\t$year\t\t\t= protect($this->input->post('edit_user_info_year') ) ;\n\t\t\t\t\n\t\t\t\t$full_date_of_birth = $previous_dob ;\n\t\t\t\tif($month != \"\" && $day != \"\" && $year != \"\"){\n\t\t\t\t\t$full_date_of_birth = $month.\"/\".$day.\"/\".$year ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$user_id = $this->user_sessions->getUserId() ;\n\t\t\t\t//Get User Privilege\n\t\t\t\t$user_privilege = $this->user_sessions->getUserPrivilege($user_id) ;\n\t\t\t\t\n\t\t\t\tif( ($account_user_id == $user_id) || ($user_privilege == '10') ){\n\t\t\t\t\t\n\t\t\t\t\t$res = $this->updateUserInfoType1($account_user_id, $fname, $lname, $full_date_of_birth, $gender) ;\n\t\t\t\t\tif($res === true){\n\t\t\t\t\t\treturn true ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false ;\n\t}", "public function register_business_user(){\n\t\t\t $this->form_validation->set_rules('name', 'Name', 'trim|required|max_length[30]|xss_clean');\n\t\t\t $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|xss_clean|email|is_unique[user.email]');\n\t\t\t $this->form_validation->set_rules('email_again', 'Retype Email', 'trim|required|valid_email|xss_clean|email|matches[email]');\n\t\t\t $this->form_validation->set_rules('password', 'Password', 'trim|required|max_length[30]|min_length[8]|xss_clean');\n\t\t\t $this->form_validation->set_rules('password_again', 'Retype Password', 'trim|required|max_length[30]|min_length[8]|xss_clean|matches[password]');\t\t\t\t\t\t\t\t\t \n\t\t\t $this->form_validation->set_rules('business_name', 'Legal Name', 'trim|required|max_length[30]|xss_clean');\n\t\t\t $this->form_validation->set_rules('business_email', 'Business Email', 'trim|required|valid_email|xss_clean|email');\t\t\t\t\t\t\t\t\t \n\t\t\t $this->form_validation->set_rules('business_email_again', 'Retype Business Email', 'trim|required|valid_email|xss_clean|email|matches[business_email]');\n\t\t\t $this->form_validation->set_rules('display_name', 'Display Name', 'trim|required|max_length[30]|xss_clean|is_unique[user_profile.display_name]');\t\t\t\t\t\t\t\t\t \n\t\t\t $this->form_validation->set_rules('address_line_1', 'Address Line 1', 'trim|required|max_length[50]|xss_clean');\t\t\t\t\t\t\t\t \n\t\t\t $this->form_validation->set_rules('city', 'City', 'trim|required|max_length[50]|xss_clean');\n\t\t\t $this->form_validation->set_rules('zip', 'Zip', 'trim|required|max_length[10]|xss_clean');\n\t\t\t $this->form_validation->set_rules('state', 'State', 'trim|required|max_length[50]|xss_clean');\n\t\t\t $this->form_validation->set_rules('country', 'Country', 'trim|required|max_length[30]|xss_clean');\n\t\t\t $this->form_validation->set_rules('phone_primary', 'phone primary', 'integer|trim|required|min_length[10]|max_length[15]|xss_clean');\t\t\t\t\t\t\t\t\t \n\t\t\t $this->form_validation->set_rules('card_name', 'Card Name ', 'trim|required|max_length[50]|xss_clean');\n\t\t\t $this->form_validation->set_rules('card_number', 'Card Number ', 'trim|required|max_length[30]|xss_clean');\n\t\t\t $this->form_validation->set_rules('security_code', 'Security Code', 'trim|required|max_length[10]|xss_clean');\n\t\t\t \n\t\t\t if($this->input->post('page_action') == \"add_pro_user\"){\n\t\t\t\t$this->form_validation->set_rules('register_plan', 'Register Plan', 'trim|required|max_length[50]|xss_clean');\n\t\t\t\t$page_for = 'business_pro';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t $page_for = 'business_basic';\n\t\t\t\t\t }\n\t\t\t\n\t\t\t $this->form_validation->set_error_delimiters('', '');\n\t\t\t\t\n\t\t\tif($this->form_validation->run() == FALSE) {\n\t\t\t\t$this->add_user($page_for);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\t$this->load->model('Registration_model');\n\t\t\t\t\t\tif( ( $user_id = $this->Registration_model->register_business_basic() ) ) {\n\t\t\t\t\t\t \t $activation_link = base_url('registration/activate_link'.\"/\".md5($this->input->post('email')));\n\t\t\t\t\t\t \t $username = $this->input->post('display_name');\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t //email fielda\n\t\t\t\t\t\t\t $to = $this->input->post('email');\n\t\t\t\t\t\t\t $subject = 'Successfully registered in Dailydrums';\n\t\t\t\t\t\t\t $fromemail = '[email protected]';\n\t\t\t\t\t\t\t $fromname = 'Dailydrums';\n\t\t\t\t\t\t\t $data['activation_link'] = $activation_link;\n\t\t\t\t\t\t\t $data['username'] = $username;\n\t\t\t\t\t\t\t $msg = $this->load->view('email_templates/registration_confirmatation_mail',$data,TRUE);\n\t\t\t\t\t\t\t $this->load->library('Utils');\n\t\t\t\t\t\t\t $this->utils->send_email($to, $subject, $msg, $fromemail, $fromname);\n\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t if($this->input->post('page_action') == \"add_pro_user\") { // For Pro user\n\t\t\t\t\t\t\t\t\t $plan = $this->Common_model->get_plan_list($this->input->post('register_plan'));\n\t\t\t\t\t\t\t\t\t $transaction_array = array('user_id'=>$user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'transaction_id'=>'by_admin',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'amount'=>$plan->price,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'subject'=>\"Subscribe Pro by ADMIN\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'date'=>date(\"Y-m-d H:i:s\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'pdate'=>date(\"Y-m-d H:i:s\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\t\n\t\t\t\t\t\t\t\t\t\t$update_data = array('user_type'=>'business_pro');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$this->Registration_model->transaction_entry($transaction_array); // save transaction data\n\t\t\t\t\t\t\t\t\t\t$this->Registration_model->update_pro_data($user_id,$update_data);\t\t\t// Update basic user to pro user\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t$plan_map_array = array( 'user_id'=>$user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'plan_id'=>$plan->id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'price'=>$plan->price,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'duration'=>$plan->duration\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t $this->load->model('Insert_data_model');\n\t\t\t\t\t\t\t\t\t\t $this->Insert_data_model->save_user_plan_map_data($plan_map_array); \t\t// Saving plan map data\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->session->set_flashdata( 'info_message',\"Business user - \".$username.\" has been registred successfully, please check the email, to activate the account.\" );\n\t\t\t\t\t\t\t \tredirect(base_url('admin/user'));\n\t\t\t\t\t\t }\n\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t $this->session->set_flashdata( 'info_message',\"<span class='error-alert'>Failed to register the Business user, due to some improper data.</span>\" );\n\t\t\t\t\t\t\t\t redirect(base_url('admin/user/add_user/'.$page_for));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t}", "function activate_user(){\n\n // use the get request since the user information \n // has been post \n if($_SERVER['REQUEST_METHOD'] == \"GET\"){\n\n if(isset($_GET['email'])) {\n \n $email = clean($_GET['email']);\n $validation_code = clean($_GET['code']);\n \n // select the user in the database \n $sql = \"SELECT id FROM users WHERE email ='\".escape($_GET['email']).\"' AND validation_code = '\".escape($_GET['code']).\"'\";\n $result = query($sql); // get the result \n\n // if the user exists in the database, activate the account by updating active by 1\n // Then the user is redirected to the login page to login \n if(row_count($result)==1){\n\n $sql2 = \"UPDATE users SET active = 1, validation_code = 0 WHERE email = '\".escape($email).\"' AND validation_code = '\".escape($validation_code).\"'\";\n $result2 = query($sql2);\n\n set_message(\"<p class='bg-success'> Your account has been activated please login</p>\");\n \n redirect(\"login.php\");\n }\n else{ // if the user is not activated display an error message\n // and redirect the user to the login page\n\n set_message(\"<p class='bg-danger'> Sorry Your account has not been activated</p>\");\n \n redirect(\"register.php\"); \n\n } \n }\n\n} // GET \n\n}", "function save() {\n $modified_fields = $this->modified_fields;\n $is_new = $this->isNew();\n\n if($is_new && ($this->getToken() == '')) {\n $this->resetToken();\n } // if\n\n $save = parent::save();\n if($save && !is_error($save)) {\n if($is_new || in_array('email', $modified_fields) || in_array('first_name', $modified_fields) || in_array('last_name', $modified_fields)) {\n $content = $this->getEmail();\n if($this->getFirstName() || $this->getLastName()) {\n $content .= \"\\n\\n\" . trim($this->getFirstName() . ' ' . $this->getLastName());\n } // if\n\n search_index_set($this->getId(), 'User', $content);\n cache_remove_by_pattern('object_assignments_*_rendered');\n } // if\n\n // Role changed?\n if(in_array('role_id', $modified_fields)) {\n clean_user_permissions_cache($this);\n } // if\n } // if\n\n return $save;\n }", "function reset_email()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Reset email\n\t\tif ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->session->set_flashdata('message',$this->lang->line('auth_message_new_email_activated'));\n\t\t\t\t\tredirect('login');\n\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->session->set_flashdata('message',$this->lang->line('auth_message_new_email_failed'));\n\t\t\t\t\tredirect('login');\n\t\t}\n\t}", "function _os2dagsorden_create_agenda_meeting_create_user_form_email_validate($element, $form, &$form_state) {\r\n $value = $element['#value'];\r\n if (!valid_email_address($value)) {\r\n form_error($element, t('Indtast en gyldig email adresse.'));\r\n }\r\n if (db_query(\"SELECT COUNT(*) FROM {users} WHERE mail = :mail;\", array(':mail' => $value))->fetchField()) {\r\n form_error($element, t('Der findes allerede en bruger med denne email.'));\r\n }\r\n}", "public function saveuser()\n {\n $time = date('Y-m-d H:i:s');\n $tim = strtotime($time);\n $token= do_hash($this->input->post('useremail').$tim);\n\n $data_check = array( \n 'email' => $_POST[\"useremail\"],// adding the Encryp name and the extention file 2gether\n 'isdeleted' => 0\n );\n $check_data = $this->Fashion_model->is_user_email_available($data_check);\n\n if($check_data) \n { \n $Json_resultSave = array (\n 'status' => '0',\n 'content' => 'Email Already Register'\n );\n echo json_encode($Json_resultSave);\n exit();\n }\n else\n {\n $data_New = array( \n 'restaurantid' => $_SESSION['rest_id'],\n 'userroleid' => $_POST['userrole'],\n 'firstname' => $_POST['firstname'],\n 'lastname' => $_POST['lastname'],\n 'email' => $_POST['useremail'],\n 'phonenumber' => $_POST['phone'],\n 'confirmemail' => $token,\n 'forcepasswordchange' => 0,\n 'status' => 1\n );\n\n //print(\"<pre>\".print_r($data_New,true).\"</pre>\");//die;\n $insert_data = $this->Fashion_model->_insertnewuser($data_New);// insert to db\n\n if($insert_data)\n {\n $rest_info=$this->Fashion_model->get_restaurant_info($_SESSION['rest_id']);\n // send the customer an email\n $site_email ='[email protected]';\n $logo = 'jol.png';\n $this->Email_model->send_restaurant_User_email($this->input->post('firstname'), $this->input->post('lastname'), $_POST['useremail'], $site_email, $logo, $rest_info->companyname,$token );\n\n $Json_resultSave = array (\n 'status' => '1'\n );\n echo json_encode($Json_resultSave);\n exit();\n\n }\n else \n {\n $Json_resultSave = array (\n 'status' => '0'\n );\n echo json_encode($Json_resultSave);\n exit();\n }\n }\n }", "public function saveBackupEmail( $userID ) {\n\t\t$email = HTTP_Helper::retrievePost( 'def_backup_email' );\n\t\tif ( $email && get_current_user_id() == $userID ) {\n\t\t\tupdate_user_meta( $userID, 'defenderAuthEmail', $email );\n\t\t}\n\t}", "function reset_email()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Reset email\n if ($this->tank_auth->activate_new_email($user_id, $new_email_key)) {\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_new_email_activated').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_new_email_failed'));\n }\n }", "private function update() {\n\n if (isset($_POST['sitename']) && isset($_POST['siteemail']) && isset($_POST['user_name'])) {\n\n function user_name_check($username) {\n return !preg_match(\"/^[-0-9A-Z_@\\s]+$/i\", $username);\n }\n\n self::$siteData = $this->validate_SiteData();\n\n self::$userData = $this->validate_UserData();\n\n if (self::$userData['password1'] == self::$userData['admin_password1']) {\n \\defender::stop();\n addNotice('danger', self::$locale['setup_5016']);\n }\n\n if (\\defender::safe()) {\n\n $user_auth = new PasswordAuth(self::INSTALLER_ALGO);\n\n $user_auth->inputNewPassword = self::$userData['password1'];\n $user_auth->inputNewPassword2 = self::$userData['password2'];\n\n switch ($user_auth->isValidNewPassword()) {\n default:\n self::$userData['user_password'] = $user_auth->getNewHash();\n self::$userData['user_salt'] = $user_auth->getNewSalt();\n break;\n case 2:\n \\defender::stop();\n \\defender::setInputError('password2');\n addNotice('danger', self::$locale['setup_5012']);\n\n break;\n case 3:\n \\defender::stop();\n \\defender::setInputError('password1');\n addNotice('danger', self::$locale['setup_5013']);\n break;\n }\n\n $admin_auth = new \\PasswordAuth(self::INSTALLER_ALGO);\n $admin_auth->inputNewPassword = self::$userData['admin_password1'];\n $admin_auth->inputNewPassword2 = self::$userData['admin_password2'];\n switch ($admin_auth->isValidNewPassword()) {\n default:\n self::$userData['user_admin_password'] = $admin_auth->getNewHash();\n self::$userData['user_admin_salt'] = $admin_auth->getNewSalt();\n break;\n case 2:\n \\defender::stop();\n \\defender::setInputError('admin_password2');\n addNotice('danger', self::$locale['setup_5015']);\n break;\n case 3:\n \\defender::stop();\n \\defender::setInputError('admin_password1');\n addNotice('danger', self::$locale['setup_5017']);\n break;\n }\n\n if (\\defender::safe()) {\n\n self::$userData['user_timezone'] = self::$siteData['default_timezone'];\n $batch_core = Batch_Core::getInstance();\n // Create Super Admin\n if (dbcount(\"(user_id)\", DB_PREFIX.\"users\", \"user_id='1'\")) {\n self::$userData['user_id'] = 1;\n dbquery_insert(DB_PREFIX.\"users\", self::$userData, 'update');\n } else {\n dbquery_insert(DB_PREFIX.\"users\", self::$userData, 'save');\n }\n $enabled_lang = implode('.', self::$siteData['enabled_languages']);\n // Update Site Settings\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['sitename'].\"' WHERE settings_name='sitename'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['siteemail'].\"' WHERE settings_name='siteemail'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".$enabled_lang.\"' WHERE settings_name='enabled_languages'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['default_timezone'].\"' WHERE settings_name='default_timezone'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['default_timezone'].\"' WHERE settings_name='timeoffset'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['default_timezone'].\"' WHERE settings_name='serveroffset'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['siteusername'].\"' WHERE settings_name='siteusername'\");\n\n if (strpos($enabled_lang, '.')) {\n\n // Update all existing panel and update new enabled language values\n dbquery(\"UPDATE \".DB_PREFIX.\"panels SET panel_languages='\".$enabled_lang.\"'\");\n\n $result = dbquery(\"SELECT link_language FROM \".DB_PREFIX.\"site_links GROUP BY link_language ASC\");\n $installed_languages = [];\n if (dbrows($result) > 0) {\n while ($data = dbarray($result)) {\n $installed_languages[] = $data['link_language'];\n }\n }\n\n $langDiff = array_diff(self::$siteData['enabled_languages'], $installed_languages);\n if (!empty($langDiff)) {\n foreach ($langDiff as $language) {\n $sql_inserts = $batch_core::batch_insert_rows('site_links', $language);\n if ($result = dbquery($sql_inserts)) {\n continue;\n }\n }\n }\n unset($installed_languages);\n\n $result = dbquery(\"SELECT admin_language FROM \".DB_PREFIX.\"admin GROUP BY admin_language ASC\");\n $installed_languages = [];\n if (dbrows($result) > 0) {\n while ($data = dbarray($result)) {\n $installed_languages[] = $data['admin_language'];\n }\n }\n\n $langDiff = array_diff(self::$siteData['enabled_languages'], $installed_languages);\n if (!empty($langDiff)) {\n foreach ($langDiff as $language) {\n $sql_inserts = $batch_core::batch_insert_rows('admin', $language);\n if ($result = dbquery($sql_inserts)) {\n continue;\n }\n }\n }\n unset($installed_languages);\n\n /*\n * Need to run another check with email_templates because installed languages might be different.\n */\n $result = dbquery(\"SELECT template_language FROM \".DB_PREFIX.\"email_templates GROUP BY template_language ASC\");\n $installed_languages = [];\n if (dbrows($result) > 0) {\n while ($data = dbarray($result)) {\n $installed_languages[] = $data['template_language'];\n }\n }\n\n $langDiff = array_diff(self::$siteData['enabled_languages'], $installed_languages);\n if (!empty($langDiff)) {\n\n foreach ($langDiff as $language) {\n $sql_inserts = $batch_core::batch_insert_rows('email_templates', $language);\n if ($result = dbquery($sql_inserts)) {\n continue;\n }\n }\n\n // Update all UF Cat Fields\n $ufc_result = dbquery(\"SELECT field_cat_id, field_cat_name FROM \".DB_PREFIX.\"user_field_cats\");\n if (dbrows($result) && is_array($langDiff) && count($langDiff)) {\n $locale_keys = array_flip(self::$siteData['enabled_languages']);\n while ($ufc_data = dbarray($ufc_result)) {\n $category_name[self::$localeset] = $ufc_data['field_cat_name'];\n // get current locale key\n if (isset($locale_keys[$ufc_data['field_cat_name']])) {\n $lang_key = $locale_keys[$ufc_data['field_cat_name']];\n foreach ($langDiff as $language) {\n $locale = [];\n include LOCALE.$language.'/setup.php';\n $category_name[$language] = $locale[$lang_key]; // bind language = translations value\n }\n }\n if (!empty($category_name)) {\n $new_field_cat_name = serialize($category_name);\n dbquery(\"UPDATE \".DB_PREFIX.\"user_field_cats SET field_cat_name=:field_cat_value WHERE field_cat_id=:field_cat_id\", [':field_cat_value' => $new_field_cat_name, ':field_cat_id' => $ufc_data['field_cat_id']]);\n }\n }\n }\n }\n }\n\n if (\\defender::safe()) {\n require_once BASEDIR.\"config_temp.php\";\n require_once INCLUDES.\"multisite_include.php\";\n self::installer_step(self::STEP_INFUSIONS);\n redirect(FUSION_REQUEST);\n //new \\Authenticate(self::$userData['user_name'], self::$userData['user_password'], TRUE, FUSION_REQUEST);\n } else {\n self::installer_step(self::STEP_PRIMARY_ADMIN_FORM);\n redirect(FUSION_REQUEST);\n }\n }\n }\n }\n }", "private function emailAtLogin() {}", "public function save()\n {\n $this->validate();\n $user = User::findOrFail($this->userId);\n if(strtolower($this->origName) == strtolower($this->newName)){\n $this->updateName($user);\n return;\n }else{\n $user->info->update(['company_name' => $this->newName]);\n $user->save();\n $this->updateName($user);\n }\n\n\n }", "function editInfo($user) {\n\n if (isset ($_POST ['submit'])) {\n $newUsername = trim(strip_tags($_POST['username']));\n $newFirstName = trim(strip_tags($_POST['firstname']));\n $newLastName = trim(strip_tags($_POST['lastname']));\n $newEmail = trim(strip_tags($_POST['email']));\n\n if(!empty($_POST['username']) AND !empty($_POST['email']) AND !empty($_POST['firstname'] AND !empty($_POST['lastname']))) {\n\n if(strlen($newUsername) <= 100 && strlen($newFirstName) <= 100 && strlen($newLastName) <= 100) {\n\n if (filter_var($newEmail, FILTER_VALIDATE_EMAIL)){\n\n $bdd = dbConnect();\n $reqmail = $bdd->prepare(\"SELECT * FROM user WHERE email = ?\");\n $reqmail->execute(array($newEmail));\n\n if ($reqmail->rowCount() > 0){\n $result = $reqmail->fetch(PDO::FETCH_ASSOC);\n if ($result['username'] == $user) // We can replace its old mail with the same one\n $mailexist = 0;\n else\n $mailexist = 1;\n }\n\n $requsername = $bdd->prepare(\"SELECT * FROM user WHERE username = ?\");\n $requsername->execute(array($newUsername));\n\n if ($requsername->rowCount() > 0){\n $result = $requsername->fetch(PDO::FETCH_ASSOC);\n if ($result['username'] == $user) // We can replace its old username with the same one\n $usernameexist = 0;\n else\n $usernameexist = 1;\n }\n\n if($mailexist == 0) {\n if($usernameexist == 0) {\n try {\n $stmt = $bdd->prepare(\"UPDATE user SET username=:newUsername, first_name=:newFirstName, last_name=:newLastName, email=:newEmail WHERE username=:username\");\n $stmt->execute(array(\n 'newUsername' => $newUsername,\n 'newFirstName' => $newFirstName,\n 'newLastName' => $newLastName,\n 'newEmail' => $newEmail,\n 'username' => $user\n ));\n $_SESSION['username'] = $newUsername;\n }\n catch(PDOException $e) {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n return 0;\n\n } else\n return -3; // Username already used\n } else\n return -2; // Mail already used\n }\n }\n }\n }\n\n return -1;\n\n }", "public function p_signup() \n {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n $q = 'SELECT user_id\n FROM users \n WHERE email = \"'.$_POST['email'].'\"';\n $user_id = DB::instance(DB_NAME)->select_field($q);\n if ($user_id!=NULL)\n {\n $error=\"User account already exists.\";\n $this->template->content = View::instance('v_users_signup');\n $this->template->content->error=$error;\n echo $this->template;\n }\n else\n {\n\t\t\n //Inserting the user into the database\n\t\t\t$_POST['created']=Time::now();\n\t\t\t$_POST['modified']=Time::now();\n\t\t\t$_POST['password']=sha1(PASSWORD_SALT.$_POST['password']);\n\t\t\t$_POST['token']=sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\t\t\t$_POST['activation_key']=str_shuffle($_POST['password'].$POST['token']);\n\t\t\t$activation_link=\"http://\".$_SERVER['SERVER_NAME'].\"/users/p_activate/\".$_POST['activation_key'];\n\t\t\t$name=$_POST['first_name'];\n\t\t\t$name.=\" \";\n\t\t\t$name.=$_POST['last_name'];\n\t\t\t$user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\t\t\t\n\t\t//Sending the confirmation mail\n\t\t\t$to[]=Array(\"name\"=>$name, \"email\"=>$_POST['email']);\n\t\t\t$subject=\"Confirmation letter\";\n\t\t\t$from=Array(\"name\"=>APP_NAME, \"email\"=>APP_EMAIL); \n $body = View::instance('signup_email');\n $body->name=$name;\n $body->activation_link=$activation_link;\n\n\n\t\t\t$email = Email::send($to, $from, $subject, $body, false, $cc, $bcc);\n\t\t\t\n\t\t\tRouter::redirect('/');\n } \n }", "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 saveData()\n\t{\n\t\t$temp_data = array('email_address' => $this->input->post('email'),\n\t\t\t'password' => $this->encrypt->encode($this->input->post('password')),\n\t\t\t'first_name' => $this->input->post('first_name'), 'last_name' => $this->input->post\n\t\t\t('last_name'), 'middle_initial' => $this->input->post('middle_initial'),\n\t\t\t'address' => $this->input->post('address'), 'phone_number' => $this->input->post\n\t\t\t('phone_number'), 'cell_number' => $this->input->post('cell_number'),\n\t\t\t'register_date' => date('Y-m-d H:i:s'), 'ip_address' => $this->input->ip_address\n\t\t\t(), 'group_id' => $this->input->post('Group'), 'send_email' => $this->input->post\n\t\t\t('confirmation_email'));\n\t\t$this->db->insert($this->db->dbprefix('member'), $temp_data);\n\t}", "function register_user_address()\n\t{\n\t\tif ($this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t\t// logged in\n\t\t\tredirect('');\n\n\t\t} elseif ($this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t// logged in, not activated\n\t\t\tredirect('/auth/send_again/');\n\n\t\t} elseif (!$this->config->item('allow_registration', 'tank_auth')) {\t// registration is off\n\t\t\t$this->_show_message($this->lang->line('auth_message_registration_disabled'));\n\n\t\t} else {\n\t\t\t$use_username = $this->config->item('use_username', 'tank_auth');\n\t\t\tif ($use_username) {\n\t\t\t\t$this->form_validation->set_rules('username', 'Username', 'trim|required|xss_clean|min_length['.$this->config->item('username_min_length', 'tank_auth').']|max_length['.$this->config->item('username_max_length', 'tank_auth').']|alpha_dash');\n\t\t\t}\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\t\t\t$this->form_validation->set_rules('first_name', 'First Name', 'trim|required|xss_clean');\n\t\t\t$this->form_validation->set_rules('last_name', 'Last Name', 'trim|required|xss_clean');\n\t\t\t$this->form_validation->set_rules('address1', 'Address1', 'trim|required|xss_clean');\n\t\t\t$this->form_validation->set_rules('address2', 'Address2', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('city', 'City', 'trim|required|xss_clean');\n\t\t\t$this->form_validation->set_rules('state', 'State', 'trim|required|xss_clean');\n\t\t\t$this->form_validation->set_rules('country', 'Country', 'trim|required|xss_clean');\n\t\t\t$this->form_validation->set_rules('pincode', 'Pin Code', 'trim|required|xss_clean');\n\t\t\t$this->form_validation->set_rules('number', 'Number', 'trim|required|xss_clean');\n\t\t\t$this->form_validation->set_rules('password', 'Password', 'trim|required|xss_clean|min_length['.$this->config->item('password_min_length', 'tank_auth').']|max_length['.$this->config->item('password_max_length', 'tank_auth').']');\n\t\t\t$this->form_validation->set_rules('confirm_password', 'Confirm Password', 'trim|required|xss_clean|matches[password]');\n\n\t\t\t$captcha_registration\t= $this->config->item('captcha_registration', 'tank_auth');\n\t\t\t$use_recaptcha\t\t\t= $this->config->item('use_recaptcha', 'tank_auth');\n\t\t\tif ($captcha_registration) {\n\t\t\t\tif ($use_recaptcha) {\n\t\t\t\t\t$this->form_validation->set_rules('recaptcha_response_field', 'Confirmation Code', 'trim|xss_clean|required|callback__check_recaptcha');\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_validation->set_rules('captcha', 'Confirmation Code', 'trim|xss_clean|required|callback__check_captcha');\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data['errors'] = array();\n\n\t\t\t$email_activation = $this->config->item('email_activation', 'tank_auth');\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->create_user(\n\t\t\t\t\t\t$use_username ? $this->form_validation->set_value('username') : '',\n\t\t\t\t\t\t$this->form_validation->set_value('email'),\n\t\t\t\t\t\t$this->form_validation->set_value('password'),\n\t\t\t\t\t\t$email_activation))) {\t\t\t\t\t\t\t\t\t// success\n\n\t\t\t\t\t//Create an entry into address table as well\n\t\t\t\t\t $address = array\n\t\t\t\t\t(\n\t\t\t\t\t\t'first_name' => $this->form_validation->set_value('first_name'),\n\t\t\t\t\t\t'last_name' => $this->form_validation->set_value('last_name'),\n\t\t\t\t\t\t'address_1' => $this->form_validation->set_value('address1'),\n\t\t\t\t\t\t'address_2' => $this->form_validation->set_value('address2'),\n\t\t\t\t\t\t'city' => $this->form_validation->set_value('city'),\n\t\t\t\t\t\t'state' => $this->form_validation->set_value('state'),\n\t\t\t\t\t\t'country' => $this->form_validation->set_value('country'),\n\t\t\t\t\t\t'pincode' => $this->form_validation->set_value('pincode'),\n\t\t\t\t\t\t'phone_number' => $this->form_validation->set_value('number'),\n\t\t\t\t\t\t'user_id' => $data['user_id']\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\t$this->database->RegisterAddress($address);\n\t\t\t\t\t$this->database->Subscribe($data['email']);\n\n\t\t\t\t\t$data['site_name'] = $this->config->item('website_name', 'tank_auth');\n\n\t\t\t\t\tif ($email_activation) {\t\t\t\t\t\t\t\t\t// send \"activate\" email\n\t\t\t\t\t\t$data['activation_period'] = $this->config->item('email_activation_expire', 'tank_auth') / 3600;\n\n\t\t\t\t\t\t$this->_send_email('activate', $data['email'], $data);\n\n\t\t\t\t\t\tunset($data['password']); // Clear password (just for any case)\n\n\t\t\t\t\t\t$this->_show_message($this->lang->line('auth_message_registration_completed_1'));\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($this->config->item('email_account_details', 'tank_auth')) {\t// send \"welcome\" email\n\n\t\t\t\t\t\t\t$this->_send_email('welcome', $data['email'], $data);\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\tunset($data['password']); // Clear password (just for any case)\n\n\t\t\t\t\t\t$this->_show_message($this->lang->line('auth_message_registration_completed_2').' echo br()'.anchor('/auth/login/', 'Login'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($captcha_registration) {\n\t\t\t\tif ($use_recaptcha) {\n\t\t\t\t\t$data['recaptcha_html'] = $this->_create_recaptcha();\n\t\t\t\t} else {\n\t\t\t\t\t$data['captcha_html'] = $this->_create_captcha();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data['use_username'] = $use_username;\n\t\t\t$data['captcha_registration'] = $captcha_registration;\n\t\t\t$data['use_recaptcha'] = $use_recaptcha;\n\t\t\t//$this->load->view('auth/register_user_address', $data);\n\t\t\t$data['meta_id'] = 8;\n\t\t\tdisplay('register_user_address', $data);\n\t\t}\n\t}", "function create_user()\r\n\t{\r\n\t\t$additional_data = array();\r\n\t\tif ($this->form_validation->run() == true)\r\n\t\t{\r\n\t\t\t$nickname \t= $this->input->post('nickname');\r\n\t\t\t$email \t= $this->input->post('email');\r\n\t\t\t$password \t= $this->input->post('password');\r\n\t\t\t$national\t= $this->input->post('national');\r\n\t\t\t$plan \t\t= $this->input->post('plan');\r\n\t\t\t$ed_level\t= $this->input->post('ed_level');\r\n\t\t\t$lang\t\t= $this->input->post('lang');\r\n\t\t\t$gender\t= $this->input->post('gender');\r\n\t\t\t\r\n\t\t\t$additional_data = array(\r\n\t\t\t\t'email'\t\t\t\t=> $email,\r\n\t\t\t\t'pass' \t\t\t=> $password,\r\n\t\t\t\t'nickname' \t\t\t=> $nickname,\r\n\t\t\t\t'last_name' \t\t\t=> '',\r\n\t\t\t\t'middle_name'\t\t\t=> '',\r\n\t\t\t\t'first_name'\t\t\t=> '',\r\n\t\t\t\t'gender'\t\t\t\t=> $gender,\r\n\t\t\t\t'addr1'\t\t\t\t=> '',\r\n\t\t\t\t'addr2'\t\t\t\t=> '',\r\n\t\t\t\t'addr3'\t\t\t\t=> '',\r\n\t\t\t\t'country'\t\t\t\t=> '',\r\n\t\t\t\t'zip_code'\t\t\t\t=> '',\r\n\t\t\t\t'nationality' \t\t=> $national,\r\n\t\t\t\t'ethnicity' \t\t\t=> '',\r\n\t\t\t\t'birthday_day' \t\t=> '',\r\n\t\t\t\t'birthday_month' \t\t=> '',\r\n\t\t\t\t'birthday_year' \t\t=> '',\r\n\t\t\t\t'language' \t\t\t=> $lang,\r\n\t\t\t\t'currently_school' \t=> '',\r\n\t\t\t\t'graduation_year' \t=> '',\r\n\t\t\t\t'area_of_interests' \t=> '',\r\n\t\t\t\t'major' \t\t\t\t=> '',\r\n\t\t\t\t'parents_email' \t\t=> '',\r\n\t\t\t\t'grade' \t\t\t\t=> $ed_level,\r\n\t\t\t\t'activationKey' \t\t=> mt_rand() . mt_rand() . mt_rand() . mt_rand() . mt_rand(),\r\n\t\t\t\t'remember_code'\t\t=> sha1($password)\r\n\t\t\t);\r\n\r\n\t\t}\r\n\r\n\r\n\t\tif ($this->form_validation->run() == true && $this->ion_auth->register($email, $password, $additional_data))\r\n\t\t{\r\n\t\t\t//check to see if we are creating the user\r\n\t\t\t//redirect them back to the admin page\r\n\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\r\n\t\t\tredirect(\"dashboard\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');\r\n\t\t\t\r\n\t\t\t$this->session->set_flashdata('app_error', $this->ion_auth->errors());\r\n\t\t\t\r\n\t\t\t$data['national'] = $this->config->item('national');\r\n\t\t\t\r\n\t\t\t$data['nickname'] = array('name' => 'nickname',\r\n\t\t\t\t'id' => 'nickname',\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t\t'value' => $this->form_validation->set_value('nickname'),\r\n\t\t\t\t'class' => 'form-control input-lg',\r\n\t\t\t\t'placeholder' => 'NICKNAME *'\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$data['email'] = array('name' => 'email',\r\n\t\t\t\t'id' => 'email',\r\n\t\t\t\t'type' => 'email',\r\n\t\t\t\t'value' => $this->form_validation->set_value('email'),\r\n\t\t\t\t'class' => 'form-control input-lg',\r\n\t\t\t\t'placeholder' => 'EMAIL ADDRESS'\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$data['password'] = array('name' => 'password',\r\n\t\t\t\t'id' => 'password',\r\n\t\t\t\t'type' => 'password',\r\n\t\t\t\t'value' => $this->form_validation->set_value('password'),\r\n\t\t\t\t'class' => 'form-control input-lg',\r\n\t\t\t\t'placeholder' => 'PASSWORD'\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$data['cpassword'] = array('name' => 'cpassword',\r\n\t\t\t\t'id' => 'cpassword',\r\n\t\t\t\t'type' => 'password',\r\n\t\t\t\t'value' => $this->form_validation->set_value('cpassword'),\r\n\t\t\t\t'class' => 'form-control input-lg',\r\n\t\t\t\t'placeholder' => 'CONFIRM PASSWORD'\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$data['lang'] = array('name' => 'lang',\r\n\t\t\t\t'id' => 'lang',\r\n\t\t\t\t'type' => 'text',\r\n\t\t\t\t'class' => 'form-control input-lg',\r\n\t\t\t\t'placeholder' => 'LANGUAGE SPOKEN'\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$data['show_form'] = \"show\";\r\n\r\n\t\t\t\r\n\t\t\t$this->render_page('signup/index', $data);\r\n\t\t}\r\n\t}", "function check_user_info()\n{\n $feedback = array ();\n \n // validating the input\n if (!empty($_POST['user_name'])\n && strlen($_POST['user_email']) <= 64\n && filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)\n && check_no_digit($_POST['user_lastname'], false)\n && strlen($_POST['user_lastname']) <= 64\n && check_no_digit($_POST['user_firstname'], false)\n && strlen($_POST['user_firstname']) <= 64\n && check_no_digit($_POST['user_nationality'], false)\n && check_no_digit($_POST['user_gender'], false)\n && check_and_valid_date($_POST['user_birthday'], False) \n && (!is_it_futur ($_POST['user_birthday']))) {\n $feedback['status'] = true;\n $_SESSION['feedback'] = $feedback;\n return true; \n } elseif (empty($_POST['user_email'])) {\n $feedback['msg'] = \"Email cannot be empty\";\n } elseif (strlen($_POST['user_email']) > 64) {\n $feedback['msg'] = \"Email cannot be longer than 64 characters\";\n } elseif (!filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)) {\n $feedback['msg'] = \"Your email address is not in a valid email format\";\n } elseif (!check_no_digit($_POST['user_lastname'], false)){\n $feedback['msg'] = \"Your lastname doesn't match the field requirements\";\n } elseif (strlen($_POST['user_lastname']) > 64) {\n $feedback['msg'] = \"Your Lastname cannot be longer than 64 characters or \n shorter than 2 characters\";\n } elseif (!check_no_digit($_POST['user_firstname'], false)){\n $feedback['msg'] = \"Your firstname doesn't match the field requirements\";\n } elseif (strlen($_POST['user_firstname']) > 64) {\n $feedback['msg'] = \"Firstname cannot be longer than 64 characters\";\n } elseif (!check_and_valid_date($_POST['user_birthday'], 0)){\n $feedback['msg'] = \"Your birthday doesn't match the field requirements\n - mm/dd/yyyy - or is not a valid date\";\n } elseif (is_it_futur($_POST['user_birthday'], 0)){\n $feedback['msg'] = \"You probably would not be using this website \n if you were not born :).\";\n } elseif (!check_no_digit($_POST['user_nationality'], false)){\n $feedback['msg'] = \"Your nationality doesn't match the field requirements\";\n } elseif (!check_no_digit($_POST['user_gender'], false)){\n $feedback['msg'] = \"Your gender is incorrect\";\n } else {\n $feedback['msg'] = \"An unknown error occurred.\";\n }\n $feedback['status'] = false;\n $_SESSION['feedback'] = $feedback;\n // default return\n return false;\n}", "function register_user($first_name, $last_name, $username, $email, $password){\r\n\r\n $first_name = escape($first_name);\r\n $last_name = escape($last_name);\r\n $username = escape($username);\r\n $email = escape($email);\r\n $password = escape($password);\r\n\r\n if(email_exists($email)){\r\n return false;\r\n } elseif (username_exists($username)) {\r\n return false;\r\n } else {\r\n $password = password_hash($password, PASSWORD_BCRYPT, array('cost'=>12)); //md5($password);\r\n $validation_code = md5($username . microtime());\r\n\r\n $sql = \"INSERT INTO users(first_name, last_name, username, email, password, validation_code, active)\";\r\n $sql.= \" VALUES('$first_name', '$last_name', '$username', '$email', '$password', '$validation_code', 0)\";\r\n $result = query($sql);\r\n confirm($result);\r\n \r\n $subject = \"Activate account\";\r\n $msg = \" Please click the link below to activate your Account\r\n\r\n <a href=\\\"\".Config::DEV_URL.\"/activate.php?email={$email}&code={$validation_code}\\\">Reset Password</a>\r\n \";\r\n\r\n $headers = \"From: [email protected]\";\r\n\r\n send_email($email, $subject, $msg, $headers);\r\n\r\n return true;\r\n }\r\n return false;\r\n}", "public function verified()\n {\n $this->verified = 1;\n $this->email_token = null;\n $this->save();\n }", "public function save()\n {\n $user_id = Yii::$app->session->getFlash('validatedUserId');\n if ($this->validate() && ( $user = User::findOne($user_id)) !== null ) {\n // Hashing user password before saving it to the DB\n // http://www.yiiframework.com/doc-2.0/guide-security-passwords.html\n $user->password = Yii::$app->getSecurity()->generatePasswordHash($this->password);\n $user->active = '1';\n // Generates a new auth key to avoid the previous one from being used\n $user->auth_key = Yii::$app->security->generateRandomString();\n // Save DB record\n return $user->save();\n }\n return false;\n }", "public function store()\n\t {\n\t\t User::register([\n\t\t\t\t'username' => 'Jefdsasfrey',\n\t\t\t\t'email' => '[email protected]',\n\t\t\t\t'password' => bcrypt('pass')\n\t\t ]);\n\n\t\t // send them a welcome email\n\n\t\t // monitor campaign for newsletter\n\n\t\t // Schedule a follow up email\n\n\t\t // update stats \n\t }", "function userSignUp ( $_email ) {\n\t\t$_sql_statement = '';\n\t\t$_bind_parameters = array ();\n\t\t$_duplicateEmailCheck;\n\t\t$_createUserInfo;\n\t\t$_resultVerification ;\n\t\t$_emailVerificationKey = '';\n\t\t$_accountPassword = '';\n\t\t\n\t\t$this->gframeDatabase = new GframeDatabase($this->db_info);\n\t\t\n\t\t$_query_request = array();\n\t\t$_query_result = array();\n\n\t\tif ( ($connection_result = $this->gframeDatabase->connect_database ()) !== TRUE ) {\n\t\t\treturn $this->gframeDatabase->returnAjaxResponseArray(false,'Failed @ connect_database',$connection_result);\n\t\t} else {\n\t\t\t// duplicate email check\n\t\t\t$_duplicateEmailCheck = $this->duplicateEmailCheck( $_email );\n\t\t\tif ($_duplicateEmailCheck['response']===FALSE) {\n\t\t\t\t$this->gframeDatabase->close_database_connection();\n\t\t\t\treturn $_duplicateEmailCheck; // error then exit\n\t\t\t}\n\n\t\t\t// generate account password \n\t\t\t$_accountPassword = $this->returnGeneratedPassword(8);\n\t\t\t\n\t\t\t// create user record\n\t\t\t$_createUserInfo = $this->createUserInfo( $_email,$_accountPassword );\n\t\t\t\n\t\t\t$_resultVerification = $this->queryResultVerification ($_createUserInfo,'createUserInfo');\n\t\t\tif($_resultVerification['response'] === FALSE) {\n\t\t\t\t$this->gframeDatabase->close_database_connection();\n\t\t\t\treturn $_resultVerification; // error then exit\n\t\t\t}\n\t\t\t\n\t\t\t// generate e mail verification key\n\t\t\t$_emailVerificationKey = $this->returnGeneratedPassword(32);\n\n\t\t\t// create user meta and email verification key\n\t\t\t// $_createUserInfo['result']['result'] has the last insert ID\n\t\t\t$_createUserInfoMeta = $this->createUserRecordMeta( $_createUserInfo['result']['result'],$_emailVerificationKey);\n\t\t\t$_resultVerification = $this->queryResultVerification ($_createUserInfoMeta,'createUserRecordMeta');\n\t\t\tif($_resultVerification['response'] === FALSE) {\n\t\t\t\t$this->gframeDatabase->close_database_connection();\n\t\t\t\treturn $_resultVerification; // error then exit\n\t\t\t}\n\t\t\t\n\t\t\t// closing the connection\n\t\t\t$this->gframeDatabase->close_database_connection();\n\t\t\t\n\t\t\t// send out \n\t\t\tif($this->sendOutVerificationEmail ( $_email,$_accountPassword,$_emailVerificationKey )) {\n\t\t\t\treturn $this->gframeDatabase->returnAjaxResponseArray(true,'OK',null);\n\t\t\t} else {\n\t\t\t\treturn $this->gframeDatabase->returnAjaxResponseArray(false,'failedAtSendingEmail',null);\n\t\t\t}\t\t\t\n\t\t}\n\t}", "public function editUserEmail($email)\n {\n // prevent database flooding\n $email = substr(trim($email), 0, 64);\n\n if (!empty($email) && $email == $_SESSION[\"user_email\"]) {\n $this->errors[] = MESSAGE_EMAIL_SAME_LIKE_OLD_ONE;\n // user mail cannot be empty and must be in email format\n } elseif (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $this->errors[] = MESSAGE_EMAIL_INVALID;\n\n } else if ($this->db->isConnected()) {\n // check if new email already exists\n $select = $this->db->row(\n 'SELECT * FROM users WHERE user_email = :user_email',\n array(\"user_email\"=>$email)\n );\n\n // if this email exists\n if (isset($select[\"user_id\"])) {\n $this->errors[] = MESSAGE_EMAIL_ALREADY_EXISTS;\n } else {\n // write users new data into database\n $update = $this->db->query(\n 'UPDATE users SET user_email = :user_email WHERE user_id = :user_id',\n array(\n \"user_email\"=>$email,\n \"user_id\"=>$_SESSION['user_id']\n )\n );\n\n if ($update > 0) {\n $_SESSION['user_email'] = $email;\n $this->messages[] = MESSAGE_EMAIL_CHANGED_SUCCESSFULLY . $email;\n } else {\n $this->errors[] = MESSAGE_EMAIL_CHANGE_FAILED;\n }\n }\n }\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}", "function createUser($f_name, $l_name, $email, $username, $passsword, $profilePicture, $birthday, $phonenumber, $education, $location, $skill, $notes)\n{\n global $db, $BASE_URL;\n $command = \"INSERT INTO `user_accounts`(`firstname`, `lastname`, `email`, `username`, `password`, `confirmStatus`, `activationCode`,profilePicture,Birthday,phoneNumber,Education,Location,Skill,Notes)\n VALUES (?, ?, ?, ?, ?, ?, ?,?,?,?,null,null,null,null)\";\n $hashPass = password_hash($passsword, PASSWORD_DEFAULT);\n $activationCode = generateCode(16);\n $stmt = $db->prepare($command);\n $stmt->execute(array($f_name, $l_name, $email, $username, $hashPass, 0, $activationCode, $profilePicture, $birthday, $phonenumber));\n $newAccount = $db->lastInsertId();\n // Send mail\n // die();\n sendMail(\n $email,\n $l_name,\n 'Confirm email',\n \"Your activation code is:\n <a href=\\\"$BASE_URL/confirmEmail.php?activationCode=$activationCode\\\">$BASE_URL/confirmEmail.php?activationCode=$activationCode</a>\"\n );\n return $newAccount;\n}", "public function updateAccount()\n\t{\n\t\tif (in_array('newsletter', $this->Config->getActiveModules()))\n\t\t{\n\t\t\t$GLOBALS['TL_DCA']['tl_member']['palettes']['default'] = str_replace('newsletter;', 'newsletter,newsalert;', $GLOBALS['TL_DCA']['tl_member']['palettes']['default']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['TL_DCA']['tl_member']['palettes']['default'] = str_replace('assignDir;', 'assignDir;{newsletter_legend:hide},newsalert;', $GLOBALS['TL_DCA']['tl_member']['palettes']['default']);\n\t\t}\n\t\t\n\t\t$intUser = $this->Input->get('id');\n\n\t\t// Front end call\n\t\tif (TL_MODE == 'FE')\n\t\t{\n\t\t\t$this->import('FrontendUser', 'User');\n\t\t\t$intUser = $this->User->id;\n\t\t}\n\n\t\t// Edit account\n\t\tif (TL_MODE == 'FE' || $this->Input->get('act') == 'edit')\n\t\t{\n\t\t\t$objUser = $this->Database->prepare(\"SELECT email FROM tl_member WHERE id=?\")\n\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t ->execute($intUser);\n\n\t\t\tif ($objUser->numRows)\n\t\t\t{\n\t\t\t\t// E-mail address has changed\n\t\t\t\tif (!empty($_POST) && $this->Input->post('email', true) != $objUser->email)\n\t\t\t\t{\n\t\t\t\t\t$this->Database->prepare(\"UPDATE tl_news_recipients SET email=? WHERE email=?\")\n\t\t\t\t\t\t\t\t ->execute($this->Input->post('email', true), $objUser->email);\n\n\t\t\t\t\t$objUser->email = $this->Input->post('email', true);\n\t\t\t\t}\n\n\t\t\t\t$objSubscriptions = $this->Database->prepare(\"SELECT pid FROM tl_news_recipients WHERE email=?\")\n\t\t\t\t\t\t\t\t\t\t\t\t ->execute($objUser->email);\n\n\t\t\t\t$strNews = serialize($objSubscriptions->fetchEach('pid'));\n\n\t\t\t\t$this->Database->prepare(\"UPDATE tl_member SET newsalert=? WHERE id=?\")\n\t\t\t\t\t\t\t ->execute($strNews, $intUser);\n\n\t\t\t\t// Update the front end user object\n\t\t\t\tif (TL_MODE == 'FE')\n\t\t\t\t{\n\t\t\t\t\t$this->User->newsalert = $strNews;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Delete account\n\t\telseif ($this->Input->get('act') == 'delete')\n\t\t{\n\t\t\t$objUser = $this->Database->prepare(\"SELECT email FROM tl_member WHERE id=?\")\n\t\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t\t ->execute($intUser);\n\n\t\t\tif ($objUser->numRows)\n\t\t\t{\n\t\t\t\t$objSubscriptions = $this->Database->prepare(\"DELETE FROM tl_news_recipients WHERE email=?\")\n\t\t\t\t\t\t\t\t\t\t\t\t ->execute($objUser->email);\n\t\t\t}\n\t\t}\n\t}", "function register_user($first_name,$last_name,$username,$email,$password)\n{\n $first_name = escape($first_name);\n $last_name = escape($last_name);\n $username = escape($username);\n $email = escape($email);\n $password = escape($password);\n if (email_exists($email)) {\n return false;\n } elseif (username_exists($username)) {\n return false;\n } else {\n $password = md5($password);\n $validation_code = md5($username . microtime());\n $sql = \"INSERT INTO users(first_name, last_name, username, email, password, validation_code, active)\";\n $sql .= \" VALUES('$first_name','$last_name','$username','$email','$password','$validation_code',0)\";\n $result = query($sql);\n\n ///// sending email////////\n $subject = \"Activate Account\";\n $msg = \" Please click the link below to activate your account\n http://localhost/login/activate.php?email=$email&code=$validation_code \n \";\n $headers = \"From: [email protected]\";\n send_email($email, $subject, $msg, $headers);\n\n return true;\n }\n\n}", "function Save($username = \"\", $password = \"\", $firstname = \"\", $surname = \"\", $access = array(), $email = \"\")\n\t{\t//$accessnumber = (int)array_sum($access);\n\t\t$accessnumber = implode(',', array_keys($access));\n\t\t$setstr = \"ausername='$username', firstname='$firstname', surname='$surname', useraccess='$accessnumber', email='$email'\";\n\t\tif($password)\n\t\t{\t$setstr .= \", upassword=MD5('$password')\";\n\t\t}\n\t\tif($this->userid)\n\t\t{\t$sql = \"UPDATE adminusers SET $setstr WHERE auserid=$this->userid\";\n\t\t\tif($result = $this->db->Query($sql))\n\t\t\t{\tif($this->db->AffectedRows())\n\t\t\t\t{\t$this->GetUserInfo();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else // must be new user\n\t\t{\t$sql = \"INSERT INTO adminusers SET $setstr\";\n\t\t\tif($result = $this->db->Query($sql))\n\t\t\t{\tif($this->db->AffectedRows())\n\t\t\t\t{\t$this->userid = $this->db->InsertID();\n\t\t\t\t\t$this->GetUserInfo();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function store(Request $request)\n {\n\n\n/*if(count(\\App\\organisation::where('SUPER_USER',request('email'))->get()) == 1)\n{\n //return redirect()->back()->withErrors(['Email has been taken']);\n return redirect()->back()->withErrors('Email has been taken');\n}*/\n\n//$users = \\DB::table('fl_org')->where('SUPER_USER', '=', request('email'))->get();\n//dd(count($users));\n//\\Mail::to($user->EMAIL)->send(new Welcome);\n\n\n\n if($this->validateEmailandPhone() == 1)\n {\n \n return response()->json(['error' => 'Email duplication'], 400);\n\n }\n\n if($this->validateOrganisation() == 1)\n {\n \n return response()->json(['error' => 'organisation duplication'], 400);\n\n }\n\n $org = new \\App\\organisation;\n //dd($request);\n $org->ORG_NAME = request('organisation');\n $org->SUPER_USER = request('email');\n $org->CREATED_BY = 1;\n \n //$plan = plan::where('PLAN_NAME', 'free')->get();\n\n \n\n\n $org->save();\n\n $iid = \\App\\organisation::latest()->first()->ORG_ID;\n\n \\App\\organisation::latest()->first()->plans()->attach(1);\n //dd($iid);\n\n $user = new \\App\\User;\n $user->FIRST_NAME = request('fname');\n $user->LAST_NAME = request('lname');\n $user->EMAIL = request('email');\n $user->PASSWORD = bcrypt(request('password'));\n $user->ORG_ID = $iid;\n $user->ADDRESS=request('address');\n $user->PHONE_NO = request('phone');\n $user->ROLE_ID = 1;\n $user->IS_ACTIVE = 0;\n $user->CREATED_BY = 1;\n\n $user->save();\n\n //Auth()->login($user);\n\n //\\Mail::to($user->EMAIL)->send(new Welcome($org,$user));\n return response()->json(['success' => 'registration successful'], 200);\n // return \\Redirect::to('/')->with('user', 'pratik');\n\n //return \\View::make('welcome')->with('user', $user->FIRST_NAME);\n //return $user;\n\n\n }", "function dosave($data, $form) {\n\t\t$member = Member::currentUser();\n\n\t\t$SQL_email = Convert::raw2sql($data['Email']);\n\t\t$forumGroup = DataObject::get_one('Group', \"\\\"Code\\\" = 'forum-members'\");\n\n\t\t// An existing member may have the requested email that doesn't belong to the\n\t\t// person who is editing their profile - if so, throw an error\n\t\t$existingMember = DataObject::get_one('Member', \"\\\"Email\\\" = '$SQL_email'\");\n\t\tif($existingMember) {\n\t\t\tif($existingMember->ID != $member->ID) {\n \t\t\t\t$form->addErrorMessage('Blurb',\n\t\t\t\t\t_t(\n\t\t\t\t\t\t'ForumMemberProfile.EMAILEXISTS',\n\t\t\t\t\t\t'Sorry, that email address already exists. Please choose another.'\n\t\t\t\t\t),\n\t\t\t\t\t'bad'\n\t\t\t\t);\n\n \t\t\t\treturn $this->redirectBack();\n\t\t\t}\n\t\t}\n\n\t\t$nicknameCheck = DataObject::get_one(\n\t\t\t\"Member\",\n\t\t\tsprintf(\n\t\t\t\t\"\\\"Nickname\\\" = '%s' AND \\\"Member\\\".\\\"ID\\\" != '%d'\",\n\t\t\t\tConvert::raw2sql($data['Nickname']),\n\t\t\t\t$member->ID\n\t\t\t)\n\t\t);\n\n\t\tif($nicknameCheck) {\n\t\t\t$form->addErrorMessage(\"Blurb\",\n\t\t\t\t_t('ForumMemberProfile.NICKNAMEEXISTS','Sorry, that nickname already exists. Please choose another.'),\n\t\t\t\t\"bad\");\n\t\t\treturn $this->redirectBack();\n\t\t}\n\n\t\t$form->saveInto($member);\n\t\t$member->write();\n\n\t\tif(!$member->inGroup($forumGroup)) {\n\t\t\t$forumGroup->Members()->add($member);\n\t\t}\n\n\t\t$member->extend('onForumUpdateProfile', $this->request);\n\n\t\treturn $this->redirect('thanks');\n\t}", "private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }", "function process_signup()\n\t{\n\t\t$parameter = file_get_contents(\"php://input\");\n\t\t\n\t\t// Decode data\n\t\t$decode_param = json_decode($parameter);\n\t\t\n\t\t// Validation format parameter\n\t\tif(! isset($decode_param->Name) ||\n\t\t\t! isset($decode_param->Username) ||\n\t\t\t! isset($decode_param->Password)\n\t\t){\n\t\t\techo json_encode(array('Status' => 500, 'Message' => 'Your format parameter is wrong')); // 500 = Internal Server Error\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Validation of null value\n\t\tif($decode_param->Name == '' ||\n\t\t\t$decode_param->Username == '' ||\n\t\t\t$decode_param->Password == ''\n\t\t){\n\t\t\techo json_encode(array('Status' => 500, 'Message' => 'Your format parameter must be filled')); // 500 = Internal Server Error\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Set variable\n\t\t$name = $decode_param->Name;\n\t\t$username = $decode_param->Username;\n\t\t$password = $decode_param->Password;\n\t\t\n\t\t// Check to database\n\t\t// Duplicate email or not\n\t\t$duplicate_email = $this->db->query(\"SELECT COUNT(*) AS count_data FROM tbl_user WHERE username = '\". $username .\"'\")->row()->count_data;\n\t\tif($duplicate_email > 0){\n\t\t\techo json_encode(array('Status' => 500, 'Message' => 'Your email have exist at database. Please, choose another email or recover your password.')); // 500 = Internal Server Error\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Save data\n\t\t$date_now = date('Y-m-d H:i:s', strtotime(\"now\"));\n\t\t$data = array(\n\t\t\t'username' => $username,\n\t\t\t'password' => md5($password),\n\t\t\t'name' => $name,\n\t\t\t'email' => $username,\n\t\t\t'last_login_time' => '0000-00-00 00:00:00',\n\t\t\t'created_on' => $date_now,\n\t\t\t'last_modified_on' => $date_now\n\t\t);\n\t\tif($this->db->insert('tbl_user', $data)){\n\t\t\t// 200 = OK - Save success\n\t\t\techo json_encode(array('Status' => 200, 'Message' => 'Save Success. You can login now'));\n\t\t} else {\n\t\t\t// 500 = Internal Server Error - Save failed\n\t\t\techo json_encode(array('Status' => 500, 'Message' => 'Save Failed. Please try again'));\n\t\t}\n\t\t\n\t}", "function prefix_send_email_to_admin() { \n\n\t\ttry {\n\n\t\t\t$user_id = get_current_user_id();\n\n\n\t\t\tif( $_POST['name'] == \"\" || $_POST['lastname'] == \"\" || $_POST['tel'] = \"\" || $_POST['cpf'] == \"\" ):\n\t\t\t\t$_SESSION['paodigital']['msg'] = \"Confirme se Nome, Sobrenome, Telefone ou CPF estão corretamente preenchidos!\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\t\t\tendif;\n\n\t\t\t$user_id = wp_update_user( \n\t\t\t\tarray( \n\t\t\t\t\t'ID' \t\t\t=> $user_id,\n\t\t\t\t\t'first_name'\t=> $_POST['name'],\n\t\t\t\t\t'last_name'\t\t=> $_POST['lastname'],\n\t\t\t\t\t'description'\t=> $_POST['notes']\n\t\t\t\t) \n\t\t\t);\n\n\t\t\tif ( get_user_meta($user_id, 'user_telefone' ) ):\n\t\t\t\t$a = update_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\telse:\n\t\t\t\t$a = add_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\tendif;\n\n\t\t\tif ( get_user_meta($user_id, 'user_cpf', true ) ):\n\t\t\t\tupdate_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\telse:\n\t\t\t\tadd_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\tendif;\n\n\n\t\t\t$error = false;\n\t\t\t$entrega = false;\n\t\t\tif( isset($_POST['save-address']) ):\n\t\t\t\t\n\t\t\t\tif( count( $_POST['address'] ) > 0 ):\n\t\t\t\t\tforeach ( $_POST['address'] as $key => $add ):\n\n\n//check address\nif( empty($add['cep']) || empty($add['address']) || empty($add['bairro']) || empty($add['city']) || empty($add['state']) ):\n\t$error = true;\nendif;\n\n\n\t\t\t\t\t\t//check entrega\n\t\t\t\t\t\tif( isset( $add['entrega'] ) ):\n\t\t\t\t\t\t\t$entrega = true;\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t$id = $add['house'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $add['house'] > 0 ):\n\n\t\t\t\t\t\t\t$params = array(\n\t\t\t\t\t\t\t\t'where'\t\t=> \"id = {$id} AND user_id = {$user_id}\", \n\t\t\t\t\t\t\t\t'limit'\t\t=> 1\n\t\t\t\t\t\t\t); \n\t\t\t\t\t\t\t$address = pods( 'usuarioendereco', $params );\n\n\t\t\t\t\t\t\tif( (integer)$address->total_found() > 0 ):\n\t\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco', $address->display('id') );\n\t\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) )? 1 : 0 ,\n\t\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t$newAddress->save($array);\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\telse:\n\n\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco');\n\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) ) ? 1 : 0 ,\n\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$newAddress->save($array);\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\tendforeach;\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\n\n\n\t\t\t/*\n\t\t\t\tVerificacao quanto ao dados dos endereços\n\t\t\t*/\n\t\t\tif( $error == true ):\n\n\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Preencha corretamente todos os endereços criados\";\n\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\telse:\n\n\t\t\t\tif( $entrega == false ):\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Escolha um endereço padrão.\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\t\telse :\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Endereço salvo com sucesso!\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"success\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/formas-de-pagamento\" );\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Não Foi Possivel salvar o endereço tente novamente.\";\n\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t}\n\t\t\n\t\t\n\n\t}", "public function store(Request $request){\n $rules =[\n 'u_name' => 'required',\n 'email' => 'unique:public_users,email',\n 'phone' => ['unique:public_users,phone',],\n 'location' => 'required',\n ];\n\n $customMessages = [\n 'required' => 'The :attribute field can not be blank.',\n 'unique' => 'The :attribute is already exists.'\n ];\n\n $this->validate($request, $rules, $customMessages);\n\n if(isset($request->updateid)){\n $data=public_users::find($request->updateid);\n }\n else{\n $data=new public_users();\n }\n $data->name=$request->u_name;\n $data->email=$request->email;\n $data->phone=$request->phone;\n $data->location=$request->location;\n $data->num_of_sends=1;\n $data->status=0;\n $rand = rand(10000,99999);\n $data->sms_code = $rand;\n $data->token=Str::random(32);\n session()->put([\n 'tmp_EM'=>$request->email\n ]);\n $smsContent = \"Hi $request->u_name,Use this code to activate your account.$rand\";\n\n try{\n $data->num_of_sends=1;\n $data->save();\n //$this->SendActiveMail($data);\n $this->SendActiveSms($data,$smsContent);\n //session()->flash('success_msg','Successfully Registered !');\n echo '<div class=\"col-md-5 col-lg-5 col-sm-10 col-10 mx-auto login-div\" style=\"margin-top: 40px;\">\n <div class=\"alert alert-success\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n Congratulations! your account is registered, you will shortly receive an OTP to activate your account.\n </div>\n <div class=\"card shadow\" style=\"border-radius: 10px;\">\n <div class=\"card-body\">\n <form role=\"form\" method=\"POST\" action=\"/public/register/otp\" autocomplete=\"off\"> \n <div class=\"form-group\">\n <label for=\"u_name\" class=\"control-label pull-left\" style=\"padding-right: 25px;\">Enter OTP to verify mobile number :</label>\n <input type=\"text\" class=\"form-control\" id=\"IdPublicOtp\" name=\"otp\" required autofocus >\n <input type=\"hidden\" class=\"form-control\" id=\"IdPublicToken\" name=\"_token\" value=\"'.csrf_token().'\">\n </div>\n <div class=\"form-group\">\n <div class=\"float-left\">\n <button type=\"submit\" id=\"IdOtpSubmit\" class=\"btn btn-primary\" style=\"display: inline;\">Submit</button>\n <a href=\"#\" class=\"btn btn-link\" id=\"IdPublicResendSms\" style=\"font-size: 14px;display: inline;\">\n Resend OTP !\n </a><br/>\n </div>\n </div><br/></form></div></div></div>';\n }\n catch(\\Exception $exception){\n echo '<div class=\"col-md-5 col-lg-5 col-sm-10 col-10 mx-auto login-div\" style=\"margin-top: 40px;\">\n <div class=\"alert alert-danger\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n Something went wrong!\n </div>';\n }\n }", "function saveUser($username, $password, $homePhone, $workPhone, $mobile, $email, $address)\n {\n $now = new DateTime();\n if ($this->data->insertUser($username, $password, $homePhone, $workPhone, $mobile, $email, $address))\n {\n $data = ($now->format('Y-m-d H:i:s')).\" Registration success. Username: $username\\n\";\n file_put_contents(dirname(__FILE__).'/../../website/logs/log.txt', $data, FILE_APPEND | LOCK_EX);\n\n return true;\n }\n else\n {\n $data = ($now->format('Y-m-d H:i:s')).\" Registration failed. Username: $username\\n\";\n file_put_contents(dirname(__FILE__).'/../../website/logs/log.txt', $data, FILE_APPEND | LOCK_EX);\n return false;\n }\n }", "function signUp($post)\n{\n $email = $post['email'];\n $password = $post['password'];\n $password_confirm = $post['password_confirm'];\n // for showing error when input are empty or mail doesn't match\n if (!preg_match(\"/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,})$/i\", $email))\n {\n $error_msg = \"Format de mail non valide.\";\n }\n // If password input length is less than 6 chars, show error.\n elseif (strlen($password) < 6)\n {\n $error_msg = \"Mot de passe incorrect. Min. 6 caractères.\";\n }\n // If both password don't match, show error.\n elseif ($password != $password_confirm)\n {\n $error_msg = \"Les mots de passes ne correspondent pas.\";\n }\n else {\n $data = new stdClass();\n $data->email = $email;\n $data->password = $password;\n $user = new User( $data );\n $userData = $user->getUserByEmail();\n if ($userData && sizeof( $userData ) > 0) // If email address is already in used, show error.\n {\n $error_msg = \"Cette adresse mail est déjà utilisée.\";\n }\n elseif (strlen($password) < 5) // If password input length is less than 6 chars, show error.\n {\n $error_msg = \"Mot de passe incorrect. Min. 5 caractères.\";\n }\n elseif ($password != $password_confirm) // If both password don't match, show error.\n {\n $error_msg = \"Les mots de passes ne correspondent pas.\";\n }\n else\n {\n // Create new user.\n $password = hash('sha256', $password);\n $user = new User();\n $user->setEmail($email);\n $user->setPassword($password);\n $user->createUser();\n $success_msg = \"Votre inscription s'est déroulée avec succès, vous allez recevoir un mail d'activation.\";\n }\n\n }\n\n //require ('view/auth/signupView.php');\n}", "public function verifyEmail()\n {\n $this->verified = true;\n\n $this->save();\n\n $this->activationToken->delete();\n }", "function create_user($email){\r\n\r\n $post_array = $_POST;\r\n $default_usergroup = \"11\";\r\n\r\n $distributor = $this->aauth->get_user();\r\n $distributor_id = $distributor->user_link_id;\r\n\r\n $new_user_id = '';\r\n $this->load->model('user_model');\r\n\r\n $password = $this->generateRandomString(6);\r\n\r\n $new_user_id = $this->aauth->create_user($post_array['email'],$password,$post_array['name'],$post_array['username'],$default_usergroup);\r\n $errors = $this->aauth->get_errors_array();\r\n\r\n if(is_array($errors) && count($errors) >= 1){\r\n $this->event_model->track('user','attempted_add_user', $errors[0]);\r\n $this->form_validation->set_message('create_user', $errors[0]);\r\n return false;\r\n\r\n }else{\r\n\r\n $this->user_model->update_user_cellphone($post_array['email'], array(\r\n \"cellphone\" => $post_array['cellphone'],\r\n \"user_link_id\" => $distributor_id,\r\n \"parent_id\" => $new_user_id\r\n ));\r\n $this->send_welcome($post_array['email'],$post_array['name'],$post_array['username'],$post_array['cellphone'],$password);\r\n $this->event_model->track('user','add_user', $new_user_id);\r\n $this->form_validation->set_message('create_user', \"<script>window.location.replace('/distributors/distributor_profile/user');</script>\");\r\n return false;\r\n }\r\n \r\n }", "protected function onAfterSave()\n {\n \t$this->saveSuccessful = true;\n\t\t\n\t\tif( $this->isNewStatusUpdate ){ \n \t$this->_sendNewStatusUpdateEmailToAdministrators();\n \t$this->_sendNewStatusUpdateEmailToUser();\n\t\t}\n }", "public function createAction()\r\n {\r\n $user = new User($_POST);\r\n\r\n if ($user->save()) {\r\n\t\t\t\r\n\t\t\tsession_regenerate_id(true);\r\n\r\n\t\t\t$_SESSION['user_id'] = User::getIdSavedUser($_POST['email']);\r\n\t\t\t\r\n\t\t\tIncome::saveDefaultIncomes($_SESSION['user_id']);\r\n\t\t\tExpense::saveDefaultExpenses($_SESSION['user_id']);\r\n\t\t\tPaymentMethod::saveDefaultPaymentMethods($_SESSION['user_id']);\r\n\t\t\t\r\n\t\t\t$user->sendActivationEmail();\r\n\r\n $this->redirect('/signup/success');\r\n\r\n } else {\r\n\r\n View::renderTemplate('Signup/new.html', [\r\n 'user' => $user\r\n ]);\r\n\r\n }\r\n }", "function createAccount(){\n\n $this->load->library('form_validation');\n $this->form_validation->set_rules('firstname','first name','trim|required');\n $this->form_validation->set_rules('lastname','last name','trim|required');\n $this->form_validation->set_rules('emailRegister','e-mail','trim|valid_email|required|is_unique[user.email]');\n $this->form_validation->set_rules('email_confirm','e-mail confirmation','trim|required|matches[emailRegister]');\n $this->form_validation->set_rules('phonenumber','phone number','trim|required');\n\n\n if($this->form_validation->run() === FALSE){\n\n $data['createAccountError'] = 'Some error during submission of register form please correct first';\n $this->load->vars($data);\n\n $this->memberForms();\n }else{\n\n //register new user\n $this->User_model->createUser();\n\n $email = $this->input->post('emailRegister');\n $newUser = $this->User_model->getUserByEmail($email);\n\n //set session for new user\n $userId = $newUser->iduser;\n $sessionData = array(\n 'userId' => $userId,\n 'loginStatus' => 1\n );\n\n $this->session->set_userdata($sessionData);\n //add contacts\n $this->Contact_model->createContact($userId,'mobile',$this->input->post('phonenumber'));\n\n redirect(site_url('user-home'));\n }\n\n }", "protected function process() {\n\t\t// Build error link.\n\t\tif (empty($_POST['user_id'])) {\n\t\t\t$link = 'management/users/create';\n\t\t} else {\n\t\t\t$link = 'management/users/edit/' . $this->user['username'];\n\t\t}\n\n\t\t// Validate.\n\t\tif (!$this->validateForm()) {\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\t\tnonce_generate();\n\n\t\t// Validate required fields.\n\t\tif (empty($_POST['username'])) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'A username must be entered.',\n\t\t\t\t'link' => $link\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\t\tif (empty($_POST['user_id']) && empty($_POST['password'])) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'A password must be entered.',\n\t\t\t\t'link' => $link\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\t\tif ($_POST['password'] !== $_POST['password_confirm']) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'The passwords did not match.',\n\t\t\t\t'link' => $link\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\t\tif (empty($_POST['email'])) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'An email address must be entered.',\n\t\t\t\t'link' => $link\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\n\t\t// Build array of user information to update.\n\t\t$user = array(\n\t\t\t'username' => $_POST['username'],\n\t\t\t'email' => $_POST['email'],\n\t\t\t'first_name' => $_POST['first_name'],\n\t\t\t'last_name' => $_POST['last_name'],\n\t\t\t'expires_on' => $_POST['expires_on']\n\t\t);\n\t\tif (!empty($_POST['password'])) {\n\t\t\t$user['password'] = password_hash($_POST['password'], PASSWORD_DEFAULT);\n\t\t}\n\n\t\tif (empty($_POST['user_id'])) {\n\t\t\t// Create the user.\n\t\t\t$this->Users->create($user);\n\t\t} else {\n\t\t\t// Update the user.\n\t\t\t$this->Users->update($_POST['user_id'], $user);\n\t\t}\n\n\t\t// Forward to the users page.\n\t\tredirect(ABSURL . 'management/users');\n\t}" ]
[ "0.72277015", "0.72259134", "0.67491835", "0.65940285", "0.6565088", "0.65029824", "0.6473292", "0.6398001", "0.63105583", "0.6303285", "0.6283853", "0.6232835", "0.6219503", "0.62100464", "0.61856395", "0.613985", "0.6111469", "0.6104364", "0.6086707", "0.6082024", "0.60618937", "0.60597485", "0.6036633", "0.6032029", "0.60190225", "0.6009626", "0.5993643", "0.5992615", "0.5986121", "0.5981782", "0.5978756", "0.5976461", "0.59745824", "0.59656715", "0.59622806", "0.59614164", "0.59601295", "0.59502196", "0.59247375", "0.5916273", "0.5910004", "0.59092855", "0.5903411", "0.58999723", "0.58986336", "0.5896639", "0.589567", "0.58911914", "0.5887639", "0.5887638", "0.5875833", "0.58698595", "0.5869671", "0.5865617", "0.58638865", "0.58593", "0.58565086", "0.58525014", "0.5846275", "0.58338434", "0.5819442", "0.5818122", "0.5817819", "0.58160245", "0.58134246", "0.5810885", "0.58098257", "0.5800424", "0.579804", "0.5794519", "0.5786118", "0.578604", "0.57817906", "0.5779101", "0.5778383", "0.5775037", "0.57699853", "0.5769822", "0.57633686", "0.57501125", "0.57496136", "0.5748029", "0.5747795", "0.5744873", "0.57430804", "0.57413507", "0.57412475", "0.5740409", "0.57379574", "0.5737655", "0.5737486", "0.5736516", "0.5734738", "0.5730709", "0.57252073", "0.5716781", "0.57087165", "0.5707159", "0.57049", "0.5695639" ]
0.71454734
2
Displays form to change password
public function passwordformAction(){ /*if($this->_request->getParam('error')){ $this->view->assign('messages',$this->_messages->getMessages()); }*/ $form = new Bel_Forms_Builder('passreset_form','/usermanagement/profile/savepassword'); $this->view->assign('form',$form); $this->view->display('forms/ajax.tpl'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionChangePassword()\n {\n $this->render('changePassword');\n }", "public function passwordChangeForm()\n {\n return view('turtle::auth.password.change');\n }", "public function changePasswordAction()\r\n\t{\r\n\t\t$this->_view->_title = 'Thay đổi mật khẩu';\r\n\r\n\t\tif ($this->_arrParam['form']['token'] > 0) {\r\n\r\n\t\t\t$new = $this->_arrParam['form']['new-password'];\r\n\t\t\t$enter = $this->_arrParam['form']['enter-password'];\r\n\r\n\t\t\tif ($new != $enter) {\r\n\t\t\t\t$this->_view->error = 'Mật khẩu không khớp. Xin kiểm tra lại';\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$this->_model->changePassword($this->_arrParam);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// URL::redirect($this->_arrParam['module'], $this->_controller, 'index');\r\n\r\n\r\n\r\n\t\t$this->_view->render(\"{$this->_controller}/change_password\");\r\n\t}", "public function showPasswordForm()\n {\n return view('parameters.users.change_password');\n }", "public function change_admin_password_form() {\n\t if ($this->lang->line('admin_menu_change_password') != '') \n\t\t$this->data['heading']= stripslashes($this->lang->line('admin_menu_change_password')); \n\t\telse $this->data['heading'] = 'Change Password';\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n \n $this->load->view(ADMIN_ENC_URL.'/templates/header.php', $this->data);\n $this->load->view(ADMIN_ENC_URL.'/adminsettings/changepassword.php', $this->data);\n $this->load->view(ADMIN_ENC_URL.'/templates/footer.php', $this->data);\n }\n }", "public function password_change()\n\t{\n\t\t$data['title'] = \"Change Password\";\n\t\t$this->load->view('admin/user/_header');\n\t\t$this->load->view('admin/user/_left_sideber');\n\t\t$this->load->view('admin/user/view_change_password');\n\t\t$this->load->view('admin/user/_footer');\n\t\t\t\n\t}", "public function editPassword(){\n \treturn view('auth.passwords.changePass');\n }", "public function change_password() {\n\t\treturn view( 'provider.profile.change_password' );\n\t}", "public function changePassword()\n {\n if( ! Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $user = User::find(Session::getCurrentUserID());\n\n View::make('templates/front/change-password.php',array());\n }", "public function change_password()\n\t{\n\t \n\t \n \t\t/* Breadcrumb Setup Start */\n\t\t\n\t\t$link = breadcrumb();\n\t\t\n\t\t$data['breadcrumb'] = $link;\n\t\t\n\t\t/* Breadcrumb Setup End */\n\t\n\t\t$data['page_content']\t=\t$this->load->view('changepwd',$data,true);\n\t\t$this->load->view('page_layout',$data);\n\t}", "public function change_pass()\n\t{\n\t\t$form = array();\n\n\t\t$form['validation']['params'] = array('password_old', 'password', 'password_confirm');\n\n\t\t$form['submit'] = function ($params) {\n\t\t\treturn $this->_change_pass_submit();\n\n\n\t\t};\n\n\t\t$form['form'] = function () {\n\t\t\tpage_info('title', lang('title_change_pass'));\n\n\t\t\t$this->_display();\n\t\t};\n\n\t\t$this->_form($form);\n\t}", "public function changePassowrdShow(){\n return view(\"pages.changepassword\");\n }", "public function viewChangePassword()\n {\n // header and module properties\n\t\t$this->data['page_module'] = MY_ACCOUNT_MODULE;\n\t\t$this->data['page_title'] = CHANGE_PASSWORD_TITLE;\n\t\t\n // to preserve previous url, check if the validation failed\n if (!Session::has('danger')) {\n $this->setPreviousListURL(strtolower(CHANGE_PASSWORD_TITLE)); \n \n // also remove the user_photo session\n Session::forget('user_photo');\n }\n\n // load the show form\n return View::make('my_account.change_password')->with('data', $this->data);\n }", "public function changePassword()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('change-password');\n\n return $this->loadPublicView('user.change-password', $breadCrumb['data']);\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 changePasswordForm()\n {\n\n return view('changePassword');\n }", "public function passwordPage() {\n return view('admin.account.change_password');\n }", "public function showChangePasswordForm()\n {\n return view('auth.changepassword');\n }", "public function change_password()\n {\n return view('backend.profile.change-password');\n }", "public function showChangePasswordForm()\n {\n return view('dashboard.change-password');\n }", "public function showChangePasswordForm(){\n return view('admin.change-password');\n }", "public function editPassword()\n\t{\n\t\t$data['active'] = 9;\n\t\t$this->load->view('skin/front_end/header_company_page_topbar');\n\t\t$this->load->view('skin/front_end/navbar_company_page', $data);\n\t\t$this->load->view('content_front_end/company_password_page');\n\t\t$this->load->view('skin/front_end/footer_company_page');\n\t}", "public function change_password()\n {\n $view_data = [\n 'form_errors' => []\n ];\n // Check input data\n if ($this->input->is_post()) {\n\n // Call API to register for parent\n $res = $this->_api('user')->change_password($this->input->post());\n\n if ($res['success'] && !isset($res['invalid_fields'])) {\n $this->_flash_message('パスワードを変更しました');\n redirect('setting');\n return;\n }\n // Show error if form is incorrect\n $view_data['form_errors'] = $res['invalid_fields'];\n $view_data['post'] = $this->input->post();\n }\n\n $this->_render($view_data);\n }", "public function changePasswordAction()\n {\n $form = new Form\\Password();\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $userModel = new Model\\Users();\n $identity = $this->_auth ->getIdentity();\n $userId = $identity->getId();\n $user = $userModel->getUser($userId);\n $result = $userModel->savePassword($user, $form->getValue('new_password'), $form->getValue('password'));\n\n if ($result) {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was changed.'); \n } else {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was NOT changed.');\n }\n $this->_redirect($this->getRequest()->getRequestUri());\n }\n $this->view->passwordForm = $form;\n }", "function display_password_form()\r\n{\r\n?>\r\n <br>\r\n <form action=\"change_passwd.php\" method=post>\r\n <table width=250 cellpadding=2 cellspacing=0 bgcolor=#cccccc>\r\n <tr><td>Старый пароль:</td>\r\n <td><input type=password name=old_passwd size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td>Новый пароль:</td>\r\n <td><input type=password name=new_passwd size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td>Повторите новый пароль:</td>\r\n <td><input type=password name=new_passwd2 size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td colspan=2 align=center><input type=submit value=\"Изменить пароль\">\r\n </td></tr>\r\n </table>\r\n <br>\r\n<?\r\n}", "public function changePasswordAction()\n {\n $form = new ChangePasswordForm();\n\n if ($this->request->isPost()) {\n\n if (!$form->isValid($this->request->getPost())) {\n\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = $this->auth->getUser();\n\n $user->password = $this->security->hash($this->request->getPost('password'));\n $user->mustChangePassword = 'N';\n\n $passwordChange = new PasswordChanges();\n $passwordChange->user = $user;\n $passwordChange->ipAddress = $this->request->getClientAddress();\n $passwordChange->userAgent = $this->request->getUserAgent();\n\n if (!$passwordChange->save()) {\n $this->flash->error($passwordChange->getMessages());\n } else {\n\n $this->flash->success('Your password was successfully changed');\n\n Tag::resetInput();\n }\n }\n }\n\n $this->view->form = $form;\n }", "function changepassword() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n $this->viewData['hash'] =User::userid();\n // Render the action with template\n $this->renderWithTemplate('users/changepassword', 'AdminPageBaseTemplate');\n }", "public function passwordChangeForm()\n {\n return view('student.change');\n }", "public function editPassword()\n {\n $this->load_view('Profil Akun', 'user/gantiPassword');\n }", "public function password()\n {\n $this->isUser();\n\n $this->data['noCabinetOrAdmin'] = true;\n\n if ($_POST) {\n\n if (!$_POST['old-password'] && !$_POST['new-password']) {\n\n $userModel = new UserModel();\n\n $validateResult = $userModel->validate($_POST);\n\n if ($validateResult === true) {\n\n $checkPassword = $userModel->checkOldPassword($_POST['old-password']);\n\n if ($checkPassword) {\n\n if ($userModel->refreshPassword($_POST)) {\n\n $this->data['success'] = 'Пароль успешно изменен';\n\n } else {\n\n $this->data['warning'] = 'Произошла ошибка';\n }\n\n } else {\n\n $this->data['warning'] = 'Старый пароль введен не правильно';\n }\n\n } else {\n\n $this->data['warning'] = $validateResult;\n }\n\n } else {\n\n $this->data['warning'] = 'Все поля должны быть заполнены';\n }\n }\n\n $this->render('password');\n }", "protected function changePassword() {}", "public function editPassword(){\n return view(editPassword);\n }", "public function passwordAction(){\r\n $this->view->password = '';\r\n }", "public function get_change_password() {\n return View::make('login.change-password');\n }", "public function actionChangePassword()\n {\n \t$user = UserAdmin::findOne(Yii::$app->request->get('id'));\n \t$model = new ChangeForcePasswordForm($user);\n \tif ($model->load(Yii::$app->request->post()) && $model->applyChanges()) \n \t{\n \t\tYii::$app->getSession()->setFlash('success', \n \t\t\t\"The user password has been changed\"\n \t\t);\n \t\treturn $this->redirect([\"/admin/crud/user-admin/view\", 'id' => $user->id]);\n \t}\n \t\n \t$this->layout = '@app/layouts/layout-popup-sm';\n \treturn $this->render('change-password', ['model' => $model]);\n }", "function display_password_form()\r\n{\r\n?>\r\n <br>\r\n <form action=\"change_passwd.php\" method=post>\r\n <table width=250 cellpadding=2 cellspacing=0 bgcolor=#cccccc>\r\n <tr><td>Vieja Contraseña:</td>\r\n <td><input type=password name=old_passwd size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td>Nueva Contraseña:</td>\r\n <td><input type=password name=new_passwd size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td>Repite Nueva Contraseña:</td>\r\n <td><input type=password name=new_passwd2 size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td colspan=2 align=center><input type=submit value=\"Cambiar Contraseña\">\r\n </td></tr>\r\n </table>\r\n <br>\r\n<?\r\n}", "public function actionChangepassword()\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\n\t\t$record = SiteUser::model()->findByAttributes(array('id'=> Yii::app()->user->id));\n\t\n\t\tif(isset($_POST['SiteUser']))\n\t\t{\t\n\t\t\tif(trim($_POST['SiteUser']['password']) != '') {\n\t\t\t\t$record->password = $_POST['SiteUser']['password'];\n\t\t\t\t\n\t\t\t} \t\t\n\t\t\tif(trim($_POST['SiteUser']['password']) == trim($_POST['SiteUser']['repeat_password'])) {\n\t\t\t\t$record->repeat_password = $record->password;\n\t\t\t}\t\n\t\t\t\n\t\t\tif($record->validate()) {\n\t\t\t\t$record->repeat_password = $record->password = crypt($record->password);\n\t\t\t\tif($record->save())\n\t\t\t\t\t$this->redirect(array('personal'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$record->repeat_password = $record->password = '';\n\t\t\t}\n\n\t\t}\t\n\n\t\t$this->render('changepassword',array('record'=>$record));\n\t}", "public function changePassword() {\n\t\t//assign public class values to function variable\n\t\t$data = $this->data;\n\t\t$data['common_data'] = $this->common_data;\n\t\t$data['page'] = 'change_password';\n\t\t$data['pageName'] = 'Change Password';\n\t\tif($data['common_data']['user_data']['role'] == INACTIVE_STATUS_ID){\n\t\t\theader(\"Location: \".ROUTE_PROFILE);\n\t\t\tdie();\n\t\t}\n\t\tif($data['common_data']['user_data']['account_type'] == FACEBOOK_ACCOUNT_TYPE){\n\t\t\theader(\"Location: \".ROUTE_ERROR_PAGE);\n\t\t\tdie();\n\t\t}\n\n\t\t$data['tutor_details'] = $this->profile_model->getTutorDetailsById($data['common_data']['user_id']);\n\t\t//Getting all payment details\n\t\t$data['payment_details'] = $this->payment_model->getPaymentDetailsById($data['common_data']['user_id']);\n\t\t$data['tutor_badges'] = $this->user_model->getTutorBadges($data['common_data']['user_id']);\n\t\t$data['badges'] = $this->user_model->getBadges();\n\n\t\t$template['body_content'] = $this->load->view('frontend/profile/change-password', $data, true);\t\n\t\t$this->load->view('frontend/layouts/template', $template, false);\n\t}", "public function changePassword() {\n return view('/myprofile/myprofilepassword');\n }", "public function getChangePasswordForm()\n {\n $this->data['title'] = trans('backpack::base.my_account');\n $this->data['user'] = $this->guard()->user();\n\n return view('backpack::auth.account.change_password', $this->data);\n }", "public function actionUpdatePassword(){\r\n //common view data\r\n $mainCategories = $this->mainCategories;\r\n $brands = $this->brands;\r\n \r\n $errors = [];\r\n $success = null;\r\n \r\n //check if the user is logged in and get User $user properties from the database\r\n $userID = $this->checkLogged();\r\n $success = null;\r\n \r\n //check if the form has been submitted and process form data\r\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n $currentPassword = filter_input(INPUT_POST, 'currentPassword', FILTER_SANITIZE_SPECIAL_CHARS);\r\n $newPassword = filter_input(INPUT_POST, 'newPassword', FILTER_SANITIZE_SPECIAL_CHARS);\r\n $confirmNewPassword = filter_input(INPUT_POST, 'confirmNewPassword', FILTER_SANITIZE_SPECIAL_CHARS);\r\n \r\n $model = new ChangePasswordForm($userID, $currentPassword, $newPassword, $confirmNewPassword);\r\n \r\n if(!$model->validate()) {\r\n $errors = $model->errors;\r\n } else if(!$model->verifyPassword()) {\r\n $errors['currentPassword'][0] = 'Incorrect password';\r\n } else {\r\n $success = $model->updatePassword() ? 'PASSWORD SUCCESSFULLY UPDATED' : 'ERROR UPDATING PASSWORD';\r\n }\r\n }\r\n \r\n include_once ROOT . '/views/profile/changepass.php';\r\n \r\n }", "public function getPasswordChangeForm();", "public function password()\n {\n return view('account.account.change-password');\n }", "public function user_password_change() {\n $data['title'] = 'Change Password';\n return view('user-dashboard.password-change', $data);\n }", "public function get_changepassword(){\n\t\tif (Auth::check()){\n\t\t\t$customer_id = Auth::user()->customer_id;\n\t\t\t\n\t\t\t$this->layout->content = View::make('frontend.customers.changepassword')\n\t\t\t\t->with('title', 'Change Password')\n\t\t\t\t->with('customer', Customer::find($customer_id));\n\t\t}\n\t}", "public function changePasswordAction()\n {\n if ($this->request->isPost()) {\n // Request data\n $data = $this->request->getPost();\n\n $formValidator = $this->createValidator([\n 'input' => [\n 'source' => $data,\n 'definition' => [\n 'password' => new Pattern\\Password,\n 'confirmation' => new Pattern\\PasswordConfirmation($data['password'])\n ]\n ]\n ]);\n\n if ($formValidator->isValid()) {\n // Update current password\n $userService = $this->getModuleService('userService');\n $userService->updatePasswordById($this->getUserId(), $data['password']);\n\n $this->flashBag->set('success', 'Your password has been updated successfully');\n return 1;\n\n } else {\n return $formValidator->getErrors();\n }\n \n } else {\n // Just render empty form\n return $this->view->render('settings/change-password');\n }\n }", "public function editPasswordAdmin()\n {\t\n \treturn view('setting.edit-password-admin');\n }", "public function actionPassword() {\n\t\t$content = ModelBase::factory('Setting')->handlePassword($this->data);\n\n\t\tif ($content->get('updated')) $this->setAlert('info', 'Password terupdate!');\n\n\t\t// Template configuration\n\t\t$this->layout = 'modules/setting/index.tpl';\n\t\t$data = ModelBase::factory('Template')->getSettingData(compact('content'));\n\n\t\t// Render\n\t\treturn $this->render($data);\n\t}", "public function changepassword() {\n return view('auth.changepassword');\n }", "public function admin_forgot_password_form() {\n if ($this->checkLogin('A') == '') {\n\t\t\t\t$this->load->view(ADMIN_ENC_URL.'/templates/forgot_password.php', $this->data);\n } else {\n redirect(ADMIN_ENC_URL.'/dashboard');\n }\n }", "public function changepassword()\n { \n return view('admin.profile.changepassword');\n }", "public function actionPassword()\n {\n $id = Yii::$app->user->id;\n\t\t$model = $this->findModel($id);\n\t\t$model->scenario = 'password';\n if ($model->load(Yii::$app->request->post())) {\t\n\t\t\tif(!Yii::$app->security->validatePassword($model->old_password, Yii::$app->user->identity->password_hash)){\n\t\t\t\tYii::$app->getSession()->setFlash('error', 'Old password not match with current password');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$model->password = $model->new_password;\n\t\t\t\tif($model->save()) {\n\t\t\t\t\tYii::$app->getSession()->setFlash('success', 'Password have changed.');\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tYii::$app->getSession()->setFlash('error', 'Password is not change.');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this->redirect(['password']);\n } else {\n return $this->render('password', [\n 'model' => $model,\n ]);\n }\n }", "public function getChangePassword(){\n return view('pages.change_password');\n }", "function change_password()\n\t{\n\t\t$header_data['title'] = 'UFLEX INDIA- Change Password.';\n\t\t$this->load->view('london/layout/header');\n\t\t// $this->load->view('layout/header', $header_data);\n\t\t$this->load->view('london/layout/sidenavbar');\n\t\t$this->load->view('layout/change-password-london');\n\t\t$this->load->view('london/layout/footer');\n\t\t// $this->load->view('layout/footer');\n\n\t}", "public function actionChangePassword()\n {\n $model = new ChangePasswordForm();\n\n $user = User::find()->where(['id' => Yii::$app->user->id])->one();\n if($user === null){\n throw new NotFoundHttpException('User is null');\n }\n\n $model->setUser($user);\n if($model->load(Yii::$app->request->post()) && $model->update())\n {\n $this->showFlashSuccessMessage('Your password has been changed successfully!');\n Yii::$app->user->logout();\n return $this->refresh();\n }\n $this->showFlashModelErrors($model);\n\n return $this->render('change-password', [\n 'model' => $model\n ]);\n }", "public function actionchangePassword() {\n if (isset($_POST['password'])) {\n\n $userid = Yii::app()->user->getState('userid');\n $model = HhUsers::model()->findByPk($userid);\n if ($model->password == md5($_POST['password'])) {\n\n $model->password = md5($_POST['newpassword']);\n if ($model->save()) {\n $this->redirect('index');\n }\n }\n }\n $this->render('changePassword');\n }", "public function showEditPassword()\n {\n return view('pages.settings.password.index');\n }", "function change_password()\n {\n if ($user = $this->authorized(USER))\n {\n $descriptive_names = array(\n 'current_password' => 'Current Password',\n 'new_password' => 'New Password',\n 'new_password_confirm' => 'Confirm Password'\n );\n\n $rules = array(\n 'current_password' => ($user['group_id']==0)?'clean':'required|clean',\n 'new_password' => 'required|clean',\n 'new_password_confirm' => 'required|clean'\n );\n\n $this->loadLibrary('form.class');\n $form = new Form();\n\n $form->dependencies['title'] = \"Change Password\";\n $form->dependencies['form'] = 'application/views/change-password.php';\n $form->dependencies['admin_reset'] = false;\n $form->dependencies['client_id'] = $user['id'];\n $form->form_fields = $_POST;\n $form->descriptive_names = $descriptive_names;\n $form->view_to_load = 'form';\n $form->rules = $rules;\n\n if ($fields = $form->process_form())\n {\n\n $this->loadModel('UserAuthentication');\n\n\n if ($this->UserAuthentication->change_password($user['id'], $fields['current_password'], $fields['new_password'], $fields['new_password_confirm']))\n {\n $this->alert(\"Password Updated\", \"success\");\n $this->redirect(\"portal/home\");\n }\n else\n {\n $this->alert(\"Error: Password Not Updated\", \"error\");\n $this->redirect(\"portal/home\");\n }\n }\n }\n }", "public function actionChangePassword()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', ['required' => true]);\n $model = $this->findModel($username);\n $model->setPassword($this->prompt(Console::convertEncoding(Yii::t('app', 'New password')) . ':', [\n 'required' => true,\n 'pattern' => '#^.{4,255}$#i',\n 'error' => Console::convertEncoding(Yii::t('app', 'More than {:number} symbols', [':number' => 4])),\n ]));\n $this->log($model->save());\n }", "public function new_password_form()\n {\n $markers = array();\n $markers['errors'] = $this->Register['Validate']->getErrors();\n if (isset($_SESSION['FpsForm'])) unset($_SESSION['FpsForm']);\n\n\n $markers['action'] = get_url('/users/send_new_password/');\n $source = $this->render('newpasswordform.html', array('context' => $markers));\n\n\n // Navigation PAnel\n $nav = array();\n $nav['navigation'] = get_link(__('Home'), '/') . __('Separator')\n . get_link(h($this->module_title), '/users/') . __('Separator') . __('Password repair');\n $this->_globalize($nav);\n\n\n return $this->_view($source);\n }", "function changepassword()\n {\n $data['action'] = $this->lang->line('changepassword');\n $data['title'] = $this->lang->line('changepassword');\n\t $data['user'] = $this->db_session->userdata('user_name');\n $data['fal'] = $this->fal_front->changepassword();\n\t $this->load->view('user/changepassword_view', $data); \n }", "public function edit()\n {\n return view('auth.change-password');\n }", "public function showpassword()\n\t\t{\n\t\t\tif(Auth::check()) {\n\t\t\t\treturn View::make('updatepassword');\n\t\t\t} else {\n\t\t\t\tApp::abort(403);\n\t\t\t}\n\t\t}", "public function changePassword()\n {\n $user = Auth::user();\n return view('dashboard.shared.change-password', compact('user'));\n }", "public function change_pass()\n {\n return view('admin.admins.profile.change_pass');\n }", "protected function _change_pass_submit()\n\t{\n\t\t$user = user_get_account_info();\n\t\t$password = $this->input->post('password');\n\t\t$password = mod('user')->encode_password($password, $user->email);\n\n\n\t\t$data['password'] = $password;\n\t\tt('session')->set_userdata('change_password', $data);\n\t\t$user_security_type = setting_get('config-user_security_change_password');\n\t\tif (in_array($user_security_type, config('types', 'mod/user_security'))) {\n\t\t\tmod('user_security')->send('change_password');\n\t\t\t$location = $this->_url('confirm/change_password');\n\t\t} else {\n\n\t\t\tmodel('user')->update($user->id, compact('password'));\n\t\t\tset_message(lang('notice_update_success'));\n\t\t\t$location = $this->_url('change_pass');\n\n\t\t}\n\n\t\treturn $location;\n\t}", "function forgot_password() {\n $datos['titulo'] = \"Restablecer Contraseña\";\n $this->render_page('usuarios/forgot_password', $datos);\n }", "public function index()\n {\n return view('auth.passwords.change-password');\n }", "public function getChangePassword() {\n return view('admin.change-password');\n }", "public function changePassword()\n {\n $user = Auth::user();\n return view('member.change_password');\n }", "public function changePasswordAction()\n {\n $errors = [];\n if(!empty($_POST)){\n $user = Auth::getUser();\n\n $userValidation = new UserValidation($_POST, ['password']);\n $errors = $userValidation->getNamedErrors();\n\n if(empty($errors)){\n if(password_verify($_POST['oldpass'], $user->password)){\n $user->changePassword($_POST['password']);\n Extra::setMessageCookie(\"Password changed successfully.\");\n $this->redirect(\"/manage-account/\");\n }\n $errors['oldpass'] = \"Password you entered is incorrect.\";\n }\n }\n View::renderTemplate(\"LoggedUser/change-password.html\", [\n 'errors' => $errors\n ]);\n }", "function get_change_password($properties) {\r\n\r\n $page_id = $properties['page_id'];\r\n\r\n $form = new liveform('change_password');\r\n\r\n $attributes =\r\n 'action=\"' . OUTPUT_PATH . OUTPUT_SOFTWARE_DIRECTORY . '/change_password.php\" ' .\r\n 'method=\"post\"';\r\n\r\n // If the form is empty, then set default values.\r\n if ($form->is_empty()) {\r\n if (USER_LOGGED_IN) {\r\n $form->set('email_address', USER_EMAIL_ADDRESS);\r\n }\r\n }\r\n\r\n $form->set('email_address', 'required', true);\r\n $form->set('email_address', 'maxlength', 100);\r\n\r\n $form->set('current_password', 'required', true);\r\n\r\n // If strong password is enabled, then display password requirements.\r\n if (STRONG_PASSWORD) {\r\n $strong_password_help = get_strong_password_requirements();\r\n } else {\r\n $strong_password_help = '';\r\n }\r\n\r\n $form->set('new_password', 'required', true);\r\n $form->set('new_password_verify', 'required', true);\r\n\r\n if (PASSWORD_HINT) {\r\n $form->set('password_hint', 'maxlength', 100);\r\n }\r\n\r\n $my_account_url = '';\r\n\r\n // If the user is logged in then get my account URL, for cancel button.\r\n if (USER_LOGGED_IN) {\r\n $my_account_url = get_page_type_url('my account');\r\n }\r\n\r\n $system = get_token_field();\r\n\r\n $output = render_layout(array(\r\n 'page_id' => $page_id,\r\n 'messages' => $form->get_messages(),\r\n 'form' => $form,\r\n 'attributes' => $attributes,\r\n 'strong_password_help' => $strong_password_help,\r\n 'my_account_url' => $my_account_url,\r\n 'system' => $system));\r\n\r\n $output = $form->prepare($output);\r\n\r\n $form->remove();\r\n\r\n return\r\n '<div class=\"software_change_password\">\r\n ' . $output . '\r\n </div>';\r\n\r\n}", "public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "public function changePasswordAction()\n {\n $message = array();\n $message['success'] = \"\";\n $message['verify'] = $this->customerVerify($_SESSION['userName'], $_POST['currentPass']);\n if (!$message['verify']) {\n $message['confirm'] = $this->checkConfirm($_POST['newPass'], $_POST['confirmPass']);\n if (!$message['confirm']) {\n $this->model->chagePass($_SESSION['userName'], password_hash($_POST['newPass'], PASSWORD_DEFAULT));\n $message['success'] = \"Your password has been changed\";\n }\n }\n echo json_encode($message);\n }", "function changeMasterPassword()\n\t{\n\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.std_layout.html\", \"setup\");\n\n\t\t$this->tpl->setVariable(\"TXT_INFO\", $this->lng->txt(\"info_text_password\"));\n\n\t\t// formular sent\n\t\tif ($_POST[\"form\"])\n\t\t{\n\t\t\t$pass_old = $this->setup->getPassword();\n\n\t\t\tif (empty($_POST[\"form\"][\"pass_old\"]))\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"password_enter_old\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tif (md5($_POST[\"form\"][\"pass_old\"]) != $pass_old)\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"password_old_wrong\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tif (empty($_POST[\"form\"][\"pass\"]))\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"password_empty\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tif ($_POST[\"form\"][\"pass\"] != $_POST[\"form\"][\"pass2\"])\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"password_not_match\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tif (md5($_POST[\"form\"][\"pass\"]) == $pass_old)\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"password_same\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tif (!$this->setup->setPassword($_POST[\"form\"][\"pass\"]))\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"save_error\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tilUtil::sendInfo($this->lng->txt(\"password_changed\"),true);\n\t\t\tilUtil::redirect(\"setup.php\");\n\t\t}\n\n\t\t// output\n\t\t$this->tpl->addBlockFile(\"SETUP_CONTENT\",\"setup_content\",\"tpl.form_change_admin_password.html\", \"setup\");\n\n\t\t$this->tpl->setVariable(\"TXT_HEADER\",$this->lng->txt(\"password_new_master\"));\n\n\t\t// pass form\n\t\t$this->tpl->setVariable(\"FORMACTION\", \"setup.php?cmd=gateway\");\n\t\t$this->tpl->setVariable(\"TXT_REQUIRED_FIELDS\", $this->lng->txt(\"required_field\"));\n\t\t$this->tpl->setVariable(\"TXT_PASS_TITLE\",$this->lng->txt(\"change_password\"));\n\t\t$this->tpl->setVariable(\"TXT_PASS_OLD\",$this->lng->txt(\"set_oldpasswd\"));\n\t\t$this->tpl->setVariable(\"TXT_PASS\",$this->lng->txt(\"set_newpasswd\"));\n\t\t$this->tpl->setVariable(\"TXT_PASS2\",$this->lng->txt(\"password_retype\"));\n\t\t$this->tpl->setVariable(\"TXT_SAVE\", $this->lng->txt(\"save\"));\n\t}", "public function changePassword()\n {\n //\n $id = Auth()->user()->id;\n $user = User::find($id);\n return view('customers.change-password',compact('user'));\n\n }", "function changePassword()\n {\n $this->view->load('frontend/user/changePassword');\n }", "function setnewpassword()\n {\n $login_model = $this->loadModel('Login');\n\n if ($login_model->setNewPassword()) {\n $this->view->render('login/index');\n } else {\n $this->view->render('login/changepassword');\n }\n }", "public function DoChangePassword($form)\n\t{\n\t\tif ($form->GetValue('Pw') == $form->GetValue('Pw2'))\n\t\t{\n\t\t\t$this->user->ChangePassword($form->GetValue('OldPw'), $form->GetValue('Pw'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session->AddMessage('info', 'Password didn\\'t match.');\n\t\t}\n\t\t\n\t\t$this->RedirectToController('profile');\n\t}", "public function change_password_page(Request $request){\n return view('frontend.modules.dashboard.change_pass');\n }", "function submitpassword() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\tif ($_POST['pass1']=== $_POST['pass2'])\n\t\t{\n\t\t\tUserModel::Create()->ChangePassword($_POST['hash'], $_POST['pass1']);\n\t\t\tif (User::IsLoggedIn())\n\t\t\t{\n\t\t\t\tUser::setpassword($_POST['pass1']);\n\t\t\t\t$this->renderWithTemplate('admin/index', 'AdminPageBaseTemplate');\n\t\t\t}\n\t\t\telse\n\t\t\t{$this->renderWithTemplate('admin/login', 'AdminPageBaseTemplate');}\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\t$this->viewData['message'] =\"Passwords Don't Match. Try Again\";\n\t\t\t$this->renderWithTemplate('users/changepassword', 'AdminPageBaseTemplate');\n\t\t}\n }", "public function index()\n {\n return view('user.change-password');\n }", "public function displayForgotPassword()\n {\n $this->render('forgot-password', ['head'=>['title'=>'Mot de passe oublié', 'meta_description'=>'']]);\n }", "public function update()\n {\n $new_password = $this->input->post('inputNewPassword');\n if ($this->authentication->change_password($new_password))\n {\n $this->flash_message('Password Akun Berhasil di Update');\n } else {\n $this->flash_message('Password Akun Gagal di Update');\n }\n redirect($this->data['user'].'/editPassword');\n }", "public function actionPasswordChange() {\n\n\t\t$userId = User::checkLogged();\n\t\t$user = User::getUserById($userId);\n\t\t$old_password = \"\";\n\t\t$password = \"\";\n\t\t$password_confirmation = \"\";\n\t\t$result = false;\n\n\t\tif (isset($_POST['submit'])) {\n\t\t\t$old_password = $_POST['old_password'];\n\t\t\t$password = $_POST['password'];\n\t\t\t$password_confirmation = $_POST['password_confirmation'];\n\n\t\t\t$errors = array();\n\n\t\t\tif (User::passwordCheck($userId, $old_password)) {\n\t\t\t\tif (Validator::checkPassword($password)) $errors['password'] = Validator::checkPassword($password);\n\t\t\t\tif (Validator::checkPasswordConfirmation($password, $password_confirmation)) $errors['password_confirmation'] =\n\t\t\t\t\tValidator::checkPasswordConfirmation($password, $password_confirmation);\n\t\t\t} else $errors['old_password'] = \"Wrong old password\";\n\n\t\t\tif (empty($errors)) {\n\t\t\t\t$result = User::passwordChange($userId, $password);\n\t\t\t}\n\t\t}\n\t\t$pageTitle = \"Password Change\";\n\t\trequire_once(ROOT . '/views/account/password_change.php');\n\n\t\treturn true;\n\t}", "public function actionChangePassword()\n {\n $model = $this->model;\n\n $modelForm = new PasswordChangeForm([\n 'user' => $model,\n ]);\n\n $rr = new RequestResponse();\n\n if (\\Yii::$app->request->isAjax && !\\Yii::$app->request->isPjax) {\n return $rr->ajaxValidateForm($modelForm);\n }\n\n\n if ($modelForm->load(\\Yii::$app->request->post()) && $modelForm->changePassword()) {\n \\Yii::$app->getSession()->setFlash('success', 'Успешно сохранено');\n } else {\n if (\\Yii::$app->request->isPost) {\n \\Yii::$app->getSession()->setFlash('error', 'Не удалось изменить пароль');\n }\n }\n\n return $this->render($this->action->id, [\n 'model' => $modelForm,\n ]);\n }", "public function changeFormAction(): Response\n {\n $user = $this->getUser();\n\n $form = $this->createForm('AppBundle\\Form\\User\\PasswordChangeType', $user);\n\n // Password blacklist to be used by zxcvbn.\n $passwordBlacklist = [\n $user->getUsername(),\n $user->getEmail()\n ];\n\n return $this->render(':Form/User:password-change.html.twig', [\n 'form' => $form->createView(),\n 'passwordBlacklist' => json_encode($passwordBlacklist)\n ]);\n }", "public function update_password() {\n $this->authenticate->check();\n $data['title'] = translate('change_password');\n $city_join = array(\n array(\n 'table' => 'app_services',\n 'condition' => 'app_city.city_id=app_services.city',\n 'jointype' => 'inner'\n )\n );\n $top_cities = $this->model_customer->getData('app_city', 'app_city.*', 'app_services.status=\"A\"', $city_join, 'city_id', 'city_id', '', 12, array(), '', array(), 'DESC');\n $data['topCity_List'] = $top_cities;\n $this->load->view('front/profile/change_password', $data);\n }", "public function index()\n {\n return view(\"auth.passwords.change\");\n }", "public function actionPasswordReset()\n\t{\n\t\t$this->render('passwordReset');\n\t}", "public function c_changepass(){\n\t\t\n\t\t$this->getC();\n\t\t$this->layout = false;\n\t\tif ($this->request->is('post')) {\n\t\t\t$customers = $this->Customers->get($this->request->session()->read('id'), [\n\t\t\t\t'contain' => []\n\t\t\t]);\n\t\t\t$pass = $this->request->data['data']['Customers']['oldpassword'];\n\t\t\t$new = $this->request->data['data']['Customers']['password'];\n\t\t\tif(!empty($customers)){\n\t\t\t\n\t\t\t\tif($this->request->data['data']['Customers']['cpassword']==$this->request->data['data']['Customers']['oldpassword']){\n\t\t\t\t\t$this->request->data['password']=$new;\n\t\t\t\t\t$customer = $this->Customers->patchEntity($customers, $this->request->data);\n\t\t\t\t\t\n\t\t\t\t\tif ($this->Customers->save($customer)) {\n\t\t\t\t\t\t$this->Flash->success('Password has been successfully updated.');\n\t\t\t\t\t\treturn $this->redirect(['action' => 'c_index']);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->Flash->success('Wrong Password. Please try again.');\n\t\t\t\t\treturn $this->redirect(['action' => 'c_index']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$this->Flash->success('Wrong Password. Please try again.');\n\t\t\t\treturn $this->redirect(['action' => 'c_index']);\n\t\t\t}\n\t\t}\n\t}", "public function changePasswordAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n if (!is_object($user) || !$user instanceof UserInterface) {\n $this->createAccessDeniedException('This user does not have access to this section.');\n }\n\n $this->page = $this->getDoctrine()->getRepository('PageBundle:Page')->findOneByAlias($this::PASSWORD_CHANGE_PAGE_ALIAS);\n\n if (!$this->page) {\n return $this->get('bardiscms_page.services.show_error_page')->errorPageAction(Page::ERROR_404);\n }\n\n // Simple publishing ACL based on publish state and user Allowed Publish States\n $accessAllowedForUserRole = $this->get('bardiscms_page.services.helpers')->isUserAccessAllowedByRole(\n $this->page->getPublishState(),\n $this->publishStates\n );\n\n if (!$accessAllowedForUserRole) {\n return $this->get('bardiscms_page.services.show_error_page')->errorPageAction(Page::ERROR_401);\n }\n\n $this->page = $this->get('bardiscms_settings.set_page_settings')->setPageSettings($this->page);\n\n $form = $this->get('fos_user.change_password.form');\n $formHandler = $this->get('fos_user.change_password.form.handler');\n\n $process = $formHandler->process($user);\n if ($process) {\n $this->setFlash('fos_user_success', 'change_password.flash.success');\n\n return $this->redirect($this->getRedirectionUrl($user));\n }\n\n $pageData = array(\n 'page' => $this->page,\n 'mobile' => $this->serveMobile,\n 'logged_username' => $this->userName,\n 'form' => $form->createView(),\n );\n\n // Render Password change page\n $response = $this->render('SonataUserBundle:ChangePassword:changePassword.html.twig', $pageData);\n\n return $response;\n }", "function admin_change_password() {\n\t\t\n\t\tConfigure::write('debug', 0);\n\t\t$this->layout = \"admin\";\n\t\t$this->set(\"changepassword\", \"selected\"); //set main navigation class\n\t\t$this->set('manageClass', 'selected');\n\t\t$uid = $this->Session->read('Admin.id');\n\t\t$email = $this->Session->read('Admin.email');\n\t\t$userdata = $this->Member->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Member.id' => $this->Session->read('Admin.id'),\n\t\t\t\t'Member.email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\tif ($userdata) {\n\t\t\tif (!empty($this->data)) {\n\t\t\t\t$this->Member->updateAll(array(\n\t\t\t\t\t'Member.pwd' => \"'\" . md5($this->data['Member']['pwd']) . \"'\",\n\t\t\t\t\t'Member.email' => \"'\" . $this->data['Member']['email'] . \"'\"\n\t\t\t\t), array(\n\t\t\t\t\t'Member.email' => $email,\n\t\t\t\t\t'Member.id' => $this->Session->read('Admin.id')\n\t\t\t\t) //(conditions) where userid=schoolid\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->Session->setFlash('Password changed successfully');\n\t\t\t\t$this->redirect(array(\n\t\t\t\t\t'action' => 'change_password',\n\t\t\t\t\t'admin' => true\n\t\t\t\t));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse {\n\t\t}\n\t\t\n\t}", "protected function actionNewPassword() {\n\t\t$this->content = $this->parser->parseTemplate(CMT_TEMPLATE.'app_welcome/cmt_new_password.tpl');\n\t}", "function change_password()\n\t\t{\n\t\t\tif ($this->input->post('change_password'))\n\t\t\t{\n\t\t\t\t$this->form_validation->set_rules('old_password', 'above', 'required');\n\t\t\t\t$this->form_validation->set_rules('password', 'above', 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\n\t\t\t\t$this->form_validation->set_rules('password_confirm', 'above', 'required');\n\n\n\t\t\t\tif ($this->form_validation->run())\n\t\t\t\t{\n\t\t\t\t\t$identity = $this->session->userdata('identity');\n\t\t\t\t\t$old_pass = $this->input->post('old_password');\n\t\t\t\t\t$new_pass = $this->input->post('password');\n\n\t\t\t\t\tif ($this->ion_auth->change_password($identity, $old_pass, $new_pass))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->flexi_cart->set_status_message($this->ion_auth->messages(), 'public', TRUE);\n\t\t\t\t\t\t// Logout so the user can re-login.\n\t\t\t\t\t\t$this->logout();\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$this->flexi_cart->set_error_message($this->ion_auth->errors(), 'public', TRUE);\n\t\t\t\t\t\tredirect(current_url());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->data['min_password_length'] = $this->config->item('min_password_length', 'ion_auth');\n\t\t\t$this->load->view('public/dashboard/change_password', $this->data);\n\t\t}", "function pass_change()\r\n\t{\r\n\t\tglobal $ibforums, $std;\r\n\r\n\t\tif ($ibforums->member['disable_mail'])\r\n\t\t{\r\n\t\t\t$ibforums->lang['no_mail'] = sprintf($ibforums->lang['no_mail'], $ibforums->member['disable_mail_reason']);\r\n\r\n\t\t\t$this->output .= View::make(\"global.warn_window\", ['message' => $ibforums->lang['no_mail']]);\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$this->output .= View::make(\"ucp.pass_change\");\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}", "function setpassword(){\n $data['code'] = $this->uri->segment(2);\n $data['meta_description'] = METADESCRIPTION;\n $data['page_title'] = SITE_TITLE;\n $data['page_name'] = \"Set Password\";\n $data['page_name'] = \"Change Password\";\n $data['page_slug']\t\t\t= $this->uri->segment(1);\n $this->load->view('admin/common/header.php',$data); \n $this->load->view('admin/setpassword', $data);\n $this->load->view('admin/common/footer.php',$data); \n }", "public function password(){\r\n\r\n\t\t\t$user_info = Helper_User::get_user_by_id($this->user_id);\r\n\r\n\t\t\tif($_POST){\r\n\r\n\t\t\t\t$formdata = form_post_data(array(\"old_password\", \"new_password\", \"repeat_new_password\"));\r\n\t\t\t\t\r\n\t\t\t\t$old_password = trim($formdata[\"old_password\"]);\r\n\t\t\t\t$new_password = trim($formdata[\"new_password\"]);\r\n\t\t\t\t$repeat_new_password = trim($formdata[\"repeat_new_password\"]);\r\n\r\n\t\t\t\t$error_flag = false;\r\n\r\n\t\t\t\tif(strlen($old_password) <= 0){\r\n\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the old password\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tif(strlen($new_password) > 0 && strlen($repeat_new_password) > 0){\r\n\t\t\t\t\t\t// if both fields are not empty\r\n\r\n\t\t\t\t\t\tif(strlen($new_password) < 6){\r\n\t\t\t\t\t\t\t// the password cannot be less than 6 characters\r\n\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\tTemplate::notify(\"error\", \"Too short password. Password must be at least 6 characters long.\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// now compare the two new passwords\r\n\t\t\t\t\t\t\tif(strcmp($new_password, $repeat_new_password) !== 0){\r\n\t\t\t\t\t\t\t\t// both passwords are not same\r\n\t\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"error\", \"New Passwords do not match. Please try again.\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the new password\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!$error_flag){\r\n\t\t\t\t\t// means there are no any errors\r\n\t\t\t\t\t// get the current user account from the database\r\n\t\t\t\t\t// if the old password matches with the one that the user entered\r\n\t\t\t\t\t// change the password, else throw an error\r\n\r\n\t\t\t\t\t$old_password_hash = Config::hash($old_password);\r\n\r\n\t\t\t\t\tif(strcmp($old_password_hash, trim($user_info->password)) === 0){\r\n\r\n\t\t\t\t\t\t\tif($this->change_password($new_password, $user_info)){\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"success\", \"Password changed successfully\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tredirect(Config::url(\"account\"));\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Wrong Old Password. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tConfig::set(\"active_link\", \"password\");\r\n\t\t\tConfig::set(\"page_title\", \"Change Account Password\");\r\n\r\n\t\t\t$view_data[\"user_info\"] = $user_info;\r\n\r\n\t\t\tTemplate::setvar(\"page\", \"account/password\");\r\n\t\t\tTemplate::set(\"account/template\", $view_data);\r\n\t\t}", "public function post_changePassword() {\n //try to change the password\n $status = AuxUser::changePassword();\n if ($status[0]) {\n //if the password change process worked, redirect to the profile page\n echo '<script>alert(\"Password Changed\");</script>';\n Response::redirect('/profile');\n } else {\n //if not, print the error message\n echo '<script>alert(\"'.$status[1].'\");</script>';\n Response::redirect('/profile');\n }\n }", "public function change_password()\n {\n $currentPassword = $this->input->post('currentPassword');\n $newPassword = $this->input->post('newPassword');\n\n $isPasswordChanged = $this->CustomModel->changePassword(\n $_SESSION['u_id'], $currentPassword, $newPassword\n );\n\n if ($isPasswordChanged) {\n echo 'success';\n }\n }" ]
[ "0.8324736", "0.8160845", "0.8154466", "0.8120245", "0.8084798", "0.79939294", "0.7976734", "0.7960955", "0.7919348", "0.79031855", "0.78976405", "0.78927815", "0.7884984", "0.7876906", "0.7871222", "0.7869703", "0.7868426", "0.78386134", "0.77957547", "0.77945447", "0.77763325", "0.77727824", "0.7756374", "0.77450335", "0.7722188", "0.7698185", "0.7696409", "0.7687556", "0.76869804", "0.7667007", "0.7640255", "0.76238394", "0.7618683", "0.7617341", "0.76163566", "0.7610108", "0.7527562", "0.7526041", "0.7511331", "0.7509645", "0.7503838", "0.7488568", "0.74797535", "0.7474318", "0.74546057", "0.74467015", "0.7445315", "0.7436854", "0.74218684", "0.7417739", "0.74146515", "0.7404207", "0.7348647", "0.7323136", "0.73109895", "0.7308962", "0.7308547", "0.73018473", "0.73010755", "0.7298742", "0.7285234", "0.7259113", "0.7254199", "0.72481066", "0.72461003", "0.7180096", "0.7165342", "0.7153713", "0.7128253", "0.7128019", "0.71207935", "0.7101105", "0.7071982", "0.70661545", "0.7055667", "0.70546937", "0.70522445", "0.70473146", "0.7040967", "0.7037457", "0.7032955", "0.7032331", "0.7022433", "0.7020189", "0.70201516", "0.7017231", "0.7004676", "0.7000532", "0.6998587", "0.69975495", "0.69948405", "0.69863474", "0.698484", "0.6977279", "0.69642806", "0.69618684", "0.6934717", "0.69298494", "0.69215477", "0.69173694" ]
0.75332
36
Saves new password after match validation
public function savepasswordAction(){ $request = $this->_request->getParams(); $error = false; $oValidationHelper = new Helpers_Usermanagement_Validate(); if(!$oValidationHelper->ifPasswordMatch($request['user_password'],$request['password2'])){ $error = true; $this->_messages->setMessage('Passwords entered do not match','error','user_password'); } if($this->_validator->validate('passreset_form',$request) && !$error){ $this->_auth->user_password = md5($request['user_password']); $this->_auth->save(); $this->_messages->setMessage('Password has been updated'); $this->_redirect('/usermanagement/profile/passwordform'); }else{ foreach ( $this->_validator->getErrors () as $field=>$error ) { $this->_messages->setMessage ( $error, 'error' , $field); } $this->_redirect('/usermanagement/profile/passwordform/?error=1'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPassword($newPassword);", "function savePassword()\n {\n // get real current password from database\n $realPassword = null;\n $dataReturn = $this->model->khachhang->getCustomerPassword($_SESSION['idUser']);\n if (!empty($dataReturn)) {\n $realPassword = $dataReturn['matKhau'];\n }\n // data user enter in form change password\n $currentPasswordText = isset($_POST['customer_password_current']) ? $_POST['customer_password_current'] : '';\n // kiem tra mat khau hien tai nhap vao co giong voi mat khau trong CSDL la $realPassword hay khong ?\n if (!password_verify(addslashes($currentPasswordText . $_SESSION['email']), $realPassword)) {\n // neu khong trung khop\n $_SESSION['error-changePassCustomer'] = 'Mật khẩu hiện tại không đúng !';\n redirect('user/changePassword');\n } else {\n $newPasswordText = isset($_POST['customer_password_new']) ? $_POST['customer_password_new'] : '';\n $resultUpdate = $this->model->khachhang->updateCustomerPassword($_SESSION['idUser'], $newPasswordText);\n if ($resultUpdate) {\n // neu luu mat khau moi thanh cong\n $_SESSION['success-changePassCustomer'] = 'Đổi mật khẩu mới thành công !';\n redirect('user/index');\n } else {\n\n }\n }\n }", "protected function changePassword() {}", "public function saveAdmPassword(){\n $this->Utilisateur->id = 1;\n if ($this->Utilisateur->saveField('password', $this->data['Utilisateur']['password_new'])):\n $this->Session->setFlash(__('Mot de passe administrateur mis à jour',true),'flash_success');\n else:\n $this->Session->setFlash(__('Mot de passe administrateur <b>NON</b> mis à jour',true),'flash_failure'); \n endif;\n $this->History->goBack(1);\n }", "public function testUpdatePasswordsDontMatch(): void { }", "public function testUpdatePasswordNotGiven(): void { }", "function save() {\r\n if(strlen($this->password) != 40) {\r\n $this->password = sha1($this->password);\r\n }\r\n // Call the parent save() method.\r\n return parent::save();\r\n }", "public function saveNewPass()\n {\n $emailNeedChangePass = isset($_SESSION['email_need_change_pass']) ? $_SESSION['email_need_change_pass'] : '';\n $newPassword = isset($_POST['f-newpass']) ? $_POST['f-newpass'] : '';\n if (($emailNeedChangePass != null) && ($newPassword != null)) {\n $resutl = $this->model->khachhang->saveNewPassword($emailNeedChangePass, $newPassword);\n if ($resutl == true) {\n $_SESSION['forget-changepass-success'] = \"Đổi mật khẩu mới thành công !\";\n unset($_SESSION['email_need_change_pass']);\n } else {\n $_SESSION['forget-changepass-fail'] = \"Đổi mật khẩu mới thất bại !\";\n }\n redirect('user/enterNewPass');\n }\n }", "public function setPassword($newPassword){\n\t}", "public function setNewPassword()\n {\n PasswordResetModel::setNewPassword(\n Request::post('user_name'), Request::post('user_password_reset_hash'),\n Request::post('user_password_new'), Request::post('user_password_repeat')\n );\n Redirect::to('index');\n }", "protected function afterValidate()\n {\n \tparent::afterValidate();\n \tif(!$this->hasErrors())\n \t\t$this->password = $this->hashPassword($this->password);\n }", "public function addpassword()\n {\n\t\tif ($this->validate()) {\n\t\t\t$model = Userlogin::find()->where(['id' => Yii::$app->user->identity->id])->one();\n $model->setPassword_login($this->password);\t\t\t\t\n\t\t\tif ($model->save()) {\n\t\t\t\treturn true;\n\t\t\t}\n }\n return false;\n }", "public function store(Request $request){\n $request->validate([\n 'current_password' => ['required', 'min:8', 'password'],\n 'password' => ['required', 'min:8', 'confirmed', Rules\\Password::defaults()],\n ]);\n \n $user = Auth::user();\n\n /* if (Hash::check($request->current_password, $user->password)) {\n $request->user()->fill([\n 'password' => Hash::make($request->password)\n ])->save();\n }else{\n ;\n } */\n\n $request->user()->fill([\n 'password' => Hash::make($request->password)\n ])->save();\n\n //TODO success message\n\n\n return redirect(route('changepass.index'));\n }", "public function store(PasswoedValidation $request)\n {\n $user_id = Auth::id();\n $from_db = User::find($user_id)->password;\n if (Hash::check($request->old_password, $from_db )) {\n User::find($user_id)->update([\n 'password' => Hash::make($request->new_password)\n ]);\n }\n return back()->with('status', 'Password Change Successfully!');\n }", "public function post_password()\n\t{\n\t\t$input = Input::all();\n\t\t$rules = array(\n\t\t\t'current_password' => array(\n\t\t\t\t'required',\n\t\t\t),\n\t\t\t'new_password' => array(\n\t\t\t\t'required',\n\t\t\t\t'different:current_password',\n\t\t\t),\n\t\t\t'confirm_password' => array(\n\t\t\t\t'same:new_password',\n\t\t\t),\n\t\t);\n\n\t\tif (Auth::user()->id !== $input['id']) return Response::error('500');\n\n\t\t$val = Validator::make($input, $rules);\n\n\t\tif ($val->fails())\n\t\t{\n\t\t\treturn Redirect::to(handles('orchestra::account/password'))\n\t\t\t\t\t->with_input()\n\t\t\t\t\t->with_errors($val);\n\t\t}\n\n\t\t$msg = Messages::make();\n\t\t$user = Auth::user();\n\n\t\tif (Hash::check($input['current_password'], $user->password))\n\t\t{\n\t\t\t$user->password = $input['new_password'];\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tDB::transaction(function () use ($user)\n\t\t\t\t{\n\t\t\t\t\t$user->save();\n\t\t\t\t});\n\n\t\t\t\t$msg->add('success', __('orchestra::response.account.password.update'));\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$msg->add('error', __('orchestra::response.db-failed'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg->add('error', __('orchestra::response.account.password.invalid'));\n\t\t}\n\n\t\treturn Redirect::to(handles('orchestra::account/password'));\n\t}", "public function newPassword() {\n $this->form_validation->set_rules('email', 'Email', 'required');\n $this->form_validation->set_rules('temp_code', 'Temporärer Code', 'required');\n $this->form_validation->set_rules('password', 'Passwort', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n $this->loadUser();\n \n if ($this->user_model->getValue('temp_code') != $this->input->post('temp_code')) {\n \t$this->error(404, 'Verification error');\n }\n \n if ($this->user_model->getValue('temp_code_valid_until') < date('Y-m-d H:i:s')) {\n \t$this->error(408, 'Provided code not valid anymore');\n }\n \n $this->user_model->setValue(\n \t'hashed_password',\n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n \t\n if (! $this->user_model->updatePassword()) {\n \t$this->error(400, 'Error wail updating password');\n }\n \n $data['new password'] = 'set';\n $this->response($data);\n }", "function regiomino_user_change_password($account, $password) {\r\n\t//watchdog('pwdaction', '@password', array('@password' => $password));\r\n $edit['pass'] = $password;\r\n user_save($account, $edit);\r\n}", "public function savePasswordToUser($user, $password);", "public function setpasswordAction(){\n $req=$this->getRequest();\n $cu=$this->aaac->getCurrentUser();\n $password=$this->getRequest()->getParam('password');\n $record=Doctrine_Query::create()->from('Users')->addWhere('ID=?')->fetchOne(array($req->getParam('id'))); \n $record->password=md5($password);\n if(!$record->trySave()){\n $this->errors->addValidationErrors($record);\n }\n $this->emitSaveData(); \n }", "function update_password()\n {\n }", "protected function afterValidate()\n {\n parent::afterValidate();\n if (!$this->hasErrors()) {\n $this->password = $this->hashPassword($this->password);\n }\n }", "protected function afterValidate()\n {\n parent::afterValidate();\n if (!$this->hasErrors()) {\n $this->password = $this->hashPassword($this->password);\n }\n }", "public function validatePassword() {\n if (!$this->hasErrors()) {\n $user = Yii::$app->user->identity;\n if (!$user || !$user->validatePassword($this->password_old)) {\n // $this->addError('password_old', 'Incorrect current password.');\n }\n }\n }", "public function validatePassword()\n {\n if (!$this->hasErrors()) {\n if (!$this->user->validatePassword($this->old_password)) {\n $this->addError('old_password', 'Incorrect email or password.');\n }\n }\n }", "public function password_validation()\n {\n $this->form_validation->set_rules('curtpassword', 'Current Password', 'callback_passwordcheck');\n $this->form_validation->set_rules('newpassword', 'New Password', 'required');\n $this->form_validation->set_rules('cpassword', 'Confirm Password', 'required|matches[newpassword]');\n if ($this->form_validation->run() == false) {\n $error = validation_errors();\n $this->session->set_flashdata('formerror', $error);\n redirect('vendor/change-password');\n } else {\n\t\t\t$password = $this->input->post('newpassword');\n\t\t\t$hash = $this->bcrypt->hash_password($password);\n\t\t\t\n if ($this->m_vendorDetail->changepass($this->id, $hash)) {\n $this->session->set_flashdata('success', 'Password updated Successfully');\n redirect('vendor/change-password');\n } else {\n $this->session->set_flashdata('error', 'unable to update your password, New password is matching with the current password!');\n redirect('vendor/change-password');\n }\n }\n\t}", "function testActivatePasswordSuccess() {\r\n $this->User = new User();\r\n \t\r\n\t\t$expected = $this->User->field('password', array('id'=>'1'));\t\r\n \t\r\n \t// should return the new password\r\n $password = $this->User->activatePassword('1bc29b36f623ba82aaf6724fd3b16718');\r\n $this->assertTrue($password);\r\n \r\n //checkk if the password has changed\r\n\t\t$result = $this->User->field('password', array('id'=>'1'));\t\r\n \t$this->assertNotEqual($result, $expected);\r\n \t\r\n \t//check if the returned password is the same as in the database\r\n \t$this->assertEqual(md5($password), $result);\r\n \t\r\n \t\r\n \t\r\n \t//test done set data to the original values\r\n \t$this->User->id=1;\r\n \t$this->User->saveField('password', $expected);\r\n \t$this->User->saveField('password_key', '1bc29b36f623ba82aaf6724fd3b16718');\r\n }", "public function setNewPassword($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_92'));\n\t\tif(!Validator::AccountPassword($value)) throw new Exception(lang('error_92'));\n\t\t\n\t\t$this->_newPassword = $value;\n\t}", "public function validatePassword()\n {\n /* @var $user User */\n $user = Yii::$app->user->identity;\n if (!$user || !$user->validatePassword($this->oldPassword)) {\n $this->addError('oldPassword', 'Incorrect old password.');\n }\n }", "public function savenewPassword($random)\n {\n $this->setRules([ 'password' => 'required|min:6',//'password_confirmation' => 'required|same:password|min:6' \n ]);\n $this->_validate();\n $checkuser = $this->_customer->where('forgot_password', $random)->first();\n if (count($checkuser) > 0) {\n $checkuser->password = Hash::make($this->request->password);\n $checkuser->forgot_password = null;\n $checkuser->save();\n return true;\n } else {\n return false;\n }\n }", "public function userPasswordUpdate() {\n $password = Hash::make($this->request->input(\"new_password\"));\n $updateArray = [\n \"password\" => $password\n ];\n $whereArray = [\n [\"user_id\", '=', $this->request->input(\"user_id\")]\n ];\n $this->usersModel->setTableName(\"cvd_users\");\n $this->usersModel->setInsertUpdateData($updateArray);\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->updateData();\n }", "function testPassword()\n {\n $this->f->_isSubmitted = true;\n $this->assertEquals(\"\", $this->f->password());\n $this->assertEquals(\"V\", $this->f->password(\"L\", \"H\", \"V\"));\n $val = &$this->f->password(\"L\", \"H\", \"V\");\n $this->f->error();\n $this->assertTrue($this->f->_hasErrors);\n $this->assertEquals(\"\", $val);\n }", "public function setPassword($id,$newpass){\n $consulta = $this->find($id)->current();\n $consulta->password = $newpass;\n $consulta->save();\n }", "public function beforeSave() {\n if ($this->isNewRecord) {\n if (isset($this->passwordSave, $this->repeatPassword) && ($this->passwordSave === $this->repeatPassword)) {\n $this->password = $this->hash($this->passwordSave);\n }\n $this->password_expiry_date = new CDbExpression(\"DATE_ADD(NOW(), INTERVAL \" . self::PASSWORD_EXPIRY . \" DAY) \");\n } else\n if (isset($this->passwordSave) && isset($this->repeatPassword) && ($this->passwordSave === $this->repeatPassword)) {\n //if it's not a new password, save the password only if it not empty and the two passwords match\n $this->password = $this->hash($this->passwordSave);\n $this->password_expiry_date = new CDbExpression(\"DATE_ADD(NOW(), INTERVAL \" . self::PASSWORD_EXPIRY . \" DAY) \");\n }\n $this->password_strategy = $this->encrypt_text(strtolower($this->email));\n if (!in_array(Lookup::item('AccessRole', $this->default_role), Lookup::items('AccessRole'))) {\n $this->default_role = 'member';\n }\n $this->roles = $this->roles_encrypt();\n return parent::beforeSave();\n }", "public function setPassword(){\n\t}", "public function setPassword($value);", "public function testPasswordChange(): void\n {\n // Test strong password - should pass.\n $this->setUpUserPostData(Constants::SAFE_PASSWORD);\n $this->assertIsInt(\\edit_user($this->dummy_user_id));\n\n // Test weak password - should pass as well.\n $this->setUpUserPostData(Constants::PWNED_PASSWORD);\n $this->assertIsInt(\\edit_user($this->dummy_user_id));\n\n // Clean up.\n $this->tearDownUserPostData();\n }", "public function store(Request $request)\n {\n \n $user = Auth::user();\n $email = $user->email;\n\n $request->validate([\n 'current_password' => ['required', new MatchOldPassword],\n 'new_password' => ['required','different:current_password'],\n 'new_confirm_password' => ['same:new_password'],\n ]);\n\n $check = User::where('email',$email)->update(['password'=> Hash::make($request->new_password)]);\n if($check){\n session()->flash('status', 'Password Changed Successfully !');\n return redirect()->route('home');\n }\n else{\n session()->flash('status', 'Something went wrong while updating your password, please try again !');\n return redirect()->route('home');\n }\n }", "public function actionChangePassword()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', ['required' => true]);\n $model = $this->findModel($username);\n $model->setPassword($this->prompt(Console::convertEncoding(Yii::t('app', 'New password')) . ':', [\n 'required' => true,\n 'pattern' => '#^.{4,255}$#i',\n 'error' => Console::convertEncoding(Yii::t('app', 'More than {:number} symbols', [':number' => 4])),\n ]));\n $this->log($model->save());\n }", "public function savePassword(Request $request) {\n $validator = Validator::make($request->all(), [\n 'password' => ['required', 'string', 'min:8', 'max:191', 'confirmed'],\n ]);\n\n if ($validator->fails()) {\n return back()->withErrors($validator);\n }\n\n Auth::user()->update([\n 'password' => Hash::make($request['password']),\n ]);\n\n return Redirect::to('/myprofile/password')->withSuccessMessage(trans('messages.password_updated'));\n }", "function updatePassword(){\n\t\tglobal $recoverPasswordInputs, $pdo;\n\t\t$newPass = createNewPassword();\n\t\t$updatePassword = $pdo->prepare('UPDATE `USER` SET `hash` = :newHash WHERE email = :email AND firstName = :firstName AND lastName = :lastName');\n\t\t$updatePassword->bindValue(':newHash', md5($newPass));\n\t\t$updatePassword->bindValue(':email', $recoverPasswordInputs['email']);\n\t\t$updatePassword->bindValue(':firstName', $recoverPasswordInputs['fname']);\n\t\t$updatePassword->bindValue(':lastName', $recoverPasswordInputs['lname']);\n\t\t$updatePassword->execute();\n\t\treturn $newPass;\n\t}", "function password_recovery()\n\t{\n\n\n\t}", "public function beforeSave() {\n if(($this->getScenario() === 'register') || ($this->getScenario() === 'changePassword')) \n $this->password = md5($this->password);\n return true;\n }", "function password_add($data) {\n\t}", "public function testValidatePassword()\n\t{\n\t\t$return = $this->auth->register($this->email, $this->password, $this->password . $this->shortPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang(\"Auth.password_nomatch\"));\n\n\t\t// using short password\n\t\t$return = $this->auth->register($this->email, $this->shortPassword, $this->shortPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.password_short'));\n\n\t\t// using weak password\n\t\t$return = $this->auth->register($this->email, $this->weakPassword, $this->weakPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.password_weak'));\n\t}", "public function password(){\r\n\r\n\t\t\t$user_info = Helper_User::get_user_by_id($this->user_id);\r\n\r\n\t\t\tif($_POST){\r\n\r\n\t\t\t\t$formdata = form_post_data(array(\"old_password\", \"new_password\", \"repeat_new_password\"));\r\n\t\t\t\t\r\n\t\t\t\t$old_password = trim($formdata[\"old_password\"]);\r\n\t\t\t\t$new_password = trim($formdata[\"new_password\"]);\r\n\t\t\t\t$repeat_new_password = trim($formdata[\"repeat_new_password\"]);\r\n\r\n\t\t\t\t$error_flag = false;\r\n\r\n\t\t\t\tif(strlen($old_password) <= 0){\r\n\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the old password\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tif(strlen($new_password) > 0 && strlen($repeat_new_password) > 0){\r\n\t\t\t\t\t\t// if both fields are not empty\r\n\r\n\t\t\t\t\t\tif(strlen($new_password) < 6){\r\n\t\t\t\t\t\t\t// the password cannot be less than 6 characters\r\n\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\tTemplate::notify(\"error\", \"Too short password. Password must be at least 6 characters long.\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// now compare the two new passwords\r\n\t\t\t\t\t\t\tif(strcmp($new_password, $repeat_new_password) !== 0){\r\n\t\t\t\t\t\t\t\t// both passwords are not same\r\n\t\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"error\", \"New Passwords do not match. Please try again.\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the new password\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!$error_flag){\r\n\t\t\t\t\t// means there are no any errors\r\n\t\t\t\t\t// get the current user account from the database\r\n\t\t\t\t\t// if the old password matches with the one that the user entered\r\n\t\t\t\t\t// change the password, else throw an error\r\n\r\n\t\t\t\t\t$old_password_hash = Config::hash($old_password);\r\n\r\n\t\t\t\t\tif(strcmp($old_password_hash, trim($user_info->password)) === 0){\r\n\r\n\t\t\t\t\t\t\tif($this->change_password($new_password, $user_info)){\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"success\", \"Password changed successfully\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tredirect(Config::url(\"account\"));\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Wrong Old Password. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tConfig::set(\"active_link\", \"password\");\r\n\t\t\tConfig::set(\"page_title\", \"Change Account Password\");\r\n\r\n\t\t\t$view_data[\"user_info\"] = $user_info;\r\n\r\n\t\t\tTemplate::setvar(\"page\", \"account/password\");\r\n\t\t\tTemplate::set(\"account/template\", $view_data);\r\n\t\t}", "public function changePassword()\n {\n // validate the info, create rules for the inputs\n $rules = array(\n 'current_password' => 'required|check_password:'.Input::get('current_password'),\n 'password' => 'required|min:4|confirmed',\n 'password_confirmation' => 'required|min:4'\n );\n\n // run the validation rules on the inputs from the form\n $validator = Validator::make(Input::all(), $rules);\n\n // if the validator fails, redirect back to the form\n if ($validator->fails()) {\n // redirect to list page\n Session::flash('danger', UNABLE_TO_SAVE);\n return Redirect::back()\n ->withErrors($validator)\n ->withInput();\n\n } else {\n if (Hash::check(Input::get('current_password'), Auth::user()->password)) {\n $user = User::find(Auth::user()->id);\n \n $user->password = Hash::make(Input::get('password'));\n $user->save();\n }\n \n #echo\"<pre>\";print_r(Input::all());echo Auth::user()->password;echo\"</pre>\";exit;\n \n \n }\n\n // redirect to list page\n Session::flash('success', SUCCESS_UPDATE);\n return Redirect::to('my_account/password');\n }", "public function newpass()\n {\n if(isset($_POST['LastPassword']) && isset($_POST['NewPassword']))\n {\n if(!empty($_POST['LastPassword']) && !empty($_POST['NewPassword']))\n {\n $this->_oldPass = md5($_POST['LastPassword']);\n $this->_newPassMD5 = md5($_POST['NewPassword']);\n $this->_id = $_SESSION['user_id'];\n $this->_email = $_SESSION['user_email'];\n\n $user = $this->model->checkPassword($this->_id);\n if(!empty($user))\n {\n if($this->_oldPass == $user['Password'])\n {\n if($this->model->changePassword($this->_email, $this->_newPassMD5))\n {\n // Si ok (true) alors on renvoi sur la page de profil\n $messageFlash = 'Your new password has been updated !';\n $this->coreSetFlashMessage('sucess', $messageFlash, 6);\n header('Location:?module=profile');\n exit();\n }\n else\n {\n // Erreur !\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'An error occur. Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Mauvais password\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'Wrong password ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Pas de user\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'An error occur ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Pas de password\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'No password send ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Pas de post\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'No password send ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }", "public function Change_Password_Validation($sorce){\r\n\r\n if (empty($sorce['current_password']))\r\n {\r\n \t$this->_flag = false;\r\n\r\n Session::put('e_password', 'You must enter your old password');\r\n }\r\n if($this->_flag){\r\n\r\n // Copy send values into local instances\r\n $password1 = $sorce['password1'];\r\n $password2 = $sorce['password2'];\r\n\r\n // Check if password is too long\r\n if(self::check_Max($password1)){\r\n\r\n $this->_flag = false;\r\n\r\n Session::put('e_password1', 'Your new password is too long, max '.$this->_max.' chars!');\r\n }\r\n\r\n // Check if password is too short\r\n else if(self::check_Min($password1)){\r\n\r\n $this->_flag = false;\r\n\r\n Session::put('e_password1', 'Your new password is too short , min '.$this->_min.' chars!');\r\n }\r\n\r\n // Check if passwords are the same\r\n else if(self::check_If_The_Same_Passwords($password1,$password2)){\r\n\r\n $this->_flag = false;\r\n\r\n Session::put('e_password1', 'Different new passwords!');\r\n }\r\n }\r\n }", "function submitpassword() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\tif ($_POST['pass1']=== $_POST['pass2'])\n\t\t{\n\t\t\tUserModel::Create()->ChangePassword($_POST['hash'], $_POST['pass1']);\n\t\t\tif (User::IsLoggedIn())\n\t\t\t{\n\t\t\t\tUser::setpassword($_POST['pass1']);\n\t\t\t\t$this->renderWithTemplate('admin/index', 'AdminPageBaseTemplate');\n\t\t\t}\n\t\t\telse\n\t\t\t{$this->renderWithTemplate('admin/login', 'AdminPageBaseTemplate');}\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\t$this->viewData['message'] =\"Passwords Don't Match. Try Again\";\n\t\t\t$this->renderWithTemplate('users/changepassword', 'AdminPageBaseTemplate');\n\t\t}\n }", "private function __changePassword() {\n\t\t$data = $this->request->data['User'];\n\t\t$this->User->id = $this->Auth->user('id');\n\t\tif ($this->User->saveField('password', $data['new_password'])) {\n\t\t\t$this->Session->setFlash(__('Your password changed successfully.'), 'success');\n\t\t\t$this->redirect($this->referer());\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Could not change your password due to a server problem, try again later.'), 'error');\n\t\t}\n\t}", "public function setPasswordAction()\n {\n $userId = $this->params()->fromRoute('userId', null);\n $token = $this->params()->fromRoute('token', null);\n\n if ($userId === null || $token === null) {\n return $this->notFoundAction();\n }\n\n $user = $this->getUserMapper()->findById($userId);\n\n if (!$user) {\n return $this->notFoundAction();\n }\n\n $record = $this->getUserRegistrationMapper()->findByUser($user);\n\n if (!$record || !$this->userRegistrationService->isTokenValid($user, $token, $record)) {\n // Invalid Token, Lets surprise the attacker\n return $this->notFoundAction();\n }\n\n if ($record->isResponded()) {\n // old link, password is already set by the user\n return $this->redirectToPostVerificationRoute();\n }\n\n $form = $this->getServiceLocator()->get('HtUserRegistration\\SetPasswordForm');\n\n if ($this->getRequest()->isPost()) {\n $form->setData($this->getRequest()->getPost());\n if ($form->isValid()) {\n $this->userRegistrationService->setPassword($form->getData(), $record);\n\n return $this->redirectToPostVerificationRoute();\n }\n }\n\n return array(\n 'user' => $user,\n 'form' => $form\n );\n }", "function hashPassword()\t{\n\t\t$fields = $this->_settings['fields'];\n\t\tif (!isset($this->model->data[$this->model->name][$fields['username']])) {\n\t\t\t$this->model->data[$this->model->name][$fields['password']] = Security::hash($this->model->data[$this->model->name][$fields['password']], null, true);\n\t\t}\n\t}", "public function actionPassword()\n {\n $id = Yii::$app->user->id;\n\t\t$model = $this->findModel($id);\n\t\t$model->scenario = 'password';\n if ($model->load(Yii::$app->request->post())) {\t\n\t\t\tif(!Yii::$app->security->validatePassword($model->old_password, Yii::$app->user->identity->password_hash)){\n\t\t\t\tYii::$app->getSession()->setFlash('error', 'Old password not match with current password');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$model->password = $model->new_password;\n\t\t\t\tif($model->save()) {\n\t\t\t\t\tYii::$app->getSession()->setFlash('success', 'Password have changed.');\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tYii::$app->getSession()->setFlash('error', 'Password is not change.');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this->redirect(['password']);\n } else {\n return $this->render('password', [\n 'model' => $model,\n ]);\n }\n }", "function update_paypassword()\n {\n }", "public function setPassword() {\n if ($this->Password) {\n $this->Password = \\app\\components\\Utilities::setHashedValue($this->Password);\n }\n }", "function change_pwd_update_register(){\n\t\tglobal $CFG;\n\t\t$old_password = $this->My_addslashes(md5($_POST[\"old_password\"]));\n\t\t \n\t\t$new_password = md5($_POST[\"new_password\"]);\n\t \n\t\tif($this->chkPasswordInAdmin($old_password,$_SESSION['adminid'])){\n\t\t\t\t$UpQuery = \"UPDATE \".$CFG['table']['admin'].\" SET password = '\".$this->filterInput($new_password).\"' WHERE admin_id = \". $this->filterInput($_SESSION['adminid']);\n\t\t\t\t$UpResult = mysql_query($UpQuery) or die($this->mysql_error($UpQuery));\n\t\t\t}\n\t\telse{\t\n\t\t\techo \"Invalid_Old_Pwd\";\t\t\t\n\t\t\texit();\n\t\t\t}\n\t}", "public function store(Request $request)\n {\n //\n if(Hash::check( $request->input('oldpassword') , Auth::user()->password )){\n if($request->input('newpassword') == $request->input('newpassword_confirmation')){\n \\App\\User::where('email',Auth::user()->email)\n ->update (['password' => bcrypt($request->input('newpassword'))]);\n return redirect('home');\n } \n else{\n // --------------- Error when New password not match\n Session::flash('checkerror', 'New password doesn\\'t match.');\n return redirect('changepassword');\n }\n }\n else{\n //------------------ Error when old password not match\n Session::flash('oldpasserror', 'Old password doesn\\'t match.');\n return redirect('changepassword');\n }\n /*\n echo bcrypt($request->input('oldpassword')).\" qwertyuiop \".Auth::user()->password;\n if((bcrypt($request->input('oldpassword')) == Auth::user()->password) && ($request->input('newpassword') == $request->input('newpassword_confirmation'))){*/\n /*$validator = Validator::make($request->all(), [\n 'newpassword' => 'required|min:6|confirmed',\n ]);\n\n if ($validator->fails()) {\n return redirect('post/create')\n ->withErrors($validator)\n ->withInput();\n }*/\n /*else{*/\n\n /* \\DB::table('users')->where('email',Auth::user()->email)\n ->update (['password' => bcrypt($request->input('newpassword'))]);*/\n /*}*/\n /* }*/\n }", "protected function changePassword()\n {\n if (empty($this->password)) {\n return;\n }\n $this->validateOnly('password', ['password' => 'min:8|confirmed']);\n $this->user->update([\n 'password' => Hash::make($this->password),\n ]);\n $this->password = null;\n $this->password_confirmation = null;\n }", "public function change()\r\n {\r\n// var_dump($this->validate());die;\r\n if ($this->validate()) {\r\n $user = $this->_user; \r\n $user->setPassword($this->newPwd);\r\n $user->removePasswordResetToken();\r\n return $user->save(false);\r\n }\r\n \r\n return false;\r\n }", "protected function beforeSave() {\n\t\tif (!empty($this->newPassword))\n\t\t\t$this->password = UtilHelper::encryptPwd($this->newPassword, $this->salt);\n\t\treturn true;\n\t}", "public function new_password(int $id)\n {\n $this->form_validation->set_rules('new_pd_user', 'Senha', 'required|regex_match[/^.*(?=.{8,})(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]).*$/]|trim',\n array( 'required' => 'O campo %s é obrigatório.',\n 'regex_match' => 'A %s deve conter uma ou mais letras maiúsculas, uma ou mais mininúsculas, números e 8 ou mais caracteres.'));\n $this->form_validation->set_rules('reapeti_new_pw', 'confirmar a senha', 'required|matches[new_pd_user]',\n array('required' => 'O campo %s é obrigatório.',\n 'matches'=>'Confirmar senha está diferente de senha.'));\n\n if ($this->form_validation->run() == FALSE){\n $errors = validation_errors();\n echo json_encode(['error'=>$errors]);\n }else{\n $data = array(\n 'password_inst_pw' => md5($this->input->post('new_pd_user'))\n );\n $this->db->update('tbl_dados_inst_pw_instuicao', $data, array('id_inst_pw' => $id));\n echo json_encode(['success'=>'Senha alterada com sucesso.']);\n }\n }", "private function AddPasswordField()\n {\n $name = 'Password';\n \n $this->AddField(Input::Password($name));\n //Password needs contain lower case letter, upper case letter, and a digit\n //$validator = new RegExp('/((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]))/');\n //$this->AddValidator($name, $validator);\n $this->AddValidator($name, new StringLength(6, 20));\n if (Request::PostData('PasswordRepeat') || !$this->user->Exists())\n {\n $this->SetRequired($name);\n }\n }", "public function testUpdatePasswordOnlyLowerCase(): void { }", "public function save() {\n if ($this->validate()) {\n $this->account->setPassword($this->password);\n return $this->account->save();\n }\n return false;\n }", "public function newPassword(){\n\t\t// Load helpers and libraries\n helper(['form', 'url']);\n $M_User = new M_User();\n\n\t\t// Default return\n\t\t$ret = redirect()->to(base_url());\n\n $options = [\n\t\t\t'action' => ROUTE_NEW_PWD_ACCOUNT, // Route\n\t\t\t'script' => self::ENCRYPTION_URL // Script URL for SHA256 encryption\n ];\n\n $request = $this->request;\n\n\t\t$token = $request->getGetPost('token');\n\t\t// Checking if a corresponding token exists in the DB\n\t\tif ($token != null){\n\t\t\t$options['token'] = $token;\n\t\t\tif ($M_User->findOneBy('securityToken', $token) != null) {\n\t\t\t\t// Displaying password creation form\n\t\t\t\t$ret = render(FORM_NEW_PWD, $options);\n }\n }\n\t\telseif (session()->has('logged_in')){\n\t\t\t$options['token'] = null;\n\t\t\t$ret = render(FORM_NEW_PWD, $options);\n\t\t}\n\n\t\t$postData = $request->getPostGet('newPwd');\n\t\t// Second step of the process (processing form data)\n\t\tif (is_array($postData)){\n\t\t\t// Something went wrong : displaying an alert\n\t\t\tif ($M_User->resetPassword($postData['token'],$postData['password']) != SC_SUCCESS){\n\t\t\t\t$options['token'] = $postData['token'];\n\t\t\t\t$options['alert'] = 'Une erreur interne est survenue';\n $options['type'] = 'danger';\n\t\t\t\t$ret = render(FORM_NEW_PWD, $options);\n }\n\t\t\t// Everything went well : redirecting to base url\n\t\t\telse{\n\t\t\t\t$ret = redirect()->to(base_url());\n\t\t\t\t// TODO - Display an alert to notify the user that everything is OK\n }\n }\n\n return $ret;\n\t}", "public function actionUpdatePassword()\n\t{\n\t\t$emp_id=isset($_POST['emp_id'])?$_POST['emp_id']:'';\n\t\t$old_password=isset($_POST['old_password'])?$_POST['old_password']:'';\n\t\t$new_password=isset($_POST['password'])?$_POST['password']:'';\n\t\tif($emp_id)\n\t\t{\n\t\t\t$model=$this->loadModel($emp_id);\t\n\t\t}\n\t\t\n\t\tif(md5($old_password)==$model->password)\n\t\t{\n\t\t\t$model->password=md5($new_password);\n\t\t\tif($model->save())\n\t\t\t\techo 1;\n\t\t}\n\t\telse{\n\t\t echo 2;\t\n\t\t}\n\t\t\n\t\t}", "public function updatepassword() {\n $request = Request::all();\n $rules = ['old_password' => 'required', 'password' => 'required|confirmed|min:6'];\n $v = Validator::make($request, $rules);\n if ($v->fails()) {\n return redirect()->back()->withErrors($v->errors());\n }\n $user = User::find(Auth::user()->id);\n if (!Hash::check($request['old_password'], $user->password)) {\n return redirect()->back()->withErrors([\"old_password\" => [0 => \"The old password does not match.\"]]);\n }\n\n $user->password = bcrypt($request['password']);\n $user->save();\n return redirect()->back()->with('status', 'Your password changed succesfully');\n }", "public function testUpdatePasswordOnlyNumbers(): void { }", "protected function hashPassword() {\n\t\t$this->password = Password::hash($this->password);\n\t}", "public function setPasswordAttribute($old){\n $this->attributes['password'] = bcrypt($old);\n }", "public function testUpdatePasswordOk()\n {\n // Config\n $currentPassword = '123456789';\n $newPassword = 'abcdef123456';\n\n // Prepare\n $user = factory(User::class)->create([\n 'password' => bcrypt($currentPassword),\n ]);\n\n $requestData = [\n 'currentpassword' => $currentPassword,\n 'newpassword' => $newPassword,\n ];\n\n $response = $this->actingAs($user)->call('POST', $this->accountChangePasswordPostUrl, $requestData);\n\n // Asserts\n $response->assertStatus(302);\n $response->assertRedirect($this->accountChangePasswordPageUrl);\n $response->assertSessionHas('success', trans('home.password_changed'));\n }", "public function checkPassword($value);", "function changePassword( $name, $pw ) {\n $d = loadDB();\n \n $found = false;\n foreach ($d['users'] as &$user) {\n if ($name == $user['name'] || $name == $user['email']) {\n $user[\"password\"] = $pw;\n saveDB( $d );\n $found = true;\n break;\n }\n }\n if (!$found)\n return FALSE;\n audit( \"changePassword done\", $name );\n return TRUE;\n }", "function setnewpassword()\n {\n $login_model = $this->loadModel('Login');\n\n if ($login_model->setNewPassword()) {\n $this->view->render('login/index');\n } else {\n $this->view->render('login/changepassword');\n }\n }", "public function newPassword($data, $id) \n {\n $data['salt'] = $this->app['password']->generateSalt(time());\n $data['password'] = $this->app['password']->encode($data['password'], $data['salt']);\n \n return $this->update($data, $id);\n }", "public function postChgPw(){\n\n\t\t//set the message for each Validator\n\t\t$message=array('old_password.required'=>'The old password field cannot be empty', \n\t\t\t\t\t\t'new_password.required'=>'The new password field cannot be empty',\n\t\t\t\t\t\t'new_password.between'=>'The password length is between 6-20 characters',\n\t\t\t\t\t\t'new_password.alpha_num'=>'The password can only use number(0-9) and characters(A-Z, a-z)',\n\t\t\t\t\t\t'new_password_2.same'=>'The new password field not same'\n\t\t\t\t\t\t);\n\n\t\t//set validator, password 2 must same with password 1\n\t\t$validator = Validator::make(Input::all(),\n\t\t\tarray(\n\t\t\t\t'old_password' =>'required',\n\t\t\t\t'new_password' =>'required|between:6,20|alpha_num',\n\t\t\t\t'new_password_2' =>'same:new_password'\n\t\t\t),$message\n\t\t);\n\n\t\t//if violate validator\n\t\tif ($validator->fails()){\n\n\t\t\t//return to chg pw view with old input and error\n\t\t\treturn Redirect::route('account-chg-pw')\n\t\t\t\t\t->withErrors($validator)\n\t\t\t\t\t->withInput();\n\t\t}else{\n\n\t\t\t//get the user data where id is current user id\n\t\t\t$user = User::find(Auth::user()->id);\n\n\t\t\t//get values from input\n\t\t\t$old_password = Input::get('old_password');\n\t\t\t$new_password = Input::get('new_password');\n\n\t\t\t//if old password and the password in db is match\n\t\t\tif(Hash::check($old_password, $user->getAuthPassword())){\n\n\t\t\t\t//if password provided matched\n\t\t\t\t$user->password=Hash::make($new_password);\n\n\t\t\t\tif ($user->save()){\n\n\t\t\t\t\t//return with success msg after saved to db\n\t\t\t\t\treturn Redirect::route('account-chg-pw')\n\t\t\t\t\t\t\t->with('global','<div class=\"alert alert-info\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-info-sign\" aria-hidden=\"true\"></span> \n\t\t\t\t\t\t\t\t\t\t\t\tYour password has been changed\t\n\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\t//return error msg wrong old password\n\t\t\t\t\treturn Redirect::route('account-chg-pw')\n\t\t\t\t\t\t\t->with('global','<div class=\"alert alert-danger\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t \t<span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t \t<span class=\"sr-only\">Error:</span>\n\t\t\t\t\t\t\t\t\t\t\t \tYour old password is wrong. Try again\n\t\t\t\t\t\t\t\t\t\t\t</div>');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//fallback for change password\n\t\treturn Redirect::route('account-chg-pw')->with('global','<div class=\"alert alert-danger\" role=\"alert\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t<span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t<span class=\"sr-only\">Error:</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \tWe could not change your password. Try again\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>');\n\n\t}", "public function activatenewpasswordAction()\n {\n $newKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME, null);\n $userId = $this->getRequest()->getParam(User::COLUMN_USERID, null);\n\n $user = $this->_getUserFromIdAndKey($userId, $newKey);\n if(!$user){\n Globals::getLogger()->info(\"New password activation: user retrieval failed - userId=$userId, key=$newKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::NO_SUCH_USER));\n }\n\n $user->{User::COLUMN_PASSWORD} = $user->newPassword;\n $user->newPassword = '';\n $user->activationKey = '';\n\n $id = $user->save();\n if($id != $user->{User::COLUMN_USERID}){\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::NEWPASSWORD_ACTIVATION_FAILED));\n }\n\n Utils::deleteCookie(User::COOKIE_MD5);\n Utils::deleteCookie(User::COOKIE_USERNAME);\n Utils::deleteCookie(User::COOKIE_REMEMBER);\n\n $this->_savePendingUserIdentity($userId);\n\n $this->_helper->redirectToRoute('userupdate',array('newPassword'=>true));\n }", "public function action()\n {\n $user = $this->user();\n $data = $this->validated();\n \n $user->forceFill([\n 'password' => Hash::make($data['password']),\n ])->save();\n }", "public function saveChangedPassw(array $data = null, array $params = array()) {\n\n\t\t$id = AuthComponent::user('id');\n\n\t\t// check that user doesn't try to change someone elses password\n\t\tif($id != $data[\"LoginAccount\"][\"id\"]) {\n\t\t\tthrow new InternalErrorException(\"ID:s dont match, something strange going on.\");\n\t\t}\n\t\t\n\t\t// password retype matches \n\t\tif($data[\"LoginAccount\"]['password_new'] != $data[\"LoginAccount\"]['password_new_retype']) {\n\t\t\treturn \"CONFIRM_ERROR\";\n\t\t}\n\t\t\n\t\t$account = $this->findById($id);\n\t\t\n\t\t$oldpw = Security::hash($data[\"LoginAccount\"][\"password_old\"], 'blowfish', \n\t\t\t\t\t\t\t\t$account[\"LoginAccount\"][\"password\"]);\n\t\t\n\t\t// check if old password matches\n\t\tif($oldpw != $account[\"LoginAccount\"][\"password\"]) {\n\t\t\treturn \"PASSWD_ERROR\";\n\t\t}\n\t\t\n\t\t// avoid double hashing.\n\t\t$account[\"LoginAccount\"][\"password\"] = $data[\"LoginAccount\"][\"password_new\"];\n\t\t\n\t\t// save, dont validate this time since username uniqueness \n\t\t// wont be fulfilled\n\t\tif($this->save($account[\"LoginAccount\"], false)) {\n\t\t\treturn \"OK\";\n\t\t}\n\t\telse {\n\t\t\treturn \"SAVE_ERROR\";\n\t\t}\n\t\t\n\t}", "public function password_verifies() {\n\t\treturn AuthComponent::password($this->data[$this->alias]['old_password']) === $this->data[$this->alias]['password'];\n\t}", "protected function _updatePassword() {\n\t\tif(!check($this->_userid)) return;\n\t\tif(!check($this->_username)) return;\n\t\tif(!check($this->_newPassword)) return;\n\t\tif($this->_md5Enabled) {\n\t\t\t$data = array(\n\t\t\t\t'userid' => $this->_userid,\n\t\t\t\t'username' => $this->_username,\n\t\t\t\t'newpassword' => $this->_newPassword\n\t\t\t);\n\t\t\t$query = \"UPDATE \"._TBL_MI_.\" SET \"._CLMN_PASSWD_.\" = [dbo].[fn_md5](:newpassword, :username) WHERE \"._CLMN_MEMBID_.\" = :userid\";\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'userid' => $this->_userid,\n\t\t\t\t'newpassword' => $this->_newPassword\n\t\t\t);\n\t\t\t$query = \"UPDATE \"._TBL_MI_.\" SET \"._CLMN_PASSWD_.\" = :newpassword WHERE \"._CLMN_MEMBID_.\" = :userid\";\n\t\t}\n\t\t\n\t\t$result = $this->db->query($query, $data);\n\t\tif(!$result) return;\n\t\t\n\t\treturn true;\n\t}", "public static function password() {\n if ( !isset($_POST['email']) ) {\n return;\n }\n \n $password = substr(Helper::hash(rand(0,16^32).$_POST['email']),0,12);\n \n $result = Database::checkUser($_POST['email']);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzer!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n return;\n }\n \n $id = $result[0]['id'];\n $passwordold = $result[0]['password'];\n \n $pw = Helper::hash($password.$_POST['email']);\n \n $success = Database::setPassword($id,$passwordold,$pw);\n if ( $success !== false ) {\n self::passwordMail($_POST['email'],$password);\n self::setError('Ein neues Passwort wurde dir zugeschickt!<br>');\n } else {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n }\n }", "public function password()\n {\n $this->isUser();\n\n $this->data['noCabinetOrAdmin'] = true;\n\n if ($_POST) {\n\n if (!$_POST['old-password'] && !$_POST['new-password']) {\n\n $userModel = new UserModel();\n\n $validateResult = $userModel->validate($_POST);\n\n if ($validateResult === true) {\n\n $checkPassword = $userModel->checkOldPassword($_POST['old-password']);\n\n if ($checkPassword) {\n\n if ($userModel->refreshPassword($_POST)) {\n\n $this->data['success'] = 'Пароль успешно изменен';\n\n } else {\n\n $this->data['warning'] = 'Произошла ошибка';\n }\n\n } else {\n\n $this->data['warning'] = 'Старый пароль введен не правильно';\n }\n\n } else {\n\n $this->data['warning'] = $validateResult;\n }\n\n } else {\n\n $this->data['warning'] = 'Все поля должны быть заполнены';\n }\n }\n\n $this->render('password');\n }", "function testActivatePasswordFail() {\r\n $this->User = new User();\r\n \r\n //get the current password-hash\r\n \t$expected = $this->User->field('password', array('id'=>'1'));\r\n \t\r\n \t//activate with wrong key - should fail\r\n $result = $this->User->activatePassword('wrongkey');\r\n $this->assertFalse($result);\r\n \r\n //check if the password in the database has changed\r\n \t$result = $this->User->field('password', array('id'=>'1'));\r\n \t$this->assertEqual($result, $expected);\r\n }", "public function changePW()\n {\n $id = $_GET['id'];\n $passwordInDB = $this->model->getPasswordInDB($id);\n // $passwordInDB = $_SESSION['user']['password'];\n $password = $_POST['password'];\n $password_confirm = $_POST['password_confirm'];\n $verifOldPW = password_verify($_POST['old-password'], $passwordInDB['password']);\n $regexCharacterChoice = '/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\\W)/';\n $errors = [];\n \n if ($verifOldPW === false) {\n $errors['password'] = 'Votre ancien mot de passe est incorrect';\n $this->model->setFlash('danger', 'Votre ancien mot de passe est incorrect');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n if (empty($password) || strlen($password) < 8 || !preg_match($regexCharacterChoice, $password)) {\n $errors['password'] = 'Vous devez rentrer un mot de passe valide';\n $this->model->setFlash('danger', 'Vous devez rentrer un mot de passe valide');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n if ($password != $password_confirm) {\n $errors['password'] = 'Les mots de passe ne correspondent pas';\n $this->model->setFlash('danger', 'Les mots de passe ne correspondent pas');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n if (empty($errors)) {\n $this->model->changePW();\n $this->model->setFlash('success', 'Votre mot de passe a bien été modifié');\n header('location:index.php?controller=adherent&action=connexionForm&id='.$id.'');\n }\n }", "public function testChangesAUsersPassword()\n {\n $user = factory(User::class)->create();\n $token = Password::createToken($user);\n $response = $this->post('/password/reset', [\n 'token' => $token,\n 'email' => $user->email,\n 'password' => 'password',\n 'password_confirmation' => 'password'\n ]);\n $this->assertTrue(Hash::check('password', $user->fresh()->password));\n }", "static public function tryToSetNewPassword() {\r\n\t\tif (!isset($_POST['chpw_hash']) || !isset($_POST['new_pw']) || !isset($_POST['new_pw_again']) || !isset($_POST['chpw_username']))\r\n\t\t\treturn;\r\n\r\n\t\tif ($_POST['chpw_username'] == self::getUsernameForChangePasswordHash()) {\r\n\t\t\tif ($_POST['new_pw'] != $_POST['new_pw_again'])\r\n\t\t\t\treturn array( __('The passwords have to be the same.') );\r\n\t\t\telseif (strlen($_POST['new_pw']) < self::$PASS_MIN_LENGTH)\r\n\t\t\t\treturn array( sprintf( __('The password has to contain at least %s signs.'), self::$PASS_MIN_LENGTH) );\r\n\t\t\telse {\r\n\t\t\t\tself::updateAccount($_POST['chpw_username'],\r\n\t\t\t\t\tarray('password', 'changepw_hash', 'changepw_timelimit'),\r\n\t\t\t\t\tarray(self::passwordToHash($_POST['new_pw']), '', 0));\r\n\t\t\t\theader('Location: login.php');\r\n\t\t\t}\r\n\t\t} else\r\n\t\t\treturn array( __('Something went wrong.') );\r\n\t}", "public function testUpdatePasswordValidationError()\n {\n // Config\n $currentPassword = '123456789';\n $newPassword = '123';\n\n // Prepare\n $user = factory(User::class)->create([\n 'password' => bcrypt($currentPassword),\n ]);\n\n $requestData = [\n 'currentpassword' => '123456789',\n 'newpassword' => $newPassword,\n ];\n\n $response = $this->actingAs($user)->call('POST', $this->accountChangePasswordPostUrl, $requestData);\n\n // Asserts\n $response->assertStatus(302);\n $response->assertRedirect($this->accountChangePasswordPageUrl);\n $response->assertSessionHasErrors('password');\n $response->assertSessionMissing('success');\n }", "public function postNewPassword()\n\t{\n\t\t//$user = User::find(Auth::user()->get()->id);\n\t\t$user = User::where('remember_token', Input::get('token'))->first();\n\n\t\tif( !$user ){\n\t\t\treturn Redirect::back()->with('message',\"Invalid User\")\n\t\t\t\t\t\t\t\t ->with('message_type','danger');\n\t\t}\n\n\t\tValidator::extend('strong_password', function($attribute, $value, $parameters) {\n\t\t\t$r1 = '/[A-Z]/'; \t\t\t\t\t //Uppercase\n\t\t\t$r2 = '/[a-z]/'; \t\t\t\t\t //lowercase\n\t\t\t$r3 = '/[!@#$%^&*()\\-_=+{};:,<.>]/'; // whatever you mean by 'special char'\n\t\t\t$r4 = '/[0-9]/'; \t\t\t\t\t //numbers\n\n\t\t\tif(preg_match_all($r1,$value, $o)<1) return false;\n\n\t\t\tif(preg_match_all($r2,$value, $o)<1) return false;\n\n\t\t\tif(preg_match_all($r3,$value, $o)<1) return false;\n\n\t\t\tif(preg_match_all($r4,$value, $o)<1) return false;\n\n\t\t\tif(strlen($value)<8) return false;\n\n\t\t\treturn true;\n\t\t});\n\n\t\tValidator::extend('check_password', function($attribute, $value, $parameters) use ($user)\n\t\t{\n\t\t\t$old_password = Hash::check($value, $user->password);\n\n\t\t\tif($old_password == true) return true;\n\n\t\t\treturn false;\n\t\t});\n\n\t\t$rules = array(\n\t\t\t'old_password' \t\t\t=> 'required|check_password',\n\t\t\t'password' \t\t\t\t=> 'required|strong_password|confirmed',\n\t\t\t'password_confirmation' => 'required',\n\t\t);\n\n\t\t$messages = array(\n\t\t\t'password.strong_password' => 'Passwords must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter, one digit and one special character.',\n\t\t\t'old_password.check_password' => 'Please enter correct system-generated password',\n\t\t\t'old_password.required' => 'Please enter the system generated password',\n\t\t);\n\n\t\t$response = [];\n\t\t$validator = Validator::make(Input::all(), $rules, $messages);\n\n\t\tif($validator->passes())\n\t\t{\n\t\t\t$user->password = Hash::make(Input::get('password'));\n\t\t\t$user->password_changed = '1';\n\t\t\t$user->remember_token = NULL;\n\t\t\t$user->save();\n\n\t\t\tSession::forget('token');\n\n\t\t\treturn Redirect::route('user.login.get')->with('message',\"Password updated successfully.\")\n\t\t\t\t\t\t\t\t ->with('message_type','success');\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\treturn Redirect::back()->with('message',\"Could not update password\")\n\t\t\t\t\t\t\t\t ->with('message_type','danger')\n\t\t\t\t\t\t\t\t ->withErrors($validator);\n\t\t}\n\t}", "public function change_password()\n {\n $currentPassword = $this->input->post('currentPassword');\n $newPassword = $this->input->post('newPassword');\n\n $isPasswordChanged = $this->CustomModel->changePassword(\n $_SESSION['u_id'], $currentPassword, $newPassword\n );\n\n if ($isPasswordChanged) {\n echo 'success';\n }\n }", "public function changePasswordAction()\n {\n $form = new Form\\Password();\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $userModel = new Model\\Users();\n $identity = $this->_auth ->getIdentity();\n $userId = $identity->getId();\n $user = $userModel->getUser($userId);\n $result = $userModel->savePassword($user, $form->getValue('new_password'), $form->getValue('password'));\n\n if ($result) {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was changed.'); \n } else {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was NOT changed.');\n }\n $this->_redirect($this->getRequest()->getRequestUri());\n }\n $this->view->passwordForm = $form;\n }", "public function postStoreNewPassword()\n {\n $input = array('password' => Input::get('password'), 'password_confirmation' => Input::get('password_again'));\n\n $rules = array('password' => 'required|min:4|max:32|confirmed', 'password_confirmation' => 'required|min:4|max:32');\n\n $v = Validator::make($input, $rules);\n\n if ($v->passes()) {\n if (Input::has('email') && Input::has('resetcode')) {\n\n try {\n // Find the user using the user id\n $user = Sentry::findUserByLogin(Input::get('email'));\n\n // Check if the reset password code is valid\n if ($user->checkResetPasswordCode(Input::get('resetcode'))) {\n // Attempt to reset the user password\n if ($user->attemptResetPassword(Input::get('resetcode'), Input::get('password'))) {\n Session::flash('global', 'Password changed successfully . Please login below');\n return Redirect::to(route('admin-sign-in'));\n } else {\n Session::flash('global', 'Unable to reset password . Please try again');\n return Redirect::to(route('admin-forgot-password'));\n }\n } else {\n Session::flash('global', 'Unable to reset password . Please try again');\n return Redirect::to(route('admin-forgot-password'));\n }\n } catch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e) {\n Session::flash('global', 'User not found');\n return Redirect::to(route('admin-forgot-password'));\n }\n } else {\n Session::flash('global', 'Invalid request . Please enter email to reset your password');\n return Redirect::to(route('admin-forgot-password'));\n }\n } else {\n return Redirect::to(route('admin-reset-password').'?email=' . Input::get('email') . '&resetcode=' . Input::get('resetcode'))->withErrors($v)->withInput();\n }\n }", "public function assignNewPassword(Users $entity, $password)\n {\n }", "public function reset_password_form_check(){\n $this->form_validation->set_rules('password','Password','required|trim');\n $this->form_validation->set_rules('cpassword','Confirm Password','required|trim|matches[password]');\n if($this->form_validation->run()) {\n $email=$this->input->post('email');\n $password=sha1($this->input->post('password'));\n if($this->model_users->update_password($password,$email)){\n redirect(\"users/login\".\"?updatepass=ok\");\n }\n else{\n redirect('users/forgotten_password'.'?updatepass=bad');\n }\n }\n }", "public function save()\n {\n $user_id = Yii::$app->session->getFlash('validatedUserId');\n if ($this->validate() && ( $user = User::findOne($user_id)) !== null ) {\n // Hashing user password before saving it to the DB\n // http://www.yiiframework.com/doc-2.0/guide-security-passwords.html\n $user->password = Yii::$app->getSecurity()->generatePasswordHash($this->password);\n $user->active = '1';\n // Generates a new auth key to avoid the previous one from being used\n $user->auth_key = Yii::$app->security->generateRandomString();\n // Save DB record\n return $user->save();\n }\n return false;\n }", "public function password($data){\n\n\n \t$q = \"SELECT password FROM user_table WHERE password='$data[current_pass]'\";\n\n \t$result = $this->connection->query($q);\n\n \t // check if current password is correct\n\n \tif($result->num_rows >0){\n\n \n \t\t$id = $_SESSION['id'];\n\n\t \t\tif($data['new_pass']==$data['re_pass'])\n\t \t\t{\n\n\t \t\t\tif(strlen($data['new_pass'])<8){\n\n\t\t\t\t$_SESSION['message'] = \"Password must contain 8 letters\";\n\t\t\t\t $_SESSION['msg_type'] = \"danger\";\n\t\t\t\t}else{\n\n\t \t\t$q=\"UPDATE user_table SET password='$data[new_pass]' WHERE id='$id'\";\n\n\t \t\t$result = $this->connection->query($q);\n\n\t \t\t$_SESSION['message'] = \"Successfully changed\";\n\t \t\t$_SESSION['msg_type'] = \"success\";\n\n\t\t \t}\n\t \n\n\t \t}\n\t \telse\n\t \t{\n\n\t \t\t$_SESSION['message'] = \"New password does not match\";\n\t \t\t$_SESSION['msg_type'] = \"warning\";\n \n\t \t}\n\t }\n\t else\n\t {\n\n\t \t$_SESSION['message']= \"Invalid current password\";\n\t \t$_SESSION['msg_type'] = \"danger\";\n \n\t }\n }", "public function create_password() {\n\t\tif(!empty($this->request->params['named']['email'])){\n\t\t\t$email = $this->request->params['named']['email'];\n\t\t}\n\t\t\n\t\t$authUserData = $this->Auth->user();\n\t\tif(empty($authUserData)){\n\t\t\t$this->Session->setFlash(__('There was an error logging you in and setting up a password. Your temporary password has been sent to your email address.', true));\n\t\t\t//Send the temporary password to the user's email address\n\t\t\t$options = array(\n\t\t\t\t\t\t\t\t'layout'=>'temporary_password',\n\t\t\t\t\t\t\t\t'subject'=>'Your Temporary Password',\n\t\t\t\t\t\t\t\t'view'=>'default'\n\t\t\t\t\t\t\t\t);\n\t\t\t$viewVars = array('temp_password'=>$authUserData['User']['email'],'user'=>$user);\n\n\t\t\t//Send the email\n\t\t\t$this->_sendEmail($email,$options,$viewVars);\n\t\t\t$this->redirect(array('controller'=>'users','action'=>'login'));\n\t\t}\n\t\t\n\t\t$user = $this->User->find('first',array('conditions'=>array('email'=>$authUserData['User']['email'])));\n\t\tif (!empty($this->request->data)) {\n\t\t\t$this->request->data['User']['id'] = $user['User']['id']; //Get the logged in user's id\n\t\t\tif ($this->User->verifyNewPassword($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('Password created.', true));\n\t\t\t\t$this->redirect(array('controller'=>'uploads','action'=>'index'));\n\t\t\t}\n\t\t}\n\t}", "public function setNewPassword($password) {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "public function setPasswordField($password = true) {}", "public function changePasswordAction(){\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n if(isset($data['password']) && isset($data['repeat_password'])){\n if($data['password'] === $data['repeat_password']){\n $user->setPassword($data['password']);\n } else {\n $this->setErrorResponse('password and repeat_password should match!');\n }\n } else {\n $this->setErrorResponse('password and repeat_password is mandatory fields!');\n }\n $this->_helper->json(array('updated' => true));\n }" ]
[ "0.708261", "0.70323414", "0.70190877", "0.6993437", "0.6918978", "0.69044703", "0.68955225", "0.68760085", "0.68589246", "0.6848455", "0.68049973", "0.6799025", "0.67777383", "0.677607", "0.6745533", "0.6722055", "0.6696917", "0.66587484", "0.6650261", "0.6624472", "0.6620251", "0.6620251", "0.659864", "0.6566819", "0.6558107", "0.6548081", "0.6533008", "0.65176094", "0.64927703", "0.6489178", "0.6469871", "0.645938", "0.6457721", "0.6456395", "0.6438005", "0.64251035", "0.64207023", "0.64197206", "0.6418826", "0.64048165", "0.6390039", "0.634394", "0.63384795", "0.6328998", "0.6323325", "0.6321051", "0.6320377", "0.6319203", "0.6305272", "0.62996435", "0.6296134", "0.62662107", "0.6253008", "0.6248355", "0.62454766", "0.62358946", "0.62340194", "0.62335914", "0.6224279", "0.6223394", "0.62204707", "0.621996", "0.6210178", "0.6209111", "0.620724", "0.6204306", "0.62042046", "0.6200338", "0.61967695", "0.617701", "0.6175038", "0.61742", "0.61739004", "0.6173546", "0.6171965", "0.6171162", "0.6167929", "0.61611855", "0.61589825", "0.6158978", "0.6156862", "0.61519355", "0.61512816", "0.6148293", "0.61458397", "0.6138681", "0.61341625", "0.6132695", "0.6128949", "0.61259645", "0.6125149", "0.61132586", "0.6112777", "0.6110905", "0.6101065", "0.610105", "0.610069", "0.60982686", "0.6097141", "0.6093536" ]
0.7256017
0
Handles emailing. Sends account activation instructions
private function _sendConfirmationEmail($email_to, $name_to, $confirmation_code){ $mailer = new Bel_Mailer(); $mailer->addTo ( $email_to ); $mailer->setSubject('Reactivate your account'); $this->view->assign('code',$confirmation_code); $this->view->assign('name',$name_to); $mailer->setBodyHtml ( $this->view->fetch('usermanagement/profile/confirmation_email.tpl') ); $mailer->send (); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendActivationEmail(){\n\t\t// generate the url\n\t\t$url = 'http://'.$_SERVER['HTTP_HOST'].'/signup/activate/'.$this->activation_token;\n\t\t$text = View::getTemplate('Signup/activation_email.txt', ['url' => $url]);\n\t\t$html = View::getTemplate('Signup/activation_email.html', ['url' => $url]);\n\t\t\n\t\tMail::send($this->email, 'Account_activation', $text, $html);\n\t}", "public function sendActivationEmail() {\n $htmlBody = \"\n <div style='font-family: Trebuchet MS, Helvetica, sans-serif'>\n Hello \" . $this->title . \" \" . $this->lastname . \",\n <br /><br />\n Thank you for registering with us at <a href='www.betvbet.co.uk'>Bet v Bet</a>.\n <br /><br />\n You are one step away from placing your first bet. Simply click the activation link below:\n <br />\n {activationLink}\n <br /><br />\n Alternatively, <a href='www.betvbet.co.uk/site/login'>log in</a> to your account and enter the code below:\n <br />\n {code}\n <br /><br />\n This code expires in 24 hours ({tomorrow}).\n <br /><br />\n Best of luck!\n <br />\n The Bet v Bet Team\n <br /><br /><br /><br />\n This inbox is not monitored, please do not reply to this address, any queries should be sent to <a href='mailto:[email protected]'>[email protected]</a>\n </div>\n \";\n\n // Now, create the activation code.\n $code = strtoupper(\\app\\components\\Utilities::generateRandomString(6));\n // Create the activation link.\n $activationLink = Yii::getAlias('@web') . '/site/activate?code=' . $code;\n\n $activate = new Activate();\n $activate->attributes = [\n 'user' => $this->id,\n 'code' => $code,\n 'expires' => time() + 86400,\n 'created' => time(),\n ];\n $activate->save();\n\n $htmlBody = str_replace('{activationLink}', $activationLink, $htmlBody);\n $htmlBody = str_replace('{code}', $code, $htmlBody);\n $htmlBody = str_replace('{tomorrow}', date(\"d/m/Y H:i\", time() + 86400), $htmlBody);\n Yii::$app->mailer->compose()\n ->setFrom(['[email protected]' => 'Bet v Bet'])\n ->setTo($this->email)\n ->setHtmlBody($htmlBody)\n ->setSubject('Bet v Bet - Account Activation')\n ->send();\n }", "public function sendActivationEmail() {\n $emailProperties = $this->gatherActivationEmailProperties();\n\n /* send either to user's email or a specified activation email */\n $activationEmail = $this->controller->getProperty('activationEmail',$this->profile->get('email'));\n $subject = $this->controller->getProperty('activationEmailSubject',$this->modx->lexicon('register.activation_email_subject'));\n return $this->login->sendEmail($activationEmail,$this->user->get('username'),$subject,$emailProperties);\n }", "public function sendActivationEmail()\n\t{\n\t\t$mailData = [\n\t\t\t'to' => $this->email,\n\t\t\t'from' => '[email protected]',\n\t\t\t'nameFrom' => 'Peter Štovka'\n\t\t];\n\n\n\t\tMail::send('email.activation', ['token' => $this->token], function ($message) use ($mailData) {\n\t\t\t$message->to($mailData['to'], 'Aktivačný email')\n\t\t\t\t->subject('Aktivácia účtu')\n\t\t\t\t->from($mailData['from'], $mailData['nameFrom']);\n\t\t});\n\t}", "public function actionActivation() {\n\t\t$email = NData::base64UrlDecode($_GET['e']);\n\t\t$activekey = $_GET['activekey'];\n\t\tif ($email&&$activekey) {\n\t\t\t$user = UserModule::userModel()->notsafe()->findByAttributes(array('email'=>$email));\n\t\t\tif(isset($user) && $user->email_verified == 0 && $user->status == 1){\n\t\t\t\t// user is active but has not verified his email\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t\t$this->render('message',array('title'=>UserModule::t(\"Email Verfied\"),'content'=>UserModule::t(\"Thank you! We now know you are you!\")));\n\t\t\t} elseif (isset($user) && $user->status==1 && $user->email_verified==1) {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Your account is active.\")));\n\t\t\t} elseif(isset($user->activekey) && $this->checkActivationKey($user, $activekey)) {\n\t\t\t\t$user->activekey = crypt(microtime());\n\t\t\t\t$user->status = 1;\n\t\t\t\t$user->email_verified = 1;\n\t\t\t\t$user->save();\n\t\t\t $this->render('activation');\n\t\t\t\t$e = new CEvent($this, array('user'=>$user));\n\t\t\t\tUserModule::get()->onActivation($e);\n\t\t\t} else {\n\t\t\t $this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->render('message',array('title'=>UserModule::t(\"User activation\"),'content'=>UserModule::t(\"Incorrect activation URL.\")));\n\t\t}\n\t}", "function activate_account_via_email_link() {\r\n\t\t\tif ( isset($_REQUEST['act']) && $_REQUEST['act'] == 'activate_via_email' && isset($_REQUEST['hash']) && is_string($_REQUEST['hash']) && strlen($_REQUEST['hash']) == 40 &&\r\n\t\t\t isset($_REQUEST['user_id']) && is_numeric($_REQUEST['user_id']) ) { // valid token\r\n\r\n\t\t\t\t$user_id = absint( $_REQUEST['user_id'] );\r\n\t\t\t\tdelete_option( \"um_cache_userdata_{$user_id}\" );\r\n\r\n\t\t\t\tum_fetch_user( $user_id );\r\n\r\n\t\t\t\tif ( strtolower($_REQUEST['hash']) !== strtolower( um_user('account_secret_hash') ) )\r\n\t\t\t\t\twp_die( __( 'This activation link is expired or have already been used.','ultimate-member' ) );\r\n\r\n\t\t\t\tUM()->user()->approve();\r\n\t\t\t\t$redirect = ( um_user('url_email_activate') ) ? um_user('url_email_activate') : um_get_core_page('login', 'account_active');\r\n\t\t\t\t$login = (bool) um_user('login_email_activate');\r\n\r\n\t\t\t\t// log in automatically\r\n\t\t\t\tif ( ! is_user_logged_in() && $login ) {\r\n\t\t\t\t\t$user = get_userdata($user_id);\r\n\t\t\t\t\t$user_id = $user->ID;\r\n\r\n\t\t\t\t\t// update wp user\r\n\t\t\t\t\twp_set_current_user( $user_id, $user->user_login );\r\n\t\t\t\t\twp_set_auth_cookie( $user_id );\r\n\r\n\t\t\t\t\tob_start();\r\n\t\t\t\t\tdo_action( 'wp_login', $user->user_login, $user );\r\n\t\t\t\t\tob_end_clean();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tum_reset_user();\r\n\t\t\t\t/**\r\n\t\t\t\t * UM hook\r\n\t\t\t\t *\r\n\t\t\t\t * @type action\r\n\t\t\t\t * @title um_after_email_confirmation\r\n\t\t\t\t * @description Action on user activation\r\n\t\t\t\t * @input_vars\r\n\t\t\t\t * [{\"var\":\"$user_id\",\"type\":\"int\",\"desc\":\"User ID\"}]\r\n\t\t\t\t * @change_log\r\n\t\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t\t * @usage add_action( 'um_after_email_confirmation', 'function_name', 10, 1 );\r\n\t\t\t\t * @example\r\n\t\t\t\t * <?php\r\n\t\t\t\t * add_action( 'um_after_email_confirmation', 'my_after_email_confirmation', 10, 1 );\r\n\t\t\t\t * function my_after_email_confirmation( $user_id ) {\r\n\t\t\t\t * // your code here\r\n\t\t\t\t * }\r\n\t\t\t\t * ?>\r\n\t\t\t\t */\r\n\t\t\t\tdo_action( 'um_after_email_confirmation', $user_id );\r\n\r\n\t\t\t\texit( wp_redirect( $redirect ) );\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "function account_activation($account_act_code='') {\n\n\t\tif( $this->authentication->is_user_logged_in() ) {\n\n\t\t\tredirect('home');\n\t\t}\n\n\t\t$this->mcontents['title']\t\t\t= 'Account Activation';\n\t\t$this->mcontents['page_heading']\t= 'Account Activation';\n\n\t\tif( !$account_act_code ) {\n\n\t\t\tredirect('home');\n\t\t}\n\n\t\t$this->load->model('common_model');\n\t\t$aResult = $this->common_model->isValidToken($account_act_code, 'account_activation');\n\t\t$aTokenStatus = c('token_status');\n\n\t\tif( $aResult['status'] != $aTokenStatus['valid'] ) {\n\n\t\t\t//find the reason why this token is not valid\n\t\t\tif( $aResult['status'] == $aTokenStatus['invalid'] ) {\n\n\t\t\t\tsf('error_message', 'Invalid Link. Please contact out support team');\n\t\t\t} elseif($aResult['status'] == $aTokenStatus['expired']) {\n\n\t\t\t\tsf('error_message', 'This link has expired. Click <a class=\"highlight1\" href=\"'.c('base_url').'user/resend_account_activation/'.$account_act_code.'\">here</a> to get another confirmation email');\n\t\t\t}\n\n\t\t\tredirect('home');\n\n\t\t} else {\n\n\t\t\t//activate the account\n\t\t\tif(true === $this->account_model->activateAccount($aResult['oToken']->user_id)){\n\n\t\t\t\t//delete the token\n\t\t\t\t$this->common_model->deleteToken($aResult['oToken']->id);\n\n\n\t\t\t\tif(!$this->authentication->makeLogin($aResult['oToken']->user_id)){\n\n\t\t\t\t\tsf('error_message', 'You could not be logged in. Please contact out admin');\n\t\t\t\t} else {\n\n\t\t\t\t\t// Send welcome message\n\t\t\t\t\t$this->load->model('maintenance_model');\n\t\t\t\t\t$this->maintenance_model->getSingleSetting('db_welcome_msg');\n\t\t\t\t\t$aWelcomeEmail['receiver_name'] = s('FULL_NAME');\n\t\t\t\t\t$aWelcomeEmail['welcome_text'] \t= $this->maintenance_model->getSingleSetting('db_signup_welcome_msg');\n\n\t\t\t\t\t$aSettings = array(\n\t\t\t\t\t\t'to' \t\t\t\t=> array(s('EMAIL') => s('FULL_NAME')), // email_id => name pairs\n\t\t\t\t\t\t'from_email' \t\t=> c('accounts_email_id'),\n\t\t\t\t\t\t'from_name'\t\t\t=> c('accounts_email_from'),\n\t\t\t\t\t\t'reply_to' \t\t\t=> array(c('accounts_email_id') => c('accounts_email_from')), // email_id => name pairs\n\t\t\t\t\t\t'email_contents' \t=> $aWelcomeEmail, // placeholder keywords to be replaced with this data\n\t\t\t\t\t\t'template_name' \t=> 'welcome', //name of template to be used\n\t\t\t\t\t\t//'preview'\t\t\t=> true\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->load->helper('custom_mail');\n\t\t\t\t\tsendMail_PHPMailer($aSettings);\n\n\t\t\t\t\tsf('success_message', 'Account has been activated. Welcome to '.$this->mcontents['c_website_title']);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tsf('error_message', 'Could not activate!!');\n\t\t\t}\n\n\n\t\t\tredirect('home');\n\t\t}\n\t}", "function email_activation($activationCode,$form)\n\t{\n\t\t$emailaddress = $this->namedFields['email']->getData();\n\t\t$site_address = SITE_ADDRESS;\n $site_address .= (substr(SITE_ADDRESS, -1) == '/') ? '' : '/';\n\t\t$link = $site_address.'sign_up?activate_code='.$activationCode;\n\t\t$body = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\"><html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" lang=\\\"en\\\" xml:lang=\\\"en\\\"><head><title>Church Growth Research Programme</title><style type=\\\"text/css\\\"><!-- body { background:#ffffff; margin:0; padding:0; } p { font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#000000; line-height:22px; margin:10px 0px 10px 0px; text-align:left; } h1, h2, h3, h4, h5, h6 { font-family:Arial, Helvetica, sans-serif; } a { color:#2a6307; outline:none; text-decoration:underline; } a:hover { color:#569823; text-decoration:underline; } --> </style></head><body bgcolor=\\\"#fff\\\"><div align=\\\"center\\\"><table width=\\\"600\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" style=\\\"border:none;\\\"><tbody><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"188\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailheader.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr><tr><td bgcolor=\\\"#fbf5de\\\" style=\\\"padding:0px 30px 0px 30px;\\\"><p>Welcome to the Church Growth Research Programme.</p><p>Please click on the link below to activate your account:<p>\".\n\t\t\t\"<p><a href=\\\"$link\\\">$link</a></p><p>Thank you, the Church Growth Reseach Programme website team.</p>\".\n\t\t\t\"</td></tr><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"33\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailfooter.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr></tbody></table></div></body></html>\";\n\t\t$from_email_address = $form['email'];\n\t\t$this->send_mail($emailaddress, SITE_NAME, $from_email_address, 'Account Activation', $body, $body_text);\n\n\t}", "public function mailActivateAccount($params)\n {\n $this->mailer->accountActivation($params);\n }", "public static function sendActivationReminders(){\n self::$UserService->sendEmailActivationReminders();\n }", "function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key))\n\t\t{\n\t\t\t// success\n\t\t\t//Add it into newletter\n\t\t\t$user = $this->database->GetUserById($user_id);\n\t\t\tadd_subscriber($user['email'], $user['username']);\n\t\t\t\n\t\t\t$this->tank_auth->logout();\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// fail\n\t\t\t$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}", "function activate()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Activate user\n if ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\n } else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n $this->_show_message($this->lang->line('auth_message_activation_failed'));\n }\n }", "function activate()\n\t{\n\t\t$user_id\t\t= $this->uri->segment(3);\n\t\t$new_email_key\t= $this->uri->segment(4);\n\n\t\t// Activate user\n\t\tif ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n\t\t\t$this->tank_auth->logout();\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_completed').' '.anchor('/auth/login/', 'Login'));\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_completed'));\n\t\t\t\t\t\tredirect('/auth/login');\n\n\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fail\n\t\t\t$this->session->set_flashdata('message', $this->lang->line('auth_message_activation_failed'));\n\t\t\tredirect('/auth/login');\n\t\t\t//$this->_show_message($this->lang->line('auth_message_activation_failed'));\n\t\t}\n\t}", "public function sendAccountActivationEmail(User $user, Token $token): void;", "protected function activation_email(Request $request) {\n $activationToken = $request->get('activation_token');\n if($request->get('password') == $request->get('password_confirmation')) {\n $userPassword = bcrypt($request->get('password'));\n }\n\n /* Validation Rules */\n $ValidationRules = [\n 'activation_token' => 'required|min:24|max:26',\n 'password' => 'required|min:8|max:30|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$/|confirmed'\n ];\n\n /* Error Messages */\n $ErrorMessages = [\n 'password.min' => 'Please enter a valid password',\n 'password.regex' => 'Please enter a secure password - contains an upper case letter, a lower case letter, a digit and a special character',\n 'password.confirmed' => 'Passwords are not matching'\n ];\n\n /* Validation */\n $this->validate($request, $ValidationRules, $ErrorMessages);\n\n $userCount = DB::table('users')->where([['verification_token', $activationToken], ['verified', 'false']])->count();\n if($userCount > 0) {\n\n /* Querying the user table by passing Email verification token */\n $user = DB::table('users')->where([['verification_token', $activationToken], ['verified', 'false']])->first();\n\n /* Updating Status of Verification */\n DB::table('users')->where('verification_token', $activationToken)->update(['password'=>$userPassword,'verified'=> true]);\n\n /**\n * Sending welcome email to the user\n * @author Tittu Varghese ([email protected])\n *\n * @param array | $user\n */\n\n $emailVariables_UserName = $user->first_name;\n $emailVariables_SubTitle = \"Welcome to Bytacoin!\";\n $emailVariables_MainTitle = \"Get Started with Bytacoin\";\n $emailVariables_EmailText = \"Thank you for completing registration with us. We are happy to serve for you and click below button to login to your dashboard and checkout our awesome offerings.\";\n $emailVariables_ButtonLink = \"https://bytacoin.telrpay.com/\";\n $emailVariables_ButtonText = \"GET STARTED\";\n\n $emailTemplate = new EmailTemplates($emailVariables_UserName,$emailVariables_SubTitle,$emailVariables_MainTitle,$emailVariables_EmailText,$emailVariables_ButtonLink,$emailVariables_ButtonText);\n\n $emailContent = $emailTemplate->GenerateEmailTemplate();\n $mail = new Email(true,$emailContent);\n $mail->addAddress($user->email,$user->first_name);\n $mail->Subject = 'Welcome to Bytacoin!';\n $mail->send();\n\n return redirect('login')->with('success', 'Your account has been activated. Please login to access dashboard.');\n\n } else {\n return redirect('login')->with('error', 'Looks like the activation link is expired or not valid.');\n }\n }", "private function sendActivationEmail($data) {\n\t$template_name = 'signup-confirmation';\n\t$template_content = array();\n\t$message = array(\n\t\t'subject' => 'Welcome! Please confirm your email address.',\n\t\t'from_email' => '[email protected]',\n\t\t'from_name' => 'Chefmes',\n\t\t'to' => array(\n\t\t\tarray(\n\t\t\t\t'email' => $data['email'],\n\t\t\t\t'name' => $data['fullname']\n\t\t\t)\n\t\t),\n\t\t'merge_language' => 'mailchimp',\n\t\t'merge_vars' => array(\n\t\t\tarray(\n\t\t\t\t'rcpt' => $data['email'],\n\t\t\t\t'vars' => array(\n\t\t\t\t\t[ 'name' => 'email', 'content' => $data['email']],\n\t\t\t\t\t[ 'name' => 'firstname', 'content' => $data['firstname']],\n\t\t\t\t\t[ 'name' => 'confirmlink', 'content' => $data['confirmlink']]\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\t\\Email::messages()->sendTemplate($template_name, $template_content, $message);\n\t//print_r($result);\n }", "function sendActivationEmail($emailid, $activationcode) {\n\t// send activation email\n\t// require ('emailcode.php');\n\t$link = \"http://s336355547.onlinehome.us/peach/service/index.php?method=get&module=activate&emailid=$emailid&activationcode=$activationcode\";\n\t$STR_EMAIL_STRING =\"<br/>Hi,<br/><br/>Please click on below link to activate your account.<br/><br/>$link <br/><br/>Regards <br/>Peach Health <br/>\";\n\tSEND_MAIL($emailid, \"Activation link of peach health\", $STR_EMAIL_STRING, \"[email protected]\");\n}", "public function mailActivatedAccount($params)\n {\n $this->mailer->accountActivated($params);\n }", "function sending_activation_email($data, &$content) {\n\t\t// Create content\n\t\t$site_name = isset($this->settings['site_name'])?$this->settings['site_name']:$this->ci->config->item('DX_website_name');\n\t\t$content = sprintf(\n\t\t\t\t$this->ci->lang->line('auth_activate_content'), \n\t\t\t\t$site_name, \n\t\t\t\t$data['activate_url'],\n\t\t\t\t$this->ci->config->item('DX_email_activation_expire') / 60 / 60,\n\t\t\t\t$data['username'], \n\t\t\t\t$data['email'],\n\t\t\t\t$data['password'],\n\t\t\t\t$site_name\n\t\t\t);\n\t}", "function send_again()\n\t{\n\t\tif (!$this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t\t// not logged in or activated\n\t\t\tredirect('/auth/login/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->change_email(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\t\t\t// success\n\n\t\t\t\t\t$data['site_name']\t= $this->config->item('website_name', 'tank_auth');\n\t\t\t\t\t$data['activation_period'] = $this->config->item('email_activation_expire', 'tank_auth') / 3600;\n\n\t\t\t\t\t$this->_send_email('activate', $data['email'], $data);\n\n\t\t\t\t\t$this->_show_message(sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisplay('send_again', $data);\t\t\t\n\t\t}\n\t}", "public function activateAction()\n {\n $process = User::activate($this->route_params['token']);\n\n if($process){\n Flash::addMessage('Account activated successfully','success');\n $this->redirect('/Login/index');\n }else{\n Flash::addMessage('Oops! Can\\'t activate your account. Activation link is too old or wrong.','danger');\n $this->redirect('/register/activation');\n }\n\n\n }", "public function activateAccount()\n {\n // Récupération des variables nécessaires à l'activation\n $email = $_GET['email'];\n $activation_key = $_GET['key'];\n // On active le compte\n $activation = $this->Members->activateAccount($email, $activation_key);\n\n // Préparation de la page\n $page = new Page(array(\n 'title' => 'Inscription réussie',\n 'class_body' => 'signin'\n ));\n // Rendu du contenu\n $variables = compact('activation');\n $content = $this->render('members/signin/validation.php', $variables);\n // Rendu de la page\n echo $page->render($content);\n }", "public function testSendActivationEmail()\n {\n $this->tester->mockCraftMethods('security', [\n 'generateRandomString' => $string = StringHelper::randomString(32)\n ]);\n\n // Test send activation email with password null\n $this->pendingUser->password = null;\n $this->users->sendActivationEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'account_activation',\n 'actions/users/set-password&code='.$string.''\n );\n\n $this->pendingUser->password = 'some_password';\n $this->users->sendActivationEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'account_activation',\n 'actions/users/verify-email&code='.$string.''\n );\n $this->pendingUser->password = null;\n\n // Test send Email Verify\n $this->users->sendNewEmailVerifyEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'verify_new_email',\n 'actions/users/verify-email&code='.$string.''\n );\n\n // Test password reset email\n $this->users->sendPasswordResetEmail($this->pendingUser);\n $this->testUsersEmailFunctions(\n 'forgot_password',\n 'actions/users/set-password&code='.$string.''\n );\n }", "public function reActivationAction() {\n //get the container object\n $container = $this->container;\n //get the translator object\n $translator = $this->get('translator');\n //get the session object\n $session = $this->getRequest()->getSession();\n //check if we have a logged in user or company\n if (FALSE === $this->get('security.context')->isGranted('ROLE_NOTACTIVE')) {\n $session->getFlashBag()->set('note', $translator->trans('You need to Login first.'));\n return $this->redirect($this->generateUrl('login'));\n }\n\n //check if the user is already active\n if (TRUE === $this->get('security.context')->isGranted('ROLE_USER')) {\n //set a notice flag\n $session->getFlashBag()->set('notice', $translator->trans('Your acount is active.'));\n return $this->redirect($this->generateUrl('user_edit'));\n }\n\n //get the logedin user\n $user = $this->getUser();\n\n //prepare the body of the email\n $body = $this->renderView('ObjectsUserBundle:User:Emails\\activate_email.txt.twig', array('user' => $user));\n //prepare the message object\n $message = \\Swift_Message::newInstance()\n ->setSubject($translator->trans('activate your account'))\n ->setFrom($container->getParameter('mailer_user'))\n ->setTo($user->getEmail())\n ->setBody($body)\n ;\n //send the activation mail to the user\n $this->get('mailer')->send($message);\n //set the success flag in the session\n $session->getFlashBag()->set('success', $this->get('translator')->trans('check your email for your activation link'));\n //redirect the user to portal\n return $this->redirect($this->generateUrl('user_edit'));\n }", "public function actionSendConfirmationEmail() {\n\n\t\t$userId = User::checkLogged();\n\t\t$confirmation = User::generateConfirmationCode($userId);\n\t\t$subject = \"Confirm your account on JustRegMe\";\n\t\t$bodyPath = ROOT . '/template/email/confirmation.php';\n\t\t$body = include($bodyPath); //loads HTML-body from template\n\t\t\n\t\techo User::sendEmail($userId, $subject, $body);\n\n\t}", "public function sendActivation()\n\t{\n\t}", "function users_user_activation($args)\n{\n $code = base64_decode(FormUtil::getPassedValue('code', (isset($args['code']) ? $args['code'] : null), 'GETPOST'));\n $code = explode('#', $code);\n\n if (!isset($code[0]) || !isset($code[1])) {\n return LogUtil::registerError(__('Error! Could not activate your account. Please contact the site administrator.'));\n }\n $uid = $code[0];\n $code = $code[1];\n\n // Get user Regdate\n $regdate = pnUserGetVar('user_regdate', $uid);\n\n // Checking length in case the date has been stripped from its space in the mail.\n if (strlen($code) == 18) {\n if (!strpos($code, ' ')) {\n $code = substr($code, 0, 10) . ' ' . substr($code, -8);\n }\n }\n\n if (DataUtil::hash($regdate, 'md5') == DataUtil::hash($code, 'md5')) {\n $returncode = pnModAPIFunc('Users', 'user', 'activateuser',\n array('uid' => $uid,\n 'regdate' => $regdate));\n\n if (!$returncode) {\n return LogUtil::registerError(__('Error! Could not activate your account. Please contact the site administrator.'));\n }\n LogUtil::registerStatus(__('Done! Account activated.'));\n return pnRedirect(pnModURL('Users', 'user', 'loginscreen'));\n } else {\n return LogUtil::registerError(__('Sorry! You entered an invalid confirmation code. Please correct your entry and try again.'));\n }\n}", "public function send_activation($email_or_username){\n\t\t$activation_key = $this->get_activation_key($email_or_username);\n\t\t$sql = \"select * from admin where email='$email_or_username' or username='$email_or_username'\";\n\t\tif ($this->num_rows($sql) == 0){\n\t\t\techo \"Username atau email yang anda masukan tidak terdaftar sebagai member di situs ini!.\";\n\t\t\texit();\n\t\t}\n\t\t$data = $this->fetchfetch($sql);\n\t\t$id = $data['id'];\n\t\t$name = $data['name'];\n\t\t$email = $data['email'];\n\t\t$today = date(\"Y-m-d\");\n\t\t$time = date(\"H:i:s\");\n\t\t$activation_link = APP_URL.$system.\"/forgot.php?act=recover&email=$email&activation=$activation_key\";\n\t\t$c_url = APP_URL;\n\t\t$c_admin_url = \"$c_url/$system\";\n\t\t$messages = \"\n\t\tyou has send a request for reset your password at <a target='_blank' href='$c_url'>$c_url</a> with detail<br>\n\t\tEmail : $email<br>\n\t\tUsername : $name<br>\n\t\tDate : $today - $time<br>\n\t\t<p>\n\t\tand if you really has send a request for reset your password at $c_url, so you can use this activation code for reset your password :\n\t\t<br>\n\t\t<b>Activation Code</b> : <i>$activation_key</i>\n\t\t</p>\n\t\tif you didn't request this action, so ignore this message or delete this message.\n\t\t\";\n\t\t$send = $this->send_email($email, \"Activation Link For Reset Your Password at $c_url\", $messages);\n\t\tif ($send == true){\n\t\t\treturn \"$email\";\n\t\t\texit();\n\t\t}else{\n\t\t\techo \"Failed! can't send email to $email\";\n\t\t}\n\t}", "public function actionActivate($email, $activationKey)\r\n {\r\n if($this->module->activeAfterRegister) // If accounts do not need to be activated.\r\n {\r\n throw new \\yii\\web\\NotFoundHttpException(); // Hide this action.\r\n }\r\n \r\n if(!Yii::$app->user->isGuest) // Only guest can activate accounts.\r\n {\r\n // Redirect instead of throwing a 403, because logged user end up on this page quite often.\r\n $this->redirect($this->module->returnLogoutUrl, 302); // Temporary redirect.\r\n }\r\n \r\n $model= User::find()->where(['email' => $email])->one();\r\n \r\n if($model && (int)$model->status === User::STATUS_ACTIVE) // If the account is already active.\r\n {\r\n throw new \\yii\\web\\ForbiddenHttpException(Yii::t(__CLASS__, 'This account is already active.'));\r\n }\r\n else if($model->activation_key && $model->activation_key == $activationKey) // The activation data checked out.\r\n {\r\n $model->scenario = 'activation';\r\n $model->status = User::STATUS_ACTIVE;\r\n $model->save();\r\n \r\n // Notify the user that activation was sucessful.\r\n return $this->render('message', [\r\n 'model' => $model,\r\n 'message' => Yii::t(__CLASS__, 'Your account is now active. Please log in to start using the service.'),\r\n 'type' => 'success'\r\n ]);\r\n }\r\n else if($model && (int)$model->status !== User::STATUS_ACTIVE && ($model->activation_key == $activationKey)) // The account has been disabled.\r\n {\r\n throw new \\yii\\web\\ForbiddenHttpException(Yii::t(__CLASS__, 'This account is not active.'));\r\n }\r\n \r\n // The activation url was wrong.\r\n throw new \\yii\\web\\ForbiddenHttpException(Yii::t(__CLASS__, 'Incorrect activation URL.'));\r\n }", "public function sendWelcomeEmail()\n {\n SendEmailJob::dispatch($this, 'confirm-email', 'Confirm Your Email', [])->onQueue('account-notifications');\n }", "function addEmail(\n\t\t$email_address,\n\t\t$activation_email_subject = null,\n\t\t$activation_email_view = null,\n\t\t$html = true,\n\t\t$fields = array())\n\t{\n\t\tif (!Pie_Valid::email($email_address)) {\n\t\t\tthrow new Pie_Exception_WrongValue(array(\n\t\t\t\t'field' => 'Email', \n\t\t\t\t'range' => 'a valid address'\n\t\t\t), 'email_address');\n\t\t}\n\t\tPie::event(\n\t\t\t'users/validate/email_address',\n\t\t\tarray('email_address' => & $email_address)\n\t\t);\n\t\t$e = new Users_Email();\n\t\t$e->address = $email_address;\n\t\tif ($e->retrieve() and $e->state !== 'unverified') {\n\t\t\tif ($e->user_id === $this->id) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Otherwise, say it's verified for another user,\n\t\t\t// even if it unsubscribed or was suspended.\n\t\t\tthrow new Users_Exception_AlreadyVerified(array(\n\t\t\t\t'key' => $e->address,\n\t\t\t\t'user_id' => $e->user_id\n\t\t\t), 'email_address');\n\t\t}\n\t\t\n\t\t// If we are here, then the email record either\n\t\t// doesn't exist, or hasn't been verified yet.\n\t\t// In either event, update the record in the database,\n\t\t// and re-send the email.\n\t\t$minutes = Pie_Config::get('users', 'activationCodeExpires', 60*24*7);\n\t\t$e->state = 'unverified';\n\t\t$e->user_id = $this->id;\n\t\t$e->activation_code = Pie_Utils::unique(5);\n\t\t$e->activation_code_expires = new Db_Expression(\n\t\t\t\"CURRENT_TIMESTAMP + INTERVAL $minutes MINUTE\"\n\t\t);\n\t\t$e->auth_code = md5(microtime() + mt_rand());\n\t\t$e->save();\n\t\t\n\t\tif (!isset($activation_email_view)) {\n\t\t\t$activation_email_view = Pie_Config::get(\n\t\t\t\t'users', 'activationEmailView', 'users/email/activation.php'\n\t\t\t);\n\t\t}\n\t\tif (!isset($activation_email_subject)) {\n\t\t\t$activation_email_subject = Pie_Config::get(\n\t\t\t\t'users', 'activationEmailSubject', \"Welcome! Please confirm your email address.\" \n\t\t\t);\n\t\t}\n\t\t$fields2 = array_merge($fields, array('user' => $this, 'email' => $e));\n\t\t$e->sendMessage(\n\t\t\t$activation_email_subject, \n\t\t\t$activation_email_view, \n\t\t\t$fields2,\n\t\t\tarray('html' => $html)\n\t\t);\n\t\t\n\t\tPie::event('users/addEmail', compact('email_address'), 'after');\n\t}", "function Trigger_ActivationEmail(&$tNG) {\r\n $emailObj = new tNG_Email($tNG);\r\n $emailObj->setFrom(\"{KT_defaultSender}\");\r\n $emailObj->setTo(\"{member_email}\");\r\n $emailObj->setCC(\"\");\r\n $emailObj->setBCC(\"\");\r\n $emailObj->setSubject(\"Activation\");\r\n //FromFile method\r\n $emailObj->setContentFile(\"includes/mailtemplates/activate.html\");\r\n $emailObj->setEncoding(\"UTF-8\");\r\n $emailObj->setFormat(\"HTML/Text\");\r\n $emailObj->setImportance(\"Normal\");\r\n return $emailObj->Execute();\r\n}", "protected function email(Request $request) {\n $verificationToken = $request->route('email_token');\n $userCount = DB::table('users')->where([['verification_token', $verificationToken], ['verified', 'false']])->count();\n if($userCount > 0) {\n\n /* Querying the user table by passing Email verification token */\n $user = DB::table('users')->where([['verification_token', $verificationToken], ['verified', 'false']])->first();\n\n /* Updating Status of Verification */\n DB::table('users')->where('verification_token', $verificationToken)->update(['verified'=> true]);\n\n /**\n * Sending welcome email to the user\n * @author Tittu Varghese ([email protected])\n *\n * @param array | $user\n */\n\n $emailVariables_UserName = $user->first_name;\n $emailVariables_SubTitle = \"Welcome to Bytacoin!\";\n $emailVariables_MainTitle = \"Get Started with Bytacoin\";\n $emailVariables_EmailText = \"Thank you for completing registration with us. We are happy to serve for you and click below button to login to your dashboard and checkout our awesome offerings.\";\n $emailVariables_ButtonLink = \"https://bytacoin.telrpay.com/\";\n $emailVariables_ButtonText = \"GET STARTED\";\n\n $emailTemplate = new EmailTemplates($emailVariables_UserName,$emailVariables_SubTitle,$emailVariables_MainTitle,$emailVariables_EmailText,$emailVariables_ButtonLink,$emailVariables_ButtonText);\n\n $emailContent = $emailTemplate->GenerateEmailTemplate();\n $mail = new Email(true,$emailContent);\n $mail->addAddress($user->email,$user->first_name);\n $mail->Subject = 'Welcome to Bytacoin!';\n $mail->send();\n\n return redirect('login')->with('success', 'Your account has been activated. Please login to access dashboard.');\n\n } else {\n\n return redirect('login')->with('error', 'Looks like the verification link is expired or not valid.');\n\n }\n }", "public function confirmAction() {\n if (Zend_Auth::getInstance()->hasIdentity())\n $this->_redirect($this->getUrl());\n\n $errors = array();\n\n $action = $this->getRequest()->getParam('a');\n\n switch ($action) {\n case 'email':\n $id = $this->getRequest()->getParam('id');\n $key = $this->getRequest()->getParam('key');\n\n $result = $this->em->getRepository('Champs\\Entity\\User')->activateAccount($id, $key);\n\n if (!$result) {\n $errors['email'] = 'Error activating your account';\n }\n\n break;\n }\n\n $this->view->errors = $errors;\n $this->view->action = $action;\n }", "public static function email_confirm_account() {\n\n if ($u = static::check_record_existence()) {\n\n $m = auth_model();\n $u = $m::first(array('where' => 'id = \\'' . $u->id . '\\''));\n\n # definindo conta como não confirmada.\n $u->hash_confirm_account = $u->hash_confirm_account ?: \\Security::random(32);\n\n if ($u->emailConfirmAccount())\n flash('Email com as instruções para Confirmação de conta para ' . $u->email . '.');\n else\n flash('Algo ocorreu errado. Tente novamente mais tarde.', 'error');\n }\n\n go_paginate();\n }", "public function sendActivationMail($user)\n {\n\n if ($user->activated || !$this->shouldSend($user))\n {\n return;\n }\n\n $token = $this->activationRepo->createActivation($user);\n\n $link = route('user.activate', $token);\n\n $this->dispatch((new SendConfirmEmail($user,$link))->onQueue('emails'));\n\n }", "static function confirm_account_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n $code = confirm_account_email($user->email);\n\n if ($code === -1) {\n flash('Sua conta já está confirmada, basta acessá-la.', 'warning');\n } else if ($code == true)\n flash(\"Enviamos um e-mail para <small><b>$user->email</b></small> com as instruções para você confirmar sua conta.\");\n else\n flash('Não foi possível lhe enviar o e-mail. Por favor, tente novamente mais tarde.', 'error');\n\n go('/');\n } else {\n flash('Verifique os dados do formulário.', 'error');\n }\n }\n\n globals('user', $user);\n }", "public function requestact_user($email)\n \t{\n\t//Get user info from email given/check they actually exist\n\t$users = $this->db->query_read_slave(\"\n\t\tSELECT user.userid, user.usergroupid, username, email, activationid, languageid\n\t\tFROM \".TABLE_PREFIX.\"user AS user\n\t\tLEFT JOIN useractivation AS useractivation ON(user.userid = useractivation.userid AND type = 0)\n\t\tWHERE email = '\" . $this->db->escape_string($email) . \"'\"\n\t);\n\t//If they exist then carry on\n\tif ($this->db->num_rows($users))\n\t{\n\t\t//Loop through everyone with the same email address\n\t\twhile ($user = $this->db->fetch_array($users))\n\t\t{\n\t\t\t//Only work on those who are still not activated\n\t\t\tif ($user['usergroupid'] == NOACTIVATION_USERGROUP)\n\t\t\t{ \n\t\t\t\t//If they for some crazy reason do not have an activation ID then...\n\t\t\t\tif (empty($user['activationid']))\n\t\t\t\t{ \n\t\t\t\t\t//Create a new activation ID for the user\n\t\t\t\t\t$user['activationid'] = build_user_activation_id($user['userid'], 2, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//If they already have an activation ID we'll update the current entry with a new ID\n\t\t\t\t\t$user['activationid'] = fetch_random_string(40);\n\t\t\t\t\t$this->db->query_write(\"\n\t\t\t\t\t\tUPDATE \".TABLE_PREFIX.\"useractivation SET\n\t\t\t\t\t\t\tdateline = \" . TIMENOW . \",\n\t\t\t\t\t\t\tactivationid = '$user[activationid]'\n\t\t\t\t\t\tWHERE userid = $user[userid]\n\t\t\t\t\t\t\tAND type = 0\n\t\t\t\t\t\");\n\t\t\t\t}\n\t\t\t\t//Set some required VB variables (for the email)\n\t\t\t\t$userid = $user['userid'];\n\t\t\t\t$username = $user['username'];\n\t\t\t\t$activateid = $user['activationid'];\n\t\t\t\t//Send out activation email, note the custom vbulletin phrase for the \"main\" site!\n\t\t\t\teval(fetch_email_phrases('activateaccount', $user['languageid']));\n\t\t\t\t//Actually send the email\n\t\t\t\tvbmail($user['email'], $subject, $message, true);\n\t\t\t}\n\t\t}\n\t\t//Return as a success\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn \"No account with that email address exists, please try again.\";\n\t}\n\t}", "function resend_activation($login){\n\t\t$this->ci->load->model('dx_auth/users', 'users');\n\t\t//$this->ci->load->model('dx_auth/user_temp', 'user_temp');\n\t\t\n\t\t$activation_key = md5(rand().microtime());\n\t\t//if ($query = $this->ci->user_temp->get_login($login) AND $query->num_rows() == 1) {\n\t\tif ($query = $this->ci->users->get_login($login) AND $query->num_rows() == 1) {\n\t\t\t$row = $query->row();\n\t\t\t//$this->ci->user_temp->update_temp(array('email' => $row->email),array('activation_key' =>$activation_key ));\n\t\t\t$this->ci->users->update(array('email' => $row->email),array('activation_key' =>$activation_key ));\n\t\t\t$from = isset($this->settings['site_email']) && $this->settings['site_email'] ? $this->settings['site_email']:$this->ci->config->item('DX_webmaster_email');\n\t\t\t\n\t\t\t\n\t\t\t$subject = sprintf($this->ci->lang->line('auth_activate_subject'), $this->ci->config->item('DX_website_name'));\n\t\t\t$new_user = (array)$row;\n\t\t\t$hash = base64_encode($new_user['email'].'_'.$activation_key);\n\t\t\t$new_user['activate_url'] = site_url($this->ci->config->item('DX_activate_uri').$hash);\n\t\t\t\t\n\t\t\t// Trigger event and get email content\n\t\t\t$this->sending_activation_email($new_user, $message);\n\n\t\t\t// Send email with activation link\n\t\t\t$mailrs = $this->_email($row->email, $from, $subject, $message);\n\t\t\tif($mailrs){\n\t\t\t\treturn 'Activation link sent to your account email';\n\t\t\t} else {\n\t\t\t\treturn 'There is some issue to send email. Please contact to site admin';\n\t\t\t}\n\t\t} else {\n\t\t\treturn 'User with login <strong>'.$login.'</strong> does not exist';\n\t\t}\n\t}", "public function confirmationEmail()\n {\n $email = new Email;\n $email->sendEmail('submitted', 'applicant', Auth::user()->email);\n }", "public function add_welcome_email() {\n $post_exists = post_exists( '[{{{site.name}}}] Welcome!' );\n \n if ( $post_exists != 0 && get_post_status( $post_exists ) == 'publish' )\n return;\n \n // Create post object\n $my_post = array(\n 'post_title' => __( '[{{{site.name}}}] Welcome!', 'buddypress-welcome-email' ),\n 'post_content' => __( 'Welcome to [{{{site.name}}}]!', 'buddypress-welcome-email' ), // HTML email content.\n 'post_excerpt' => __( 'Welcome to [{{{site.name}}}]!', 'buddypress-welcome-email' ), // Plain text email content.\n 'post_status' => 'publish',\n 'post_type' => bp_get_email_post_type() // this is the post type for emails\n );\n \n // Insert the email post into the database\n $post_id = wp_insert_post( $my_post );\n \n if ( $post_id ) {\n // add our email to the taxonomy term 'activation_completed'\n // Email is a custom post type, therefore use wp_set_object_terms\n \n $tt_ids = wp_set_object_terms( $post_id, 'activation_completed', bp_get_email_tax_type() );\n foreach ( $tt_ids as $tt_id ) {\n $term = get_term_by( 'term_taxonomy_id', (int) $tt_id, bp_get_email_tax_type() );\n wp_update_term( (int) $term->term_id, bp_get_email_tax_type(), array(\n 'description' => 'Recipient has successfully activated an account.',\n ) );\n }\n }\n }", "public function sendActivationMail(LEmailAccountActivation $code, LUser $user = null) {\n $this->errorCode = 0;\n $message = new YiiMailMessage();\n if (isset($this->activationMailSubjectCallback))\n $subject = call_user_func($this->activationMailSubjectCallback, $code, $user);\n if (!isset($subject) || !is_string($subject))\n $subject = LilyModule::t('E-mail registration on {siteName}', array('{siteName}' => Yii::app()->name));\n $message->setSubject($subject);\n $message->view = $this->activationMailView;\n if (isset($this->activationMailView))\n $message->setBody(array('code' => $code, 'user' => $user), 'text/html');\n else\n $message->setBody(LilyModule::t('Your email was used in registration on <a href=\"{siteUrl}\">{siteName}</a>.<br />\nTo activate it you have to go by this <a href=\"{activationUrl}\">link</a></li> in your browser. <br />\nIf you haven\\'t entered this email on {siteName}, than just ignore this message.<br />\n<br />\nYours respectfully,<br />\nadministration of {siteName}.', array('{siteUrl}' => Yii::app()->createAbsoluteUrl(Yii::app()->homeUrl), '{siteName}' => Yii::app()->name,\n '{activationUrl}' => Yii::app()->createAbsoluteUrl('/'.LilyModule::route('user/activate'), array('code' => $code->code)))), 'text/html');\n $message->addTo($code->email);\n $message->from = $this->adminEmail;\n $recipient_count = Yii::app()->mail->send($message);\n if ($recipient_count > 0)\n Yii::log('E-mail to ' . $code->email . ' was sent.', CLogger::LEVEL_INFO, 'lily');\n else\n Yii::log('Failed sending e-mail to ' . $code->email . '.', CLogger::LEVEL_WARNING, 'lily');\n $this->errorCode = $recipient_count == 0;\n return $recipient_count > 0;\n }", "function send_activation_mail(UsersEntity $user) {\n $to = $user->email;\n $content = $this->view->send_activation_mail($user);\n return $this->MailAPI->send_mail($to,$content['subject'],$content['body']);\n }", "public function user_activation($data) {\n $usersDetails = ClassRegistry::init('User')->find('first', array('conditions' => array('User.id' => $data['user_id'])));\n\n if(isset($data['password']) && !empty($data['password'])) {\n $userPass = $data['password'];\n }\n else{\n $userPass = $usersDetails['UserDetail']['org_password'];\n\t\t\t$sqlN = \"select AES_DECRYPT(org_password, 'secret') as org_password from user_details WHERE user_details.user_id =\".$data['user_id'];\n\n\t\t $dd = ClassRegistry::init('User')->query($sqlN);\n\n\t\t\t$userPass = $dd[0][0]['org_password'];\n\n }\n\n $domain_url = SITEURL;\n\n $endc = safeEncrypt($usersDetails['User']['email']);\n $activation_url = 'users/activate_account/'.$endc;\n\n $emailAddress = $usersDetails['User']['email'];\n $email = new CakeEmail();\n $email->config('Smtp');\n $email->from(array(ADMIN_FROM_EMAIL => MAIL_SITENAME));\n $email->to($emailAddress);\n $email->subject(\"OpusView: Account activation\");\n $email->template('user_activation');\n $email->emailFormat('html');\n $email->viewVars(array('receiver' => $usersDetails['UserDetail']['first_name'] . ' ' . $usersDetails['UserDetail']['last_name'], 'username' => $usersDetails['User']['email'], 'password' => $userPass, 'domain_url' => $domain_url, 'activation_url' => $activation_url));\n $email->send();\n return true;\n }", "function send_again()\n {\n if (!$this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t\t// not logged in or activated\n redirect('/auth/login/');\n\n } else {\n $this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n $data['errors'] = array();\n\n if ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n if (!is_null($data = $this->tank_auth->change_email(\n $this->form_validation->set_value('email')))) {\t\t\t// success\n\n $data['site_name']\t= $this->config->item('website_name', 'tank_auth');\n $data['activation_period'] = $this->config->item('email_activation_expire', 'tank_auth') / 3600;\n\n $this->_send_email('activate', $data['email'], $data);\n\n $this->_show_message(sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\n } else {\n $errors = $this->tank_auth->get_error_message();\n foreach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n }\n }\n $this->load->view('auth/send_again_form', $data);\n }\n }", "private function sendActivationEmail($user, $data)\n\t{\n\t\t$app\t\t= JFactory::getApplication();\n\t\t$config\t\t= JFactory::getConfig();\n\t\t$uparams\t= JComponentHelper::getParams('com_users');\n\t\t$db\t\t\t= JFactory::getDbo();\n\n\t\t$data = array_merge((array)$user->getProperties(), $data);\n\n\t\t$useractivation = $uparams->get('useractivation');\n\n\t\t// Load the users plugin group.\n\t\tJPluginHelper::importPlugin('user');\n\n\t\tif (($useractivation == 1) || ($useractivation == 2)) {\n\t\t\t$params = array();\n\t\t\t$params['activation'] = JApplication::getHash(JUserHelper::genRandomPassword());\n\t\t\t$user->bind($params);\n\t\t\t$userIsSaved = $user->save();\n\t\t}\n\n\t\t// Set up data\n\t\t$data = $user->getProperties();\n\t\t$data['fromname']\t= $config->get('fromname');\n\t\t$data['mailfrom']\t= $config->get('mailfrom');\n\t\t$data['sitename']\t= $config->get('sitename');\n\t\t$data['siteurl']\t= JUri::root();\n\n\t\t// Load com_users translation files\n\t\t$jlang = JFactory::getLanguage();\n\t\t$jlang->load('com_users', JPATH_SITE, 'en-GB', true); // Load English (British)\n\t\t$jlang->load('com_users', JPATH_SITE, $jlang->getDefault(), true); // Load the site's default language\n\t\t$jlang->load('com_users', JPATH_SITE, null, true); // Load the currently selected language\n\n\t\t// Handle account activation/confirmation emails.\n\t\tif ($useractivation == 2)\n\t\t{\n\t\t\t// Set the link to confirm the user email.\n\t\t\t$uri = JURI::getInstance();\n\t\t\t$base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));\n\t\t\t$data['activate'] = $base.JRoute::_('index.php?option=com_users&task=registration.activate&token='.$data['activation'], false);\n\n\t\t\t$emailSubject\t= JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_ACCOUNT_DETAILS',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename']\n\t\t\t);\n\n\t\t\t$emailBody = JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename'],\n\t\t\t\t$data['siteurl'].'index.php?option=com_users&task=registration.activate&token='.$data['activation'],\n\t\t\t\t$data['siteurl'],\n\t\t\t\t$data['username'],\n\t\t\t\t$data['password_clear']\n\t\t\t);\n\t\t}\n\t\telseif ($useractivation == 1)\n\t\t{\n\t\t\t// Set the link to activate the user account.\n\t\t\t$uri = JURI::getInstance();\n\t\t\t$base = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port'));\n\t\t\t$data['activate'] = $base.JRoute::_('index.php?option=com_users&task=registration.activate&token='.$data['activation'], false);\n\n\t\t\t$emailSubject\t= JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_ACCOUNT_DETAILS',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename']\n\t\t\t);\n\n\t\t\t$emailBody = JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename'],\n\t\t\t\t$data['siteurl'].'index.php?option=com_users&task=registration.activate&token='.$data['activation'],\n\t\t\t\t$data['siteurl'],\n\t\t\t\t$data['username'],\n\t\t\t\t$data['password_clear']\n\t\t\t);\n\t\t} else {\n\n\t\t\t$emailSubject\t= JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_ACCOUNT_DETAILS',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename']\n\t\t\t);\n\n\t\t\t$emailBody = JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_REGISTERED_BODY',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename'],\n\t\t\t\t$data['siteurl']\n\t\t\t);\n\t\t}\n\n\t\t// Send the registration email.\n\t\t$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $data['email'], $emailSubject, $emailBody);\n\n\t\t//Send Notification mail to administrators\n\t\tif (($uparams->get('useractivation') < 2) && ($uparams->get('mail_to_admin') == 1)) {\n\t\t\t$emailSubject = JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_ACCOUNT_DETAILS',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['sitename']\n\t\t\t);\n\n\t\t\t$emailBodyAdmin = JText::sprintf(\n\t\t\t\t'COM_USERS_EMAIL_REGISTERED_NOTIFICATION_TO_ADMIN_BODY',\n\t\t\t\t$data['name'],\n\t\t\t\t$data['username'],\n\t\t\t\t$data['siteurl']\n\t\t\t);\n\n\t\t\t// get all admin users\n\t\t\t$query = 'SELECT name, email, sendEmail' .\n\t\t\t\t\t' FROM #__users' .\n\t\t\t\t\t' WHERE sendEmail=1';\n\n\t\t\t$db->setQuery( $query );\n\t\t\t$rows = $db->loadObjectList();\n\n\t\t\t// Send mail to all superadministrators id\n\t\t\tforeach( $rows as $row )\n\t\t\t{\n\t\t\t\t$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $row->email, $emailSubject, $emailBodyAdmin);\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "public function againActivate(Request $request)\n {\n $template_html = 'mail.activate_user';\n\n $template_data = [\n 'url_activate' => url('http://localhost/sms_mkt/activated.php?key=' . encrypt($request->email) . '&user=' . $request->username),\n\n ];\n\n $user = new Users();\n $user->email = $request->email;\n\n Mail::send($template_html, $template_data, function ($msg) use ($user) {\n $msg->subject('ยืนยันตัวตน === Activate');\n $msg->to([$user->email]);\n $msg->from('[email protected]', 'ClickNext');\n });\n return $this->responseRequestSuccess('Success!');\n }", "public function sendActivationMail($user) \n {\n if ($user->status == config('sc.user_status.active')) {\n return 'activated';\n }\n\n $code = $this->generateActivationCode($user);\n try {\n $response = Mail::send('emails.user_verification', \n ['user'=>$user, 'code'=>$code], \n function ($m) use($user, $code) {\n $m->to($user->email, $user->name)->subject('User Verification');\n }\n );\n\n if ($response) {\n return true;\n }\n }\n catch(Exception $e) {\n return SCHelper::getErrorMessage($e);\n }\n return \"Email Error\";\n }", "static private function setAndSendActivationKeyFor($accountId, &$errors) {\r\n\t\t$account = DB::getInstance()->fetchByID('account', $accountId);\r\n\t\t$activationHash = $account['activation_hash'];\r\n\t\t$activationLink = self::getActivationLink($activationHash);\r\n\r\n\t\t$subject = 'Runalyze v'.RUNALYZE_VERSION;\r\n\t\t$message = __('Thanks for your registration').', '.$account['name'].\"!<br><br>\\r\\n\\r\\n\";\r\n\t\t$message .= sprintf( __('You can activate your account (username = %s) with the following link'), $account['username']).\":<br>\\r\\n\";\r\n\t\t$message .= $activationLink;\r\n\r\n\t\tif (!System::sendMail($account['mail'], $subject, $message)) {\r\n\t\t\t$errors[] = __('Sending the link did not work. Please contact the administrator.');\r\n\r\n\t\t\tif (System::isAtLocalhost()) {\r\n\t\t\t\tif ($activationHash == '') {\r\n\t\t\t\t\t$errors[] = __('Your local server has no smtp-server. Your account has been directly activated.');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$errors[] = __('Your local server has no smtp-server. You have to contact the administrator.');\r\n\t\t\t\t\tError::getInstance()->addDebug('Link for activating account: '.$activationLink);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function __sendActivationEmail($user_id) {\n\n\n\n //echo $user_id;echo \"fgfgfgfdgfdgfdgdf</br>\";\n\n\n\n //$user = $this->User->find(array('User.id' => $user_id), array('User.email', 'User.username','User.id'));\n\n\n\n $user = $this->User->find('all', array('conditions' => array('User.id' => $user_id)));\n\n\n\n //echo '<pre>';print_r($user);die();\n\n\n\n $usr = $user[0]['User']['email'];\n\n\n\n //print_r($usr);die();\n\n\n\n $urlm = 'http://netin.crystalbiltech.com/winegarden/users/activate/' . $user_id . '/' . $this->User->getActivationHash();\n\n\n\n\n\n\n\n $this->set('username', $this->data['User']['username']);\n\n\n\n //$user['User']['email'];\n\n\n\n //print_r($abcd123);die();\n\n\n\n App::uses('CakeEmail', 'Network/Email');\n\n\n\n $email = new CakeEmail();\n\n\n\n\n\n\n\n $email->from($usr)\n\n\n\n//->cc(Configure::read('Settings.ADMIN_EMAIL'))\n\n\n\n//->cc('[email protected]')\n\n\n\n ->to($usr)\n\n\n\n ->subject('User Activation')\n\n\n\n ->template('activation')\n\n\n\n ->emailFormat('both')\n\n\n\n ->viewVars(array('ds' => $urlm))\n\n\n\n ->send();\n\n\n\n // return $this->redirect(array('controller' => 'shop', 'action' => 'index'));\n\n\n\n }", "public function sendGlobalUserActivated()\n {\n if ($this->_sendMails) {\n $row = $this->getModel()->getKwfUserRowById($this->id);\n $mail = new Kwf_User_Mail_GlobalUserActivated($row);\n $mail->send();\n $this->writeLog('user_mail_GlobalUserActivation');\n }\n }", "public function actionActivate()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', [\n 'required' => true\n ]);\n $model = $this->findModel($username);\n $model->status = User::STATUS_ACTIVE;\n $model->removeEmailConfirmToken();\n $this->log($model->save());\n }", "public function activate()\n {\n $response = $this->response();\n /* le hash de l'email */\n $emailHash = $this->uri->segment(3);\n /* le log d'activation */\n $logID = $this->uri->segment(4);\n if ($this->oauth_web->activate($emailHash, $logID)) {\n redirect();\n // $response[\"status\"] = true;\n }\n // $this->output->set_output(json_encode($response));\n }", "public static function sendActivationEmail(MapTableContextObject $mapTableContextObject){\n switch($mapTableContextObject->getTable()){\n case 'werock_user_emails':\n\n try {\n\n /** @var MapTableColumnObject $MapTableColumnObjectEmail */\n $MapTableColumnObjectEmail = $mapTableContextObject->getMapTableTableObject()->getColumns()['werock_user_email_value'];\n /** @var MapTableColumnObject $MapTableColumnObjectUserId */\n $MapTableColumnObjectUserId = $mapTableContextObject->getMapTableTableObject()->getColumns()['werock_user_id'];\n\n $UpdatedUser = self::$UserService->getUser((int)$MapTableColumnObjectUserId->getSubmittedValue());\n if (!empty($UpdatedUser)) {\n self::$UserRepository->assignEmail($UpdatedUser, $MapTableColumnObjectEmail->getSubmittedValue());\n CoreNotification::set('Sent confirmation email', CoreNotification::SUCCESS);\n }\n\n } catch(Exception $e){\n CoreNotification::set('Unable to send confirmation email', CoreNotification::ERROR);\n }\n\n break;\n }\n }", "function emailRegistrationAdmin() {\n require_once ('com/tcshl/mail/Mail.php');\n $ManageRegLink = DOMAIN_NAME . '/manageregistrations.php';\n $emailBody = $this->get_fName() . ' ' . $this->get_lName() . ' has just registered for TCSHL league membership. Click on the following link to approve registration: ';\n $emailBody.= $ManageRegLink;\n //$sender,$recipients,$subject,$body\n $Mail = new Mail(REG_EMAIL, REG_EMAIL, REG_EMAIL_SUBJECT, $emailBody);\n $Mail->sendMail();\n }", "public function userActivationMailSend(Request $request)\n {\n $report = [];\n\n $report['senderEmail'] = '[email protected]';\n $report['senderName'] = 'Anonymus User';\n $report['subject'] = 'New user registration';\n $report['emailTo'] = env('ADMIN_MAIL');\n\n $report['name'] = $request->name;\n $report['email'] = $request->email;\n $report['message'] = $request->message;\n\n Mail::to($report['emailTo'])->send(new UserActivation($report));\n\n return redirect()->route('forms.contactform-thankyou');\n }", "function send_again()\n\t{\n\t\tif (!$this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t\t// not logged in or activated\n\t\t\tredirect('/auth/login/');\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email');\n\n\t\t\t$data['errors'] = array();\n\n\t\t\tif ($this->form_validation->run()) {\t\t\t\t\t\t\t\t// validation ok\n\t\t\t\tif (!is_null($data = $this->tank_auth->change_email(\n\t\t\t\t\t\t$this->form_validation->set_value('email')))) {\t\t\t// success\n\n\t\t\t\t\t$data['site_name']\t= config_item('company_name');\n\t\t\t\t\t$data['activation_period'] = config_item('email_activation_expire') / 3600;\n\n\t\t\t\t\t$this->_send_email('activate', $data['email'], $data);\n\t\t\t\t\t$this->session->set_flashdata('message', sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\t\t\t\t\t\tredirect('/auth/login');\n\t\t\t\t\t//$this->_show_message(sprintf($this->lang->line('auth_message_activation_email_sent'), $data['email']));\n\n\t\t\t\t} else {\n\t\t\t\t\t$errors = $this->tank_auth->get_error_message();\n\t\t\t\t\tforeach ($errors as $k => $v)\t$data['errors'][$k] = $this->lang->line($v);\n\t\t\t\t}\n\t\t\t}\n\t$this->load->module('layouts');\n\t$this->load->library('template');\n\t$this->template->title('Send Password - '.config_item('company_name'));\n\t$this->template\n\t->set_layout('login')\n\t->build('auth/send_again_form',isset($data) ? $data : NULL);\n\t\t}\n\t}", "function emailconfirmation(){\n\t\t\trequire( dirname(__FILE__) . '/email-confirmation.php' );\n\t\t}", "function verify_email()\n\t{\n\t\tlog_message('debug', 'Account/verify_email');\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['msg'] = get_session_msg($this);\n\t\tlog_message('debug', 'Account/verify_email:: [1] post='.json_encode($_POST));\n\t\t# skip this step if the user has already verified their email address\n\t\tif($this->native_session->get('__email_verified') && $this->native_session->get('__email_verified') == 'Y'){\n\t\t\tredirect(base_url().'account/login');\n\t\t}\n\n\t\t# otherwise continue here\n\t\tif(!empty($_POST['emailaddress'])){\n\t\t\t$response = $this->_api->post('account/resend_link', array(\n\t\t\t\t'emailAddress'=>$this->native_session->get('__email_address'),\n\t\t\t\t'baseLink'=>base_url()\n\t\t\t));\n\n\t\t\t$data['msg'] = (!empty($response['result']) && $response['result']=='SUCCESS')?'The verification link has been resent':'ERROR: The verification link could not be resent';\n\t\t}\n\n\t\t$data = load_page_labels('sign_up',$data);\n\t\t$this->load->view('account/verify_email', $data);\n\t}", "public function sendEmailVerificationNotification()\n { \n \n $this->notify(new ConfirmEmail); \n \n }", "public function resendActivationEmail()\n {\n $breadCrumb = $this->userEngine\n ->breadcrumbGenerate('resend-activation-email');\n\n return $this->loadPublicView('user.resend-activation-email', $breadCrumb['data']);\n }", "public function ActivateUser()\n {\n if (false === $this->isActivateUserAllowed()) {\n return;\n }\n\n $oMailProfile = TDataMailProfile::GetProfile('new-registration');\n\n if (null === $oMailProfile) {\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $sMessageCode = 'ERROR_ACTIVATE_USER';\n $oMessageManager->AddMessage($sConsumerName, $sMessageCode);\n\n return;\n }\n\n $password = TTools::GenerateNicePassword();\n\n $oMailProfile->AddData('login', $this->oTable->sqlData['login']);\n $oMailProfile->AddData('name', $this->oTable->sqlData['firstname']);\n $oMailProfile->AddData('email', $this->oTable->sqlData['email']);\n $oMailProfile->AddData('password', $password);\n $oMailProfile->ChangeToAddress($this->oTable->sqlData['email'], $this->oTable->sqlData['name']);\n\n $bValidEmail = TTools::IsValidEMail($this->oTable->sqlData['email']);\n $sMessageCode = 'ERROR_ACTIVATE_USER';\n if ($bValidEmail) {\n $oMailProfile->SendUsingObjectView('TDataMailProfile', 'Core');\n\n $filterUtil = $this->getInputFilterUtil();\n $postData = $this->oTable->sqlData;\n foreach ($postData as $key => $value) {\n $valueOfKey = $filterUtil->getFilteredInput($key);\n if (null !== $valueOfKey) {\n $postData[$key] = $valueOfKey;\n }\n }\n\n $postData['crypted_pw'] = $password;\n $postData['crypted_pw_check'] = $password;\n $postData['allow_cms_login'] = '1';\n $this->Save($postData);\n $sMessageCode = 'SUCCESS_ACTIVATE_USER';\n }\n\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $oMessageManager->AddMessage($sConsumerName, $sMessageCode);\n }", "public function initiateEmailActivation(User $user)\n {\n if (! config('settings.activation') || ! $this->validateEmail($user)) {\n return true;\n }\n\n $activationRepostory = new ActivationRepository();\n $activationRepostory->createTokenAndSendEmail($user);\n }", "public function activate(){\r\n\t\t$id = $this->uri->segment(3);\r\n\t\t$code = $this->uri->segment(4);\r\n\r\n\t\t//fetch requests details\r\n\t\t$request = $this->requests_model->getRequestById($id);\r\n \r\n\r\n\t\t//if code matches\r\n\t\tif($request['code'] == $code){\r\n\t\t\t//update user active status\r\n\t\t\t// $data['activate'] = true;\r\n\t\t\t$query = $this->accounts_model->updateActivate($id);\r\n\r\n\t\t\tif($query){\r\n\r\n\t\t\t\t$row = $this->accounts_model->getCheckUser($request['email']);\r\n\r\n\t\t\t\t$this->session->set_userdata('is_user', $row['type']);\r\n\t\t\t\t$this->session->set_userdata('myName', \t$row['firstname'].\" \".$row['lastname']);\r\n\t\t\t\t$this->session->set_userdata('myEmail', $row['email']);\r\n\t\t\t\t$this->session->set_userdata('myId', \t$row['id']);\r\n\t\t\t\t$this->session->set_userdata('myRole', \t$row['role']);\r\n\r\n\t\t\t\t$this->session->set_flashdata('msg', 'User activated successfully');\r\n\t\t\t\tredirect('main');\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t\t$this->session->set_flashdata('error_msg', 'Something went wrong in activating account');\r\n\t\t\t\tredirect('login'); \r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\t\t\t\r\n\t\t\t$this->session->set_flashdata('error_msg', 'Cannot activate account. Code didnt match');\r\n\t\t\tredirect('login'); \r\n\t\t}\r\n \r\n\t}", "function activate($key)\n {\n // activate account\n $result = $this->user_model->activate_account($key);\n \n switch($result)\n {\n case 0: // If activation key not matched with any account\n $msg = 'No account is related with this activation key, either your account is already activated or key is expired !!!'; \n $type = \"danger\";\n break;\n \n case 1: // Account activated\n $msg = 'Congratulations, your account is activated now. Login here';\n $type = \"success\"; \n break;\n \n case 2: // Activation key expired\n $msg = 'Activation key expired, create new account.';\n $type = \"warning\";\n break; \n \n default:\n break;\n \n }\n\n // set notification message to show on page\n $this->base->set_message($msg, $type); \n \n $this->index();\n\n return true;\n }", "public function sendActivationEmail(Affiliate $affiliate): void\n {\n $message = (new TemplatedEmail())\n ->from('[email protected]')\n ->to($affiliate->getEmail())\n ->subject('Affiliate activated')\n ->htmlTemplate('mail/affiliate_activation.html.twig')\n ->context([\n 'token' => $affiliate->getToken()\n ]); \n\n $this->mailer->send($message);\n }", "function activateUser() {\n if (isset($_GET['account'])) {\n $account = htmlspecialchars($_GET['account'], ENT_QUOTES);\n \n connectDatabase();\n \n $result = queryDatabase(\"SELECT email\n FROM user\n WHERE active = 0\");\n\n if (mysql_num_rows($result) > 0){\n while ($row = mysql_fetch_object($result)) {\n if ($account == crypt($row->email, SALT)) {\n queryDatabase(\"UPDATE user SET active = 1\n WHERE email = '$row->email'\");\n \n echo '<div class=\"good\">Activation successful - Login using EMAIL/USER ID and PASSWORD</div>';\n \n break;\n }\n }\n }\n }\n}", "private function emailAtLogin() {}", "function activate($username = false, $verification = false)\n\t{\n\t\tif($username && $verification)\n\t\tif($this->auth->activate(urldecode($username), $verification))\n\t\t{\n\t\t\t$this->_render_page('user/activation', array('success' => true));\n\t\t\treturn;\n\t\t}\n\t\t$this->_render_page('user/activation', array('success' => false));\n\t}", "public function sendRegistrationEmail()\n {\n $loginToken=$this->extractTokenFromCache('login');\n\n $url = url('register/token',$loginToken);\n Mail::to($this)->queue(new RegistrationConfirmationEmail($url));\n }", "public function activationAction()\n {\n View::renderBlade('register/activation');\n }", "public function sendActivationEmail(User $user, $token)\n {\n $urlActivation = Url::toRoute(['auth/activate', 'token' => $token], true);\n\n $message = Yii::$app->mailer->compose('activation', [\n 'user' => $user,\n 'urlActivation' => $urlActivation\n ]);\n $message->setTo([$user->email => $user->name])\n ->setFrom([Yii::$app->params['noReplyEmail'] => Yii::$app->name])\n ->setSubject('User account activation')\n ->setTextBody('Activate your account by visiting url ' . $urlActivation)\n ->send();\n }", "public function resendActivationEmailSuccess()\n {\n return $this->loadPublicView('user.resend-activation-email-success');\n }", "public function activatedAction()\r\n {\r\n View::renderTemplate('Signup/activated.html');\r\n }", "function email_settings_activation_email($url,$user)\n\t{\n return EmailSettings\\CustomEmail::generate(array(\n \t\t\"title-option\" => \"email-settings-activation-email-title\",\n \t\t\"message-option\" => \"email-settings-activation-email-template\",\n \t\t\"variables\" => array(\"%USERNAME%\",\"%EMAIL%\",\"%LINK%\"),\n \t\t\"url\" => $url,\n \t\t\"user\" => $user,\n \t\t\"wp_mail_from\" => \"EmailSettings\\Filters::activation_filter_from_email\",\n \t\t\"wp_mail_from_name\" => \"EmailSettings\\Filters::activation_filter_from_name\",\n \t\t\"fallback_message\" => __(\"Hello, here is your activation link:\").' '. $url\n\t )\n\t );\n\t}", "protected function sendActivationEmail($user) {\n return true;\n }", "public function action_activateaccount()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\tisAllowedTo('moderate_forum');\n\n\t\tif (isset($this->_req->query->save, $this->_profile['is_activated'])\n\t\t\t&& $this->_profile['is_activated'] != 1)\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\n\t\t\t// If we are approving the deletion of an account, we do something special ;)\n\t\t\tif ($this->_profile['is_activated'] == 4)\n\t\t\t{\n\t\t\t\tdeleteMembers($context['id_member']);\n\t\t\t\tredirectexit();\n\t\t\t}\n\n\t\t\t// Actually update this member now, as it guarantees the unapproved count can't get corrupted.\n\t\t\tapproveMembers(array('members' => array($context['id_member']), 'activated_status' => $this->_profile['is_activated']));\n\n\t\t\t// Log what we did?\n\t\t\tlogAction('approve_member', array('member' => $this->_memID), 'admin');\n\n\t\t\t// If we are doing approval, update the stats for the member just in case.\n\t\t\tif (in_array($this->_profile['is_activated'], array(3, 4, 13, 14)))\n\t\t\t{\n\t\t\t\tupdateSettings(array('unapprovedMembers' => ($modSettings['unapprovedMembers'] > 1 ? $modSettings['unapprovedMembers'] - 1 : 0)));\n\t\t\t}\n\n\t\t\t// Make sure we update the stats too.\n\t\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\t\tupdateMemberStats();\n\t\t}\n\n\t\t// Leave it be...\n\t\tredirectexit('action=profile;u=' . $this->_memID . ';area=summary');\n\t}", "public function confirmationAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n \t$userId = $this->getRequest()->getParam('userId');\n $activationKey = $this->getRequest()->getParam(self::ACTIVATION_KEY_PARAMNAME);\n\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if(!$user){\n // No such user\n Globals::getLogger()->registrationError(\"Account activation: user retrieval failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $user->clearCache();\n $user = $this->_getUserFromIdAndKey($userId, $activationKey);\n\n if($user->{User::COLUMN_STATUS} == User::STATUS_PENDING){\n $user->{User::COLUMN_STATUS} = User::STATUS_MEMBER;\n $user->date = date('Y-m-d H:i:s');\n $id = $user->save();\n if($id !== $userId){\n Globals::getLogger()->registrationError(\"Account activation: user save failed - userId=$userId, key=$activationKey\", Zend_Log::INFO );\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::ACTIVATION_FAILED));\n }\n\n $this->view->success = true;\n $this->view->alreadyDone = false;\n \t$this->_savePendingUserIdentity($userId);\n } else {\n $this->view->success = false;\n $this->view->alreadyDone = true;\n }\n }", "function svbk_rcp_email_on_activation( $status, $user_id ) {\n\n\tif( 'active' == $status && get_user_meta( $user_id, '_rcp_new_subscription', true ) ) {\n\n\t\t// Send welcome email.\n\t\tif ( ! svbk_rcp_email_subscription_status( $user_id, 'active' ) ) {\n\t\t\tremove_action( 'rcp_set_status', 'rcp_email_on_activation', 11, 2 );\n\t\t}\n\n\t}\n\n}", "function confirm_email() {\n \n\n $confirm_url = $this->traffic_model->GetAbsoluteURLFolder().'/confirm_register/' . $this->traffic_model->MakeConfirmationMd5();\n \n\n $this->email->from('[email protected]');\n\n $this->email->to($this->input->post('email'));\n $this->email->set_mailtype(\"html\");\n $this->email->subject('Confirm registration');\n $message = \"Hello \" . $this->input->post('username'). \"<br/>\" .\n \"Thanks for your registration with www.satrafficupdates.co.za <br/>\" .\n \"Please click the link below to confirm your registration.<br/>\" .\n \"$confirm_url<br/>\" .\n \"<br/>\" .\n \"Regards,<br/>\" .\n \"Webmaster <br/>\n www.satrafficupdates.co.za\n \";\n $this->email->message($message);\n if ($this->email->send()) {\n echo 'Message was sent';\n //return TRUE;\n } else {\n echo $this->email->print_debugger();\n //return FALSE;\n }\n\n\n\n\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 activateAction()\r\n {\r\n\t\tUser::activate($this->route_params['token']);\r\n\t\t\r\n\t\t$this->user = Auth::getUser();\r\n\r\n $this->redirect('/signup/activated');\r\n }", "function resend_account_activation($sToken) {\n\n\t\t//see if the token is an expired one\n\t\t$aResult = $this->common_model->isValidToken($sToken, 'account_activation');\n\t\t$aTokenStatus = c('token_status');\n\n\t\tif($aResult['status'] == $aTokenStatus['expired']){\n\n\t\t\t$oToken = $aResult['oToken'];\n\t\t\t$oUser = $this->user_model->getUserBy('id', $oToken->user_id);\n\t\t\t//confirmation email to user\n\t\t\t$account_activation_code = $this->common_model->generateToken('account_activation', $oUser->id);\n\t\t\t$arr_email['name']\t\t\t\t= $oUser->first_name . ' ' . $oUser->last_name;\n\t\t\t$arr_email['activation_url']\t= site_url('user/account_activation/'.$account_activation_code);\n\t\t\t$arr_email['help_url']\t\t\t= site_url('help');\n\n\n\t\t\t$this->load->helper('custom_mail');\n\t\t\tif(sendMail($oUser->email_id, $arr_email, 'registration_activation_link')){\n\t\t\t\t$this->session->set_flashdata ('success_message', 'Please Check your email now.');\n\t\t\t}else{\n\t\t\t\t$this->session->set_flashdata ('info_message', 'Confirmation mail is not sent');\n\t\t\t}\n\t\t}\n\n\t\tredirect('home');\n\t}", "private function SendVerificationEmail($email,$activationcode){\n\t\t$this->load->library('email');\n\t \t$this->email->set_mailtype('html');\n\t\t$this->email->from('[email protected]', 'Biva Publication');\n\t\t$this->email->to($email);\n\n\n\t\t$message='<!DOCTYPE html><html><head></head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head><body>';\n\t\t$message.='<p>Dear Reader,</p>';\n\t\t$message.='<p>Thanks for registaring on Biva Publication! Please <strong><a href=\"'.base_url().'home/validate_email/'.$email.'/'.$activationcode.'\">Click Here To Validate Email</a></strong>to active your account, you will be able to log into Biva Publication and manage your ordees.</p>';\n\t\t$message.='<p>Thank You!</p>';\n\t\t$message.='<p>Biva Publication</p>';\n\t\t$message.='</body></html>';\n\n\n\t\t$this->email->subject('Biva Publication Account Verification');\n\t\t$this->email->message($message);\n\n\t\t$this->email->send() or die(\"Message Not Send\");\n\t}", "public function sendVerificationMail()\n {\n\n $this->notify(new VerifyEmail($this));\n\n }", "public function activateUser(string $activationCode)\n {\n try {\n $user = app(User::class)->where('activation_code', $activationCode)->first();\n if (! $user) {\n return 'The code does not exist for any user in our system.';\n }\n $user->status = 1;\n $user->activation_code = null;\n $user->save();\n //auth()->login($user);\n\n // Get welcome message text\n //$locale = App::getLocale();\n $locale = 'en';\n $message = PostTranslation::where('title', 'Welcome email')\n ->where('locale', $locale)\n ->first();\n\n // Send to the user the confirmation about the activation of the account\n $mailDatas = [];\n $mailDatas['senderEmail'] = '[email protected]';\n $mailDatas['senderName'] = 'Global CI - Administrator';\n $mailDatas['subject'] = 'Activation of your Global CI account';\n $mailDatas['emailTo'] = $user->email;\n $mailDatas['name'] = $user->name;\n $mailDatas['body'] = $message->body ?? null;\n\n Mail::to($user->email)->send(new UserActivationConfirmation($mailDatas));\n } catch (\\Exception $exception) {\n logger()->error($exception);\n\n return 'Whoops! something went wrong.';\n }\n\n return redirect()->to('/')->with('message', 'User succesfuly activated');\n }", "public function p_signup() \n {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n $q = 'SELECT user_id\n FROM users \n WHERE email = \"'.$_POST['email'].'\"';\n $user_id = DB::instance(DB_NAME)->select_field($q);\n if ($user_id!=NULL)\n {\n $error=\"User account already exists.\";\n $this->template->content = View::instance('v_users_signup');\n $this->template->content->error=$error;\n echo $this->template;\n }\n else\n {\n\t\t\n //Inserting the user into the database\n\t\t\t$_POST['created']=Time::now();\n\t\t\t$_POST['modified']=Time::now();\n\t\t\t$_POST['password']=sha1(PASSWORD_SALT.$_POST['password']);\n\t\t\t$_POST['token']=sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string());\n\t\t\t$_POST['activation_key']=str_shuffle($_POST['password'].$POST['token']);\n\t\t\t$activation_link=\"http://\".$_SERVER['SERVER_NAME'].\"/users/p_activate/\".$_POST['activation_key'];\n\t\t\t$name=$_POST['first_name'];\n\t\t\t$name.=\" \";\n\t\t\t$name.=$_POST['last_name'];\n\t\t\t$user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\t\t\t\n\t\t//Sending the confirmation mail\n\t\t\t$to[]=Array(\"name\"=>$name, \"email\"=>$_POST['email']);\n\t\t\t$subject=\"Confirmation letter\";\n\t\t\t$from=Array(\"name\"=>APP_NAME, \"email\"=>APP_EMAIL); \n $body = View::instance('signup_email');\n $body->name=$name;\n $body->activation_link=$activation_link;\n\n\n\t\t\t$email = Email::send($to, $from, $subject, $body, false, $cc, $bcc);\n\t\t\t\n\t\t\tRouter::redirect('/');\n } \n }", "public function send_verification_email($email_addr,$username)\n {\n //build config array using premade gmail account\n $config= array(\n 'protocol'=>'smtp',\n 'smtp_host'=>'ssl://smtp.googlemail.com',\n 'smtp_port'=>465,\n 'smtp_user'=>'HIDDEN',\n 'smtp_pass'=>'HIDDEN',\n 'charset' => 'iso-8859-1',\n 'mailtype' => 'html',\n\n );\n\n $this->CI->load->library('email',$config);\n $this->email->CI =& $this;\n\n $this->CI->email->set_newline(\"\\r\\n\");\n\n if(!$code=$this->CI->user_model->read_code($username))\n {\n return FALSE; // if verification code from db cannot be read return false\n }\n\n //build email template and send code as a-link\n $verify_link=\"<a href=\".site_url().'users/validate_user/'.$code.\">Click Here to Validate Account<a/>\";\n $this->CI->email->from('HIDDEN', 'RH FILES');\n $this->CI->email->to($email_addr);\n $this->CI->email->subject('Account Validation');\n $this->CI->email->message('Thanks for taking the time to create an account. \n Please follow the link to validate your account: '.$verify_link);\n \n return $this->CI->email->send();\n }", "public function sendInformationMail(LAccount $account) {\n $this->errorCode = 0;\n $message = new YiiMailMessage();\n if (isset($this->informationMailSubjectCallback))\n $subject = call_user_func($this->informationMailSubjectCallback, $account);\n if (!isset($subject) || !is_string($subject))\n $subject = LilyModule::t('E-mail registration on {siteName}', array('{siteName}' => Yii::app()->name));\n $message->setSubject($subject);\n $message->view = $this->informationMailView;\n if (isset($this->informationMailView))\n $message->setBody(array('account' => $account), 'text/html');\n else\n $message->setBody(LilyModule::t('Your email was successfully registered on <a href=\"{siteUrl}\">{siteName}</a>!', array('{siteUrl}' => Yii::app()->createAbsoluteUrl(Yii::app()->homeUrl), '{siteName}' => Yii::app()->name)), 'text/html');\n $message->addTo($account->id);\n $message->from = $this->adminEmail;\n $recipient_count = Yii::app()->mail->send($message);\n if ($recipient_count > 0)\n Yii::log('E-mail to ' . $account->id . ' was sent.', CLogger::LEVEL_INFO, 'lily');\n else\n Yii::log('Failed to send e-mail to ' . $account->id . '.', CLogger::LEVEL_WARNING, 'lily');\n $this->errorCode = $recipient_count == 0;\n return $recipient_count > 0;\n }", "public function sendEmail()\r\n {\r\n\t\t$mail = new UserMails;\r\n\t\t$mail->sendAdminEmail('admin-user', $this->_user);\r\n }", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "public function send_verification_email($account_id)\n {\n $this->load->helper('url');\n \n // Create a 64 byte random string as a key to activate the account\n $this->db->select('email');\n $this->db->where('id', $account_id);\n $this->db->limit(1);\n $account_email = $this->db->get('accounts')->row()->email;\n\n $verification_code = bin2hex(openssl_random_pseudo_bytes(32));\n $activation_url = site_url() . 'accounts/email_validation/' . $account_id . '_' . $verification_code;\n \n // Store the validation code in the DB\n $this->db->where('id', $account_id);\n $this->db->limit(1);\n $this->db->update('accounts', array('verification_code' => $verification_code));\n\n // Send the email containing the link\n\n $subject = 'Chemistry Fair UI 2016 | Verifikasi alamat email';\n\n $message = '<span style=\"font-family: Verdana\">Kami mendeteksi alamat email anda melakukan proses pendaftaran akun di website kami.';\n $message .= 'Silahkan meng-klik link ini untuk mengaktifkan akun anda. </span>';\n\n $message .= '<a href=' . \"'\" . $activation_url . \"'\" . '>Aktifkan akun Chemistry Fair anda</a>';\n\n $header = \"From:[email protected] \\r\\n\";\n $header .= \"MIME-Version: 1.0\\r\\n\";\n $header .= \"Content-type: text/html\\r\\n\";\n\n return mail($account_email, $subject, $message, $header) ? true : false;\n }", "public function doSignup(Request $request)\n {\n \t# receive request \n \t$name = $request->name;\n \t$email = $request->email;\n \t$pass = $request->pass;\n\n // encrypt password\n $pass = bcrypt($pass);\n\n \t// check if users already exits \n \t$already_email_exits = Client::where('email', $email)->first();\n \tif($already_email_exits !== null){\n \t\t$data = array(\n \t\t\t'status' => 'error',\n \t\t\t'message' => 'This email already exits !'\n \t\t);\n \t}else{\n \t // check if users already exits \n \t $already_user_exits = Client::where('name', $name)->first();\n\n // check if users already exits \n $already_user_exits = Client::where('name', $name)->first();\n\n if($already_user_exits == null){\n\n // now save users information and create a local wallet\n $clients = New Client();\n $clients->name = $name;\n $clients->email = $email;\n $clients->password = $pass;\n $clients->save();\n\n // Send activation email \n $token = rand(000, 999).'-'.rand(222, 888);\n $status = 'inactive';\n\n // save information\n $find_id = Client::where('email', $email)->first();\n $user_id = $find_id->id;\n\n // updated activation\n $activation = new Activation();\n $activation->user_id = $user_id;\n $activation->status = $status;\n $activation->token = $token;\n $activation->save();\n\n // fetch activation\n $active_details = Activation::where('user_id', $user_id)->first();\n $data = array(\n 'id' => $active_details->id,\n 'name' => $name,\n 'token' => $active_details->token\n );\n\n // Fire a mail\n // send User an Email\n \\Mail::to($email)->send(new AccountActivation($data));\n\n\n // send clients a signup successfull messages\n $data = array(\n 'status' => 'success',\n 'message' => 'Registration successfull !, A confirmation link has been sent to '.$email\n );\n }else{\n\n $data = array(\n 'status' => 'error',\n 'message' => 'This user already exits !'\n );\n }\n }\n\n // check for response\n return response()->json($data);\n }", "function sendMail($email,$id,$username,$x){\n\t$to=addslashes($email);\n\t$subject=\"BIT UnOfficial : Activate your account\";\n\t$message=\"\n\t<html>\n\t<head>\n\t\t<style>\n\t\t*{\n\t\t\twidth:90%;\n\t\t\t\n\t\t}\n\t\th2{\n\t\t\tbackground:#0F1A22;\n\t\t\tcolor:#fff;\n\t\t\tpadding:10px;\n\t\t\tfont-weight:400;\n\t\t}\n\t\tp{\n\t\t\tbackground:#FFF4DA;\n\t\t\tpadding:10px;\n\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t<h2>Welcome to BIT UnOfficial</h2>\n\t<h3>Hello $username, you are just one step away from activating your account</h3>\n\t<p>\n\t\t<b>Account information </b><br><br>\n\t\tEmail ID: $email<br>\n\t\tTo get your account up and running <a href=\\\"http://BITUnOfficial.com/loginSys/verifyAccount.php?verifyFor=$id&rand=$x\\\">\n\t\tclick on this link.</a><br><br>\n\t\tLog in any time to BITUnOfficial to be a part of our wonderful community.\n <br>\n\t\t<b>In case you can not see the above link, copy and paste the text below onto your browser's address bar.</b>\n\t\thttp://BITUnOfficial.com/loginSys/verifyAccount.php?verifyFor=$id&rand=$x\n\t</p>\t\n\t<hr>\n\t<h6>If you are not $username please ignore this email</h6> \n\t</body>\n\t</html>\";\n $message= wordwrap($message,67,\"\\r\\n\");\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t$headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\n\t$headers .= 'To: '.$to. \"\\r\\n\";\n\t$headers .= 'From: Account Activation <[email protected]>' . \"\\r\\n\";\n\tif(mail($to,$subject,$message,$headers))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "protected function notify(User $user){\n// '<a href=\"'.action('ProfileController@getActivate', $user->activation_code).'\">Activate My Email</a>';\n// //$msgBody = 'Your activation code is '.$user->phoneActivationCode;\n// $msgBody = 'Thank you for registering with our consultation services,\\nAn activation email has been sent to your mail, please activate it in order to access your account.';\n $emailData= [\n 'name'=>$user->name,\n 'link'=>action('UserController@getActivate', $user->activation_code)\n ];\n SharedFunctions::sendEmailTo('emails.welcome', $user->email,\n 'Register mail', $emailData);\n //SharedFunctions::sendSMS($user->phone, $msgBody);\n }", "public function activateAccount($email){\n try{\n\n Mage::log(\"Trying to create new User Account with params: \" . print_r($email, 1));\n\n $response = $this->setUnauthorizedRequest()\n ->postMethod(\n $this->getRouteApiUrl(self::API_ENDPOINT_ACTIVATE_ACCOUNT),\n Mage::helper('core')->jsonEncode(['email' => $email])\n )\n ->execute([parent::CREATED_HTTP_CODE, parent::SUCCESS_HTTP_CODE]);\n\n if($this->hasFailed()) {\n Mage::log(\"User account activation has failed\" . print_r($this->getInfo(),1));\n } else {\n Mage::log(\"Successfully user account activation.\");\n }\n return $response;\n\n }catch (Exception $e){\n Mage::log(\"User account activation has failed reason: \" . $e->getMessage());\n Mage::logException($e);\n return false;\n }\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AffiliateVerifyEmail);\n }", "public function activate(Request $request){\n $token = $request->get(\"token\", '');\n\n if ($token==\"default\") {\n $content['error'] = \"Please activate your account\";\n }\n elseif (!$this->activationTokenModel->activate($token)) {\n if ($this->activationTokenModel->hasError()) {\n $content['error'] = $this->activationTokenModel->errorToString();\n } else {\n $content['error'] = \"An unknown error prevented us from continue\";\n }\n } else {\n $acc = new AccountModel();\n $acc->redirectToLobby();\n }\n return $this->render($request, $content);\n }", "function accountEmail()\n {\n // Fetch the shop account handler\n $accountHandler = eZShopAccountHandler::instance();\n\n return $accountHandler->email( $this );\n }", "public function sendEmailVerificationNotification();", "protected function activation(Request $request) {\n $activationToken = $request->route('activation_token');\n $userCount = DB::table('users')->where([['verification_token', $activationToken], ['verified', 'false']])->count();\n if($userCount > 0) {\n\n /* Querying the user table by passing Email verification token */\n $user = DB::table('users')->where([['verification_token', $activationToken], ['verified', 'false']])->first();\n\n $returnData['user'] = $user;\n $returnData['activation_token'] = $activationToken;\n\n return view('user_activation',['dataArray' => $returnData]);\n\n } else {\n return redirect('login')->with('error', 'Looks like the activation link is expired or not valid.');\n }\n }" ]
[ "0.8181327", "0.7780875", "0.77540654", "0.7601788", "0.74485546", "0.7391282", "0.73153704", "0.7304696", "0.7281379", "0.72643083", "0.7253234", "0.72407913", "0.72331643", "0.71049964", "0.7066964", "0.70362884", "0.70265144", "0.7022141", "0.69720453", "0.6970183", "0.6953797", "0.69492674", "0.69306535", "0.68824", "0.68643326", "0.6861632", "0.68610716", "0.685294", "0.67929745", "0.67682815", "0.6759784", "0.67536724", "0.67503715", "0.6715432", "0.6711273", "0.66815805", "0.6679553", "0.6676709", "0.66324574", "0.6625667", "0.661832", "0.65959644", "0.65710413", "0.6552289", "0.6547852", "0.65310985", "0.65220046", "0.6434315", "0.6433085", "0.6415922", "0.64120543", "0.64117277", "0.6406764", "0.64043796", "0.64010406", "0.63881034", "0.6376187", "0.6375848", "0.6369035", "0.6332475", "0.63312066", "0.6316509", "0.6309961", "0.63069314", "0.62849027", "0.62765247", "0.6274516", "0.6271883", "0.6266728", "0.6236316", "0.6231802", "0.6224613", "0.62244284", "0.6223092", "0.6219869", "0.6213846", "0.6208797", "0.620644", "0.6203829", "0.6194818", "0.61843246", "0.6183643", "0.6181639", "0.6172761", "0.6166273", "0.6154193", "0.6132003", "0.6129879", "0.61269885", "0.6124435", "0.61240995", "0.6122494", "0.6110103", "0.61083925", "0.61083114", "0.61019856", "0.6096976", "0.60964435", "0.6085308", "0.6083328", "0.6080236" ]
0.0
-1
Get all events grouped by year from the main site.
public function get_events_by_year() { switch_to_blog( get_network()->site_id ); $years = array(); foreach ($this->get_events() as $event) { $start = get_field( 'event_start', $event->ID ); if ( $start ) { $year = date( 'Y', strtotime( $start ) ); $years[ $year ][] = $event; } } restore_current_blog(); return $years; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getYearsOfEvents()\n {\n $qb = $this->entityManager->getRepository('Event\\Entity\\Event')\n ->createQueryBuilder('e')\n ->select('YEAR(e.eventStartDate) AS eYear')\n ->where('e.deleted = 0')\n ->groupBy('eYear')\n ->orderBy('eYear', 'DESC');\n\n $query = $qb->getQuery();\n $result = $query->getResult();\n return $result;\n }", "public function year($year = null)\n {\n return \\App\\Event::with('venue.city.states')\n ->whereYear('start_date', $year)\n ->orderby('start_date', 'asc')\n ->paginate($this->paginate);\n }", "public function get_timeline_events() {\r\n\t\t$contents[] = $this->get_content_posts();\r\n\t\t$contents[] = $this->get_content_tweets();\r\n\t\t$contents[] = $this->get_content_stories();\r\n\t\t\r\n\t\t$events = array();\r\n\t\t\r\n\t\t// Process each of the contents we have attempted to grab and combine them as events by year.\r\n\t\tforeach( $contents as $content ) {\r\n\t\t\tif( is_array ( $content ) ) {\r\n\t\t\t\tforeach ( $content as $date_group => $values ) {\r\n\t\t\t\t\tif( empty( $events[$date_group] ) || !isset( $events[$date_group] ) ) {\r\n\t\t\t\t\t\t$events[$date_group] = $values;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t$events[$date_group] = array_merge( $events[$date_group], $values);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tforeach( $events as $year=>&$event ) {\r\n\t\t\tusort( $event, array( &$this, 'sort_events_by_date' ) );\r\n\t\t}\r\n\t\t\r\n\t\tuksort( &$events, array( &$this, 'sort_date_groups' ) );\r\n\r\n\t\treturn $events;\r\n\t}", "public function getEventsYear(App\\Request $request)\n\t{\n\t\t$record = Vtiger_Calendar_Model::getInstance($request->getModule());\n\t\t$record->set('user', $request->getArray('user', 'Alnum'));\n\t\t$record->set('time', $request->isEmpty('time') ? '' : $request->getByType('time'));\n\t\tif ($request->has('start') && $request->has('end')) {\n\t\t\t$record->set('start', $request->getByType('start', 'DateInUserFormat'));\n\t\t\t$record->set('end', $request->getByType('end', 'DateInUserFormat'));\n\t\t}\n\t\tif ($request->has('filters')) {\n\t\t\t$record->set('filters', $request->getByType('filters', 'Alnum'));\n\t\t}\n\t\tif ($request->has('cvid')) {\n\t\t\t$record->set('customFilter', $request->getInteger('cvid'));\n\t\t}\n\t\t$entity = array_merge($record->getEntityYearCount(), $record->getPublicHolidays());\n\t\t$response = new Vtiger_Response();\n\t\t$response->setResult($entity);\n\t\t$response->emit();\n\t}", "function get_all_by_key_by_year() {\t\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_set_form_g_and_o\n\t\t\t\tWHERE sfg_pos_id = ? AND sfg_pay_id = ?\";\n\t\t$query = $this->db->query($sql, array($this->sfg_pos_id, $this->sfg_pay_id));\n\t\treturn $query;\n\t}", "public function getEventsYear(App\\Request $request)\n\t{\n\t\t$record = Calendar_Calendar_Model::getCleanInstance();\n\t\t$record->set('user', $request->getArray('user', 'Alnum'));\n\t\t$record->set('time', $request->getByType('time'));\n\t\tif ($request->has('start') && $request->has('end')) {\n\t\t\t$record->set('start', $request->getByType('start', 'DateInUserFormat'));\n\t\t\t$record->set('end', $request->getByType('end', 'DateInUserFormat'));\n\t\t}\n\t\tif ($request->has('filters')) {\n\t\t\t$record->set('filters', $request->getByType('filters', 'Alnum'));\n\t\t}\n\t\tif ($request->has('cvid')) {\n\t\t\t$record->set('customFilter', $request->getInteger('cvid'));\n\t\t}\n\t\t$entity = array_merge($record->getEntityYearCount(), $record->getPublicHolidays());\n\t\t$response = new Vtiger_Response();\n\t\t$response->setResult($entity);\n\t\t$response->emit();\n\t}", "function findEvents($url=array()) {\n\t\t$events = $this->find('all',array('conditions'=>array('YEAR(date)='.$url['year'].' AND MONTH(date)='.$url['month']),'recursive'=>2));\n\t\tif ($url['tag'] != 'all') {\n\t\t\t$events = $this->findEventsByTag($events,$url['tag']);\n\t\t}\n\t\t\n\t\tif ($url['calendar'] != 'all' && $url['tag'] == 'all') {\n\t\t\t$events = $this->findEventsByCalendar($events,$url['calendar']);\n\t\t}\n\t\treturn $events;\n\t}", "public function eventsAction()\n {\n $year = $this->params()->fromQuery('year', date('Y'));\n $container = $this->getEvent()->getApplication()->getServiceManager();\n $adapter = $container->get('Application\\Service\\Adapter');\n $sql = \"SELECT * FROM events WHERE event_date LIKE ? ORDER BY event_date\";\n $events = $adapter->query($sql, Adapter::QUERY_MODE_PREPARE);\n $events->execute([$year . '%']);\n return new ViewModel(['events' => $events, 'year' => $year]);\n }", "function getMediaYears($date)\n{\n $sql = \"SELECT media_year,media_year_start,media_year_end from media_calendar where media_year <= YEAR('\" . $date . \"') GROUP by media_year ORDER BY media_year DESC\";\n $result = getResult($sql);\n return $result;\n}", "function events($year, $month)\n {\n $cursor = '';\n $events = array();\n\n // Tadpoles returns events spread across multiple pages of data.\n // Keep grabbing the next page until we've exhausted all available events.\n do {\n $month = str_pad($month, 2, '0', STR_PAD_LEFT);\n\n $last_day = date('t', strtotime(\"$year-$month-01\"));\n $last_day = str_pad($last_day, 2, '0', STR_PAD_LEFT);\n\n $earliest_ts = strtotime(\"$year-$month-01 00:00:00\");\n $latest_ts = strtotime(\"$year-$month-$last_day 23:59:59\");\n\n $params = array('num_events' => '100', 'state' => 'client', 'direction' => 'range', 'earliest_event_time' => $earliest_ts, 'latest_event_time' => $latest_ts, 'cursor' => $cursor);\n $jsonStr = curl('https://www.tadpoles.com/remote/v1/events?' . http_build_query($params));\n $json = json_decode($jsonStr);\n\n $events = array_merge($events, $json->events);\n $cursor = $json->cursor;\n } while(isset($json->cursor) && strlen($json->cursor) > 0);\n\n return $events;\n }", "function get_all_by_key_by_year(){\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_set_form_attitude\n\t\t\t\tWHERE sft_pos_id = ? AND sft_pay_id = ?\";\n $query = $this->db->query($sql, array($this->sft_pos_id, $this->sft_pay_id));\n\t\treturn $query;\n\n\t}", "public function year_list()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\t'name' => 'date_range_start',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'date',\n\t\t\t\t\t'default' => 'year-01-01'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'date_range_end',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'date'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'limit',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'default' => 100\n\t\t\t\t\t)\n\t\t\t);\n\n//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t$today = $this->CDT->date_array();\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->CDT->set_default($this->CDT->datetime_array());\n\t\tif ($this->P->value('date_range_end') === FALSE)\n\t\t{\n\t\t\t$this->P->set('date_range_end', $this->CDT->add_year($this->P->value('limit')));\n\t\t\t$this->CDT->reset();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->P->set('limit', 9999);\n\t\t}\n\n\t\t$dir = ($this->P->value('date_range_end', 'ymd') > $this->P->value('date_range_start', 'ymd')) ? 1 : -1;\n\t\t$output = '';\n\t\t$count = 0;\n\n//ee()->TMPL->log_item('Calendar: Looping');\n\n\t\tdo {\n\t\t\t$vars['conditional']\t= array\t(\t'is_current_year'\t\t=>\t($this->CDT->year == $today['year']) ? TRUE : FALSE,\n\t\t\t\t\t\t\t\t\t\t\t\t'is_not_current_year'\t=>\t($this->CDT->year == $today['year']) ? FALSE : TRUE\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t$vars['single']\t= array('year'\t=> $this->CDT->year);\n\t\t\t$vars['date']\t= array(\n\t\t\t\t'year'\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t'date'\t\t=> $this->CDT->datetime_array(),\n\t\t\t);\n\t\t\t$output .= $this->swap_vars($vars, ee()->TMPL->tagdata);\n\t\t\t$this->CDT->add_year($dir);\n\t\t\t$count++;\n\t\t} while ($count < $this->P->value('limit') AND $this->CDT->year < $this->P->value('date_range_end', 'year'));\n\n\t\treturn $output;\n\t}", "function get_entries_records_for_year($entries, $year, $boundle)\n{\n $dates = get_year_dates($year);\n // Setting the start date is the first day of the selected year.\n $start_date = $dates['start_date'];\n // Setting the end date is the last day of the selected year.\n $end_date = $dates['end_date'];\n\n $entries_records = [];\n if (isset($entries)) {\n foreach ($entries as $entry) {\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'entry_month_record')\n ->entityCondition('bundle', $boundle)\n ->fieldCondition('field_entry', 'target_id', $entry, '=')\n ->fieldCondition('field_entry_date', 'value', $start_date, '>=')\n ->fieldCondition('field_entry_date', 'value', $end_date, '<=')\n ->fieldOrderBy('field_entry_date', 'value')\n ->addMetaData('account', user_load(1));\n\n $records = $query->execute();\n\n if (!empty($records)) {\n $records_ids = array_keys($records['entry_month_record']);\n\n // Adding each records for an entry in the array of entry id.\n $entries_records[$entry] = $records_ids;\n }\n }\n }\n\n return $entries_records;\n}", "public function findAllYears()\n {\n $query = 'SELECT DISTINCT t.year FROM ApiTracklistBundle:Track t ORDER BY t.year DESC';\n\n return $this->getEntityManager()\n ->createQuery($query)\n ->getResult();\n }", "public function groupMatchesByYear()\n {\n $matches = $this->matchService->groupMatchesByYear();\n return response()->json(['message' => 'Retrieved Successfully', 'data' => $matches], Response::HTTP_OK);\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}", "function this_year()\n{\n global $db; // golbalize db variable:\n $thisYear = date('Y') . '-01-01';\n $nextYear = ((int) date('Y') + 1) . '-01-01';\n $datesIds = $db->getMany(DATES, [\n 'date' => $thisYear,\n 'dates.date' => $nextYear,\n ], ['id', 'date'], ['date' => '>=', 'dates.date' => '<=']);\n if ($db->count > 0) {\n return $datesIds;\n }\n}", "function icalendar_get_events( $url = '', $count = 5 ) {\n\t// Find your calendar's address http://support.google.com/calendar/bin/answer.py?hl=en&answer=37103\n\t$ical = new iCalendarReader();\n\treturn $ical->get_events( $url, $count );\n}", "public static function getHolidaysInYear($year) {\n $criteria = new CDbCriteria();\n $criteria->addCondition('YEAR(t.date) = ' . $year);\n $models = self::model()->findAll($criteria);\n $aRetVal = [];\n foreach ($models as $model) {\n // Check if plan was approved\n $plan = HrHolidayPlans::model()->findByPk($year);\n if ($plan && $plan->isApproved()) {\n $aRetVal[$model->date] = $model->date;\n }\n }\n \n return $aRetVal;\n }", "function GetYearList() {\n\t\t$companyid = $this->companyID;\n\t\t$emp_seqno = $this->empSeqNo;\n\t\t$sql_string = <<<_YearHolidayList_\n\t\t\t\tselect my_year as year1,\n\t\t\t\t\t my_year as year2\n\t\t\t\t from ehr_year_holiday_v\n\t\t\t\t where company_id = '$companyid'\n and emp_seq_no = '$emp_seqno'\n\t\t\t\t group by my_year\n\t\t\t\t order by my_year desc\n_YearHolidayList_;\n\t\treturn $this->DBConn->GetArray($sql_string);\n\t}", "public function getAllYears()\n\t{\n\t\treturn array_map(function ($election) {\n\t\t\t/** @var Election $election */\n\t\t\treturn date('Y', $election->getDate()->getTimestamp());\n\t\t}, $this->getAll());\n\t}", "function get_flat_entries_records_for_year($entries, $year, $bundle)\n{\n\n $dates = get_year_dates($year);\n // Setting the start date is the first day of the selected year.\n $start_date = $dates['start_date'];\n // Setting the end date is the last day of the selected year.\n $end_date = $dates['end_date'];\n\n if (!empty($entries)) {\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'entry_month_record')\n ->entityCondition('bundle', $bundle)\n ->fieldCondition('field_entry', 'target_id', $entries, 'IN')\n ->fieldCondition('field_entry_date', 'value', $start_date, '>=')\n ->fieldCondition('field_entry_date', 'value', $end_date, '<=')\n ->fieldOrderBy('field_entry_date', 'value')\n ->addMetaData('account', user_load(1));\n $records = $query->execute();\n if (!empty($records)) {\n $records_ids = array_keys($records['entry_month_record']);\n // Adding each records for an entry in the array of entry id.\n }\n } else {\n return [];\n }\n\n return $records_ids;\n}", "function get_squarecandy_events_year_nav() {\n\tif ( wp_date( 'Y' ) === get_transient( 'squarecandy_events_year_archive_update' ) ) {\n\t\treturn false;\n\t}\n\n\t// needs updating\n\tupdate_squarecandy_archive_year_list();\n\n}", "public function fetchYears()\n\t{\n\t\treturn $this->dibi->fetchAll('\n\t\t\tSELECT\n\t\t\t\tyear\n\t\t\tFROM\n\t\t\t\tjournal\n\t\t\tGROUP BY\n\t\t\t\tyear\n\t\t\tORDER BY\n\t\t\t\tyear\t\t\n\t\t');\n\t\t\t\n\t}", "public function getAllSaintsDay($year)\n {\n $date = new \\DateTime($year.'-10-31');\n for ($i = 0; $i < 7; $i++) {\n if ($date->format('w') == 6) {\n break;\n }\n $date->add(new \\DateInterval('P1D'));\n }\n\n return $date;\n }", "function GetEventList($year=NULL, $month=NULL, $day=NULL, $forward=0, $customerid=0, $userid=0, $type = 0, $privacy = 0, $closed = '') {\n\tglobal $AUTH;\n\n\t$DB = LMSDB::getInstance();\n\n\t$t = time();\n\n\tif(!$year) $year = date('Y', $t);\n\tif(!$month) $month = date('n', $t);\n\tif(!$day) $day = date('j', $t);\n\n\tunset($t);\n\n\tswitch ($privacy) {\n\t\tcase 0:\n\t\t\t$privacy_condition = '(private = 0 OR (private = 1 AND userid = ' . intval(Auth::GetCurrentUser()) . '))';\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\t$privacy_condition = 'private = 0';\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$privacy_condition = 'private = 1 AND userid = ' . intval(Auth::GetCurrentUser());\n\t\t\tbreak;\n\t}\n\n\t$startdate = mktime(0,0,0, $month, $day, $year);\n\t$enddate = mktime(0,0,0, $month, $day+$forward, $year);\n\n\tif(!isset($userid) && empty($userid))\n\t\t$userfilter = '';\n\telse\n\t{\n\t\tif(is_array($userid))\n\t\t{\n\t\t\t$userfilter = ' AND EXISTS ( SELECT 1 FROM eventassignments WHERE eventid = events.id AND userid IN ('.implode(',', $userid).'))';\n\t\t\tif(in_array('-1', $userid))\n\t\t\t\t$userfilter = ' AND NOT EXISTS (SELECT 1 FROM eventassignments WHERE eventid = events.id)';\n\t\t}\n\t}\n\n\t$list = $DB->GetAll(\n\t\t'SELECT events.id AS id, title, note, description, date, begintime, enddate, endtime, customerid, closed, events.type, '\n\t\t.$DB->Concat('UPPER(c.lastname)',\"' '\",'c.name').' AS customername,\n\t\tuserid, vusers.name AS username, '.$DB->Concat('c.city',\"', '\",'c.address').' AS customerlocation,\n\t\tevents.address_id, va.location, nodeid, vn.location AS nodelocation, ticketid\n\t\tFROM events\n\t\tLEFT JOIN vaddresses va ON va.id = events.address_id\n\t\tLEFT JOIN vnodes as vn ON (nodeid = vn.id)\n\t\tLEFT JOIN customerview c ON (customerid = c.id)\n\t\tLEFT JOIN vusers ON (userid = vusers.id)\n\t\tWHERE ((date >= ? AND date < ?) OR (enddate <> 0 AND date < ? AND enddate >= ?)) AND ' . $privacy_condition\n\t\t.($customerid ? ' AND customerid = '.intval($customerid) : '')\n\t\t. $userfilter\n\t\t. (!empty($type) ? ' AND events.type ' . (is_array($type) ? 'IN (' . implode(',', array_filter($type, 'intval')) . ')' : '=' . intval($type)) : '')\n\t\t. ($closed != '' ? ' AND closed = ' . intval($closed) : '')\n\t\t.' ORDER BY date, begintime',\n\t\t array($startdate, $enddate, $enddate, $startdate, Auth::GetCurrentUser()));\n\n\t$list2 = array();\n\tif ($list)\n\t\tforeach ($list as $idx => $row) {\n\t\t\t$row['userlist'] = $DB->GetAll('SELECT userid AS id, vusers.name\n\t\t\t\t\tFROM eventassignments, vusers\n\t\t\t\t\tWHERE userid = vusers.id AND eventid = ? ',\n\t\t\t\t\tarray($row['id']));\n\t\t\t$endtime = $row['endtime'];\n\t\t\tif ($row['enddate'] && $row['enddate'] - $row['date']) {\n\t\t\t\t$days = round(($row['enddate'] - $row['date']) / 86400);\n\t\t\t\t$row['enddate'] = $row['date'] + 86400;\n\t\t\t\t$row['endtime'] = 0;\n\t\t\t\t$dst = date('I', $row['date']);\n\t\t\t\t$list2[] = $row;\n\t\t\t\twhile ($days) {\n\t\t\t\t\tif ($days == 1)\n\t\t\t\t\t\t$row['endtime'] = $endtime;\n\t\t\t\t\t$row['date'] += 86400;\n\t\t\t\t\t$newdst = date('I', $row['date']);\n\t\t\t\t\tif ($newdst != $dst) {\n\t\t\t\t\t\tif ($newdst < $dst)\n\t\t\t\t\t\t\t$row['date'] += 3600;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$row['date'] -= 3600;\n\t\t\t\t\t\t$newdst = date('I', $row['date']);\n\t\t\t\t\t}\n\t\t\t\t\tlist ($year, $month, $day) = explode('/', date('Y/n/j', $row['date']));\n\t\t\t\t\t$row['date'] = mktime(0, 0, 0, $month, $day, $year);\n\t\t\t\t\t$row['enddate'] = $row['date'] + 86400;\n\t\t\t\t\tif ($days > 1 || $endtime)\n\t\t\t\t\t\t$list2[] = $row;\n\t\t\t\t\t$days--;\n\t\t\t\t\t$dst = $newdst;\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\t$list2[] = $row;\n\t\t}\n\n\treturn $list2;\n}", "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 function index_should_return_a_collection_of_records()\r\n {\r\n // by year collection\r\n $this->get('/holidays/us/2018/');\r\n $body = json_decode($this->response->getContent(), true );\r\n $this->assertArrayHasKey('holidays', $body);\r\n $this->assertCount(47, $body['holidays']);\r\n $this->assertArrayHasKey('2018-02-19', $body['holidays']);\r\n\r\n $arr= $body['holidays']['2018-02-19'];\r\n $this->assertCount(1, $arr);\r\n $this->assertEquals( $arr[0]['name'], 'Washington\\'s Birthday');\r\n $this->assertEquals( $arr[0]['country'], 'us');\r\n $this->assertEquals( $arr[0]['date'], '2018-02-19');\r\n $this->assertEquals( $arr[0]['public'], '0');\r\n\r\n ///////////////////////////////\r\n // public\r\n $this->get('/holidays/us/2018/?public=1');\r\n $body = json_decode($this->response->getContent(), true );\r\n $this->assertArrayHasKey('holidays', $body);\r\n $this->assertCount(7, $body['holidays']);\r\n $this->assertArrayHasKey('2018-01-01', $body['holidays']);\r\n\r\n $arr= $body['holidays']['2018-01-01'];\r\n $this->assertCount(2, $arr);\r\n $this->assertEquals( $arr[1]['name'], 'New Year\\'s Day');\r\n $this->assertEquals( $arr[1]['country'], 'us');\r\n $this->assertEquals( $arr[1]['date'], '2018-01-01');\r\n $this->assertEquals( $arr[1]['public'], '1');\r\n\r\n ///////////////////////\r\n // month\r\n $this->get('/holidays/us/2018/?month=3')\r\n ->seeJson( [\r\n 'status'=> 200,\r\n 'message'=>'succeeded with content',\r\n 'holidays'=>[\r\n [\r\n 'name'=>'International Women\\'s Day',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-08',\r\n 'public'=> 0\r\n ],\r\n [\r\n 'name'=>'Saint Patrick\\'s Day',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-17',\r\n 'public'=> 0\r\n ],\r\n [\r\n 'name'=>'Palm Sunday',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-25',\r\n 'public'=> 0\r\n ],\r\n [\r\n 'name'=>'Good Friday',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-30',\r\n 'public'=> 1\r\n ]\r\n ]\r\n ] );\r\n }", "private function _get_calendar_array()\n\t{\n\t $this->all_events = $this->result->xpath(\".//event\");\n\t \n\t foreach($this->all_events as $an_event):\n\t $start_at = $an_event->xpath(\"./start-at\");\n \t $start_at = $start_at[0];\n \t $end_at = $an_event->xpath(\"./end-at\");\n \t $end_at = $end_at[0];\n \t \n \t $start_at = new DateTime($start_at);\n \t $start_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $start_at->setTime(0, 0, 0);\n \t $end_at = new DateTime($end_at);\n \t $end_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $end_at->setTime(0, 0, 0);\n \t \n \t $start_timestamp = strtotime($start_at->format('Y-m-d'));\n $end_timestamp = strtotime($end_at->format('Y-m-d'));\n \n $start_year = date(\"Y\", $start_timestamp);\n $end_year = date(\"Y\", $end_timestamp);\n $start_month = date(\"m\", $start_timestamp);\n $end_month = date(\"m\", $end_timestamp);\n $start_day = date(\"d\", $start_timestamp);\n $start_day = $start_day + 1;\n $end_day = date(\"d\", $end_timestamp);\n $end_day = $end_day + 1;\n \n if(($start_year == $this->year && $start_month == $this->month) || ($end_year == $this->year && $end_month == $this->month)):\n if($start_year == $end_year):\n if($start_month == $end_month):\n $this->_calendar_array_one($start_day, $end_day);\n else:\n if($end_month != $this->month):\n $this->_calendar_array_two($start_day);\n else:\n $this->_calendar_array_three($end_day);\n endif;\n endif;\n endif;\n endif;\n endforeach;\n \n\t foreach($this->callinks as $callinks):\n\t foreach($callinks as $key => $value):\n\t $this->combined_callinks[\"$key\"] = $value;\n\t endforeach;\n\t endforeach;\n\t}", "public function GetAllFacturesVentesByYear() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n \n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data'][\"idSociete\"];\n $filterYear = $_REQUEST['data'][\"filterYear\"];\n // Input validations\n if (!empty($idSociete) && !empty($filterYear)) {\n try {\n $sql = $this->db->prepare(\"SELECT idFacture,date as dateCre,total,YEAR(date) AS factYear FROM facturevente WHERE idEtat != 5 and YEAR(date) = :filterYear AND idSociete = :idSociete\");\n $sql->bindParam('idSociete', $idSociete, PDO::PARAM_INT);\n $sql->bindParam('filterYear', $filterYear, PDO::PARAM_STR);\n $sql->execute();\n\n if ($sql->rowCount() > 0) {\n $result = array();\n while ($rlt = $sql->fetchAll()) {\n $result[] = $rlt;\n }\n // If success everythig is good send header as \"OK\" and return list of users in JSON format\n $this->response($this->json($result[0]), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n } catch (Exception $ex) {\n $this->response('', $ex->getMessage());\n }\n }\n }\n \n }", "function get_years_to_search() {\n global $DB;\n $sql = \"SELECT date AS fecha FROM {report_user_statistics};\";\n $dates = $DB->get_records_sql($sql);\n $result = array();\n foreach ($dates as $date) {\n $fecha = new DateTime(\"@$date->fecha\");\n $result[$fecha->format('Y')] = $fecha->format('Y');\n }\n return $result;\n}", "public function getCalendarEvents($uid, $appName, $facebook_page_id = '') {\n $user = \\Drupal::currentUser();\n if ($appName) {\n $terms_obj = \\Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($appName);\n $socialname = $terms_obj->getName();\n $events = array();\n $query = \\Drupal::database()->select('social_media', 'sm');\n if ($facebook_page_id) {\n $result = $query->fields('sm', array('id', 'scheduled_timestamp'))->condition('sm.uid', $uid, '=')->condition('sm.social_media_name', $socialname, '=')->condition('sm.page_id', $facebook_page_id, '=')->orderBy('created', 'DESC')->execute()->fetchAll();\n } else {\n $result = $query->fields('sm', array('id', 'scheduled_timestamp'))->condition('sm.uid', $uid, '=')->condition('sm.social_media_name', $socialname, '=')->orderBy('created', 'DESC')->execute()->fetchAll();\n }\n if (!empty($result)) {\n foreach ($result as $row_object) {\n $date = new DrupalDateTime(date('Y-m-d H:i:s', $row_object->scheduled_timestamp), new \\DateTimeZone('utc'));\n $date->setTimezone(new \\DateTimeZone($user->getTimeZone()));\n $manual_datetime = strtotime($date->format('Y-m-d H:i:s'));\n //$manual_datetime = $scheduled_data->manual_datetime;\n $published_date = date('Y-m-d H:i:s', $manual_datetime);\n $Onlytime = explode(\" \", $published_date);\n $formatedTime = date(\"g:i a\", strtotime($Onlytime[1]));\n $unformatedTime = date('Y-m-d H:00', $manual_datetime);\n $events[] = array('start' => $unformatedTime);\n }\n }\n }\n return $events;\n }", "public function getAnnualSales() {\n\t\t// Query\n\t\t$sql = '\n\t\t\tSELECT \n\t\t\t\tDATE_FORMAT(transactionDate, \"%Y\") AS year, \n\t\t\t\tSUM(amount) AS amount\n\t\t\tFROM \n\t\t\t\ttransactions\n\t\t\tGROUP BY \n\t\t\t\tDATE_FORMAT(transactionDate, \"%Y\")\n\t\t';\n\n\t\t// Return\n\t\treturn DB::select($sql);\n\t}", "private function fetchEvents(string $url): array\n {\n $calendar = new ICal($url);\n return $this->beautifyEvents($calendar->events());\n }", "public function findYearsByFilter($filter) {\n $filter2 = clone $filter;\n $filter2->year = null;\n $articles = $this->findByFilter($filter2);\n $yearArray = array();\n foreach($articles as $article) {\n $date = $article->getArticleDate();\n $year = $date->format('Y');\n if(!isset($yearArray[$year])) {\n $yearArray[$year] = array('count' => 0);\n }\n if(!isset($yearArray[$year]['value'])) {\n $yearFilter = clone $filter2;\n $yearFilter->year = $year;\n $yearArray[$year]['value'] = intval($year);\n $yearArray[$year]['searchFilter'] = $yearFilter;\n }\n $yearArray[$year]['count']++;\n }\n return $yearArray;\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 get_holiday_list($year) {\n for ($i = 1; $i <= 12; $i++) { // query for months\n if ($i >= 1 && $i <= 9) { // if i<=9 concate with Mysql.becuase on Mysql query fast in two digit like 01.\n $start_date = $year . \"-\" . '0' . $i . '-' . '01';\n $end_date = $year . \"-\" . '0' . $i . '-' . '31';\n } else {\n $start_date = $year . \"-\" . $i . '-' . '01';\n $end_date = $year . \"-\" . $i . '-' . '31';\n }\n $get_holiday_list[$i] = $this->settings_model->get_holiday_list_by_date($start_date, $end_date); // get all report by start date and in date \n }\n return $get_holiday_list; // return the result\n }", "public function index()\n {\n $banner = array(\n 'title' => 'All Events',\n 'subtitle' => 'See what is going on our world.',\n );\n\n $today = Carbon::today()->toDateString();\n $events = Event::whereDate('event_date', '>=', $today)\n ->orderBy('event_date', 'asc');\n\n // Filter by url param\n if ($month = request('month')) {\n $events->whereMonth('event_date', Carbon::parse($month)->month);\n }\n\n if ($year = request('year')) {\n $events->whereYear('event_date', $year);\n }\n\n $events = $events->paginate(5);\n\n // Temporary\n $archives = Event::selectRaw('year(event_date) year, monthname(event_date) month, count(*) published')\n ->whereDate('event_date', '>=', $today)\n ->groupBy('year', 'month')\n ->orderByRaw('min(event_date) asc')\n ->get()\n ->toArray();\n\n return view('events.index', compact('banner','events', 'archives'));\n }", "private function makeDayEventListArray()\n\t{\n\t\t$outevents = array();\n\t\t$n = 0;\n\t\tforeach($this->eventItems as $item) {\n\t\t\tif($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) {\t\t\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$outevents[$n]['url'] = $item['url'].'?id='.$item['id'];\n\t\t\t\t} else {\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$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\t\n\t\tif(count($outevents)) {\n\t\t\treturn $outevents;\n\t\t}\n\t\treturn false;\n\t}", "public function All() {\n return $this->get_all_events( 'start_date', 'DESC', false );\n }", "public function index()\n {\n $filters = request()->only('date', 'region');\n\n $events = $this->event\n ->when(isset($filters['date']), function ($query) use ($filters) {\n return $query->whereDate('date', $filters['date']);\n })\n ->when(isset($filters['region']), function ($query) use ($filters) {\n return $query->where('place', 'LIKE', \"%{$filters['region']}%\");\n })\n ->paginate(10);\n\n return response()->json([\n 'error' => false,\n 'message' => '',\n 'data' => [\n 'current_page' => $events->currentPage(),\n 'last_page' => $events->lastPage(),\n 'per_page' => $events->perPage(),\n 'path' => $events->path(),\n 'data' => new EventCollection($events)\n ]\n ], 200);\n }", "public static function getExpensesStatisticForYear($year)\n {\n $expensesByMonth = Expense::find_by_sql(\"SELECT \n SUBSTR(`date`, 1, 7) as `date_month`,\n SUM(`value`) AS summary\n FROM \n `expenses` \n WHERE \n `date` BETWEEN '$year-01-01' AND '$year-12-31' \n Group BY \n SUBSTR(`date`, 1, 7)\n \");\n\n return $expensesByMonth;\n }", "public static function retrieveAllForYearByCallsign($year)\n {\n $rows = self::whereYear('on_duty', $year)\n ->with([ 'person:id,callsign,status', 'position:id,title,type,count_hours' ])\n ->orderBy('on_duty')\n ->get();\n\n if (!$rows->isEmpty()) {\n PositionCredit::warmYearCache($year, array_unique($rows->pluck('position_id')->toArray()));\n }\n\n $personGroups = $rows->groupBy('person_id');\n\n return $personGroups->map(function ($group) {\n $person = $group[0]->person;\n\n return [\n 'id' => $group[0]->person_id,\n 'callsign' => $person ? $person->callsign : \"Person #\".$group[0]->person_id,\n 'status' => $person ? $person->status : 'deleted',\n\n 'total_credits' => $group->pluck('credits')->sum(),\n 'total_duration' => $group->pluck('duration')->sum(),\n 'total_appreciation_duration' => $group->filter(function ($t) {\n return $t->position ? $t->position->count_hours : false;\n })->pluck('duration')->sum(),\n\n 'timesheet' => $group->map(function ($t) {\n return [\n 'on_duty' => (string) $t->on_duty,\n 'off_duty' => (string) $t->off_duty,\n 'duration' => $t->duration,\n 'credits' => $t->credits,\n 'position' => [\n 'id' => $t->position_id,\n 'title' => $t->position ? $t->position->title : \"Position #\".$t->position_id,\n 'count_hours' => $t->position ? $t->position->count_hours : 0,\n ]\n ];\n })->values()\n ];\n })->sortBy('callsign', SORT_NATURAL|SORT_FLAG_CASE)->values();\n }", "public function group_sources_by_domain()\r\n {\r\n //\r\n // The return value is an array, a key in this array is a domain\r\n // and the value is a list of all the sources with this domain.\r\n\r\n $key_function = function($x) {\r\n return $x->domain;\r\n };\r\n return $this->group_sources($key_function);\r\n }", "public function getGoogleEvents()\n {\n $googleCalendar = $this->googleCalendarAuthorizationAction();\n $now = new \\DateTime();\n $currentDate = $now->format(\\DateTime::RFC3339);\n\n $eventsGoogle = $googleCalendar->initEventsList('primary', [\n 'maxResults' => 100, 'orderBy' => 'startTime',\n 'singleEvents' => true,\n 'timeMin' => $currentDate\n ]);\n\n return $eventsGoogle;\n }", "public function moviesByYear() {\n $model = $this->model;\n $request = $this->request;\n $movies = $this->getAndSetCache(\n \\CacheVars::NAMESPACE_PAGE,\n \\CacheVars::KEY_MOVIES_DATA . \"_by_year_{$this->request->year}\",\n function() use($model, $request) {\n return $model->getMoviesByYear($request->year);\n }\n );\n $this->view->addParameter(\"movies\", $movies);\n }", "public function yearType($year = null, $type = null)\n {\n return \\App\\Event::with('venue.city.states')\n ->whereYear('start_date', $year)\n ->where('type', $type)\n ->orderby('start_date', 'asc')\n ->paginate($this->paginate);\n }", "public function index($year)\n\t{\n\t\t/**\n\t\t* get all places that have sowings in a specific year \n\t\t*/\n\t\t$places = Place :: whereHas('sowings', function($query) use ($year){\n\t\t\t$query->where('year','=',$year);\n\t\t})->get();\n\n\t\t$places->each(function($item) use($year){\n\t\t\t// var_dump($item);\n\t\t\t$item->sowings = $item->sowings->filter(function($item) use ($year){\n\t\t\t\treturn $item->year == $year;\n\t\t\t})->all();\n\t\t\t\n\t\t});\n\n\t\t$years = Sowing :: distinct('year')->pluck('year');\n\n\t\treturn view('sowings.index', compact('years','places'));\n\t}", "public function getEvents()\n {\n\n $cached = $this->getFromCache('events_cache');\n if ($cached !== null) {\n return $cached;\n }\n\n // Fetch past and future events (only upcoming contains the current event)\n $events = $this->client->getEvents(\n array(\n 'group_urlname' => $this->group,\n 'status' => 'past,upcoming',\n 'desc' => 'desc'\n )\n );\n\n // Filter out events further in the future than a day\n $dayFromNow = (time() + (24 * 60 * 60)) * 1000;\n $events = $events->filter(function($value) use ($dayFromNow) {\n return ($value['time'] < $dayFromNow)? true : false;\n });\n\n $this->saveInCache('events_cache', $events);\n\n return $events;\n }", "public function getEventList() {\n $response = $this->client->get(\n $this->apiUrl . \"events\");\n return $response->json();\n }", "public function getYear()\n {\n $allYear=array();\n $query=\"SELECT YEAR (input_date) as cyear FROM `consume_details` group by YEAR (input_date)\";\n // Utility::dd()\n $result=mysqli_query($this->conn,$query);\n while ($row=mysqli_fetch_assoc($result))\n {\n $allYear['cyear']=$row;\n }\n return $allYear;\n }", "public function GetAllFacturesAchatsByYear() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n \n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data'][\"idSociete\"];\n $filterYear = $_REQUEST['data'][\"filterYear\"];\n // Input validations\n if (!empty($idSociete) && !empty($filterYear)) {\n try {\n $sql = $this->db->prepare(\"SELECT idFacture,date as dateCre,total,YEAR(date) AS factYear FROM factureachat WHERE idEtat != 5 and YEAR(date) = :filterYear AND idSociete = :idSociete\");\n $sql->bindParam('idSociete', $idSociete, PDO::PARAM_INT);\n $sql->bindParam('filterYear', $filterYear, PDO::PARAM_STR);\n $sql->execute();\n\n if ($sql->rowCount() > 0) {\n $result = array();\n while ($rlt = $sql->fetchAll()) {\n $result[] = $rlt;\n }\n // If success everythig is good send header as \"OK\" and return list of users in JSON format\n $this->response($this->json($result[0]), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n } catch (Exception $ex) {\n $this->response('', $ex->getMessage());\n }\n }\n }\n \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 getTwoYearDates()\n {\n $current_year = date('Y-m-d',strtotime(date('Y-01-01')));\n $next_year = date('Y-m-d', strtotime('last day of december next year'));\n\n return Holiday::where('date', '>=', $current_year)\n ->where('date', '<=', $next_year)\n ->orderBy('date', 'asc')\n ->paginate(25);\n }", "function get_vehicles_by_year() {\n global $db;\n $query = 'SELECT * FROM vehicles\n ORDER BY year DESC';\n $statement = $db->prepare($query);\n $statement->execute();\n $vehicles = $statement->fetchAll();\n $statement->closeCursor();\n return $vehicles;\n }", "public function getAll(){\n //old : \n // $events = $this->events;\n // return $events;\n $repo = $this->om->getRepository(Event::class); \n return $repo->findAll();\n }", "public function getEvents()\n {\n //\n\n return Event::all();\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}", "protected function build_global_calendar(&$tpl_var)\n {\n global $page;\n\n assert( count($page['chronology_date']) == 0 );\n $query='\n SELECT '.pwg_db_get_date_YYYYMM($this->date_field).' as period,\n COUNT(distinct id) as count';\n $query.= $this->inner_sql;\n $query.= $this->get_date_where();\n $query.= '\n GROUP BY period\n ORDER BY '.pwg_db_get_year($this->date_field).' DESC, '.pwg_db_get_month($this->date_field).' ASC';\n\n $result = pwg_query($query);\n $items=array();\n while ($row = pwg_db_fetch_assoc($result))\n {\n $y = substr($row['period'], 0, 4);\n $m = (int)substr($row['period'], 4, 2);\n if ( ! isset($items[$y]) )\n {\n $items[$y] = array('nb_images'=>0, 'children'=>array() );\n }\n $items[$y]['children'][$m] = $row['count'];\n $items[$y]['nb_images'] += $row['count'];\n }\n //echo ('<pre>'. var_export($items, true) . '</pre>');\n if (count($items)==1)\n {// only one year exists so bail out to year view\n list($y) = array_keys($items);\n $page['chronology_date'][CYEAR] = $y;\n return false;\n }\n\n global $lang;\n foreach ( $items as $year=>$year_data)\n {\n $chronology_date = array( $year );\n $url = duplicate_index_url( array('chronology_date'=>$chronology_date) );\n\n $nav_bar = $this->get_nav_bar_from_items( $chronology_date,\n $year_data['children'], false, false, $lang['month'] );\n\n $tpl_var['calendar_bars'][] =\n array(\n 'U_HEAD' => $url,\n 'NB_IMAGES' => $year_data['nb_images'],\n 'HEAD_LABEL' => $year,\n 'items' => $nav_bar,\n );\n }\n\n return true;\n }", "public function yearList($all_option = true)\n\t{\n\t\tif ( $all_option == true ) $years['all'] = 'All';\n\t\t$all_years = $this->doll->orderBy('release_year', 'desc')->groupBy('release_year')->select('release_year')->get();\n\t\tforeach ( $all_years as $year ){\n\t\t\t$years[$year->release_year] = $year->release_year;\n\t\t}\n\t\treturn $years;\n\t}", "function get_uc_groups( $post_status = 'publish', $school_year = false ) {\n\t$args = array(\n\t\t'post_type' => 'uc_group',\n\t\t'post_status' => $post_status,\n\t\t'posts_per_page' => -1,\n\t);\n\n\tif ( $school_year ) {\n\t\t$school_year_array = get_school_year( $school_year );\n\t\t$args['date_query'] = array(\n\t\t\tarray(\n\t\t\t\t'after' => $school_year_array['start'],\n\t\t\t\t'before' => $school_year_array['end'],\n\t\t\t\t'inclusive' => true,\n\t\t\t)\n\t\t);\n\t}\n\n\t$wp_posts = get_posts( $args );\n\t$result = array();\n\tforeach ($wp_posts as $post) {\n\t\t$result[] = array('value' => $post->ID, 'label' => $post->post_title);\n\t}\n\treturn $result;\n}", "public function events_calendar_query($month = 1, $year = 2010)\n\t{\n\t\t$this->events = $this->_process(\"http://tigedealers.com/month_events_api/$year/$month\");\n\t\t\n\t\tif($this->events):\n\t\t\t$this->result = simplexml_load_string($this->events);\n\t\telse:\n\t\t\t$this->result = array(array(\"text\" => \"Trouble on the western front\"));\n\t\tendif;\n\t\t\n\t\t$this->month = $month;\n\t\t$this->year = $year;\n\t\t\n\t\t$this->_get_calendar_array();\n\t}", "function getArchiveList()\n {\n $sql = \"SELECT LEFT(`published`, 7) AS `year_month`, COUNT(*) AS `count` FROM `blog_articles` WHERE `published` < NOW() GROUP BY `year_month` ASC\";\n $rows = $this->db->fetchAll($sql);\n\n $years = [];\n foreach ($rows as $row) {\n list($year, $month) = explode('-', $row->year_month);\n $time = strtotime($row->year_month.'-01 00:00:00');\n\n if (!isset($years[$year])) {\n $years[$year] = [ 'count' => 0, 'months' => [] ];\n }\n $years[$year]['count'] += (int)$row->count;\n $years[$year]['months'][$month] = [ 'count' => (int)$row->count, 'name' => strftime('%B', $time) ];\n }\n\n return $years;\n }", "public function getYears() {\r\n\t\t$year = array();\r\n\t\t$current_year = strftime(\"%Y\");\r\n\t\tfor($i = 2000; $i <= $current_year+1 && $y = strftime(\"%Y\", mktime(0,0,0,0,0,$i)); ++$i) {\r\n\t\t\t$year[$i] = array('id' => $i, 'name' => $y+1);\r\n\t\t}\r\n\t\treturn $year; //array\r\n\t}", "Public function getEvents()\n\t{\n\t\t$result=$this->M_calendar->getEvents();\n\t\techo json_encode($result);\n\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 _getCalendarData( $year, $month, $day){\t\t\t\t\n\t\t$rows = $this->_listIcalEventsByMonth( $year, $month);\n \t\t\n\t\t$rowcount = count( $rows );\t\t\n\t\t$data = array();\n\t\t$data['year'] = $year;\n\t\t$data['month'] = $month;\n\t\t$month = intval($month);\n\t\tif( $month <= '9' ) {\n\t\t\t$month = '0' . $month;\n\t\t}\n\t\t$data['startday'] = $startday = (int) EventBookingHelper::getConfigValue('calendar_start_date');\t\t\n\t\t// get days in week\n\t\t$data[\"daynames\"] = array();\n\t\tfor( $i = 0; $i < 7; $i++ ) {\n\t\t\t$data[\"daynames\"][$i] = $this->_getDayName(($i+$startday)%7, true );\n\t\t}\t\t\n\t\t$data[\"dates\"]=array();\t\t\n\t\t//Start days\n\t\t$start = (( date( 'w', mktime( 0, 0, 0, $month, 1, $year )) - $startday + 7 ) % 7 );\t\t\n\t\t// previous month\n\t\t$priorMonth = $month-1;\n\t\t$priorYear = $year;\t\t\n\t\tif ($priorMonth <= 0) {\n\t\t\t$priorMonth += 12;\n\t\t\t$priorYear -= 1;\n\t\t}\t\t\t\n\t\t$dayCount=0;\n\t\tfor( $a = $start; $a > 0; $a-- ){\n\t\t\t$data[\"dates\"][$dayCount] = array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"] = \"prior\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"] = $priorMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"] = $priorYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay'] = 0;\n\t\t\t$dayCount++;\n\t\t}\n\t\tsort($data[\"dates\"]);\n\t\t//Current month\n\t\t$end = date( 't', mktime( 0, 0, 0,( $month + 1 ), 0, $year ));\n\t\tfor( $d = 1; $d <= $end; $d++ ){\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t// utility field used to keep track of events displayed in a day!\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"current\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$month;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$year;\t\t\n\t\t\t\t\t\t\n\t\t\t$t_datenow = $this->_getNow();\n\t\t\t$now_adjusted = $t_datenow->toUnix(true);\n\t\t\tif( $month == strftime( '%m', $now_adjusted)\n\t\t\t&& $year == strftime( '%Y', $now_adjusted)\n\t\t\t&& $d == strftime( '%d', $now_adjusted)) {\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=true;\n\t\t\t}else{\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=false;\n\t\t\t}\n\t\t\t$data[\"dates\"][$dayCount]['d']=$d;\t\t\t\t\t\t\n\t\t\t$data[\"dates\"][$dayCount]['events'] = array();\n\t\t\tif( $rowcount > 0 ){\n\t\t\t\tforeach ($rows as $row) {\n\t\t\t\t\t\t$date_of_event = explode('-',$row->event_date);\n\t\t\t\t\t\t$date_of_event = (int)$date_of_event[2];\t\t\t\t\t\t\n\t\t\t\t\t\tif ($d == $date_of_event ){\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i=count($data[\"dates\"][$dayCount]['events']);\n\t\t\t\t\t\t\t$data[\"dates\"][$dayCount]['events'][$i] = $row;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t$dayCount++;\n\t\t}\t\n \t\n\t\t// followmonth\n\t\t$days \t= ( 7 - date( 'w', mktime( 0, 0, 0, $month + 1, 1, $year )) + $startday ) %7;\n\t\t$d\t\t= 1;\n\t\t$followMonth = $month+1;\n\t\t$followYear = $year;\n\t\tif ($followMonth>12) {\n\t\t\t$followMonth-=12;\n\t\t\t$followYear+=1;\n\t\t}\n\t\t$data[\"followingMonth\"]=array();\n\t\tfor( $d = 1; $d <= $days; $d++ ) {\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"following\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$followMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$followYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$dayCount++;\n\t\t}\n\t\treturn $data;\t\t\n\t}", "public function fetchTitlesByYear($year)\n\t{\n\t\treturn $this->dibi->fetchAll(\"\n\t\t\tSELECT\n\t\t\t\tid, title, volume, year \n\t\t\tFROM\n\t\t\t\tjournal\t\n\t\t\tWHERE\n\t\t\t\tyear = %i\n\t\t\tORDER BY\n\t\t\t\tyear DESC, volume DESC\t\n\t\t\", $year);\t\n\t}", "public function index()\n {\n $seo = new SEOTools();\n\n $seo->setTitle('Home');\n $seo->setCanonical('https://citizenwarfare.com');\n\n\n $sorted = [];\n $pubEvents = Event::where('private', 0)->with('organization')->get();\n\n $events = new EventController();\n $timezonedata = $events->getTimeZone();\n session()->put('timezone', $timezonedata->time_zone->name);\n\n\n //remove outdated public events\n if(!$today = Carbon::now()->setTimezone(session()->get('timezone'))->format('Y-m-d')){\n $today = Carbon::now()->setTimezone(session()->get('timezone'))->format('Y-m-d');\n }\n //dd($this->data['pubEvents']);\n foreach ($pubEvents as $k => $event) {\n $parsed = Carbon::parse($event->start_date)->setTimezone(session()->get('timezone'))->format('Y-m-d');\n if ($parsed < $today) {\n unset($pubEvents[$k]);\n }\n //sort for front page and profile.\n $weekStart = Carbon::getWeekStartsAt();\n $weekEnd = Carbon::getWeekEndsAt();\n\n if(Carbon::parse($event->start_date)->setTimezone(session()->get('timezone'))->format('Y-m-d') < $weekEnd && $event > $weekStart){\n $sorted['thisWeek'][] = $event;\n }elseif(Carbon::parse($event->start_date)->setTimezone(session()->get('timezone'))->format('m') === Carbon::now()->setTimezone(session()->get('timezone'))->format('m')){\n $sorted['thisMonth'][] = $event;\n }elseif(Carbon::parse($event->start_date)->setTimezone(session()->get('timezone'))->format('Y-m-d') === Carbon::now()->setTimezone(session()->get('timezone'))->format('Y-m-d')){\n $sorted['today'][] = $event;\n }\n }\n\n return view('home')->with('sorted', $sorted);\n }", "public function events( $fields = '' ) {\n\t\treturn $this->client->getGroup( [\n\t\t\t'urlname' => $this->group,\n\t\t 'fields' => $fields\n\t\t] );\n\t}", "public function genData($url, $group, $month = \"\", $year = \"\", $ssl = false, $tries = 3, $tz = \"UTC\") {\n\t\t//This is the time zone that events seem to be stored in\n\t\t$pst = new DateTimeZone(\"America/Los_Angeles\");\n\t\t$tzDest = new DateTimeZone($tz);\n\t\t$month = (empty($month)) ? intval(gmstrftime(\"%m\")) : $month;\n\t\t//$month = (strlen($month) === 1) ? \"0\" . $month : (string) $month;\n\t\t$year = (empty($year)) ? gmstrftime(\"%Y\") : $year;\n\t\t// erk\n\t\t$url = ($ssl ? str_replace( \"http:\", \"https:\", $url ) : $url );\n\t\t$url.= \"/\" . $group . \"/events_\" . $month . \"_\" . $year . \".xml\";\n\t\t// Setting the (upcoming) file handle to true for ultimate hackiness\n\t\t$f = true;\n\t\t// Checking robots.txt with rbt_prs (https://github.com/meklu/rbt_prs) if it's been included\n\t\tif (strpos($url,'http') !== false and function_exists(\"isUrlBotSafe\")) {\n\t\t\tif (!isUrlBotSafe($url)) {\n\t\t\t\t$f = false;\n\t\t\t}\n\t\t}\n\t\tif ($f) {\n\t\t\tdo {\n\t\t\t\t$tries -= 1;\n\t\t\t\t$f = @fopen($url, \"r\");\n\t\t\t\tif ($f !== false) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while ($tries > 0);\n\t\t}\n\t\tif ($f === false) {\n\t\t\treturn array(\"status\" => false, \"events\" => array(), \"pastevents\" => array(),);\n\t\t}\n\t\t$str = stream_get_contents($f);\n\t\tfclose($f);\n\t\t$xml = new DOMDocument();\n\t\t$xml->loadXML($str);\n\t\t$events = array();\n\t\t$pastevents = array();\n\t\tforeach ($xml->getElementsByTagName(\"event\") as $e) {\n\t\t\t$events[] = $this->parseEvent($e->nodeValue, $month, $year, $pst, $tzDest);\n\t\t}\n\t\tforeach ($xml->getElementsByTagName(\"expiredEvent\") as $e) {\n\t\t\t$pastevents[] = $this->parseEvent($e->nodeValue, $month, $year, $pst, $tzDest);\n\t\t}\n\t\treturn array(\"status\" => true, \"events\" => $events, \"pastevents\" => $pastevents);\n\t}", "public function getEvents(array $filters = array());", "public function yearProvider()\n {\n return array(\n // year = 1\n array('11111111111111111', array(2001, 2031)),\n // year = K\n array('1M8GDM9AXKP042788', array(1989, 2019)),\n // year = 3\n array('5GZCZ43D13S812715', array(2003, 2033)),\n // invalid year\n array('5GZCZ43D1US812715', array())\n );\n }", "public function all()\n {\n $model = new Event();\n $events = $model->readAll();\n return ['events'=>$events];\n }", "private function visibleYears(int $year) : array\n {\n $yearsList = [];\n\n // Previous year\n if ($year > 2007) {\n $yearsList[] = $year - 1;\n }\n\n // Current year\n $yearsList[] = $year;\n\n // Next year\n if ($year <= (int)$this->today->format('Y')) {\n $yearsList[] = $year + 1;\n }\n\n return $yearsList;\n }", "public function getTotalSPerYear(){\n // FROM [mon].[ProjectDetail]\n // GROUP BY YEAR([CreatedAt])\n $result = [];\n $this->db->select(\"YEAR([CreatedAt]) as year, count(ApiKey) as count\");\n $this->db->from($this->TBL_SDEVICEPROFILE);\n $this->db->group_by('YEAR([CreatedAt])');\n $q = $this->db->get();\n return $q->result_array();\n }", "public function index()\n {\n (new Calendar())->getOutDays();\n $user = Auth::user();\n $year = $_GET['year'] ?? Carbon::now()->year;\n $data = array(\n \"hours\" => array(1, 2, 3, 4, 5, 6),\n \"date\" => Carbon::now('Europe/Paris'),\n \"categories\" => Category::all(),\n \"calendar\" => (new Calendar())->show(),\n \"navi\" => (new Calendar())->navigation(),\n \"counts\" => array(\n 'f' => Helpers::getCounter('f', $year, $user),\n 'cp' => Helpers::getCounter('cp', $year, $user),\n 'r' => Helpers::getCounter('r', $year, $user),\n 'am' => Helpers::getCounter('am', $year, $user),\n 'cs' => Helpers::getCounter('cs', $year, $user),\n 'a' => Helpers::getCounter('a', $year, $user),\n ),\n \"days\" => Helpers::getNumberRange(1, 31),\n \"months\" => Helpers::getNumberRange(1, 12),\n \"years\" => Helpers::getNumberRange(2015, 2030),\n );\n\n return view('pages.wcalendar.index', compact('data'));\n }", "function get_group_by_event($event_id) {\n\t\t$data = $this->db->query('SELECT org_title \n\t\t\t\tFROM organization JOIN organization_event ON(organization.org_id = organization_event.org_id)\n\t\t\t\tWHERE event_id='.$event_id.'');\n\t\treturn $data->result();\n\t}", "protected function getData()\n\t{\n\t\t$today = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", time())\n\t\t));\n\n\t\t$tomorrow = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+1 day\"))\n\t\t));\n\n\t\t// if it's not friday, return\n\t\tif (date(\"N\", time()) != 5) {\n\t\t\treturn $this->combineData(array($today, $tomorrow));\n\t\t}\n\n\n\t\t// if today is friday, also get sunday and monday's events\n\t\t$sunday = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+2 days\"))\n\t\t));\n\n\t\t$monday = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+3 days\"))\n\t\t));\n\n\t\treturn $this->combineData(array($today, $tomorrow, $sunday, $monday));\n\t}", "public function events()\n {\n if (!Sentry::check()) {\n // User is not logged in, or is not activated\n return Redirect::route('landing');\n } else {\n // Gets all appointments from the school\n $user = Sentry::getUser();\n\n // Check if user is superAdmin\n if ($user->hasAccess('school')) {\n $appointments = Appointment::get()->load('group.school')->toArray();\n // Returns JSON response of the user\n return Response::json($appointments)->setCallback(\n Input::get('callback')\n ); //return View::make('calendar.events');\n\n } else {\n // If user is not superAdmin, show groups based on the school of the logged in user\n $user->load('school.groups.appointments.group.school');\n $appointments = [];\n\n // Loop through groups to get all appointments\n foreach ($user->school->groups as $group) {\n foreach ($group->appointments as $appointment) {\n array_push($appointments, $appointment);\n }\n }\n // Returns JSON response of the user\n return Response::json($appointments)->setCallback(Input::get('callback'));\n }\n }\n }", "public function getPostsBySectionYear($DailyopSection = fasle,$year = false) {\n\t\t\t\n\t\tif(!$DailyopSection) throw new BadRequestException(\"No Dailyop Section Passed In\");\n\n\t\tif(isset($DailyopSection['DailyopSection'])) $DailyopSection = $DailyopSection['DailyopSection'];\n\n\t\tif(!$year) $year = date(\"Y\");\n\n\t\t$token = \"dailyop_section_posts_\".$DailyopSection['id'].\"_\".$year;\n\n\t\tif(($posts = Cache::read($token,\"1min\")) === false) {\n\n\t\t\t$posts = $this->find(\"all\",array(\n\t\t\t\t\"conditions\"=>array(\n\t\t\t\t\t\"Dailyop.dailyop_section_id\"=>$DailyopSection['id'],\n\t\t\t\t\t\"Dailyop.active\"=>1,\n\t\t\t\t\t\"Dailyop.hidden\"=>0,\n\t\t\t\t\t\"YEAR(Dailyop.publish_date) = '{$year}'\",\n\t\t\t\t\t\"Dailyop.publish_date < NOW()\"\n\t\t\t\t),\n\t\t\t\t\"contain\"=>array(\n\t\t\t\t\t\"DailyopSection\",\n\t\t\t\t\t\"DailyopMediaItem\"=>array(\n\t\t\t\t\t\t\"MediaFile\",\n\t\t\t\t\t\t\"order\"=>array(\"DailyopMediaItem.display_weight\"=>\"ASC\"),\n\t\t\t\t\t\t\"limit\"=>1\n\t\t\t\t\t),\n\t\t\t\t\t\"DailyopTextItem\"=>array(\n\t\t\t\t\t\t\"MediaFile\",\n\t\t\t\t\t\t\"order\"=>array(\"DailyopTextItem.display_weight\"=>\"ASC\"),\n\t\t\t\t\t\t\"limit\"=>1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t\"order\"=>array(\n\t\t\t\t\t\"Dailyop.publish_date\"=>\"DESC\"\n\t\t\t\t)\n\t\t\t));\n\n\t\t\t//Cache::write($token,$posts,\"1min\");\n\n\t\t}\n\n\t\treturn $posts;\n\n\n\t}", "public function getYearList() \n {\t\t\n $this->db->select(\"to_char(cm_date, 'yyyy') as cm_year\");\n $this->db->from(\"ims_hris.calendar_main\");\n $this->db->where(\"to_char(cm_date, 'yyyy')::numeric >= to_char(current_date, 'yyyy')::numeric - 15\");\n $this->db->group_by(\"to_char(cm_date, 'YYYY')\");\n $this->db->order_by(\"to_char(cm_date, 'YYYY') desc\");\n $q = $this->db->get();\n \n return $q->result_case('UPPER');\n }", "function getYearsSelect()\n\t{\n\t\treturn $this->db->query(\"SELECT distinct(year(created_sell)) as yearssell from tb_sell where status <> 1 order by created_sell desc\")->result();\n\t}", "function loadEvents() {\n $events = Event::orderBy('date', 'desc')->paginate(10);\n \n return view('cms.events', ['events' => $events]);\n }", "public function selectAnalyticsbyDomain($domain) {\n $sql = \"SELECT count(*), to_char(timestamp, 'yyyy-mm') AS date\n FROM outbound_link\n WHERE url ilike $1\n AND timestamp > (NOW() - INTERVAL '1 year')\n GROUP BY date;\";\n\n $result = $this->sdb->query($sql, [\"%\".$domain.\"%\"]);\n $results = $this->sdb->fetchAll($result);\n return $results;\n }", "function get_years () {\n global $db;\n $query = 'SELECT DISTINCT year FROM CalcBatting\n ORDER BY year ASC';\n $statement = $db->prepare($query);\n $statement->execute();\n $years = $statement->fetchAll();\n $statement->closeCursor();\n return $years;\n}", "public function searchActiveCelebritiesWorldYear($year = 2015)\n {\n $intervalStart = $year .'-01-01 00:00:00';\n\t\t$intervalEnd = $year .'-12-31 00:00:00';\n\t\t\n\t\t$query = ArtistPlan::find()\n\t\t\t->innerJoin('artist', 'artistplan.artist_id = artist.id')\n\t\t\t->andWhere(['artistplan.show_status' => 1])\n\t\t\t->andWhere(['artist.show_status' => 1])\n\t\t\t->andWhere(['artist.celebrity_status' => 1])\n\t\t\t->andWhere(['between', 'start_date', self::$startOfTime, $intervalEnd])\n\t\t\t->andWhere(['between', 'end_date', $intervalStart, self::$endOfTime])\n\t\t\t->orderBy([\"artist.show_order\" => SORT_ASC]);\n\t\t\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n\t\t\t'pagination' => [\n\t\t\t\t'pageSize' => 40\n\t\t\t]\n ]);\n\n return $dataProvider;\n }", "public function getYearValues() {\n\t return array (\n\t array (2012),\n\t array (900),\n\t array (2050),\n\t array ('2050'),\n\t array ('year')\n\t );\n }", "function get_calendars() {\n\n\t\t// Get the attached calendars\n\t\t$calendars = wp_get_post_terms( $this->post_id , 'calendar' );\n\t\t$this->calendars = $calendars;\n\t\t\n\t\t// Loop through calendars, checking permissions\n\t\tforeach ( $calendars as $calendar ) {\n\t\t\t\n\t\t\t// Is it a group calendar?\n\t\t\tif ( is_group_calendar( $calendar->term_id ) ) :\n\t\t\t\t$group_id\t= groups_get_id( $calendar->slug );\n\t\t\t\t$can_view \t= groups_is_user_member( get_current_user_id() , $group_id ) ? true : false;\n\t\t\telse :\n\t\t\t\t$can_view = true;\n\t\t\tendif;\n\t\t\t\n\t\t\t// If we find a calendar for which the user is authorized, go ahead and display it\n\t\t\tif( $can_view ) :\n\t\t\t\t$this->calendar = $calendar;\n\t\t\t\t$this->can_view = true;\n\t\t\t\tbreak;\n\t\t\tendif;\n\t\t}\n\n\t\t// If the user is not allowed to view any calendar, redirect them to the group\n\t\tif ( !$can_view ) {\n\t\t\t$redirect = SITEURL . '/groups/' . $this->calendar->slug;\n\t\t\tbp_core_add_message( 'You cannot access events on this calendar.' , 'error' );\n\t\t\tbp_core_redirect( $redirect );\n\t\t}\n\t}", "public function testEventsFromValidCalendarAreReturned()\n {\n $events = factory(Event::class, 2)->make()->sortBy('start_time');\n $googleCal = view('tests.google')->with('events', $events)->render();\n $this->mockHttpResponses([new Response(200, [], $googleCal)]);\n\n $returnedEvents = self::$importer->get('valid-google-url', now()->subYear(), now()->addYear());\n\n $this->assertInstanceOf(Collection::class, $returnedEvents);\n $this->assertCount(2, $returnedEvents);\n $this->assertEquals($events->first()->title, $returnedEvents->first()->title);\n $this->assertEquals($events->first()->location, $returnedEvents->first()->location);\n $this->assertEquals($events->first()->description, $returnedEvents->first()->description);\n $this->assertEquals($events->last()->title, $returnedEvents->last()->title);\n $this->assertEquals($events->last()->location, $returnedEvents->last()->location);\n $this->assertEquals($events->last()->description, $returnedEvents->last()->description);\n }", "public static function getNextEvents() {\n\n $startDate = Carbon::now() -> format('Y-m-d');\n $endDate = Carbon::now() -> addWeeks(4) -> format('Y-m-d');\n\n $events = Event::all() -> where(\"date\", \">=\", $startDate)\n -> where(\"date\", \"<=\", $endDate);\n\n foreach ($events as $event) {\n $event -> date = Carbon::createFromFormat(\"Y-m-d\", $event -> date)\n -> format(\"d/m/Y\");\n }\n\n return $events;\n\n }", "public function index(): AnonymousResourceCollection\n {\n $key = 'events_index';\n\n EventResource::withoutWrapping();\n if (Cache::has($key)) {\n return EventResource::collection(Cache::get($key));\n }\n\n $events = Event::orderBy('created_at')->get();\n Cache::put($key, $events);\n\n return EventResource::collection($events);\n }", "public function OrderYear()\n {//--------------------------------------------------------------Lấy về năm (cái mà có bản ghi trả về)\n\t $arr=array();\n\t $select= \"SELECT DISTINCT(year(orderDate)) As orderYear FROM orders order by orderDate \";\n\t $result=$this->executeSelect($select);\n\t while($row=mysqli_fetch_array($result))\n\t {\n\t\t $year=new ordersDto();\n\t\t $year->setorderYear($row['orderYear']);\n\t\t $arr[]=$year;\n\t }\n\t $this->DisConnectDB();\n\t return $arr;\n }", "public function getYearEraDayIndex($year);", "public function eventsUsingTableAction()\n {\n $year = $this->params()->fromQuery('year', date('Y'));\n $events = $this->model->findEventsByYear((int) $year);\n $viewModel = new ViewModel(['events' => $events, 'year' => $year]);\n $viewModel->setTemplate('signups/index/events');\n return $viewModel;\n }", "private function inclusionByYearByTypeEssai()\n {\n $em = $this->getDoctrine()->getManager();\n\n $inclusionByYearByTypeEssai = $em->getRepository(Inclusion::class)\n ->createQueryBuilder('i')\n ->select(' count(i) as nb, YEAR(i.datInc) AS year, e.typeEssai as type')\n ->join('i.essai', 'e')\n ->where('i.datInc IS NOT NULL')\n ->groupBy('year, type')\n ->orderBy('year')\n ->getQuery()\n ->getResult();\n\n $data = [];\n $years = [];\n $essais = [];\n foreach ($inclusionByYearByTypeEssai as $resp) {\n if (empty($data[$resp['year']][$resp['type']]))\n $data[$resp['year']][$resp['type']] = 0;\n $data[$resp['year']][$resp['type']] += $resp['nb'];\n $years[] = $resp['year'];\n $essais[] = $resp['type'];\n }\n $years = array_unique($years);\n $essais = array_unique($essais);\n sort($years);\n sort($essais);\n foreach ($data as $year => $v) {\n $total = 0;\n foreach ($v as $nb) {\n $total += $nb;\n }\n foreach ($v as $name => $nb) {\n $data[$year][$name] = $data[$year][$name] / $total * 100;\n }\n }\n\n $data_by_type = [];\n foreach ($years as $year) {\n foreach ($essais as $v) {\n if (empty($data[$year][$v]))\n $data_by_type[$v][] = 0;\n else\n $data_by_type[$v][] = $data[$year][$v];\n }\n }\n\n return [\"years\" => $years, \"data\" => $data_by_type];\n }", "function loadPublicCalendars() {\n $sql = \"\n SELECT c.calendar_id, c.title, c.color\n FROM %s AS c\n WHERE c.surfer_id IS NULL\n ORDER BY c.title\n \";\n $result = $this->databaseQueryFmt($sql, $this->tableCalendars);\n if (!$result || $result->count() == 0) {\n // database error or no public calendars defined\n return FALSE;\n }\n\n $calendars = array();\n while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) {\n $calendars[] = $row;\n }\n\n return $calendars;\n }", "public static function all() : array\n {\n $config = new Configuration();\n $connectionParams = array(\n 'dbname' => 'test',\n 'user' => 'root',\n 'password' => 'root',\n 'host' => 'localhost',\n 'driver' => 'pdo_mysql',\n );\n $conn = DriverManager::getConnection($connectionParams, $config);\n $qb = $conn->createQueryBuilder();\n $qb->select('title', 'date')\n ->from('events');\n return $qb->execute()->fetchAll();\n }", "public function getEvents()\n {\n $qb = $this->entityManager->getRepository(Event::class)->createQueryBuilder('e')\n ->where('e.deleted = 0')\n ->orderBy('e.eventStartDate', 'DESC');\n return $qb->getQuery();\n }", "public function index()\n {\n return $this->eventsToArray(Event::all());\n }" ]
[ "0.6634203", "0.6416047", "0.62959236", "0.6189904", "0.6116527", "0.6100796", "0.60418874", "0.6010047", "0.59350014", "0.59234107", "0.58710515", "0.5830806", "0.5779693", "0.5731799", "0.5724064", "0.57094616", "0.56512785", "0.56471294", "0.5624089", "0.5600589", "0.55955863", "0.55499166", "0.55245435", "0.5499521", "0.54674894", "0.5456779", "0.545542", "0.54513943", "0.53673375", "0.53481233", "0.5332132", "0.53190863", "0.53149444", "0.5311861", "0.5306479", "0.530154", "0.5296281", "0.52893436", "0.52761495", "0.5250854", "0.52496725", "0.52419305", "0.5210141", "0.5208419", "0.51984745", "0.519424", "0.51928616", "0.5191225", "0.5183282", "0.5180523", "0.51568407", "0.5153796", "0.5144883", "0.51441115", "0.5142182", "0.51326156", "0.51306695", "0.5125573", "0.511287", "0.51056224", "0.51019436", "0.5099498", "0.5091107", "0.5083701", "0.50786126", "0.50776833", "0.5062088", "0.50600743", "0.5059909", "0.5058084", "0.50571615", "0.5052761", "0.50474846", "0.50408417", "0.50387716", "0.5036714", "0.50169843", "0.5013105", "0.50106317", "0.50095874", "0.4986423", "0.49845886", "0.49835983", "0.49776366", "0.49577945", "0.49565342", "0.49564984", "0.49549472", "0.49492002", "0.4947333", "0.49467415", "0.49398723", "0.49391934", "0.4934425", "0.493438", "0.49331447", "0.4930638", "0.4929195", "0.49269822", "0.49258214" ]
0.77518725
0
Create a new job instance.
public function __construct(User $user) { $this->user = $user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createJob( $creationParameters ){ return $this->APICallSub( '/jobs', array( 'create' => $creationParameters ), \"Could not create new job with query \" . $creationParameters['query'] . \" and operation \" . $creationParameters['operation'] ); }", "abstract public function makeJob();", "abstract public function makeJob();", "private function createSearchJob() {\n $response = $this->client->request('POST','search/jobs', [\n 'json' => [\n 'query' => $this->getSumoQuery(),\n 'from' => $this->start->format(DateTime::ATOM),\n 'to' => $this->end->format(DateTime::ATOM),\n 'timeZone' => $this->profile->getTimezone()\n ]\n ]);\n $code = $response->getStatusCode();\n if ($code !== 202) {\n throw new \\Exception('Error getting data from Sumologic, error was HTTP ' . $code . ' - ' . $response->getBody() . '.');\n }\n $data = json_decode($response->getBody());\n $this->jobId = $data->id;\n if ($this->output->isVerbose()) {\n $this->output->writeln(\" > Debug: Search job ID {$this->jobId} created.\");\n }\n }", "public function createJobObject($payload)\n {\n $job = new Job([\n 'title' => $payload['title'],\n 'name' => $payload['title'],\n 'description' => $payload['description'],\n 'url' => $payload['url'],\n 'location' => $payload['locations'],\n ]);\n\n $job->setCompany($payload['company'])\n ->setDatePostedAsString($payload['date'])\n ->setBaseSalary($payload['salary']);\n\n return $job;\n }", "public function createJobExecution(JobInstance $job)\n {\n return new JobExecution();\n }", "public function setJobName(string $jobName): JobInstanceInterface;", "public function __construct(Job $job)\n {\n $this->job = $job;\n }", "public static function createJob($project, $jobOptions, $parentJob = null) {\n\n // Check if the job must be CC\n $isCC = ($jobOptions->getProjectJobFileType() && $jobOptions->getProjectJobFileType() == ProjectJobFile::TYPE_CC);\n\n if ($jobOptions->getJobType())\n Subtitle::defineSubtitleExtension($jobOptions->getJobType());\n\n // Get job type service id\n $jobOptionsTypeService = JobTypeService::model()->byJobTypeAndService(\n $jobOptions->getJobType(),\n $jobOptions->getService()\n )->find();\n\n // Set attributes\n $projectJob = new PRMProjectJob();\n $projectJob->source_lang_id = $jobOptions->getSourceLanguage();\n $projectJob->target_lang_id = $jobOptions->getTargetLanguage();\n $projectJob->project_id = $project->id;\n $projectJob->job_type_id = $jobOptions->getJobType();\n $projectJob->job_type_service_id = $jobOptionsTypeService->id;\n $projectJob->subtitle_provided = $jobOptions->isSubtitleProvided() ? 1 : 0;\n $projectJob->status = parent::STATUS_NEW;\n $projectJob->due_date = $jobOptions->getDueDate();\n $projectJob->is_billable = ($jobOptions->getJobType() != JobType::TYPE_ACCEPTANCE) ? 1 : 0;\n $projectJob->is_cc = (int) $isCC;\n $projectJob->forced_subtitle = $jobOptions->getIsForced() ? 1 : 0;\n $projectJob->job_meta_type_id = $jobOptions->getMetaType();\n\n if($projectJob->save(false)) {\n\n $deliverySpecComponent = new DeliverySpecComponent();\n $projectJobPreference = $deliverySpecComponent->copyTerritoriesToJobPreferences($projectJob, $project->delivery_spec_id);\n // Set max_box_lines = 3 for CC jobs\n if($projectJobPreference instanceof ProjectJobPreference && $isCC) {\n $projectJobPreference->max_box_lines = 3;\n $projectJobPreference->save(false);\n }\n\n ProjectBreakdownReport::create(ProjectBreakdownReportActions::TASK_ADDED)\n ->forProjectJob($projectJob)\n ->save();\n\n if ($project->user_id){\n PUserJob::model()->assignJob($project->user_id, $projectJob->id);\n }\n\n ProjectJobParent::link($parentJob ? $parentJob->id : 0, $projectJob->id);\n\n if ($jobOptions->getOutputSupportedFile() instanceof ProjectSupportedFile) {\n $deliverableFile = new ProjectJobDeliverableFiles();\n $deliverableFile->project_job_id = $projectJob->id;\n $deliverableFile->project_supported_file_id = $jobOptions->getOutputSupportedFile()->id;\n $deliverableFile->file_name = $jobOptions->getOutputFileName();\n\n if ($jobOptions->getOutputPositioningType()){\n $deliverableFile->positioning_profile = \"0;{$jobOptions->getOutputPositioningType()};{$jobOptions->getOutputAspect()};{$jobOptions->getOutputAspectRatio()}\";\n }\n\n $deliverableFile->save(false);\n }\n\n // Return job\n return $projectJob;\n }\n\n return false;\n }", "public function createJobObject($payload)\n {\n $job = new Job;\n\n $map = $this->getJobSetterMap();\n\n array_walk($map, function ($path, $setter) use ($payload, &$job) {\n try {\n $value = static::getValue(explode('.', $path), $payload);\n $job->$setter($value);\n } catch (\\OutOfRangeException $e) {\n // do nothing\n }\n });\n\n return $job;\n }", "public function create(JobRequest $jobRequest)\n {\n $job = new Job();\n\n $job->business_person = $jobRequest->business_person;\n $job->principal_phone = $jobRequest->principal_phone;\n $job->optional_phone = $jobRequest->optional_phone;\n $job->init_date = $jobRequest->init_date;\n $job->finish_date = $jobRequest->finish_date;\n $job->city = $jobRequest->city;\n\n $job->save();\n\n return compact('job');\n }", "public function createNewJob($jobBody, $queue)\n {\n $job = new Job($jobBody, $queue);\n\n if ($this->jobHasBeenAddedFromOutside($job)) {\n $this->addMissingJobTimeData($job);\n }\n\n return $job;\n }", "protected function createJobFromPayload($payload = [])\n {\n return new Job([\n 'title' => $payload['jobTitle'],\n 'name' => $payload['jobTitle'],\n 'description' => $payload['descriptionFragment'],\n 'url' => $payload['jobViewUrl'],\n 'sourceId' => $payload['jobListingId'],\n 'location' => $payload['location'],\n 'industry' => $payload['jobCategory']\n ]);\n }", "public function created(Job $job)\n {\n //\n }", "protected function generateJob()\n\t{\n\t\t$name = $this->inflector->getJob();\n\n\t\t$this->call('make:job', compact('name'));\n\t}", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "static public function factory($job, $conn, $handle, $initParams=array())\n {\n if (empty($initParams['path'])) {\n $paths = explode(',', NET_GEARMAN_JOB_PATH);\n $file = null;\n\n foreach ($paths as $path) {\n $tmpFile = $path . '/' . $job . '.php';\n\n if (file_exists(realpath($tmpFile))) {\n $file = $tmpFile;\n break;\n }\n }\n }\n else {\n $file = $initParams['path'];\n }\n\n if ( ! file_exists($file) ) {\n throw new Net_Gearman_Job_Exception('Invalid Job class file: ' . (empty($file) ? '<empty>' : $file));\n }\n\n include_once $file;\n\n if (empty($initParams['class_name'])) {\n $class = NET_GEARMAN_JOB_CLASS_PREFIX . $job;\n }\n else {\n $class = $initParams['class_name'];\n }\n\n if (!class_exists($class)) {\n throw new Net_Gearman_Job_Exception('Invalid Job class: ' . (empty($class) ? '<empty>' : $class) . ' in ' . (empty($file) ? '<empty>' : $file) );\n }\n\n $instance = new $class($conn, $handle, $initParams);\n if (!$instance instanceof Net_Gearman_Job_Common) {\n throw new Net_Gearman_Job_Exception('Job is of invalid type: ' . get_class($instance));\n }\n\n return $instance;\n }", "public function creating(Job $job)\n {\n $job->setTokenValue();\n $job->setExpiresAtValue();\n $job->is_activated = 1;\n }", "private function createJob (string $cronTab) : CronJobInterface\n {\n return new class ($cronTab) implements CronJobInterface\n {\n /** @var string */\n private $cronTab;\n\n\n /**\n */\n public function __construct (string $cronTab)\n {\n $this->cronTab = $cronTab;\n }\n\n\n /**\n */\n public function getCronTab () : string\n {\n return $this->cronTab;\n }\n\n\n /**\n */\n public function getName () : string\n {\n return \"My Job\";\n }\n\n\n /**\n */\n public function execute (BufferedSymfonyStyle $io) : CronStatus\n {\n return new CronStatus(true);\n }\n };\n }", "private function createJob(array $data = [])\n {\n $workflow = fake(WorkflowModel::class);\n $stage = fake(StageModel::class, [\n 'action_id' => 'info',\n 'workflow_id' => $workflow->id,\n 'required' => 1,\n ]);\n fake(StageModel::class, [\n 'action_id' => 'button',\n 'workflow_id' => $workflow->id,\n 'required' => 0,\n ]);\n\n $data = array_merge([\n 'workflow_id' => $workflow->id,\n 'stage_id' => $stage->id,\n ], $data);\n\n return fake(JobModel::class, $data);\n }", "public function getNewJob() {\n # we can grab a locked job if we own the lock\n $rs = $this->runQuery(\"\n SELECT id\n FROM \" . self::$jobsTable . \"\n WHERE queue = ?\n AND (run_at IS NULL OR NOW() >= run_at)\n AND (locked_at IS NULL OR locked_by = ?)\n AND failed_at IS NULL\n AND attempts < ?\n ORDER BY created_at DESC\n LIMIT 10\n \", array($this->queue, $this->name, $this->max_attempts));\n\n // randomly order the 10 to prevent lock contention among workers\n shuffle($rs);\n\n foreach ($rs as $r) {\n $job = new DJJob($this->name, $r[\"id\"], array(\n \"max_attempts\" => $this->max_attempts,\n \"fail_on_output\" => $this->fail_on_output\n ));\n if ($job->acquireLock()) return $job;\n }\n\n return false;\n }", "public function store(Request $request): JobResource\n {\n $jobTypes = Factory::listTypes();\n $validValues = $this->validate(\n $request,\n [\n 'sample_code' => ['filled', 'string', 'alpha_dash'],\n 'name' => ['required', 'string'],\n 'type' => ['required', 'string', Rule::in($jobTypes->pluck('id'))],\n 'parameters' => ['filled', 'array'],\n ]\n );\n $parametersValidation = $this->_prepareNestedValidation(\n Factory::validationSpec($validValues['type'], $request)\n );\n $validParameters = $this->validate($request, $parametersValidation);\n $type = $validValues['type'];\n $validParameters = $validParameters['parameters'] ?? [];\n $job = Job::create(\n [\n 'sample_code' => $validValues['sample_code'] ?? null,\n 'name' => $validValues['name'],\n 'job_type' => $type,\n 'status' => Job::READY,\n 'job_parameters' => [],\n 'job_output' => [],\n 'log' => '',\n 'user_id' => \\Auth::guard('api')->id(),\n ]\n );\n $job->setParameters(Arr::dot($validParameters));\n $job->save();\n $job->getJobDirectory();\n\n return new JobResource($job);\n }", "public function __construct(JobPoster $job)\n {\n $this->job = $job;\n }", "public function create()\n {\n // Display form to create a new job\n return view('jobs.create');\n }", "public function __construct(Job $job)\n {\n parent::__construct();\n\n $this->job = $job;\n }", "protected function getJobInstance(): JobInstance\n {\n if (!isset($this->jobInstance)) {\n $id = $this->argument('instanceId');\n /** @noinspection PhpIncompatibleReturnTypeInspection */\n $this->jobInstance = JobInstance::findOrFail(intval($id));\n }\n\n return $this->jobInstance;\n }", "public function getInstance()\n {\n if (!is_null($this->instance)) {\n return $this->instance;\n }\n\n if (!class_exists($this->class)) {\n throw new \\RuntimeException('Could not find job class \"'.$this->class.'\"');\n }\n\n if (!method_exists($this->class, $this->method) or !is_callable(array($this->class, $this->method))) {\n throw new \\RuntimeException('Job class \"'.$this->class.'\" does not contain a public \"'.$this->method.'\" method');\n }\n\n $class = new \\ReflectionClass($this->class);\n\n if ($class->isAbstract()) {\n throw new \\RuntimeException('Job class \"'.$this->class.'\" cannot be an abstract class');\n }\n\n $instance = $class->newInstance();\n\n return $this->instance = $instance;\n }", "static function createJobDescriptorFromInput()\n {\n $obj = b2input()->json();\n $job = new \\scheduler\\JobDescriptor();\n\n $job->group = trim($obj->group) ?: b2config()->scheduler['defaultGroupName'];\n $job->name = $obj->name;\n $job->type = $obj->type;\n $job->description = $obj->description;\n\n if ($obj->data) {\n $job->data = parse_ini_string($obj->data);\n }\n if (empty($job->data)) {\n $job->data = null;\n }\n\n// var_dump($job);\n\n return $job;\n }", "public function create() {}", "public function __construct()\n {\n $this->jobService = new JobService();\n }", "public function create()\n {\n $job=new Job;\n return view('jobs.create',[\n 'job'=>$job,]);\n //\n }", "public function store(CreateJobFormRequest $request)\n {\n $job = Job::create($request->input());\n\n return response()->json($job, 201);\n\n }", "public function create()\n {\n return view('admin.job.create');\n }", "public function createAction(Request $request)\n {\n $entity = new Job();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('job_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function create(){}", "public function create(Request $request) {\n $jobPost = new Job();\n $jobPost->user_id = Auth::user()->id;\n\n // Substract one credit from user's subscription\n $userPlans = Auth::user()->plans;\n\n foreach ($userPlans as $plan) {\n if ($plan->credits > 0) {\n $plan->credits = $plan->credits - 1;\n $plan->save();\n }\n }\n\n $jobPostData = $request::input('jobPost');\n foreach ($jobPostData as $key => $value) {\n $jobPost[$key] = $value;\n }\n\n $jobPost->save();\n\n return $jobPost;\n }", "public function __construct($job)\n {\n $payload = [];\n $this->job = $job;\n $payload['data'] = json_encode($this->job);\n\n $payload['classname'] = $this->job->getNameOfClass();\n $this->payload = $payload;\n\n }", "public function create()\n {\n return view('profile.job.create');\n }", "public function create()\n {\n return view('job.add_job');\n }", "public function store(CreateRequest $request, Job $job)\n {\n $newTask = $request->validated();\n $newTask['job_id'] = $job->id;\n $task = Task::create($newTask);\n\n flash(__('task.created'), 'success');\n\n return redirect()->route('jobs.show', $job);\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function create()\n {}", "public function createTask()\n {\n return factory($this->model)->create();\n }", "public function newAction()\n {\n $entity = new Job();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function createJob(array $settings, $metaData = [], $priority = 0)\n {\n return $this->client->createJob([\n 'Role' => config('media-converter.iam_arn'),\n 'Settings' => $settings,\n 'Queue' => config('media-converter.queue_arn'),\n 'UserMetadata' => $metaData,\n 'StatusUpdateInterval' => $this->getStatusUpdateInterval(),\n 'Priority' => $priority,\n ]);\n }", "public function addNewJobOpo()\n {\n }", "public function insert($projectId, Google_Job $postBody, $optParams = array()) {\n $params = array('projectId' => $projectId, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n $data = $this->__call('insert', array($params));\n if ($this->useObjects()) {\n return new Google_Job($data);\n } else {\n return $data;\n }\n }", "public function run()\n {\n Job::create([\n \"name\" => \"Wirausaha\"\n ]);\n\n Job::create([\n \"name\" => \"Wiraswasta\"\n ]);\n\n Job::create([\n \"name\" => \"Freelance\"\n ]);\n\n Job::create([\n \"name\" => \"Pelajar\"\n ]);\n }", "public function create() {\n \n }", "public function create() {\n \n }", "public static function createJob($mysqli,$name, $jobdesc, $cust_email, $trade, $area, $jobcost, $jobdate, $estdate){\n $insert = \"INSERT INTO job (job_name,job_desc,cust_email,trade_name,area,preferred_cost,date_needed,offer_end_date) VALUES (?,?,?,?,?,?,?,?)\";\n $stmt = $mysqli->prepare($insert);\n $stmt->bind_param('sssssiss', $name, $jobdesc, $cust_email, $trade, $area, $jobcost, $jobdate, $estdate); \n $stmt->execute();\n $stmt->close();\n $job = new Job(['JobName'],['JobDesc'],['Email'],['Trade'],['Area'],['JobCost'],['JobDate'],['EstDate']);\n return $job;\n }", "public function store(Request $request)\n {\n $job = new Job();\n $job->title = $request->title;\n $job->description = $request->description;\n $job->company_name = $request->company_name;\n $this->repo->save($job);\n return new JobsResources($job);\n }", "public function create()\n {\n $fields = Field::all();\n $jobTypes = config('user.job_type');\n\n return view('job.create', [\n 'fields' => $fields,\n 'jobTypes' => $jobTypes,\n ]);\n }", "public static function create($queue, $class, array $data = null, $run_at = 0)\n {\n $id = static::createId($queue, $class, $data, $run_at);\n\n $job = new static($queue, $id, $class, $data);\n\n if ($run_at > 0) {\n if (!$job->delay($run_at)) {\n return false;\n }\n } elseif (!$job->queue()) {\n return false;\n }\n\n Stats::incr('total', 1);\n Stats::incr('total', 1, Queue::redisKey($queue, 'stats'));\n\n return $job;\n }", "public function create()\n {\n return $this->objectManager->create($this->className);\n }", "public function create() {\r\n }", "public function create()\n {\n //TODO\n }", "public function submit(Job $job): JobResource\n {\n if (!$job->canBeModified()) {\n abort(400, 'Unable to submit a job that is already submitted.');\n }\n $job->setStatus(Job::QUEUED);\n JobRequest::dispatch($job);\n\n return new JobResource($job);\n }", "public function __construct(int $status, Job $job)\n {\n $this->status = $status;\n $this->job = $job;\n\n $this->updateTask($this->status, $this->job);\n }", "public function create()\n {\n return new $this->class;\n }", "public function create() {\n }", "public function create() {\n }", "public function create() {\n\t \n }", "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 return view('admin.jobs.create');\n }", "public function fake(Generator &$faker): Job\n {\n return new Job([\n 'name' => $faker->catchPhrase,\n 'summary' => $faker->sentence,\n 'workflow_id' => random_int(1, Fabricator::getCount('workflows') ?: 4),\n 'stage_id' => random_int(1, Fabricator::getCount('stages') ?: 99),\n ]);\n }", "public function run()\n {\n Job::factory()->count(100)->create();\n \n }", "public function create() {\n\t\t\t//\n\t\t}", "public function create()\n {\n return view('admin.jobs.create');\n\n }", "public function create() {\n\n\t\t\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "protected function _createJob($type, $job)\n\t{\n\t\treturn strtoupper($type) . ' ' . json_encode($job);\n\t}", "public function createJobWithSalesPrices(array $inputData): Job;", "public function create(Job $job)\n {\n $states = $job->prepareStates();\n $countries = $job->prepareCountries();\n $hours = $job->prepareHours();\n $minutes = $job->prepareMinutes();\n $ampm = $job->prepareAmpm();\n $open = $job->prepareOpen();\n return view('companies.create', compact(['states','countries','hours','minutes','ampm','open']));\n }", "public function create()\n {\n return view('jobs.create');\n }", "public function create()\n {\n return view('jobs.create');\n }", "public function create()\n {\n return view('jobs.create');\n }" ]
[ "0.6920272", "0.6905722", "0.6905722", "0.6869542", "0.6808916", "0.65271425", "0.65184414", "0.64918077", "0.6489135", "0.6468623", "0.6425879", "0.64058304", "0.63938236", "0.63899404", "0.63753885", "0.6304669", "0.6256802", "0.6241474", "0.620155", "0.61789167", "0.60741454", "0.60695714", "0.6047274", "0.60462874", "0.6028435", "0.6027225", "0.6021894", "0.60214204", "0.59231514", "0.58802027", "0.5874528", "0.58576655", "0.58098435", "0.5805053", "0.58005697", "0.5789109", "0.57851434", "0.57767034", "0.5775661", "0.5755982", "0.5702295", "0.5683395", "0.5683395", "0.5683395", "0.5683376", "0.5679739", "0.5678496", "0.5659406", "0.56529284", "0.56470996", "0.5634536", "0.5632702", "0.5632702", "0.5628215", "0.5625956", "0.5621957", "0.56141514", "0.56048644", "0.5604791", "0.5601149", "0.5601067", "0.5599652", "0.5595376", "0.55932534", "0.55932534", "0.55932015", "0.55778396", "0.55778396", "0.55778396", "0.55778396", "0.55778396", "0.55778396", "0.55778396", "0.55778396", "0.55778396", "0.55778396", "0.55778396", "0.55362236", "0.5534658", "0.5531583", "0.55224913", "0.5522197", "0.5517534", "0.55171794", "0.55171794", "0.55171794", "0.55171794", "0.55171794", "0.55171794", "0.55171794", "0.55171794", "0.55171794", "0.55171794", "0.55171794", "0.55171794", "0.5514842", "0.549955", "0.5497938", "0.54876786", "0.54876786", "0.54876786" ]
0.0
-1
Run the database seeds.
public function run() { Country::factory()->hasCompanies(2)->create(['name' => 'Канада']); Country::factory(9)->hasCompanies(2)->create(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
Generated from protobuf field string BatchID = 1;
public function getBatchID() { return $this->BatchID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setBatchID($var)\n {\n GPBUtil::checkString($var, True);\n $this->BatchID = $var;\n\n return $this;\n }", "function getBatchID()\n\t\t{\n\t\t\treturn $this->BatchID;\n\t\t}", "public function get_batch_id()\n {\n $results = $this->results();\n\n return $results['SubmitNotificationBatchResult']->BatchID;\n }", "function setBatchID($BatchID)\n\t\t{\n\t\t\t$this->BatchID = $BatchID;\n\t\t}", "function get_batch_id() {\n global $_REQUEST;\n if (!(isset($_REQUEST['batch_id'])\n && is_string($_REQUEST['batch_id'])\n && preg_match('/^\\{?[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}\\}?$/i', $_REQUEST['batch_id']))) {\n hs_ajax_result(false, \"hack attach!\", null);\n }\n\n return $_REQUEST['batch_id'];\n}", "public function fetchBatchId ()\r\n {\r\n $member_id = $this->getMember_id(true);\r\n $student_class_object = new Acad_Model_StudentClass();\r\n $student_class_object->setMember_id($member_id);\r\n $batch_identifier_class_id = $student_class_object->fetchBatchIdentifierClassId();\r\n $class_object = new Acad_Model_Class();\r\n $class_object->setClass_id($batch_identifier_class_id);\r\n $class_object->fetchInfo();\r\n $batch_id = $class_object->getBatch_id();\r\n return $batch_id;\r\n }", "public function getBatchCode()\n {\n $params = $this->getRequest()->getPost();\n $batch_number = $params['batch_number'];\n if (!$batch_number) {\n $id = (int) $params['entity_id'];\n if (!$id) {\n $id = $this->getRequest()->getParam('id', null); //Get batch id\n }\n if ($id) {\n $batch_number = Mage::getModel('batchcode/batchcode')\n ->load($id)\n ->getBatchNumber();\n }\n }\n\n if (!$batch_number) {\n $batch_number = Mage::helper('batchcode')->__('Invalid');\n }\n\n return $batch_number;\n }", "public function actionGetStackerBatchId(){\n $this->pageTitle = 'Stacker API - Get Stacker Batch ID';\n $result = '';\n \n if(isset($_POST['TerminalName']) || isset($_POST['MembershipCardNumber'])){\n $terminalName = $_POST['TerminalName'];\n $mcardnumber = $_POST['MembershipCardNumber'];\n \n $result = $this->_getStackerBatchId($terminalName, $mcardnumber);\n }\n \n $this->render('getStackerBatchId', array('result'=>$result));\n }", "function getBatchObj()\n\t\t{\n\t\t\treturn $this->BatchObj;\n\t\t}", "public function getBatch()\n {\n return $this->_batch;\n }", "public function get_start_batch(): string\n {\n return $this->start_batch;\n }", "function _civicrm_api3_entity_batch_create_spec(&$params) {\n $params['entity_id']['api.required'] = 1;\n $params['batch_id']['api.required'] = 1;\n}", "public function hasBatchid(){\n return $this->_has(3);\n }", "public function getBatch()\n {\n return isset($this->batch) ? $this->batch : null;\n }", "function getThisBatchId($db) {\n\t\t$batchId=0;\n\t\t$res=$db->query(\"SELECT MIN(id) as id_min FROM batch\");\n\t\twhile($row=$res->fetch_assoc()) {\n\t\t\t$batchId=$row[\"id_min\"];\n\t\t}\n\t\treturn $batchId+1;\n\t}", "public function getBatchQuantity()\n {\n return $this->batchQuantity;\n }", "public function id()\n {\n return $this->identity['jobId'];\n }", "public function getNextBatchNumber()\n {\n return $this->getLastBatchNumber() + 1;\n }", "public function getBatchToken(): ?string\n {\n return $this->batchToken;\n }", "public function schemaDefinition() {\n return [\n 'description' => 'Stores details about batches (processes that run in multiple HTTP requests).',\n 'fields' => [\n 'bid' => [\n 'description' => 'Primary Key: Unique batch ID.',\n // This is not a serial column, to allow both progressive and\n // non-progressive batches. See batch_process().\n 'type' => 'int',\n 'unsigned' => TRUE,\n 'not null' => TRUE,\n ],\n 'token' => [\n 'description' => \"A string token generated against the current user's session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it.\",\n 'type' => 'varchar_ascii',\n 'length' => 64,\n 'not null' => TRUE,\n ],\n 'timestamp' => [\n 'description' => 'A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.',\n 'type' => 'int',\n 'not null' => TRUE,\n ],\n 'batch' => [\n 'description' => 'A serialized array containing the processing data for the batch.',\n 'type' => 'blob',\n 'not null' => FALSE,\n 'size' => 'big',\n ],\n ],\n 'primary key' => ['bid'],\n 'indexes' => [\n 'token' => ['token'],\n ],\n ];\n }", "public function getBatch()\n\t{\n\t\tif (! is_int(self::$batch))\n\t\t{\n\t\t\t$batch = $this->db->table($this->table)\n\t\t\t\t->selectMax('batch')\n\t\t\t\t->get()->getResultObject();\n\t\t\t$batch = empty($batch) ? 0 : (int) reset($batch)->batch;\n\n\t\t\tself::$batch = $batch + 1;\n\t\t}\n\n\t\treturn self::$batch;\n\t}", "public function setBatch($value)\n {\n $this->_batch = $value;\n return $this;\n }", "public function setBatch(Batch $batch)\n {\n $this->batch = $batch;\n }", "function get_batch($batch_id)\n {\n return $this->db->get_where('batch',array('batch_id'=>$batch_id))->row_array();\n }", "function delete_batch($batch_id)\n {\n return $this->db->delete('batch',array('batch_id'=>$batch_id));\n }", "protected function getBatchCacheKey(ObjectIdentityInterface $oid)\n {\n return $oid->getType() . '_' . $this->getBatchNumber($oid);\n }", "public function get_end_batch(): string\n {\n return $this->end_batch;\n }", "public function __construct(array $batch)\n\t{\n\t\tif(Tivoka::$version == Tivoka::VER_1_0) throw new Tivoka_exception('Batch requests are not supported by JSON-RPC 1.0 spec', Tivoka::ERR_SPEC_INCOMPATIBLE);\n\t\t$this->id = array();\n\t\n\t\t//prepare requests...\n\t\tforeach($batch as $request)\n\t\t{\n\t\t\tif(!($request instanceof Tivoka_Request) && !($request instanceof Tivoka_Notification))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t//request...\n\t\t\tif($request instanceof Tivoka_Request)\n\t\t\t{\n\t\t\t\tif(in_array($request->id,$this->id,true)) continue;\n\t\t\t\t$this->id[$request->id] = $request;\n\t\t\t}\n\t\t\t\n\t\t\t$this->request[] = $request->request;\n\t\t}\n\t}", "public function getOrCreateBatch()\n {\n $batch = DB::table('job_batches')->where('name', '=', 'Process Csv')->first();\n if (!$batch) {\n try {\n return Bus::batch([])->name('Process Csv')->dispatch();\n } catch (\\Throwable $e) {\n }\n }\n return Bus::findBatch($batch->id);\n }", "public function requestBatchSatus($batchId);", "public function getStringId()\n\t{\n\t\treturn 'id_' . $this->getId();\n\t}", "function getStringID() {\n\t\treturn '[#'.$this->data_array['artifact_id'].']';\n\t}", "public function build_batch_reference($batch_reference = '')\n {\n $this->build_batch_reference = $batch_reference;\n }", "function setID($id) {\n global $connection;\n if (strlen($id)>0) {\n $this->batch_id = $id;\n $sql = 'select tr_batch_id, image_batch_id, completed_date, path from TR_BATCH where tr_batch_id = ?';\n if ($statement = $connection->prepare($sql)) {\n $statement->bind_param(\"i\",$id);\n $statement->execute();\n $statement->bind_result($batch_id, $image_batch_id, $completed_date, $path);\n $statement->store_result();\n if ($statement->fetch()) {\n $this->batch_id = $batch_id;\n $this->path = $path;\n $this->image_batch_id = $image_batch_id;\n $this->completed_date = $completed_date;\n // make sure there is a TR_USER_BATCH entry for this batch for the current user.\n $this->selectOrCreateUserForBatch();\n }\n $statement->close();\n if (strlen($this->batch_id)==0) {\n throw new Exception('Batch not found for path '. $path);\n }\n } else {\n throw new Exception('Problem with database connection or query preparation.');\n }\n } else {\n throw new Exception('No id provided for batch.');\n }\n }", "public function finish( $batch_id ) {\n\t\taffiliate_wp()->utils->data->delete_by_match( \"^{$batch_id}[0-9a-z\\_]+\" );\n\t}", "public function setDataBatch($var)\n {\n GPBUtil::checkMessage($var, \\Ydb\\PersQueue\\V1\\MigrationStreamingReadServerMessage\\DataBatch::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }", "public function batch($value) {\n return $this->setProperty('batch', $value);\n }", "function setBatchObj($BatchObj)\n\t\t{\n\t\t\t$this->BatchObj = $BatchObj;\n\t\t}", "public function __toString() {\n\t\t\treturn sprintf('PaypalBatch Object %s', $this->intId);\n\t\t}", "public function getJobId()\n {\n return (string) $this->job->getMessageId();\n }", "public function getLastBatchNo()\n {\n $query = \"SELECT max(BatchNumber) AS BatchNumber FROM voucherbatch\";\n $sql = Yii::app()->db->createCommand($query);\n $result = $sql->queryRow();\n \n if($result['BatchNumber'] > 0)\n return $result['BatchNumber'] + 1;\n else\n return 1;\n }", "public function getProjectBatchInfo(){\n return $this->_projectBatchInfo;\n }", "function id()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n \n return $this->ID;\n }", "public function lblBatchLabel_Create($strControlId = null) {\n\t\t\t$this->lblBatchLabel = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblBatchLabel->Name = QApplication::Translate('Batch Label');\n\t\t\t$this->lblBatchLabel->Text = $this->objStewardshipBatch->BatchLabel;\n\t\t\t$this->lblBatchLabel->Required = true;\n\t\t\treturn $this->lblBatchLabel;\n\t\t}", "protected function getBatchNumber(ObjectIdentityInterface $oid)\n {\n $identifier = $oid->getIdentifier();\n\n if (!$this->isDigitIdentifier($oid)) {\n $identifier = crc32($identifier);\n }\n\n return (int)floor($identifier / $this->batchSize) + 1;\n }", "public function getDataBatch()\n {\n return $this->readOneof(4);\n }", "public function setBatchNo($batch_no)\n {\n $this->_batch_no = $batch_no;\n }", "function id()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return $this->ID;\n }", "public function getJobId(): string\n {\n return $this->job_id;\n }", "public function getBatchRequest()\n {\n return new CFBatchRequest();\n }", "public function txtBatchLabel_Create($strControlId = null) {\n\t\t\t$this->txtBatchLabel = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtBatchLabel->Name = QApplication::Translate('Batch Label');\n\t\t\t$this->txtBatchLabel->Text = $this->objStewardshipBatch->BatchLabel;\n\t\t\t$this->txtBatchLabel->Required = true;\n\t\t\t$this->txtBatchLabel->MaxLength = StewardshipBatch::BatchLabelMaxLength;\n\t\t\treturn $this->txtBatchLabel;\n\t\t}", "public static function getID() {\r\n return 1;\r\n }", "function add_batch($params)\n {\n $this->db->insert('batch',$params);\n return $this->db->insert_id();\n }", "public function getJobId()\n {\n return $this->job->getMessageId();\n }", "public function get_builder_id()\n {\n return $this->builder_id;\n }", "public function getId()\n {\n return substr($this->_id, 0, 12);\n }", "public function getIdAttribute()\n {\n return $this->attributes['bag_id'];\n }", "public function __construct($batchId = null, $idsCount = null)\n {\n $this\n ->setBatchId($batchId)\n ->setIdsCount($idsCount);\n }", "public function getJobId()\n {\n if (array_key_exists('MessageId', $this->job)) {\n return $this->job['MessageId'];\n }\n\n return $this->job['messageId'];\n }", "public function setBatch($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Datastore\\V1\\QueryResultBatch::class);\n $this->batch = $var;\n\n return $this;\n }", "protected static function ExtractBatchBoundaryIndex($httpBatchResponse)\n {\n preg_match(\"|boundary=(batchresponse_[^\\r\\n]+)|\", $httpBatchResponse,\n $m, PREG_OFFSET_CAPTURE);\n if (isset($m[1]) && isset($m[1][1])) { return $m[1][1]; }\n\n return -1;\n }", "public function retrieve_product_batchid()\n\t{\t\n\t\t$CI =& get_instance();\n\t\t$batch_id = $this->input->post('batch_id');\n\t\t$product_info = $CI->Invoices->get_total_product_batch($batch_id);\n\t\techo json_encode($product_info);\n\t}", "public function buffer_client_id()\r\n\t{\r\n\t\treturn $this->buffer->client_id();\r\n\t}", "public function getBatchCount() {\n\t\treturn count( $this->batches );\n\t}", "public static function id()\n {\n return 1;\n }", "public function lblPaypalBatch_Create($strControlId = null) {\n\t\t\t$this->lblPaypalBatch = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPaypalBatch->Name = QApplication::Translate('Paypal Batch');\n\t\t\t$this->lblPaypalBatch->Text = ($this->objStewardshipBatch->PaypalBatch) ? $this->objStewardshipBatch->PaypalBatch->__toString() : null;\n\t\t\treturn $this->lblPaypalBatch;\n\t\t}", "public function getId()\n {\n return (substr($this->_id, 0, 12));\n }", "public function getID(): string {\n\t\treturn 'comments';\n\t}", "public function getBatchV1()\n {\n return Controllers\\BatchV1Controller::getInstance();\n }", "public function getId_Boisson()\n {\n return $this->Id_Boisson;\n }", "public function getID()\n {\n return 1;\n }", "public function getDatasetSubmissionId(): int\n {\n return $this->datasetSubmissionId;\n }", "public function getLastBatchNumber()\n {\n global $wpdb;\n\n $max = $wpdb->get_results(\n \"SELECT MAX(`batch`) as max FROM {$wpdb->prefix}exolnet_migration as em\",\n 'ARRAY_A'\n );\n\n return absint($max[0]['max']) ?? 0;\n }", "public static function process_batch_request() {\n\t\t// Batch ID.\n\t\t$batch_id = isset( $_REQUEST['batch_id'] ) ? sanitize_key( $_REQUEST['batch_id'] ) : false;\n\n\t\tif ( ! $batch_id ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => __( 'A batch process ID must be present to continue.', 'popup-maker' ),\n\t\t\t) );\n\t\t}\n\n\t\t// Nonce.\n\t\tif ( ! isset( $_REQUEST['nonce'] ) || ( isset( $_REQUEST['nonce'] ) && false === wp_verify_nonce( $_REQUEST['nonce'], \"{$batch_id}_step_nonce\" ) ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => __( 'You do not have permission to initiate this request. Contact an administrator for more information.', 'popup-maker' ),\n\t\t\t) );\n\t\t}\n\n\t\t// Attempt to retrieve the batch attributes from memory.\n\t\t$batch = PUM_Batch_Process_Registry::instance()->get( $batch_id );\n\n\t\tif ( $batch === false ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( '%s is an invalid batch process ID.', 'popup-maker' ), esc_html( $_REQUEST['batch_id'] ) ),\n\t\t\t) );\n\t\t}\n\n\t\t$class = isset( $batch['class'] ) ? sanitize_text_field( $batch['class'] ) : '';\n\t\t$class_file = isset( $batch['file'] ) ? $batch['file'] : '';\n\n\t\tif ( empty( $class_file ) || ! file_exists( $class_file ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( 'An invalid file path is registered for the %1$s batch process handler.', 'popup-maker' ), \"<code>{$batch_id}</code>\" ),\n\t\t\t) );\n\t\t} else {\n\t\t\trequire_once $class_file;\n\t\t}\n\n\t\tif ( empty( $class ) || ! class_exists( $class ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( '%1$s is an invalid handler for the %2$s batch process. Please try again.', 'popup-maker' ), \"<code>{$class}</code>\", \"<code>{$batch_id}</code>\" ),\n\t\t\t) );\n\t\t}\n\n\t\t$step = sanitize_text_field( $_REQUEST['step'] );\n\n\t\t/**\n\t\t * Instantiate the batch class.\n\t\t *\n\t\t * @var PUM_Interface_Batch_Exporter|PUM_Interface_Batch_Process|PUM_Interface_Batch_PrefetchProcess $process\n\t\t */\n\t\tif ( isset( $_REQUEST['data']['upload']['file'] ) ) {\n\n\t\t\t// If this is an import, instantiate with the file and step.\n\t\t\t$file = sanitize_text_field( $_REQUEST['data']['upload']['file'] );\n\t\t\t$process = new $class( $file, $step );\n\n\t\t} else {\n\n\t\t\t// Otherwise just the step.\n\t\t\t$process = new $class( $step );\n\n\t\t}\n\n\t\t// Garbage collect any old temporary data.\n\t\t// TODO Should this be here? Likely here to prevent case ajax passes step 1 without resetting process counts?\n\t\tif ( $step < 2 ) {\n\t\t\t$process->finish();\n\t\t}\n\n\t\t$using_prefetch = ( $process instanceof PUM_Interface_Batch_PrefetchProcess );\n\n\t\t// Handle pre-fetching data.\n\t\tif ( $using_prefetch ) {\n\t\t\t// Initialize any data needed to process a step.\n\t\t\t$data = isset( $_REQUEST['form'] ) ? $_REQUEST['form'] : array();\n\n\t\t\t$process->init( $data );\n\t\t\t$process->pre_fetch();\n\t\t}\n\n\t\t/** @var int|string|WP_Error $step */\n\t\t$step = $process->process_step();\n\n\t\tif ( is_wp_error( $step ) ) {\n\t\t\twp_send_json_error( $step );\n\t\t} else {\n\t\t\t$response_data = array( 'step' => $step );\n\n\t\t\t// Map fields if this is an import.\n\t\t\tif ( isset( $process->field_mapping ) && ( $process instanceof PUM_Interface_CSV_Importer ) ) {\n\t\t\t\t$response_data['columns'] = $process->get_columns();\n\t\t\t\t$response_data['mapping'] = $process->field_mapping;\n\t\t\t}\n\n\t\t\t// Finish and set the status flag if done.\n\t\t\tif ( 'done' === $step ) {\n\t\t\t\t$response_data['done'] = true;\n\t\t\t\t$response_data['message'] = $process->get_message( 'done' );\n\n\t\t\t\t// If this is an export class and not an empty export, send the download URL.\n\t\t\t\tif ( method_exists( $process, 'can_export' ) ) {\n\n\t\t\t\t\tif ( ! $process->is_empty ) {\n\t\t\t\t\t\t$response_data['url'] = pum_admin_url( 'tools', array(\n\t\t\t\t\t\t\t'step' => $step,\n\t\t\t\t\t\t\t'nonce' => wp_create_nonce( 'pum-batch-export' ),\n\t\t\t\t\t\t\t'batch_id' => $batch_id,\n\t\t\t\t\t\t\t'pum_action' => 'download_batch_export',\n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Once all calculations have finished, run cleanup.\n\t\t\t\t$process->finish();\n\t\t\t} else {\n\t\t\t\t$response_data['done'] = false;\n\t\t\t\t$response_data['percentage'] = $process->get_percentage_complete();\n\t\t\t}\n\n\t\t\twp_send_json_success( $response_data );\n\t\t}\n\n\t}", "public function batch()\n {\n return $this->belongsTo(Batch::class);\n }", "public function ddl_perbatch($batch)\r\n\t {\r\n\t $link = $this->connect();\r\n\t $query = \"SELECT \r\n\t p.pig_id \r\n\t FROM pig p\r\n\t WHERE p.pig_batch = '\" . $batch . \"' \";\r\n\t $result = mysqli_query($link, $query);\r\n\t $arr_ppen = array();\r\n\t while ($row = mysqli_fetch_row($result)) {\r\n\t $arr_ppen[] = $row[0];\r\n\r\n\t }\r\n\t return $arr_ppen;\r\n\t }", "protected function getNewID()\n {\n $ids = [];\n $namedIds = [];\n foreach (static::$ids as $k) {\n // attempt use the supplied value if the ID property is mutable\n $property = static::getProperty($k);\n if (in_array($property['mutable'], [self::MUTABLE, self::MUTABLE_CREATE_ONLY]) && isset($this->_unsaved[$k])) {\n $id = $this->_unsaved[$k];\n } else {\n $id = self::$driver->getCreatedID($this, $k);\n }\n\n $ids[] = $id;\n $namedIds[$k] = $id;\n }\n\n $this->_id = implode(',', $ids);\n $this->_ids = $namedIds;\n }", "public function batch()\n\t{\n\t\treturn $this->table()->max('batch');\n\t}", "public function getID()\n {\n return $this->banner_campaign_id;\n }", "protected function existingItemId(FeedsImportBatch $batch, FeedsSource $source) {\n\n // The only possible unique target is name.\n foreach ($this->uniqueTargets($batch) as $target => $value) {\n if ($target == 'name') {\n $vocabulary = $this->vocabulary();\n if ($tid = db_result(db_query(\"SELECT tid FROM {term_data} WHERE name = '%s' AND vid = %d\", $value, $vocabulary->vid))) {\n return $tid;\n }\n }\n }\n return 0;\n }", "public function testGenerateID()\n {\n $this->Mail->Body = 'Testing 1, 2, 3';\n $this->Mail->isHTML();\n $this->Mail->AltBody = $this->Mail->Body;\n $this->buildBody();\n $this->Mail->preSend();\n $message = $this->Mail->getSentMIMEMessage();\n\n // Find the generated ID in the message.\n self::assertSame(\n 1,\n preg_match(\n '`Content-Type: multipart/alternative;\\s+boundary=\"(b[1-3]_[A-Za-z0-9]{32,})\"`',\n $message,\n $matches\n ),\n 'Boundary identifier header line not found in message'\n );\n\n // Check that the generated ID is used in at least one boundary.\n $LE = PHPMailer::getLE();\n self::assertStringContainsString(\n $LE . '--' . $matches[1] . $LE,\n $message,\n 'No boundaries using the generated ID found in message'\n );\n }", "public function getRecordId()\n {\n return isset($this->fields['id']) ?\n $this->fields['id'] : '';\n }", "function getUniqueID(){\n\t\treturn $this->module.'_'.$this->ID;\n\t}", "public function batchIndex(): ?int;", "public function getUniqueId()\n {\n return $this->getParent()->getUniqueId() . \"_cg\" . $this->getId();\n }", "public function getID()\n {\n return $this->formattedData['id'];\n }", "function get_idstring() {\n return $this->id;\n }", "public function id() {\n return $this->activity_array['id'];\n }", "function Receipt_Batch(){\n\t/*Constructor function initialises a new receipt batch */\n\t\t$this->Items = array();\n\t\t$this->ItemCounter=0;\n\t\t$this->total=0;\n\t}", "protected function getOrganizationActionBatchRequest($organization_id, $action_batch_id)\n {\n // verify the required parameter 'organization_id' is set\n if ($organization_id === null || (is_array($organization_id) && count($organization_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $organization_id when calling getOrganizationActionBatch'\n );\n }\n // verify the required parameter 'action_batch_id' is set\n if ($action_batch_id === null || (is_array($action_batch_id) && count($action_batch_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $action_batch_id when calling getOrganizationActionBatch'\n );\n }\n\n $resourcePath = '/organizations/{organizationId}/actionBatches/{actionBatchId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($organization_id !== null) {\n $resourcePath = str_replace(\n '{' . 'organizationId' . '}',\n ObjectSerializer::toPathValue($organization_id),\n $resourcePath\n );\n }\n // path params\n if ($action_batch_id !== null) {\n $resourcePath = str_replace(\n '{' . 'actionBatchId' . '}',\n ObjectSerializer::toPathValue($action_batch_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getEntityId()\n {\n return $this->feedbackId;\n }", "public function getIdParameter(): string;", "public function ddl_batch()\r\n\t {\r\n\t $link = $this->connect();\r\n\t $search = \"SELECT DISTINCT pig_batch FROM pig\";\r\n\t $resultq = mysqli_query($link, $search);\r\n\t $batch = array();\r\n\t $batchArr = array();\r\n\t while ($row = mysqli_fetch_row($resultq)) {\r\n\t $batch['batch'] = $row[0];\r\n\t $batchArr[] = $batch;\r\n\t }\r\n\t return $batchArr;\r\n\t }", "public function getUniqueId() {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }" ]
[ "0.7591301", "0.7506304", "0.72075903", "0.67298156", "0.64076585", "0.6348025", "0.59486574", "0.58121145", "0.58113956", "0.57880896", "0.5721433", "0.5570651", "0.55528086", "0.55322933", "0.55178195", "0.5318432", "0.5308517", "0.5267166", "0.52521724", "0.52351195", "0.52215165", "0.521892", "0.52040946", "0.51894766", "0.51865286", "0.5174539", "0.5163068", "0.5149745", "0.5141627", "0.5128119", "0.5123985", "0.50937736", "0.5091769", "0.5086069", "0.50737965", "0.5047582", "0.504012", "0.49796426", "0.49688438", "0.49505794", "0.49475217", "0.49474046", "0.49473754", "0.49461544", "0.4941222", "0.4939672", "0.49387184", "0.49339616", "0.49222234", "0.49168903", "0.49136248", "0.48985785", "0.48970717", "0.4895858", "0.4892768", "0.48774564", "0.48736593", "0.48528624", "0.48488396", "0.48324952", "0.48323643", "0.48305073", "0.48267603", "0.48244357", "0.4814134", "0.48077267", "0.47952268", "0.4775088", "0.47744218", "0.4773588", "0.47670043", "0.47650585", "0.47483957", "0.4743844", "0.47417587", "0.47291592", "0.47276324", "0.47235444", "0.47138926", "0.4704924", "0.47021157", "0.4689936", "0.4673218", "0.4661122", "0.4656531", "0.46555308", "0.4655292", "0.46497443", "0.46495014", "0.46454543", "0.46426973", "0.46407002", "0.4635704", "0.46345764", "0.46314806", "0.46314806", "0.46314806", "0.46314806", "0.46314806", "0.46314806" ]
0.75993687
0
Generated from protobuf field string BatchID = 1;
public function setBatchID($var) { GPBUtil::checkString($var, True); $this->BatchID = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBatchID()\n {\n return $this->BatchID;\n }", "function getBatchID()\n\t\t{\n\t\t\treturn $this->BatchID;\n\t\t}", "public function get_batch_id()\n {\n $results = $this->results();\n\n return $results['SubmitNotificationBatchResult']->BatchID;\n }", "function setBatchID($BatchID)\n\t\t{\n\t\t\t$this->BatchID = $BatchID;\n\t\t}", "function get_batch_id() {\n global $_REQUEST;\n if (!(isset($_REQUEST['batch_id'])\n && is_string($_REQUEST['batch_id'])\n && preg_match('/^\\{?[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}\\}?$/i', $_REQUEST['batch_id']))) {\n hs_ajax_result(false, \"hack attach!\", null);\n }\n\n return $_REQUEST['batch_id'];\n}", "public function fetchBatchId ()\r\n {\r\n $member_id = $this->getMember_id(true);\r\n $student_class_object = new Acad_Model_StudentClass();\r\n $student_class_object->setMember_id($member_id);\r\n $batch_identifier_class_id = $student_class_object->fetchBatchIdentifierClassId();\r\n $class_object = new Acad_Model_Class();\r\n $class_object->setClass_id($batch_identifier_class_id);\r\n $class_object->fetchInfo();\r\n $batch_id = $class_object->getBatch_id();\r\n return $batch_id;\r\n }", "public function getBatchCode()\n {\n $params = $this->getRequest()->getPost();\n $batch_number = $params['batch_number'];\n if (!$batch_number) {\n $id = (int) $params['entity_id'];\n if (!$id) {\n $id = $this->getRequest()->getParam('id', null); //Get batch id\n }\n if ($id) {\n $batch_number = Mage::getModel('batchcode/batchcode')\n ->load($id)\n ->getBatchNumber();\n }\n }\n\n if (!$batch_number) {\n $batch_number = Mage::helper('batchcode')->__('Invalid');\n }\n\n return $batch_number;\n }", "public function actionGetStackerBatchId(){\n $this->pageTitle = 'Stacker API - Get Stacker Batch ID';\n $result = '';\n \n if(isset($_POST['TerminalName']) || isset($_POST['MembershipCardNumber'])){\n $terminalName = $_POST['TerminalName'];\n $mcardnumber = $_POST['MembershipCardNumber'];\n \n $result = $this->_getStackerBatchId($terminalName, $mcardnumber);\n }\n \n $this->render('getStackerBatchId', array('result'=>$result));\n }", "function getBatchObj()\n\t\t{\n\t\t\treturn $this->BatchObj;\n\t\t}", "public function getBatch()\n {\n return $this->_batch;\n }", "public function get_start_batch(): string\n {\n return $this->start_batch;\n }", "function _civicrm_api3_entity_batch_create_spec(&$params) {\n $params['entity_id']['api.required'] = 1;\n $params['batch_id']['api.required'] = 1;\n}", "public function hasBatchid(){\n return $this->_has(3);\n }", "public function getBatch()\n {\n return isset($this->batch) ? $this->batch : null;\n }", "function getThisBatchId($db) {\n\t\t$batchId=0;\n\t\t$res=$db->query(\"SELECT MIN(id) as id_min FROM batch\");\n\t\twhile($row=$res->fetch_assoc()) {\n\t\t\t$batchId=$row[\"id_min\"];\n\t\t}\n\t\treturn $batchId+1;\n\t}", "public function getBatchQuantity()\n {\n return $this->batchQuantity;\n }", "public function id()\n {\n return $this->identity['jobId'];\n }", "public function getNextBatchNumber()\n {\n return $this->getLastBatchNumber() + 1;\n }", "public function getBatchToken(): ?string\n {\n return $this->batchToken;\n }", "public function schemaDefinition() {\n return [\n 'description' => 'Stores details about batches (processes that run in multiple HTTP requests).',\n 'fields' => [\n 'bid' => [\n 'description' => 'Primary Key: Unique batch ID.',\n // This is not a serial column, to allow both progressive and\n // non-progressive batches. See batch_process().\n 'type' => 'int',\n 'unsigned' => TRUE,\n 'not null' => TRUE,\n ],\n 'token' => [\n 'description' => \"A string token generated against the current user's session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it.\",\n 'type' => 'varchar_ascii',\n 'length' => 64,\n 'not null' => TRUE,\n ],\n 'timestamp' => [\n 'description' => 'A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.',\n 'type' => 'int',\n 'not null' => TRUE,\n ],\n 'batch' => [\n 'description' => 'A serialized array containing the processing data for the batch.',\n 'type' => 'blob',\n 'not null' => FALSE,\n 'size' => 'big',\n ],\n ],\n 'primary key' => ['bid'],\n 'indexes' => [\n 'token' => ['token'],\n ],\n ];\n }", "public function getBatch()\n\t{\n\t\tif (! is_int(self::$batch))\n\t\t{\n\t\t\t$batch = $this->db->table($this->table)\n\t\t\t\t->selectMax('batch')\n\t\t\t\t->get()->getResultObject();\n\t\t\t$batch = empty($batch) ? 0 : (int) reset($batch)->batch;\n\n\t\t\tself::$batch = $batch + 1;\n\t\t}\n\n\t\treturn self::$batch;\n\t}", "public function setBatch($value)\n {\n $this->_batch = $value;\n return $this;\n }", "public function setBatch(Batch $batch)\n {\n $this->batch = $batch;\n }", "function get_batch($batch_id)\n {\n return $this->db->get_where('batch',array('batch_id'=>$batch_id))->row_array();\n }", "function delete_batch($batch_id)\n {\n return $this->db->delete('batch',array('batch_id'=>$batch_id));\n }", "protected function getBatchCacheKey(ObjectIdentityInterface $oid)\n {\n return $oid->getType() . '_' . $this->getBatchNumber($oid);\n }", "public function get_end_batch(): string\n {\n return $this->end_batch;\n }", "public function __construct(array $batch)\n\t{\n\t\tif(Tivoka::$version == Tivoka::VER_1_0) throw new Tivoka_exception('Batch requests are not supported by JSON-RPC 1.0 spec', Tivoka::ERR_SPEC_INCOMPATIBLE);\n\t\t$this->id = array();\n\t\n\t\t//prepare requests...\n\t\tforeach($batch as $request)\n\t\t{\n\t\t\tif(!($request instanceof Tivoka_Request) && !($request instanceof Tivoka_Notification))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t//request...\n\t\t\tif($request instanceof Tivoka_Request)\n\t\t\t{\n\t\t\t\tif(in_array($request->id,$this->id,true)) continue;\n\t\t\t\t$this->id[$request->id] = $request;\n\t\t\t}\n\t\t\t\n\t\t\t$this->request[] = $request->request;\n\t\t}\n\t}", "public function getOrCreateBatch()\n {\n $batch = DB::table('job_batches')->where('name', '=', 'Process Csv')->first();\n if (!$batch) {\n try {\n return Bus::batch([])->name('Process Csv')->dispatch();\n } catch (\\Throwable $e) {\n }\n }\n return Bus::findBatch($batch->id);\n }", "public function requestBatchSatus($batchId);", "public function getStringId()\n\t{\n\t\treturn 'id_' . $this->getId();\n\t}", "function getStringID() {\n\t\treturn '[#'.$this->data_array['artifact_id'].']';\n\t}", "public function build_batch_reference($batch_reference = '')\n {\n $this->build_batch_reference = $batch_reference;\n }", "function setID($id) {\n global $connection;\n if (strlen($id)>0) {\n $this->batch_id = $id;\n $sql = 'select tr_batch_id, image_batch_id, completed_date, path from TR_BATCH where tr_batch_id = ?';\n if ($statement = $connection->prepare($sql)) {\n $statement->bind_param(\"i\",$id);\n $statement->execute();\n $statement->bind_result($batch_id, $image_batch_id, $completed_date, $path);\n $statement->store_result();\n if ($statement->fetch()) {\n $this->batch_id = $batch_id;\n $this->path = $path;\n $this->image_batch_id = $image_batch_id;\n $this->completed_date = $completed_date;\n // make sure there is a TR_USER_BATCH entry for this batch for the current user.\n $this->selectOrCreateUserForBatch();\n }\n $statement->close();\n if (strlen($this->batch_id)==0) {\n throw new Exception('Batch not found for path '. $path);\n }\n } else {\n throw new Exception('Problem with database connection or query preparation.');\n }\n } else {\n throw new Exception('No id provided for batch.');\n }\n }", "public function finish( $batch_id ) {\n\t\taffiliate_wp()->utils->data->delete_by_match( \"^{$batch_id}[0-9a-z\\_]+\" );\n\t}", "public function setDataBatch($var)\n {\n GPBUtil::checkMessage($var, \\Ydb\\PersQueue\\V1\\MigrationStreamingReadServerMessage\\DataBatch::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }", "public function batch($value) {\n return $this->setProperty('batch', $value);\n }", "function setBatchObj($BatchObj)\n\t\t{\n\t\t\t$this->BatchObj = $BatchObj;\n\t\t}", "public function __toString() {\n\t\t\treturn sprintf('PaypalBatch Object %s', $this->intId);\n\t\t}", "public function getJobId()\n {\n return (string) $this->job->getMessageId();\n }", "function id()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n \n return $this->ID;\n }", "public function lblBatchLabel_Create($strControlId = null) {\n\t\t\t$this->lblBatchLabel = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblBatchLabel->Name = QApplication::Translate('Batch Label');\n\t\t\t$this->lblBatchLabel->Text = $this->objStewardshipBatch->BatchLabel;\n\t\t\t$this->lblBatchLabel->Required = true;\n\t\t\treturn $this->lblBatchLabel;\n\t\t}", "public function getProjectBatchInfo(){\n return $this->_projectBatchInfo;\n }", "public function getLastBatchNo()\n {\n $query = \"SELECT max(BatchNumber) AS BatchNumber FROM voucherbatch\";\n $sql = Yii::app()->db->createCommand($query);\n $result = $sql->queryRow();\n \n if($result['BatchNumber'] > 0)\n return $result['BatchNumber'] + 1;\n else\n return 1;\n }", "protected function getBatchNumber(ObjectIdentityInterface $oid)\n {\n $identifier = $oid->getIdentifier();\n\n if (!$this->isDigitIdentifier($oid)) {\n $identifier = crc32($identifier);\n }\n\n return (int)floor($identifier / $this->batchSize) + 1;\n }", "public function getDataBatch()\n {\n return $this->readOneof(4);\n }", "public function setBatchNo($batch_no)\n {\n $this->_batch_no = $batch_no;\n }", "function id()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return $this->ID;\n }", "public function getJobId(): string\n {\n return $this->job_id;\n }", "public function getBatchRequest()\n {\n return new CFBatchRequest();\n }", "public function txtBatchLabel_Create($strControlId = null) {\n\t\t\t$this->txtBatchLabel = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtBatchLabel->Name = QApplication::Translate('Batch Label');\n\t\t\t$this->txtBatchLabel->Text = $this->objStewardshipBatch->BatchLabel;\n\t\t\t$this->txtBatchLabel->Required = true;\n\t\t\t$this->txtBatchLabel->MaxLength = StewardshipBatch::BatchLabelMaxLength;\n\t\t\treturn $this->txtBatchLabel;\n\t\t}", "public static function getID() {\r\n return 1;\r\n }", "function add_batch($params)\n {\n $this->db->insert('batch',$params);\n return $this->db->insert_id();\n }", "public function getJobId()\n {\n return $this->job->getMessageId();\n }", "public function get_builder_id()\n {\n return $this->builder_id;\n }", "public function getId()\n {\n return substr($this->_id, 0, 12);\n }", "public function getIdAttribute()\n {\n return $this->attributes['bag_id'];\n }", "public function __construct($batchId = null, $idsCount = null)\n {\n $this\n ->setBatchId($batchId)\n ->setIdsCount($idsCount);\n }", "public function getJobId()\n {\n if (array_key_exists('MessageId', $this->job)) {\n return $this->job['MessageId'];\n }\n\n return $this->job['messageId'];\n }", "public function setBatch($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Datastore\\V1\\QueryResultBatch::class);\n $this->batch = $var;\n\n return $this;\n }", "protected static function ExtractBatchBoundaryIndex($httpBatchResponse)\n {\n preg_match(\"|boundary=(batchresponse_[^\\r\\n]+)|\", $httpBatchResponse,\n $m, PREG_OFFSET_CAPTURE);\n if (isset($m[1]) && isset($m[1][1])) { return $m[1][1]; }\n\n return -1;\n }", "public function retrieve_product_batchid()\n\t{\t\n\t\t$CI =& get_instance();\n\t\t$batch_id = $this->input->post('batch_id');\n\t\t$product_info = $CI->Invoices->get_total_product_batch($batch_id);\n\t\techo json_encode($product_info);\n\t}", "public function buffer_client_id()\r\n\t{\r\n\t\treturn $this->buffer->client_id();\r\n\t}", "public function getBatchCount() {\n\t\treturn count( $this->batches );\n\t}", "public static function id()\n {\n return 1;\n }", "public function lblPaypalBatch_Create($strControlId = null) {\n\t\t\t$this->lblPaypalBatch = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPaypalBatch->Name = QApplication::Translate('Paypal Batch');\n\t\t\t$this->lblPaypalBatch->Text = ($this->objStewardshipBatch->PaypalBatch) ? $this->objStewardshipBatch->PaypalBatch->__toString() : null;\n\t\t\treturn $this->lblPaypalBatch;\n\t\t}", "public function getId()\n {\n return (substr($this->_id, 0, 12));\n }", "public function getBatchV1()\n {\n return Controllers\\BatchV1Controller::getInstance();\n }", "public function getId_Boisson()\n {\n return $this->Id_Boisson;\n }", "public function getID(): string {\n\t\treturn 'comments';\n\t}", "public function getID()\n {\n return 1;\n }", "public function getDatasetSubmissionId(): int\n {\n return $this->datasetSubmissionId;\n }", "public function getLastBatchNumber()\n {\n global $wpdb;\n\n $max = $wpdb->get_results(\n \"SELECT MAX(`batch`) as max FROM {$wpdb->prefix}exolnet_migration as em\",\n 'ARRAY_A'\n );\n\n return absint($max[0]['max']) ?? 0;\n }", "public static function process_batch_request() {\n\t\t// Batch ID.\n\t\t$batch_id = isset( $_REQUEST['batch_id'] ) ? sanitize_key( $_REQUEST['batch_id'] ) : false;\n\n\t\tif ( ! $batch_id ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => __( 'A batch process ID must be present to continue.', 'popup-maker' ),\n\t\t\t) );\n\t\t}\n\n\t\t// Nonce.\n\t\tif ( ! isset( $_REQUEST['nonce'] ) || ( isset( $_REQUEST['nonce'] ) && false === wp_verify_nonce( $_REQUEST['nonce'], \"{$batch_id}_step_nonce\" ) ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => __( 'You do not have permission to initiate this request. Contact an administrator for more information.', 'popup-maker' ),\n\t\t\t) );\n\t\t}\n\n\t\t// Attempt to retrieve the batch attributes from memory.\n\t\t$batch = PUM_Batch_Process_Registry::instance()->get( $batch_id );\n\n\t\tif ( $batch === false ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( '%s is an invalid batch process ID.', 'popup-maker' ), esc_html( $_REQUEST['batch_id'] ) ),\n\t\t\t) );\n\t\t}\n\n\t\t$class = isset( $batch['class'] ) ? sanitize_text_field( $batch['class'] ) : '';\n\t\t$class_file = isset( $batch['file'] ) ? $batch['file'] : '';\n\n\t\tif ( empty( $class_file ) || ! file_exists( $class_file ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( 'An invalid file path is registered for the %1$s batch process handler.', 'popup-maker' ), \"<code>{$batch_id}</code>\" ),\n\t\t\t) );\n\t\t} else {\n\t\t\trequire_once $class_file;\n\t\t}\n\n\t\tif ( empty( $class ) || ! class_exists( $class ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( '%1$s is an invalid handler for the %2$s batch process. Please try again.', 'popup-maker' ), \"<code>{$class}</code>\", \"<code>{$batch_id}</code>\" ),\n\t\t\t) );\n\t\t}\n\n\t\t$step = sanitize_text_field( $_REQUEST['step'] );\n\n\t\t/**\n\t\t * Instantiate the batch class.\n\t\t *\n\t\t * @var PUM_Interface_Batch_Exporter|PUM_Interface_Batch_Process|PUM_Interface_Batch_PrefetchProcess $process\n\t\t */\n\t\tif ( isset( $_REQUEST['data']['upload']['file'] ) ) {\n\n\t\t\t// If this is an import, instantiate with the file and step.\n\t\t\t$file = sanitize_text_field( $_REQUEST['data']['upload']['file'] );\n\t\t\t$process = new $class( $file, $step );\n\n\t\t} else {\n\n\t\t\t// Otherwise just the step.\n\t\t\t$process = new $class( $step );\n\n\t\t}\n\n\t\t// Garbage collect any old temporary data.\n\t\t// TODO Should this be here? Likely here to prevent case ajax passes step 1 without resetting process counts?\n\t\tif ( $step < 2 ) {\n\t\t\t$process->finish();\n\t\t}\n\n\t\t$using_prefetch = ( $process instanceof PUM_Interface_Batch_PrefetchProcess );\n\n\t\t// Handle pre-fetching data.\n\t\tif ( $using_prefetch ) {\n\t\t\t// Initialize any data needed to process a step.\n\t\t\t$data = isset( $_REQUEST['form'] ) ? $_REQUEST['form'] : array();\n\n\t\t\t$process->init( $data );\n\t\t\t$process->pre_fetch();\n\t\t}\n\n\t\t/** @var int|string|WP_Error $step */\n\t\t$step = $process->process_step();\n\n\t\tif ( is_wp_error( $step ) ) {\n\t\t\twp_send_json_error( $step );\n\t\t} else {\n\t\t\t$response_data = array( 'step' => $step );\n\n\t\t\t// Map fields if this is an import.\n\t\t\tif ( isset( $process->field_mapping ) && ( $process instanceof PUM_Interface_CSV_Importer ) ) {\n\t\t\t\t$response_data['columns'] = $process->get_columns();\n\t\t\t\t$response_data['mapping'] = $process->field_mapping;\n\t\t\t}\n\n\t\t\t// Finish and set the status flag if done.\n\t\t\tif ( 'done' === $step ) {\n\t\t\t\t$response_data['done'] = true;\n\t\t\t\t$response_data['message'] = $process->get_message( 'done' );\n\n\t\t\t\t// If this is an export class and not an empty export, send the download URL.\n\t\t\t\tif ( method_exists( $process, 'can_export' ) ) {\n\n\t\t\t\t\tif ( ! $process->is_empty ) {\n\t\t\t\t\t\t$response_data['url'] = pum_admin_url( 'tools', array(\n\t\t\t\t\t\t\t'step' => $step,\n\t\t\t\t\t\t\t'nonce' => wp_create_nonce( 'pum-batch-export' ),\n\t\t\t\t\t\t\t'batch_id' => $batch_id,\n\t\t\t\t\t\t\t'pum_action' => 'download_batch_export',\n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Once all calculations have finished, run cleanup.\n\t\t\t\t$process->finish();\n\t\t\t} else {\n\t\t\t\t$response_data['done'] = false;\n\t\t\t\t$response_data['percentage'] = $process->get_percentage_complete();\n\t\t\t}\n\n\t\t\twp_send_json_success( $response_data );\n\t\t}\n\n\t}", "public function batch()\n {\n return $this->belongsTo(Batch::class);\n }", "public function ddl_perbatch($batch)\r\n\t {\r\n\t $link = $this->connect();\r\n\t $query = \"SELECT \r\n\t p.pig_id \r\n\t FROM pig p\r\n\t WHERE p.pig_batch = '\" . $batch . \"' \";\r\n\t $result = mysqli_query($link, $query);\r\n\t $arr_ppen = array();\r\n\t while ($row = mysqli_fetch_row($result)) {\r\n\t $arr_ppen[] = $row[0];\r\n\r\n\t }\r\n\t return $arr_ppen;\r\n\t }", "protected function getNewID()\n {\n $ids = [];\n $namedIds = [];\n foreach (static::$ids as $k) {\n // attempt use the supplied value if the ID property is mutable\n $property = static::getProperty($k);\n if (in_array($property['mutable'], [self::MUTABLE, self::MUTABLE_CREATE_ONLY]) && isset($this->_unsaved[$k])) {\n $id = $this->_unsaved[$k];\n } else {\n $id = self::$driver->getCreatedID($this, $k);\n }\n\n $ids[] = $id;\n $namedIds[$k] = $id;\n }\n\n $this->_id = implode(',', $ids);\n $this->_ids = $namedIds;\n }", "public function batch()\n\t{\n\t\treturn $this->table()->max('batch');\n\t}", "public function getID()\n {\n return $this->banner_campaign_id;\n }", "protected function existingItemId(FeedsImportBatch $batch, FeedsSource $source) {\n\n // The only possible unique target is name.\n foreach ($this->uniqueTargets($batch) as $target => $value) {\n if ($target == 'name') {\n $vocabulary = $this->vocabulary();\n if ($tid = db_result(db_query(\"SELECT tid FROM {term_data} WHERE name = '%s' AND vid = %d\", $value, $vocabulary->vid))) {\n return $tid;\n }\n }\n }\n return 0;\n }", "public function testGenerateID()\n {\n $this->Mail->Body = 'Testing 1, 2, 3';\n $this->Mail->isHTML();\n $this->Mail->AltBody = $this->Mail->Body;\n $this->buildBody();\n $this->Mail->preSend();\n $message = $this->Mail->getSentMIMEMessage();\n\n // Find the generated ID in the message.\n self::assertSame(\n 1,\n preg_match(\n '`Content-Type: multipart/alternative;\\s+boundary=\"(b[1-3]_[A-Za-z0-9]{32,})\"`',\n $message,\n $matches\n ),\n 'Boundary identifier header line not found in message'\n );\n\n // Check that the generated ID is used in at least one boundary.\n $LE = PHPMailer::getLE();\n self::assertStringContainsString(\n $LE . '--' . $matches[1] . $LE,\n $message,\n 'No boundaries using the generated ID found in message'\n );\n }", "public function getRecordId()\n {\n return isset($this->fields['id']) ?\n $this->fields['id'] : '';\n }", "function getUniqueID(){\n\t\treturn $this->module.'_'.$this->ID;\n\t}", "public function batchIndex(): ?int;", "function get_idstring() {\n return $this->id;\n }", "public function getID()\n {\n return $this->formattedData['id'];\n }", "public function getUniqueId()\n {\n return $this->getParent()->getUniqueId() . \"_cg\" . $this->getId();\n }", "public function id() {\n return $this->activity_array['id'];\n }", "function Receipt_Batch(){\n\t/*Constructor function initialises a new receipt batch */\n\t\t$this->Items = array();\n\t\t$this->ItemCounter=0;\n\t\t$this->total=0;\n\t}", "protected function getOrganizationActionBatchRequest($organization_id, $action_batch_id)\n {\n // verify the required parameter 'organization_id' is set\n if ($organization_id === null || (is_array($organization_id) && count($organization_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $organization_id when calling getOrganizationActionBatch'\n );\n }\n // verify the required parameter 'action_batch_id' is set\n if ($action_batch_id === null || (is_array($action_batch_id) && count($action_batch_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $action_batch_id when calling getOrganizationActionBatch'\n );\n }\n\n $resourcePath = '/organizations/{organizationId}/actionBatches/{actionBatchId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($organization_id !== null) {\n $resourcePath = str_replace(\n '{' . 'organizationId' . '}',\n ObjectSerializer::toPathValue($organization_id),\n $resourcePath\n );\n }\n // path params\n if ($action_batch_id !== null) {\n $resourcePath = str_replace(\n '{' . 'actionBatchId' . '}',\n ObjectSerializer::toPathValue($action_batch_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getEntityId()\n {\n return $this->feedbackId;\n }", "public function getIdParameter(): string;", "public function ddl_batch()\r\n\t {\r\n\t $link = $this->connect();\r\n\t $search = \"SELECT DISTINCT pig_batch FROM pig\";\r\n\t $resultq = mysqli_query($link, $search);\r\n\t $batch = array();\r\n\t $batchArr = array();\r\n\t while ($row = mysqli_fetch_row($resultq)) {\r\n\t $batch['batch'] = $row[0];\r\n\t $batchArr[] = $batch;\r\n\t }\r\n\t return $batchArr;\r\n\t }", "public function getUniqueId() {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }", "public function getId(): string\n {\n return $this->id;\n }" ]
[ "0.7600266", "0.7507258", "0.7207866", "0.673229", "0.64077014", "0.63488173", "0.59483385", "0.5812637", "0.5812263", "0.57884437", "0.5721678", "0.55684054", "0.55529034", "0.5532456", "0.5518264", "0.53182745", "0.5309306", "0.52660006", "0.5252119", "0.5234759", "0.52215296", "0.5219741", "0.52054435", "0.5191854", "0.5188026", "0.5175262", "0.5162866", "0.5149966", "0.5141714", "0.51292866", "0.51250863", "0.5094424", "0.5091887", "0.50881505", "0.50758797", "0.50487477", "0.50406444", "0.4981143", "0.49696693", "0.49506825", "0.4947453", "0.49473268", "0.49471122", "0.49468", "0.49417105", "0.4939188", "0.4938897", "0.49340594", "0.49227864", "0.49155614", "0.4914329", "0.48990726", "0.48973534", "0.48959523", "0.48925602", "0.48783132", "0.48751628", "0.48533732", "0.4848775", "0.48336023", "0.48326865", "0.48312077", "0.48252222", "0.48234203", "0.48139814", "0.48078677", "0.47961393", "0.47747585", "0.4774563", "0.47744125", "0.47671866", "0.47641253", "0.4748434", "0.4744602", "0.47427034", "0.47308296", "0.47276348", "0.47239298", "0.47143176", "0.47064093", "0.47007403", "0.46898478", "0.46730223", "0.4660389", "0.4656863", "0.4656637", "0.4656315", "0.46499187", "0.4649834", "0.46468472", "0.4641649", "0.46415532", "0.4637105", "0.4634346", "0.46328688", "0.46328688", "0.46328688", "0.46328688", "0.46328688", "0.46328688" ]
0.75942975
1
Generated from protobuf field repeated .kubemq.SendQueueMessageResult Results = 2;
public function getResults() { return $this->Results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setResults($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Kubemq\\SendQueueMessageResult::class);\n $this->Results = $arr;\n\n return $this;\n }", "public function send(){\n\t\t\n\t\t$database = new Database();\n\t\t$query = $database->selectOne('message_queues', array('id',\n\t\t\t\t\t\t\t\t\t 'is_executed','executed_at','message','cellphone'), \n\t\t\t\t\t\t\t\t\t ' is_executed=0 ');\n\t\t$exec = $database->query($query);\n\t\tif ($exec) {\n\t\t\t$record = $database->fetchArray($exec);\n\t\t\t$response = $this->sendMessage($database, $record);\n\n\t\t\treturn json_encode(array('status' => $response['status'], 'message' => $response['message']));\n\t\t}\n\n\t}", "public function getResultMessage() {}", "public function testSendInvoiceToBatchOnSendMessageBatchCallable()\n {\n $validator = new InvoiceValidator();\n $successInvoice = Invoice::load($this->getValidInvoiceData()[0], $validator);\n $failedInvoice = Invoice::load($this->getValidInvoiceData()[1], $validator);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessageBatch command for first batch of 10\n new Result([\n 'Successful' => [0 => ['Id' => $successInvoice->getInvoiceId()]],\n 'Failed' => [0 => ['Id' => $failedInvoice->getInvoiceId()]]\n ])\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n # Use SqsQueueCallbackTester to test the callback\n $callbackTester = new SqsQueueCallbackTester();\n $sqsQueue->setOnSendMessageBatchCallback($callbackTester);\n\n $sqsQueue\n ->sendInvoiceToBatch($successInvoice, $validator)\n ->sendInvoiceToBatch($failedInvoice, $validator);\n\n # Destroy the object. This should trigger the final batch send.\n unset($sqsQueue);\n\n # Confirm that the successful and failed invoices were passed to the\n # SqsQueueCallbackTester instance\n $this->assertEquals(1, count($callbackTester->successfulInvoices));\n $this->assertEquals($successInvoice, $callbackTester->successfulInvoices[0]);\n $this->assertEquals(1, count($callbackTester->failedInvoices));\n $this->assertEquals($failedInvoice, $callbackTester->failedInvoices[0]);\n\n # Confirm the stack is empty (ie. that the API calls HAVE been made)\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "protected function queueMessages()\n {\n $pages = $users = $files = $sites = 0;\n\n foreach ($this->pagesToQueue() as $id) {\n yield \"P{$id}\";\n $pages++;\n }\n foreach ($this->pagesToRemove() as $id) {\n yield \"RP{$id}\";\n $pages++;\n }\n foreach ($this->usersToRemove() as $id) {\n yield \"RU{$id}\";\n $users++;\n }\n foreach ($this->filesToRemove() as $id) {\n yield \"RF{$id}\";\n $files++;\n }\n foreach ($this->sitesToRemove() as $id) {\n yield \"RS{$id}\";\n $sites++;\n }\n\n yield 'R' . json_encode([$pages, $users, $files, $sites]);\n }", "public function process_queue()\r\n {\r\n error_reporting(0);\r\n\r\n // TODO: Prefill information is stored in this array. It's nasty, but it works for now.\r\n // This will need to be cleaned up somehow, later.\r\n $this->prefillRequests = array();\r\n\r\n $this->parseResponses();\r\n\r\n // Array of keys that need to be included in the response.\r\n $include = array('request', 'class', 'hit');\r\n $responseQuery = [];\r\n foreach($this->messageQuery as $response) {\r\n // Switch all keys to lower case to prevent possible case errors.\r\n $responseArr = array_change_key_case($response, CASE_LOWER);\r\n // returns an array that intersects with the keys from the $include array\r\n $responseQuery[] = array_intersect_key($responseArr, array_flip($include));\r\n }\r\n\r\n $requestSummary = $this->ArchiveResponse->ArchiveRequest->Request->getSummary(\r\n $this->CurrentAgency->agencyId,\r\n $this->CurrentDevice->agencyDeviceId);\r\n\r\n $summary = array(\r\n 'requests' => $requestSummary,\r\n 'response' => $responseQuery,\r\n 'prefill' => $this->prefillRequests\r\n );\r\n $this->set('summary', $summary);\r\n }", "public function enqueueRequests()\n {\n if (!$this->has_requests) {\n\t\treturn \"No requests to send\";\n\t}\n\t\n\t$finished = \"Error connecting to redis\";\n \n try {\n $redis = new Redis();\n $redis->pconnect(REDIS_ADDRESS);\n \n $multi = $redis->multi();\n \n //Executing all posts to Redis in one multi batch\n foreach ($this->data_requests as $key => $request) {\n $uuid = $request->getUUID();\n \n $multi->lPush(PENDING_QUEUE, $uuid);\n $multi->hSet(VALUES_HASH, $uuid, $request->getFormattedURL());\n $multi->hSet(VALUES_HASH, $uuid . ':method', $this->endpoint->method);\n $multi->hSet(STATS_HASH, $uuid . ':start', $this->start_time);\n }\n \n $ret = $multi->exec();\n \n $finished = \"Postback Delivered\";\n \n //Seach results for any errors from Redis commands\n foreach ($ret as $idx => $result) {\n if (!$result) {\n $finished = \"Redis call failed: \" . $idx;\n }\n }\n \n }\n catch (Exception $e) {\n return \"Error posting to Redis\";\n }\n \n return $finished;\n \n }", "function execute() {\n foreach($this -> queue as $queue) {\n for($written = 0; $written < strlen($queue); $written += $fwrite) {\n $fwrite = fwrite($this -> __sock, substr($queue, $written));\n if($fwrite === false or $fwrite <= 0)\n trigger_error('WRITE ERROR', E_USER_ERROR);\n }\n }\n // Read in the results from the pipelined commands\n $responses = array();\n for($i = 0; $i < count($this -> queue); $i++) {\n $responses[] = $this -> response();\n }\n // Clear the queue and return the response\n $this -> queue = array();\n if($this -> pipelined) {\n $this -> pipelined = false;\n return $responses;\n }\n return $responses[0];\n }", "public function transactionMessage ($resultsArr);", "public function batchSendQueue(\n Swift_Mime_Message $message,\n &$failedRecipients = null,\n Swift_Mailer_RecipientIterator $it = null\n )\n {\n $this->addToQueue = true;\n \n return $this->batchSend($message, $failedRecipients, $it);\n }", "public function execute()\n {\n\n $undeliveredRecipients = array();\n $recipientsCount = 0;\n\n while (count($this->recipients) >= 1) {\n\n //send the command and read the response\n parent::execute();\n\n $recipient = array_pop($this->recipients);\n\n switch ($this->response->getCode()) {\n\n case '250':\n case '251':\n if (isset($recipient['original_email'])) {\n //we finally delivered mail to a user that provided a \n //forward-address\n $key = array_search($recipient['original_email'],\n $undeliveredRecipients);\n\n if ($key !== FALSE)\n unset($undeliveredRecipients[$key]);\n }\n\n $recipientsCount++;\n break;\n\n case '450':\n case '451':\n //add the recipient to the begginning of the queue to try again\n //later\n if ($recipient['retries'] > 0) {\n $recipient['retries']--;\n array_unshift($this->recipients, $recipient);\n }\n break;\n\n /* Handle too much recipients by splitting the message to chunks\n *\n * RFC 821 [30] incorrectly listed the error where an SMTP server\n * exhausts its implementation limit on the number of RCPT commands\n * (\"too many recipients\") as having reply code 552. The correct \n * reply code for this condition is 452. Clients SHOULD treat a \n * 552 code in this case as a temporary, rather than permanent, \n * failure so the logic below works. \n */\n case '452':\n case '552':\n array_push($this->recipients, $recipient);\n\n $result['undelivered'] = $undeliveredRecipients;\n //this causes the client to append a new mail sending sequence \n //for the rest of recipients\n $result['toDeliver'] = $this->recipients;\n $result['recipientsCount'] = $recipientsCount;\n\n return $result;\n break; //unreachable\n\n case '550':\n case '553':\n $undeliveredRecipients[] = $recipient['email'];\n break;\n\n case '551':\n if (preg_match('/<\\([^>]*\\)>/', $this->response, $matches)) {\n\n $forward = array();\n $forward['email'] = $matches[1];\n $forward['retries'] = 2;\n if (isset($recipient['original_email'])) {\n $forward['original_email'] = \n $recipient['original_email'];\n } else {\n $forward['original_email'] = $recipient['email'];\n $undeliveredRecipients[] = $recipient['email'];\n }\n\n $this->recipients[] = $forward;\n }\n break;\n }\n\n }\n\n return array(\n 'undelivered' => $undeliveredRecipients, \n 'recipientsCount' => $recipientsCount,\n );\n }", "public function queue($numbers = null, $message = null, $type = null, $queue = null);", "public function testSendInvoiceToBatchSuccessfulSendViaSendThreshold()\n {\n $validator = new InvoiceValidator();\n $invoice = Invoice::load($this->getValidInvoiceData()[0], $validator);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessageBatch command for first batch of 10\n new Result([]),\n # Result for SendMessageBatch command for the final batch of 1\n new Result([])\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n for ($i = 0; $i < (SqsQueue::SEND_BATCH_SIZE + 1); $i++) {\n $invoice->setInvoiceId($invoice->getInvoiceId() . '-' . $i);\n $sqsQueue->sendInvoiceToBatch($invoice, $validator);\n }\n\n # Destroy the object. This should trigger the final batch send.\n unset($sqsQueue);\n\n # Confirm the stack is empty (ie. that the API calls HAVE been made)\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "public function testGetWebhookQueueAccountMessage()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueueAccountMessage(), 3);\n\n $webhook = $sw->getWebhookQueueAccountMessage();\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $webhook = $sw->getWebhookQueueAccountMessage(false);\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $webhook = $sw->getWebhookQueueAccountMessage(true);\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $this->checkGetRequests($container, [\n '/v4/webhooks/queues/account?delete=false',\n '/v4/webhooks/queues/account?delete=false',\n '/v4/webhooks/queues/account?delete=true'\n ]);\n }", "public function Queues();", "public function queueOn($queue, $numbers = null, $message = null, $type = null);", "public function sendMultiple(array $messages);", "function exec_queue()\n\t{\n\t\t$vbulletin =& $this->registry;\n\n\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t{\n\t\t\t// Lock mailqueue table so that only one process can\n\t\t\t// send a batch of emails and then delete them\n\t\t\t$vbulletin->db->lock_tables(array('mailqueue' => 'WRITE'));\n\t\t}\n\n\t\t$emails = $vbulletin->db->query_read(\"\n\t\t\tSELECT *\n\t\t\tFROM \" . TABLE_PREFIX . \"mailqueue\n\t\t\tORDER BY mailqueueid\n\t\t\tLIMIT \" . intval($vbulletin->options['emailsendnum'])\n\t\t);\n\n\t\t$mailqueueids = '';\n\t\t$newmail = 0;\n\t\t$emailarray = array();\n\t\twhile ($email = $vbulletin->db->fetch_array($emails))\n\t\t{\n\t\t\t// count up number of mails about to send\n\t\t\t$mailqueueids .= ',' . $email['mailqueueid'];\n\t\t\t$newmail++;\n\t\t\t$emailarray[] = $email;\n\t\t}\n\t\tif (!empty($mailqueueids))\n\t\t{\n\t\t\t// remove mails from queue - to stop duplicates being sent\n\t\t\t$vbulletin->db->query_write(\"\n\t\t\t\tDELETE FROM \" . TABLE_PREFIX . \"mailqueue\n\t\t\t\tWHERE mailqueueid IN (0 $mailqueueids)\n\t\t\t\");\n\n\t\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t\t{\n\t\t\t\t$vbulletin->db->unlock_tables();\n\t\t\t}\n\n\t\t\tif ($vbulletin->options['use_smtp'])\n\t\t\t{\n\t\t\t\t$prototype =& new vB_SmtpMail($vbulletin);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$prototype =& new vB_Mail($vbulletin);\n\t\t\t}\n\n\t\t\tforeach ($emailarray AS $index => $email)\n\t\t\t{\n\t\t\t\t// send those mails\n\t\t\t\t$mail = (phpversion() < '5' ? $prototype : clone($prototype)); // avoid ctor overhead\n\t\t\t\t$mail->quick_set($email['toemail'], $email['subject'], $email['message'], $email['header'], $email['fromemail']);\n\t\t\t\t$mail->send();\n\t\t\t}\n\n\t\t\t$newmail = 'data - ' . intval($newmail);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t\t{\n\t\t\t\t$vbulletin->db->unlock_tables();\n\t\t\t}\n\n\t\t\t$newmail = 0;\n\t\t}\n\n\t\t// update number of mails remaining\n\t\t$vbulletin->db->query_write(\"\n\t\t\tUPDATE \" . TABLE_PREFIX . \"datastore SET\n\t\t\t\tdata = \" . $newmail . \",\n\t\t\t\tdata = IF(data < 0, 0, data)\n\t\t\tWHERE title = 'mailqueue'\n\t\t\");\n\n\t\t// if we're using a alternate datastore, we need to give it an integer value\n\t\t// this may not be atomic\n\t\tif (method_exists($vbulletin->datastore, 'build'))\n\t\t{\n\t\t\t$mailqueue_db = $vbulletin->db->query_first(\"\n\t\t\t\tSELECT data\n\t\t\t\tFROM \" . TABLE_PREFIX . \"datastore\n\t\t\t\tWHERE title = 'mailqueue'\n\t\t\t\");\n\t\t\t$vbulletin->datastore->build('mailqueue', intval($mailqueue_db['data']));\n\t\t}\n\t}", "public function sendQueue(Swift_Mime_Message $message, &$failedRecipients = null)\n {\n $this->addToQueue = true;\n \n return $this->send($message, $failedRecipients);\n }", "public function runQueue();", "public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}", "public function sendResults( $results = array() ) {\n\n // dummy data:\n // $results = array(\n // (object)array(\n // \"id\" => \"484848484852bf4f6c7eca896c0030516ab2f228f157237712e52d66489d9960\",\n // \"result\" => 6,\n // \"sc\" => 1625125748\n // )\n // );\n\n $postdata = json_encode(\n (object)array(\n 'testResults' => $results\n )\n );\n\n $ch = curl_init();\n\n $curlOpts = array(\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => $postdata,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_SSLKEY => self::$keyFile,\n CURLOPT_SSLCERT => self::$certFile,\n CURLOPT_KEYPASSWD => self::$keyPass,\n CURLOPT_URL => self::getStageURL() . self::API_ENDPOINT_RESULTS,\n CURLOPT_HTTPHEADER => array('Content-Type: application/json'),\n );\n \n curl_setopt_array($ch , $curlOpts);\n \n $output = curl_exec( $ch ) ;\n \n if ( curl_errno( $ch ) ) {\n $error_msg = curl_error( $ch );\n print \"curl_error: $error_msg <br>\";\n } else {\n $status = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n if ( 204 === $status ) {\n return true;\n } else {\n $response = json_decode($output);\n if ( is_object( $response ) ) {\n return $response;\n } else {\n return (object)array(\n 'status' => $status,\n 'response' => $response\n );\n }\n }\n }\n }", "public function testMessageThreadsV2GetMessages0()\n {\n }", "public function testGetQueueUrlQueueCreated()\n {\n $queueUrl = 'my-invoice-queue-message-url';\n $results = [\n new Result(['QueueUrl' => $queueUrl])\n ];\n $sqsQueue = $this->getSqsQueueInstance($results);\n $this->assertEquals($queueUrl, $sqsQueue->getQueueUrl());\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "public function getMessageQueue()\n\t{\n\t\treturn $this->messages;\n\t}", "public function send( Execution $e ) {\n $this->queue[] = $e;\n $this->messagesAccepted++;\n }", "private function setQueue() {\n if (count($this->request->q) > 0) {\n try {\n $this->client->setQueue(array($this->request->q));\n $this->view->addParameter(\"result\", \"success\");\n } catch(Exception $e) {\n $this->view->addParameter(\"result\", \"failure\");\n $this->view->addParameter(\"data\", \"Failed to execute '{$this->request->action}' action\");\n }\n } else {\n $this->view->addParameter(\"result\", \"invalid\");\n $this->view->addParameter(\"data\", \"Query array must not be empty\");\n }\n }", "public function queued()\n {\n return $this->memory->get('orchestra.publisher.queue', []);\n }", "public function testEnqueueQueueJobs()\n {\n $queueJobTest1 = new TestQueueJob('price', 'ShopwarePriceImport');\n $queueJobTest2 = new TestQueueJob('product', 'ShopwareProductExport');\n\n $result = $this->queue->enqueue($queueJobTest1);\n $this->assertTrue($result);\n\n $result = $this->queue->enqueue($queueJobTest2);\n $this->assertTrue($result);\n\n $this->assertCount(2, $this->queueStorage->queue);\n }", "public function getQueuedPendingCount()\n {\n return $this->queuedPendingCount;\n }", "function getResultMessage() {\n return $this->memcached->getResultCode();\n }", "public function ReconcileQueues()\n {\n $xml = file_get_contents($this->StatsDir);\n $XML = simplexml_load_string($xml);\n foreach ($XML->data->queue as $i => $q) {\n $NAME = (string) $q->name[0];\n list($DOMAIN, $VMTA) = explode('/', $NAME);\n $LONGIP = ip2long(trim($VMTA));\n if (isset($this->TDOMS[$DOMAIN]) && ($DOMAIN!=='*') && ($VMTA!=='*'))\n if (!isset($this->PoolIPs[$LONGIP]))\n $this->ALERTS[] = FAIL.\" No Queued Jobs for \".$DOMAIN.' on VMTA: '.$VMTA.WHT;\n else {\n $POOL = $this->PoolIPs[$LONGIP];\n $TARGET = $this->TDOMS[$DOMAIN];\n $SIZE = (string) $q->rcp[0];\n $MODE = (string) $q->mode[0];\n $PAUSED = (string) $q->paused[0];\n $RETRY = empty($q->retryTime)?'00:00:00':(string) $q->retryTime[0];\n $ER = [];\n foreach ($q->event as $event)\n $ER[] = (string) $event->text[0];\n if ($SIZE >= $this->Low) \n unset($this->Pools[$POOL]['ips'][$LONGIP][$TARGET]);\n }\n }\n if (empty($this->Pools)) {\n $this->ALERTS[] = FAIL.\" No low Queues Found\";\n return false;\n }\n return $this->CompileJobs();\n }", "public function pauseQueue()\n {\n return $this->sendrequest('pause', null);\n }", "function submitBatch() {\n\tglobal $gMaxQueueLength;\n\t$submittedTests = countTestsWithCode(SUBMITTED);\n\t$unsubmitTests = obtainTestsWithCode(NOT_STARTED);\n\tif ( !isEmptyQuery($unsubmitTests) ) {\n\t\twhile ($row = mysqli_fetch_assoc($unsubmitTests)) {\n\t\t\tsubmitTest($row, 0);\n\t\t\t// Limit the number of in-flight tests\n\t\t\tif ($gMaxQueueLength) {\n\t\t\t\t$submittedTests++;\n\t\t\t\tif ($submittedTests >= $gMaxQueueLength)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}", "function messages_send($count = 5){\n\t\tfor($i=0;$i<$count;$i++)\n\t\t{\n\t\t\t$element = vazco_newsletter::queuePop('not_sent');\n\t\t\tif($element!==null)\n\t\t\t{\n\t\t\t\t$result = vazco_newsletter::sendMessage($element[0],$element[1]);\n\t\t\t\tif($result)\n\t\t\t\t\tvazco_newsletter::queuePush($element,'sent');\n\t\t\t\telse\n\t\t\t\t\tvazco_newsletter::queuePush($element,'error');\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function transactionGetResultsSuccess ($message);", "public function fetchQueuedMessagesForGraphWidget(array $params = array())\n {\n $responseParsed = array();\n $response = $this->request($this->getEndpointUrl(__FUNCTION__), $params);\n\n if (isset($response['messages_details']['samples'])) {\n foreach ($response['messages_details']['samples'] as $singleStat) {\n $responseParsed[] = [\n 'x' => $singleStat['timestamp'],\n 'y' => $singleStat['sample']\n ];\n }\n } else {\n $responseParsed = [\n [\n 'x' => 0,\n 'y' => 0,\n ],\n [\n 'x' => (int) gmdate('U') * 1000,\n 'y' => 0,\n ],\n ];\n }\n\n return array_reverse($responseParsed);\n }", "public function testMessageThreadsV2GetMessages()\n {\n }", "public function getQueue();", "public function getQueue();", "public function send() : array\n {\n $this->validateBeforePush();\n\n $results = [];\n\n // Loop through all apps in selected application group\n // and try and send the push message to each app.\n foreach ($applications = $this->appGroups[$this->appGroup] as $appName => $credentials) {\n\n // Skip empty credentials\n if ($this->hasEmptyCredentials($credentials)) {\n $results[$appName] = 'skipped - empty credentials';\n continue;\n }\n\n try {\n $UAData = [\n 'body' => json_encode($this->buildPushData()),\n 'auth' => [$credentials['app_key'], $credentials['master_secret']],\n ];\n\n if (!empty($this->proxy)) {\n $UAData['proxy'] = $this->proxy;\n }\n\n // Send request to Urban Airship\n $response = $this->getHttpClient()->post('/api/push', $UAData);\n\n // Validate response by looking at the received status code\n if (!in_array($response->getStatusCode(), [200, 201, 202])) {\n throw (new SendPushFailedException(sprintf('[%s] - [%s] Could not send push message. Status code received: %d %s',\n $this->appGroup, $appName, $response->getStatusCode(), $response->getReasonPhrase())))\n ->addMeta([\n 'responseCode' => $response->getStatusCode(),\n 'responseContent' => $response->getBody()->getContents()\n ]);\n }\n\n // Decode response\n $content = json_decode($response->getBody()->getContents(), true);\n\n // Handle potential errors\n if (empty($content['ok']) || !$content['ok']) {\n throw (new SendPushFailedException(sprintf('[%s]- [%s] Could not send push message. Reason: %s', $appName, $this->appGroup,\n $content->error), $content->error_code))\n ->addMeta([\n 'requestData' => $this->getRequestData(),\n 'responseCode' => $response->getStatusCode(),\n 'responseContent' => $content\n ]);\n }\n\n $results[] = $content;\n } catch (ClientException $e) {\n if(in_array($e->getCode(), ['503', '504']) && $this->retries < self::MAX_RETRIES) {\n $this->retries++;\n\n // Sleep 1, 2, 3\n $sleepSeconds = $this->retries ?: 1;\n\n sleep($sleepSeconds);\n\n return $this->send();\n }\n \n // Setting retries back, since the instance could be reused in a queue\n $this->retries = 0;\n\n throw (new SendPushFailedException(sprintf('[%s] - [%s] Could not send push message. Reason: %s', $this->appGroup, $appName,\n $e->getMessage())))\n ->addMeta([\n 'credentials' => $credentials,\n 'proxy' => $this->proxy,\n 'requestData' => $this->getRequestData(),\n 'responseCode' => $e->getResponse()->getStatusCode(),\n 'responseContent' => $e->hasResponse() ? $e->getResponse()->getBody()->getContents() : null\n ]);\n } catch (\\Throwable $e) {\n throw (new SendPushFailedException(sprintf('[%s] - [%] Could not send push message. Reason: %s', $this->appGroup, $appName,\n $e->getMessage()))\n )->addMeta([\n 'code' => $e->getCode(),\n 'credentials' => $credentials,\n 'proxy' => $this->proxy,\n 'requestData' => $this->getRequestData()\n ]);\n }\n }\n\n // Reset retries in case we are running in queue --demon mode\n $this->retries = 0;\n\n return $results;\n }", "public function testGetWebhookQueueTemplateMessage()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueueTemplateMessage(), 3);\n\n $webhook = $sw->getWebhookQueueTemplateMessage('TestingGUID');\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $webhook = $sw->getWebhookQueueTemplateMessage('TestingGUID', false);\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $webhook = $sw->getWebhookQueueTemplateMessage('TestingGUID', true);\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $this->checkGetRequests($container, [\n '/v4/webhooks/queues/template/TestingGUID?delete=false',\n '/v4/webhooks/queues/template/TestingGUID?delete=false',\n '/v4/webhooks/queues/template/TestingGUID?delete=true'\n ]);\n }", "public function getQueue()\n {\n return array();\n }", "public function testGetWebhookQueuesRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueues());\n\n $response = $sw->getWebhookQueuesRaw();\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkGetRequests($container, ['/v4/webhooks/queues']);\n }", "public function testMessageThreadsV2Post()\n {\n }", "function startQueue(){\n\n // Maintain the array checkLogQ as a FIFO buffer with length 4.\n // When a new entry is added, remove oldest entry and shuffle.\n function addCheckLog($message){\n global $checkLogQ;\n $length = 4;\n // If checkLogQ size is smaller than 4 add the message\n if(count($checkLogQ)<$length){\n $checkLogQ[] = $message;\n }\n // If checkLogQ size is bigger than 4 - Remove the oldest message and add the new one\n else{\n array_shift($checkLogQ);\n $checkLogQ[] = $message;\n }\n }\n // Prints all checkLogQ messages to the console \n function printCheckLogQ(){\n global $checkLogQ;\n foreach($checkLogQ as $message){\n print($message);\n }\n $checkLogQ = array(); // reset a variable to an empty array\n }\n \n try{\n while(true){\n addCheckLog(date('Y/m/d H:i:s').\" Awaiting a message...\\n\");\n\n // Receive messages from queue, maximum waits for 20 seconds for message\n // receive_request - contain all the queue messages\n global $sqs;\n $receive_request = $sqs->receiveMessage(array(\n 'QueueUrl' => ds_config(\"QUEUE_URL\"),\n 'WaitTimeSeconds' => 20,\n 'MaxNumberOfMessages' => 10\n ));\n // Count the amount of messages received\n $msgCount = 0;\n if($receive_request->getPath('Messages') !== NULL){\n $msgCount = count($receive_request->getPath('Messages'));\n }\n addCheckLog(date('Y/m/d H:i:s').\" found $msgCount message(s)\\n\");\n // If at least one message has been received\n if ($msgCount!=0) {\n printCheckLogQ();\n foreach ($receive_request->getPath('Messages') as $msg) {\n messageHandle($msg, $receive_request);\n }\n }\n }\n }\n catch (Exception $e) {\n printCheckLogQ();\n print(date('Y/m/d H:i:s').\" Queue receive error: $e\");\n sleep(5);\n global $restart;\n $restart = true;\n }\n }", "public function testListQueue()\n {\n $job = new JobQUeueList(self::$virtualHost, self::$queueName);\n $response = Bootstrap::getFactory()->getJobService()->execute($job);\n $body = $response->getBody();\n\n $this->assertTrue($response->isSuccess());\n $this->assertTrue(is_object($body));\n $this->assertEquals((string)self::$virtualHost, $body->vhost);\n $this->assertEquals((string)self::$queueName, $body->name);\n }", "public function getQueue()\n {\n return $this->doRequest('GET', \"queue\", []);\n }", "public function fetchMessageFromQueue()\n {\n $whereParams = [\n 'status' => 'PENDING',\n ];\n $orderBy = 'attempts';\n return $this->db->first($this->table, $whereParams, $orderBy);\n\n }", "public function batchSend()\n\t{\n\t\treturn $this->mailer->batchSend($this->message);\n\t}", "public function getStats()\n {\n $request = new TaskQueueFetchQueueStatsRequest();\n $response = new TaskQueueFetchQueueStatsResponse();\n\n $request->addQueueName($this->str_name);\n\n $this->makeCall('FetchQueueStats', $request, $response);\n \n return $response->getQueueStats(0);\n }", "public function sendMessage($queueId, $message, $options = null);", "private function sendMessage($database, $record){\n\n\t\t\t// Preparing message requests\n\t\t\t$messages = json_decode($record['message'], true);\n\n\t\t\t// Add headers for multiple parts\n\t\t\t$chunksId = '';\n\t\t\tif (count($messages)>1) $chunksId = md5(strtotime(\"now\"));\n\n\t\t\t// Sending long messages in chunks and short in a single go\n\t\t\tforeach ($messages as $messagePart){\n\n\t\t\t\t$request = array(\n\t\t\t\t\t'message' => $messagePart,\n\t\t\t\t\t'cellphone' => $record['cellphone'],\n\t\t\t\t);\t\n\n\t\t\t\t// Sending Message\n\t\t\t\t$accessKey = Config::params('sms_service')->access_key;\n\t\t\t\t$originator = Config::params('sms_service')->originator;\n\t\t\t\t$smsType = Config::params('sms_service')->type;\n\t\t\t\t$datacoding = Config::params('sms_service')->datacoding;\n\n\t\t\t\t$MessageBird = new \\MessageBird\\Client($accessKey);\n\t\t\t\t$Message = new \\MessageBird\\Objects\\Message();\n\t\t\t\t$Message->originator = $originator;\n\t\t\t\t$Message->recipients = (int)$request['cellphone'];\n\t\t\t\t$Message->body = $request['message'];\n\t\t\t\t$Message->type = $smsType;\n\t\t\t\t$Message->datacoding = $datacoding;\n\n\t\t\t\tif ($chunksId) $Message->typeDetails['udh'] = $chunksId;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t$MessageResult = $MessageBird->messages->create($Message);\n\t\t\t\t\t//print_r($MessageResult);\n\t\t\t\t} catch (\\MessageBird\\Exceptions\\AuthenticateException $e) {\n\t\t\t\t\t// That means that your accessKey is unknown\n\t\t\t\t\treturn array ('status' => self::FAILED, 'message' => 'SMS API Authentication Failed. Please contact to your Admininstrator.');\n\t\t\t\t} catch (\\MessageBird\\Exceptions\\BalanceException $e) {\n\t\t\t\t\t// That means that you are out of credits, so do something about it.\n\t\t\t\t\treturn array ('status' => self::FAILED, 'message' => 'SMS API Out of Credit. Please contact to your Admininstrator.');\n\t\t\t\t} catch (\\MessageBird\\Exceptions\\RequestException $e) {\n\t\t\t\t\t// That means that either submitted request is invalid or sms provider not supporting that country\n\t\t\t\t\t// updating request status as failed\n\t\t\t\t\t$this->updateRecord($database, $record, 2);\n\t\t\t\t\treturn array ('status' => self::FAILED, 'message' => $e->getMessage());\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\treturn array ('status' => self::FAILED, 'message' => $e->getMessage());\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $this->updateRecord($database, $record);\n\t}", "public function getQueue()\n {\n \treturn \"campaign-{$this->campaign->id}-worker-{$this->id}\";\n }", "public function transactionSucceeded ($resultsArr);", "public function flushQueue(Swift_Transport $transport, &$failedRecipients = null)\n {\n $failedRecipients = (array)$failedRecipients;\n $count = 0;\n $time = time();\n\n $maxNumberOfMessages = max(\n min(\n $this->getMessageLimit(),\n static::MAX_NUMBER_MESSAGES\n ),\n static::MIN_NUMBER_MESSAGES\n );\n\n $options = [\n 'MaxNumberOfMessages' => $maxNumberOfMessages,\n 'WaitTimeSeconds' => $this->longPollingTimeout\n ];\n\n while (true) {\n try {\n $response = $this->sqs->receiveMessage([\n 'QueueUrl' => $this->queueUrl,\n ] + $options);\n } catch (\\Exception $e) {\n $this->logError('Load messages from SQS', $e);\n return $count;\n }\n\n $messages = $response->get('Messages');\n if (!is_array($messages) || count($messages) == 0) {\n return $count;\n }\n\n foreach ($messages as $sqsMessage) {\n if (!$transport->isStarted()) {\n $transport->start();\n }\n\n $message = unserialize(gzuncompress(base64_decode((string)$sqsMessage['Body'])));\n\n try {\n $count += $transport->send($message, $failedRecipients);\n } catch (\\Exception $e) {\n $this->logError('Send e-mail', $e);\n }\n\n $this->removeSqsMessage((string)$sqsMessage['ReceiptHandle']);\n\n if ($this->getMessageLimit() && ($count >= $this->getMessageLimit())) {\n return $count;\n }\n\n if ($this->getTimeLimit() && ((time() - $time) >= $this->getTimeLimit())) {\n return $count;\n }\n }\n }\n\n return $count;\n }", "public function pending()\n {\n $prefix = config('vapor-ui.queue.prefix');\n\n if (empty($prefix)) {\n return 0;\n }\n\n $queue = $this->queueResolver->__invoke();\n\n return collect($this->sqs->getQueueAttributes([\n 'AttributeNames' => [\n 'ApproximateNumberOfMessages',\n 'ApproximateNumberOfMessagesNotVisible',\n 'ApproximateNumberOfMessagesDelayed',\n ],\n 'QueueUrl' => \"$prefix/$queue\",\n ])['Attributes'])->sum();\n }", "public function process()\r\n {\r\n $success = true;\r\n\r\n $items = Queue::find()\r\n ->where(['and', ['sent_time' => null], ['<', 'attempts', $this->maxAttempts]])\r\n ->orderBy(['created_at' => SORT_ASC])\r\n ->limit($this->mailsPerRound)\r\n ->all();\r\n\r\n if (!empty($items)) {\r\n $attributes = ['attempts', 'last_attempt_time'];\r\n foreach ($items as $item) {\r\n try{\r\n /** @var \\app\\models\\Queue $item */\r\n if ($message = $item->toMessage()) {\r\n if ($this->sendMessage($message)) {\r\n $item->delete();\r\n } else {\r\n throw new Exception('An error occurred while sending the message');\r\n }\r\n }\r\n } catch (Exception $e) {\r\n $success = false;\r\n $item->attempts++;\r\n $item->last_attempt_time = new Expression('NOW()');\r\n $item->updateAttributes($attributes);\r\n }\r\n }\r\n }\r\n\r\n return $success;\r\n }", "public function testSendInvoiceToBatchUnsuccessfulSendViaDestructor()\n {\n $validator = new InvoiceValidator();\n\n $sqsClient = $this->getMockedAwsSdk()->createSqs(['version' => '2012-11-05']);\n $cmd = $sqsClient->getCommand('SendMessage', [\n 'QueueName' => 'my-queue-name'\n ]);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessage command\n new AwsException('Exception message', $cmd)\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n foreach ($this->getValidInvoiceData() as $data) {\n $invoice = Invoice::load($data, $validator);\n $sqsQueue->sendInvoiceToBatch($invoice, $validator);\n }\n # Destroy the object. This should trigger the batch send.\n unset($sqsQueue);\n }", "public function get_queued_status() {\n\t\treturn '';\n\t}", "public function getResultMessage()\n {\n return $this->resultMessage;\n }", "public function getResultMessage()\n\t{\n\t\t// TODO: Implement getResultMessage() method.\n\t\t$message = array();\n\n\t\t$message[] = '';\n\t\t$message[] = 'Wordpress has been installed succesfully.';\n\t\t$message[] = '';\n\t\t$message[] = 'Credentials:';\n\t\t$message[] = 'Admin user : ' . $this->config->get('admin_user');\n\t\t$message[] = 'Admin password : ' . $this->config->get('admin_password');\n\t\t$message[] = '';\n\n\t\treturn $message;\n\t}", "public function GetSendingJobStatusCodes()\n\t{\n\t\treturn array ('i', 'r');\n\t}", "public function send()\n {\n if (!isset($this->message))\n {\n return FALSE;\n }\n\n $this->sqs_client->sendMessage([\n 'MessageGroupId'\t\t\t=> '1',\n 'MessageDeduplicationId'\t=> mt_rand(),\n 'QueueUrl' \t\t\t\t=> SQS_VIDEO_URL,\n 'MessageBody' \t\t\t\t=> json_encode($this->message)\n ]);\n\n return TRUE;\n }", "public function purgeAllQueues() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('purgeAllQueues', func_get_args()));\n }", "public function purgeAllQueues() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('purgeAllQueues', func_get_args()));\n }", "public function FlushQueue()\n {\n do\n {\n $result = $this->FlushMsg();\n } while ($result);\n }", "public function processMessages() {\n while ( ( $execution = array_shift($this->queue) ) ) { \n $execution->event('continue');\n $this->messagesDelivered++;\n }\n }", "public function send_queue()\n\t{\n\t\t$sql = 'SELECT *\n\t\t\t\tFROM ' . SQL_PREFIX . 'notify\n\t\t\t\tORDER BY notify_time';\n\t\t$result = Fsb::$db->query($sql, 'notify_');\n\t\tif ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\t// Suppression des elements directement, afin d'eviter un double envoie\n\t\t\t$sql = 'DELETE FROM ' . SQL_PREFIX . 'notify';\n\t\t\tFsb::$db->query($sql);\n\t\t\tFsb::$db->destroy_cache('notify_');\n\n\t\t\t// Envoie du message\n\t\t\tdo\n\t\t\t{\n\t\t\t\t$this->method = (isset($this->ext[$row['notify_method']])) ? $row['notify_method'] : NOTIFY_MAIL;\n\t\t\t\t$this->subject = $row['notify_subject'];\n\t\t\t\t$this->body = $row['notify_body'];\n\t\t\t\t$this->bcc = explode(\"\\n\", $row['notify_bcc']);\n\t\t\t\t$return = $this->send(false);\n\t\t\t\t$this->reset();\n\n\t\t\t\t// En cas d'echec du message on le reinsere dans la base de donnee\n\t\t\t\tif (!$return && $row['notify_try'] < Notify::MAX_TRY)\n\t\t\t\t{\n\t\t\t\t\t$row['notify_try']++;\n\t\t\t\t\tunset($row['notify_id']);\n\t\t\t\t\tforeach ($row AS $k => $v)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (is_numeric($k))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($row[$k]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tFsb::$db->insert('notify', $row, 'INSERT', true);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile ($row = Fsb::$db->row($result));\n\t\t\tFsb::$db->query_multi_insert();\n\t\t}\n\t\tFsb::$db->free($result);\n\t}", "public function testGetWebhookQueueAccountMessageRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueueAccountMessage());\n\n $response = $sw->getWebhookQueueAccountMessageRaw();\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkGetRequests($container, ['/v4/webhooks/queues/account?delete=false']);\n }", "public function testGetWebhookQueues()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueues());\n\n $webhook = $sw->getWebhookQueues();\n $this->assertInstanceOf(SmartwaiverWebhookQueues::class, $webhook);\n\n $this->checkGetRequests($container, ['/v4/webhooks/queues']);\n }", "public function getResult($queueJobId);", "public function getResultMessage()\n {\n return $this->_resultMessage;\n }", "public function execute() {\n\t\t$outfile = $this->getOption( 'outfile' );\n\t\t$conditions = [];\n\t\t$gateway = $this->getOption( 'gateway' );\n\t\tif ( $gateway ) {\n\t\t\t$conditions['gateway'] = $gateway;\n\t\t}\n\n\t\t$consumer = new QueueFileDumper(\n\t\t\t$this->getOption( 'queue' ),\n\t\t\t$this->getOption( 'max-messages' ),\n\t\t\t$outfile,\n\t\t\t$conditions\n\t\t);\n\n\t\t$startTime = time();\n\t\t$messageCount = $consumer->dequeueMessages();\n\n\t\t$elapsedTime = time() - $startTime;\n\t\tLogger::info(\n\t\t\t\"Dumped $messageCount messages to $outfile in $elapsedTime seconds.\"\n\t\t);\n\t}", "public function StartQueue() {\n\t\t$timestart = microtime(true);\n\t\t$current_job_pointer = 0;\n\t\techo \"Job count is \" .$this->_job_count.\"<br/>\";\n\t\tif ($this->_slots > $this->_job_count) $this->_slots = $this->_job_count;\n\t\tfor ($slotcount=0; $slotcount < $this->_slots + 1; $slotcount++) {\n\t\t\techo \"Finished count is \" . $this->_finished_count . \"<br/>\";\n\t\t\techo \"Slots are \" .$this->_slots . \" <br/>\";\n\t\t\t$this->AddJobs();\n\t\t}\n\n\t\t$loop = 0;\n\t\twhile($this->_finished_count < $this->_job_count) {\n\t\t\techo \"<br/>Loop is $loop<br/>\";\n\t\t\tsleep(1);\n\t\t\t$this->PollJobs();\n\t\t\techo \"Finished count is \" . $this->_finished_count . \"<br/>\";\n\t\t\techo \"Slots are \" .$this->_slots . \"<br/>\";\n\t\t\twhile($this->_slots > 0) {\n\t\t\t\t$this->LogEntry($this->_slots . \" slots left and \".count($this->_waiting_queue).\" jobs waiting. <br/>\");\n\t\t\t\t$this->AddJobs();\n\t\t\t}\n\n\t\t\tif ($this->_vars['timeout'] !== 0) {\n\t\t\t\tif (round(microtime(true) - $timestart) > $this->_vars['timeout']) {\n\t\t\t\t\t$this->LogEntry(\"Timeout reached.\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$loop++;\n\n\t\t}\n\n\t\t$execution = round(microtime(true) - $timestart, 2);\n\t\t$this->LogEntry(\"Finished after $execution seconds. \". $this->_finished_count .\" jobs completed.\\n\");\n\t\treturn $this->_log;\n\t}", "public function testSendInvoiceToBatchSuccessfulSendViaDestructor()\n {\n $validator = new InvoiceValidator();\n $invoice = Invoice::load($this->getValidInvoiceData()[0], $validator);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessageBatch command\n new Result([])\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n $sqsQueue->sendInvoiceToBatch($invoice, $validator);\n # Destroy the object. This should trigger the batch send.\n unset($sqsQueue);\n\n # Confirm the stack is empty (ie. that the API calls HAVE been made)\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "public abstract function sendJobs();", "public function status() {\n\t\t$output = array(\n\t\t\tarray('CURRENT', ''),\n\t\t array('Queue', 'Size'),\n\t\t array('----', '---'),\n\t\t);\n\n\t\tforeach($this->queues as $queue) {\n\t\t $output[] = array( $queue, ResqueProxy::size( $queue ) );\n\t\t}\n\n\t\t$output[] = array( 'failed', ResqueProxy::redis()->llen('failed') );\n\n\n\t\t$output[] = array('----', '---');\n\t\t$output[] = array('TOTALS', '');\n\t\t$output[] = array( 'processed', ResqueProxy::redis()->get('resque:stat:processed') );\n\t\t$output[] = array( 'failed', ResqueProxy::redis()->get('resque:stat:failed') );\n\n\t\t$this->columns($output);\n\t}", "public function queue(): string\n {\n return $this->queue;\n }", "protected function addResultMessage() {\n\t\tif ($this->amountOfMigratedRecords > 0) {\n\t\t\t$headline = LocalizationUtility::translate('migrationSuccessful', 'dam_falmigration');\n\t\t\t$message = LocalizationUtility::translate('migratedFiles', 'dam_falmigration', array(0 => $this->amountOfMigratedRecords));\n\t\t} else {\n\t\t\t$headline = LocalizationUtility::translate('migrationNotNecessary', 'dam_falmigration');;\n\t\t\t$message = LocalizationUtility::translate('allFilesMigrated', 'dam_falmigration');\n\t\t}\n\n\t\t$messageObject = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Messaging\\\\FlashMessage', $message, $headline);\n\t\t// addMessage is a magic method realized by __call()\n\t\tFlashMessageQueue::addMessage($messageObject);\n\t}", "private function addFurtherMessageToQueue($project, $versionId, $directory)\n {\n $message = [\n 'project' => $project,\n 'versionId' => $versionId,\n 'directory' => $directory\n ];\n\n $pDependMessage = $message;\n $pDependMessage['type'] = 'analyze';\n\n $exchange = $this->container->getParameter('messagequeue.exchange');\n $this->getMessageQueue()->sendSimpleMessage($message, $exchange, 'analysis.phploc');\n $this->getMessageQueue()->sendSimpleMessage($message, $exchange, 'analysis.linguist');\n $this->getMessageQueue()->sendSimpleMessage($pDependMessage, $exchange, 'analysis.pdepend');\n }", "public function rewardsSmsQueue()\n {\n $sms_queue = RewardSms::where(\"sent\", 0)->get()->take(5);\n \n foreach ($sms_queue as $key => $queue) {\n \n $this->sendSms($queue->phone, $queue->text);\n \n $sms_obj = RewardSms::where(\"rewards_sms_id\", $queue->rewards_sms_id)->get()->first();\n $sms_obj->sent = 1;\n $sms_obj->save();\n }\n }", "public function testSendInvoiceToBatchUnsuccessfulSendViaDestructorLogEntry()\n {\n $validator = new InvoiceValidator();\n\n $sqsClient = $this->getMockedAwsSdk()->createSqs(['version' => '2012-11-05']);\n $cmd = $sqsClient->getCommand('SendMessage', [\n 'QueueName' => 'my-queue-name'\n ]);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessage command\n new AwsException('Exception message', $cmd)\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n foreach ($this->getValidInvoiceData() as $data) {\n $invoice = Invoice::load($data, $validator);\n $sqsQueue->sendInvoiceToBatch($invoice, $validator);\n }\n\n try {\n # Destroy the object. This should trigger the batch send.\n unset($sqsQueue);\n } catch (Exception $e) {\n # Ignore\n }\n\n $logEntries = explode(\"\\n\", trim($this->getLogFileContents()));\n # 1 log entry per invoice in the batch\n $this->assertEquals(count($this->getValidInvoiceData()), count($logEntries));\n\n $this->assertEquals(\n SqsQueue::LOG_RC_SQS_MESSAGE_INVOICE_SENDBATCH_EXCEPTION,\n $this->getLogEntryResultCode($logEntries[0])\n );\n\n $this->assertEquals(\n SqsQueue::LOG_RC_SQS_MESSAGE_INVOICE_SENDBATCH_EXCEPTION,\n $this->getLogEntryResultCode($logEntries[1])\n );\n }", "public function getQueues() {\n return $this->queues;\n }", "public function testDeleteWebhookQueueAccountMessageRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueueAccountMessageDelete());\n\n $response = $sw->deleteWebhookQueueAccountMessageRaw('MessageId');\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkDeleteRequests($container, ['/v4/webhooks/queues/account/MessageId']);\n }", "public function doQueueCommand()\n {\n $result = new ezcMvcResult;\n $command = $_POST['MergeCommand'];\n\n try {\n $queueOperation = mm\\Daemon\\Queue::add( new mm\\Operations\\Merge( $command ) );\n } catch( Exception $e ) {\n $result->variables['result'] = 'ko';\n $result->variables['message'] = $e->getMessage();\n $result->variables['d'] = $_POST['MergeCommand'];\n return $result;\n }\n\n $result->variables['status'] = 'ok';\n $result->variables['operation_hash'] = $queueOperation->hash;\n $result->variables['target_size'] = $queueOperation->object->targetFileSize;\n $result->variables['target_file'] = $queueOperation->object->targetFile;\n $result->variables['command'] = $command;\n\n return $result;\n }", "public function testGetQueueUrlViaQueueCreation()\n {\n $queueUrl = 'my-invoice-queue-message-url';\n\n $sqsClient = $this->getMockedAwsSdk()->createSqs(['version' => '2012-11-05']);\n $cmd = $sqsClient->getCommand('GetQueueUrl', [\n 'QueueName' => 'my-queue-name'\n ]);\n\n $results = [\n # Exception for inital GetQueueUrl command\n new SqsException('No Attribute MD5 found', $cmd, ['code' => 'AWS.SimpleQueueService.NonExistentQueue']),\n # Result for CreateQueue command for creation of dead letter queue\n new Result(['QueueUrl' => 'my-deadletter-queue-url']),\n # Result for GetQueueAttributes command (to fetch ARN of dead letter queue)\n new Result(['Attributes' => ['QueueArn' => 'arn:deadletter-queue']]),\n # Result for creation of invoice message queue\n new Result(['QueueUrl' => $queueUrl])\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n $this->assertEquals($queueUrl, $sqsQueue->getQueueUrl());\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "public function getQueueJob(array $data);", "public function getMessageAction() {\n\n //this will return One message which is inserted first of All exist in Current Queue\n $result = $this->messageQueue->Get();\n $this->code = ($result)? 200 : 404;\n return new \\Symfony\\Component\\HttpFoundation\\Response(json_encode(array('result'=>$result)), $this->code , array(\n 'Content-Type' => 'application/json'\n ));\n }", "private function getCompleteResult()\n\t{\n\t\tif($this->complete_result)\n\t\t{\n\t\t\treturn $this->complete_result;\n\t\t}\n\n\t\t$message = $this->amqp->GetMessageBody($this->connection, $this->task_id,$this->connection_details['result_expire'], true);\n\t\t\n\t\tif($message !== false)\n\t\t{\n\t\t\t$this->complete_result = $message['complete_result'];\n\t\t\t$this->body = json_decode(\n\t\t\t\t$message['body']\n\t\t\t);\n\t\t}\n\n\t\treturn false;\n\t}", "function sendMessageToQueue($messageObj){\n\tglobal $LAS_CFG;\n\t\n\t$daemon_host = $LAS_CFG->las_daemon_server['host'];\n\t$daemon_port = $LAS_CFG->las_daemon_server['port'];\n\t$daemon_url = 'tcp://'.$daemon_host.':'.$daemon_port;\n\t\n\t$client_timeout = $LAS_CFG->las_daemon_server['timeout'];\n\t\n\t$exchange_name = $LAS_CFG->message_server['taskQueue'];\n\t$new_routing_key = $exchange_name . $messageObj->routing_key;\n\t$messageObj->routing_key = $new_routing_key;\n\t\n\t// Convert JSON message to String\n\t$message = json_encode($messageObj);\n\t\n\t$server = new LasManager($daemon_url);\n\treturn $server->clientSendMessage($message, $client_timeout);\n}", "public function count() {\n return count($this->queues);\n }", "public function testQueue() {\n $node = $this->node;\n $message = Message::create([\n 'template' => 'foo',\n ]);\n\n $subscribe_options = [];\n $subscribe_options['save message'] = FALSE;\n\n try {\n $this->messageSubscribers->sendMessage($node, $message, [], $subscribe_options);\n $this->fail('Can add a non-saved message to the queue.');\n }\n catch (MessageSubscribeException $e) {\n $this->assertTrue(TRUE, 'Cannot add a non-saved message to the queue.');\n }\n\n // Assert message was saved and added to queue.\n $uids = array_fill(1, 10, new DeliveryCandidate([], [], 1));\n foreach ($uids as $uid => $candidate) {\n $candidate->setAccountId($uid);\n }\n $subscribe_options = [\n 'uids' => $uids,\n 'skip context' => TRUE,\n 'range' => 3,\n ];\n $queue = \\Drupal::queue('message_subscribe');\n $this->assertEquals($queue->numberOfItems(), 0, 'Queue is empty');\n $this->messageSubscribers->sendMessage($node, $message, [], $subscribe_options);\n $this->assertTrue((bool) $message->id(), 'Message was saved');\n $this->assertEquals($queue->numberOfItems(), 1, 'Message added to queue.');\n\n // Assert queue-item is processed and updated. We mock subscription\n // of users to the message. It will not be sent, as the default\n // notifier is disabled.\n $item = $queue->claimItem();\n $item_id = $item->item_id;\n\n // Add the queue information, and the user IDs to process.\n $subscribe_options['queue'] = [\n 'uids' => $uids,\n 'item' => $item,\n 'end time' => FALSE,\n ];\n\n $this->messageSubscribers->sendMessage($node, $message, [], $subscribe_options);\n\n // Reclaim the new item, and assert the \"last UID\" was updated.\n $item = $queue->claimItem();\n $this->assertNotEquals($item_id, $item->item_id, 'Queue item was updated.');\n $this->assertEquals($item->data['subscribe_options']['last uid'], 3, 'Last processed user ID was updated.');\n }", "private function parseResponses() \r\n {\r\n $validStates = array('Response', 'Response30');\r\n $messages = $this->MessageQueue->find('all', array(\r\n 'fields' => array('messageIdentity', 'message', 'processState', 'isCopied', 'sourceDeviceAlias'),\r\n 'conditions' => array(\r\n 'mailbox' => $this->CurrentDevice->deviceAlias,\r\n 'processState' => $validStates\r\n ),\r\n 'order' => 'createDate'\r\n ));\r\n \r\n // Start a transaction\r\n $this->MessageQueue->transaction(null, true);\r\n\r\n // Process all the messages. Any messages that fail will be placed into the $errors array.\r\n $errors = array();\r\n $processed = array();\r\n foreach($messages as $message)\r\n {\r\n $message = $message['MessageQueue'];\r\n\r\n try\r\n {\r\n libxml_use_internal_errors(true);\r\n $xml = Xml::build($message['message']);\r\n $namespaces = array_flip($xml->getNamespaces(true));\r\n\r\n // Convert the XML to an array and pass the resulting message to the correct processing function.\r\n $payload = Set::reverse($xml);\r\n // Set messageQuery to the payload array for message handling.\r\n $this->messageQuery[] = $payload['LawEnforcementTransaction']['Transaction']['Response'];\r\n\r\n if ($this->{\"handle{$message['processState']}\"}($message, $payload, $namespaces))\r\n $processed[] = $message['messageIdentity'];\r\n else\r\n $errors[] = array(\r\n 'message' => $message,\r\n 'error' => 'Message id ' . $message['messageIdentity'] . ' failed to process.'\r\n );\r\n }\r\n catch(Exception $e)\r\n {\r\n $errors[] = array(\r\n 'message' => $message,\r\n 'error' => 'Exception thrown while processing Message id ' . $message['messageIdentity'] . ': '\r\n . $e->getMessage()\r\n );\r\n }\r\n }\r\n \r\n // Just send the raw LawEnforcementTransaction to the user as is with a statement indicating the error.\r\n if (!empty($errors))\r\n {\r\n $copy = $errors;\r\n foreach($copy as $index => $error) {\r\n try\r\n {\r\n $this->queueErrorResponse($error['error'], $error['message']);\r\n $processed[] = $error['message']['messageIdentity'];\r\n unset($copy[$index]);\r\n }\r\n catch(Exception $e)\r\n {\r\n $errors[$index]['error'] = \"Failed to enqueue message that failed processing. \" \r\n . \"Original Error:\\n\\n\" . $error['error'];\r\n }\r\n }\r\n }\r\n\r\n // Dequeue all processed messages.\r\n if (!empty($processed))\r\n $this->MessageQueue->deleteAll(array('messageIdentity' => $processed));\r\n \r\n // Deal with any errors that failed to get directed towards the user. All we can do is change them in the queu\r\n // to a new state (so they're not lost) and log them in the CLIPS error log.\r\n //\r\n // This should almost never happen.\r\n if (!empty($errors)) {\r\n $ids = Set::extract($errors, '{n}.message.messageIdentity');\r\n \r\n // Log each of the messages that failed\r\n foreach($errors as $id => $error) {\r\n CakeLog::write('error', \"Message (id {$error['message']['messageIdentity']}) failed to process. \" \r\n . \"{$error['error']}\\n{$error['message']['message']}\");\r\n }\r\n \r\n // UpdateAll doesn't behave like other Cake model functions. We have to quote the param ourself.\r\n $this->MessageQueue->updateAll(\r\n array('processState' => '\\'CLIPS_Error\\''),\r\n array('messageIdentity' => $ids)\r\n );\r\n }\r\n\r\n return $this->MessageQueue->transaction(true, true);\r\n }", "public function getRedisMsgs()\n {\n return [[], [], [], 0, []];\n }", "public function getMessagesAndFlush() {}", "public function main()\n {\n $sms = $this->SmsService->smsList();\n $sendId= [];\n $cnt = count($sms);\n $this->log(\"Send Message count \".$cnt,'debug');\n if($cnt>0){\n $refKey = \"FCCTV\".time();\n $api = new gabiaSmsApi('brickcommerce','6caf388099c1c8f8a782dfa57534b1dc');\n\n foreach($sms as $key => $info){\n try{\n //$sendId[]=$info->id;\n $r = $api->sms_send($info->recv_phone_number, \"070-5015-6383\",$info->message,$refKey);\n\n if ($r == gabiaSmsApi::$RESULT_OK)\n {\n $this->log(\"Send Message \".$info->id.\" : number : \".$info->recv_phone_number. \" : \" . $api->getResultMessage() . \"이전 : \" . $api->getBefore() . \" : 이후 : \" . $api->getAfter(),'debug');\n $this->SmsService->smsSendUpdate($info->id);\n }\n\n //$this->log(\"Send Message \".$info->id.\" : number : \".$info->recv_phone_number,'debug');\n }catch (Exception $e){\n $this->log($e->getMessage(),'error');\n }\n\n }\n\n $result = $api->get_status_by_ref($refKey);\n $this->log(\"CODE : \".$result[\"CODE\"].\"::::::MESG : \".$result[\"MESG\"],'debug');\n\n }\n }", "protected static function getQueueStatus()\n {\n $result = [];\n\n try {\n $repository = RepositoryRegistry::getQueueItemRepository();\n\n $query = new QueryFilter();\n $query->where('status', Operators::NOT_EQUALS, QueueItem::COMPLETED);\n\n $result = $repository->select($query);\n } catch (RepositoryNotRegisteredException $e) {\n } catch (QueryFilterInvalidParamException $e) {\n } catch (RepositoryClassException $e) {\n }\n\n return static::formatJsonOutput($result);\n }", "public function isSent(): bool\n {\n return $this->status === static::STATUS_QUEUED || $this->status === static::STATUS_COMPLETE;\n }", "public function enqueue(array $messages);", "public function GetQueuedJobs()\n {\n $JOBS = $this->DB->GET('MUP.injector.jobs', ['status' => 'QUEUED', 'pmta' => $this->HOSTID, 'active' => '1', 'ORDER' => ['date' => 'ASC']], ['id', 'target', 'pool'], 100000);\n if (empty($JOBS)) {\n $this->ALERTS[] = FAIL.\" ~ <<< No Jobs to Inject...\";\n }else{\n if (isset($JOBS['id']))\n $JOBS = [$JOBS['id']=> $JOBS];\n foreach ($JOBS as $ID => $JOB) \n if (!isset($this->QueuedJobs[$JOB['pool']][$JOB['target']])) \n $this->QueuedJobs[$JOB['pool']][$JOB['target']] = ltrim($ID, '0');\n $this->Debug('QUEUED JOBS', $this->QueuedJobs);\n }\n }" ]
[ "0.76260746", "0.6044391", "0.56180656", "0.55385405", "0.5512505", "0.54077566", "0.5398891", "0.53052056", "0.52634776", "0.5255026", "0.52334505", "0.522062", "0.51656127", "0.51409054", "0.5122383", "0.5097822", "0.508234", "0.5068912", "0.5055981", "0.50304717", "0.49840975", "0.49710107", "0.49608123", "0.49493736", "0.49453926", "0.4938102", "0.49373147", "0.49363446", "0.4920448", "0.49042818", "0.49036628", "0.4890738", "0.48905793", "0.4876875", "0.48687616", "0.48638755", "0.48624235", "0.48603103", "0.48582846", "0.48582846", "0.48447943", "0.4841748", "0.48228207", "0.48169404", "0.4800451", "0.47980225", "0.47910047", "0.47845986", "0.47838056", "0.47707272", "0.4763699", "0.47550854", "0.47528458", "0.47478834", "0.47398698", "0.47381607", "0.47365025", "0.47308946", "0.47298422", "0.47262576", "0.47184795", "0.47157973", "0.4710039", "0.47095641", "0.47080913", "0.47080913", "0.47079405", "0.4707753", "0.4688109", "0.468513", "0.46767065", "0.4660674", "0.46577793", "0.46508744", "0.46505204", "0.46485296", "0.4647863", "0.4639572", "0.46394876", "0.46366894", "0.46307012", "0.46281418", "0.4618111", "0.46122256", "0.4610247", "0.46022508", "0.45980895", "0.45967555", "0.45967162", "0.4594949", "0.45936537", "0.45773515", "0.4566335", "0.4552066", "0.45461553", "0.45423838", "0.45406175", "0.45393494", "0.4512114", "0.4506478", "0.4506179" ]
0.0
-1
Generated from protobuf field repeated .kubemq.SendQueueMessageResult Results = 2;
public function setResults($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Kubemq\SendQueueMessageResult::class); $this->Results = $arr; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send(){\n\t\t\n\t\t$database = new Database();\n\t\t$query = $database->selectOne('message_queues', array('id',\n\t\t\t\t\t\t\t\t\t 'is_executed','executed_at','message','cellphone'), \n\t\t\t\t\t\t\t\t\t ' is_executed=0 ');\n\t\t$exec = $database->query($query);\n\t\tif ($exec) {\n\t\t\t$record = $database->fetchArray($exec);\n\t\t\t$response = $this->sendMessage($database, $record);\n\n\t\t\treturn json_encode(array('status' => $response['status'], 'message' => $response['message']));\n\t\t}\n\n\t}", "public function getResultMessage() {}", "public function testSendInvoiceToBatchOnSendMessageBatchCallable()\n {\n $validator = new InvoiceValidator();\n $successInvoice = Invoice::load($this->getValidInvoiceData()[0], $validator);\n $failedInvoice = Invoice::load($this->getValidInvoiceData()[1], $validator);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessageBatch command for first batch of 10\n new Result([\n 'Successful' => [0 => ['Id' => $successInvoice->getInvoiceId()]],\n 'Failed' => [0 => ['Id' => $failedInvoice->getInvoiceId()]]\n ])\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n # Use SqsQueueCallbackTester to test the callback\n $callbackTester = new SqsQueueCallbackTester();\n $sqsQueue->setOnSendMessageBatchCallback($callbackTester);\n\n $sqsQueue\n ->sendInvoiceToBatch($successInvoice, $validator)\n ->sendInvoiceToBatch($failedInvoice, $validator);\n\n # Destroy the object. This should trigger the final batch send.\n unset($sqsQueue);\n\n # Confirm that the successful and failed invoices were passed to the\n # SqsQueueCallbackTester instance\n $this->assertEquals(1, count($callbackTester->successfulInvoices));\n $this->assertEquals($successInvoice, $callbackTester->successfulInvoices[0]);\n $this->assertEquals(1, count($callbackTester->failedInvoices));\n $this->assertEquals($failedInvoice, $callbackTester->failedInvoices[0]);\n\n # Confirm the stack is empty (ie. that the API calls HAVE been made)\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "protected function queueMessages()\n {\n $pages = $users = $files = $sites = 0;\n\n foreach ($this->pagesToQueue() as $id) {\n yield \"P{$id}\";\n $pages++;\n }\n foreach ($this->pagesToRemove() as $id) {\n yield \"RP{$id}\";\n $pages++;\n }\n foreach ($this->usersToRemove() as $id) {\n yield \"RU{$id}\";\n $users++;\n }\n foreach ($this->filesToRemove() as $id) {\n yield \"RF{$id}\";\n $files++;\n }\n foreach ($this->sitesToRemove() as $id) {\n yield \"RS{$id}\";\n $sites++;\n }\n\n yield 'R' . json_encode([$pages, $users, $files, $sites]);\n }", "public function process_queue()\r\n {\r\n error_reporting(0);\r\n\r\n // TODO: Prefill information is stored in this array. It's nasty, but it works for now.\r\n // This will need to be cleaned up somehow, later.\r\n $this->prefillRequests = array();\r\n\r\n $this->parseResponses();\r\n\r\n // Array of keys that need to be included in the response.\r\n $include = array('request', 'class', 'hit');\r\n $responseQuery = [];\r\n foreach($this->messageQuery as $response) {\r\n // Switch all keys to lower case to prevent possible case errors.\r\n $responseArr = array_change_key_case($response, CASE_LOWER);\r\n // returns an array that intersects with the keys from the $include array\r\n $responseQuery[] = array_intersect_key($responseArr, array_flip($include));\r\n }\r\n\r\n $requestSummary = $this->ArchiveResponse->ArchiveRequest->Request->getSummary(\r\n $this->CurrentAgency->agencyId,\r\n $this->CurrentDevice->agencyDeviceId);\r\n\r\n $summary = array(\r\n 'requests' => $requestSummary,\r\n 'response' => $responseQuery,\r\n 'prefill' => $this->prefillRequests\r\n );\r\n $this->set('summary', $summary);\r\n }", "public function enqueueRequests()\n {\n if (!$this->has_requests) {\n\t\treturn \"No requests to send\";\n\t}\n\t\n\t$finished = \"Error connecting to redis\";\n \n try {\n $redis = new Redis();\n $redis->pconnect(REDIS_ADDRESS);\n \n $multi = $redis->multi();\n \n //Executing all posts to Redis in one multi batch\n foreach ($this->data_requests as $key => $request) {\n $uuid = $request->getUUID();\n \n $multi->lPush(PENDING_QUEUE, $uuid);\n $multi->hSet(VALUES_HASH, $uuid, $request->getFormattedURL());\n $multi->hSet(VALUES_HASH, $uuid . ':method', $this->endpoint->method);\n $multi->hSet(STATS_HASH, $uuid . ':start', $this->start_time);\n }\n \n $ret = $multi->exec();\n \n $finished = \"Postback Delivered\";\n \n //Seach results for any errors from Redis commands\n foreach ($ret as $idx => $result) {\n if (!$result) {\n $finished = \"Redis call failed: \" . $idx;\n }\n }\n \n }\n catch (Exception $e) {\n return \"Error posting to Redis\";\n }\n \n return $finished;\n \n }", "function execute() {\n foreach($this -> queue as $queue) {\n for($written = 0; $written < strlen($queue); $written += $fwrite) {\n $fwrite = fwrite($this -> __sock, substr($queue, $written));\n if($fwrite === false or $fwrite <= 0)\n trigger_error('WRITE ERROR', E_USER_ERROR);\n }\n }\n // Read in the results from the pipelined commands\n $responses = array();\n for($i = 0; $i < count($this -> queue); $i++) {\n $responses[] = $this -> response();\n }\n // Clear the queue and return the response\n $this -> queue = array();\n if($this -> pipelined) {\n $this -> pipelined = false;\n return $responses;\n }\n return $responses[0];\n }", "public function transactionMessage ($resultsArr);", "public function batchSendQueue(\n Swift_Mime_Message $message,\n &$failedRecipients = null,\n Swift_Mailer_RecipientIterator $it = null\n )\n {\n $this->addToQueue = true;\n \n return $this->batchSend($message, $failedRecipients, $it);\n }", "public function execute()\n {\n\n $undeliveredRecipients = array();\n $recipientsCount = 0;\n\n while (count($this->recipients) >= 1) {\n\n //send the command and read the response\n parent::execute();\n\n $recipient = array_pop($this->recipients);\n\n switch ($this->response->getCode()) {\n\n case '250':\n case '251':\n if (isset($recipient['original_email'])) {\n //we finally delivered mail to a user that provided a \n //forward-address\n $key = array_search($recipient['original_email'],\n $undeliveredRecipients);\n\n if ($key !== FALSE)\n unset($undeliveredRecipients[$key]);\n }\n\n $recipientsCount++;\n break;\n\n case '450':\n case '451':\n //add the recipient to the begginning of the queue to try again\n //later\n if ($recipient['retries'] > 0) {\n $recipient['retries']--;\n array_unshift($this->recipients, $recipient);\n }\n break;\n\n /* Handle too much recipients by splitting the message to chunks\n *\n * RFC 821 [30] incorrectly listed the error where an SMTP server\n * exhausts its implementation limit on the number of RCPT commands\n * (\"too many recipients\") as having reply code 552. The correct \n * reply code for this condition is 452. Clients SHOULD treat a \n * 552 code in this case as a temporary, rather than permanent, \n * failure so the logic below works. \n */\n case '452':\n case '552':\n array_push($this->recipients, $recipient);\n\n $result['undelivered'] = $undeliveredRecipients;\n //this causes the client to append a new mail sending sequence \n //for the rest of recipients\n $result['toDeliver'] = $this->recipients;\n $result['recipientsCount'] = $recipientsCount;\n\n return $result;\n break; //unreachable\n\n case '550':\n case '553':\n $undeliveredRecipients[] = $recipient['email'];\n break;\n\n case '551':\n if (preg_match('/<\\([^>]*\\)>/', $this->response, $matches)) {\n\n $forward = array();\n $forward['email'] = $matches[1];\n $forward['retries'] = 2;\n if (isset($recipient['original_email'])) {\n $forward['original_email'] = \n $recipient['original_email'];\n } else {\n $forward['original_email'] = $recipient['email'];\n $undeliveredRecipients[] = $recipient['email'];\n }\n\n $this->recipients[] = $forward;\n }\n break;\n }\n\n }\n\n return array(\n 'undelivered' => $undeliveredRecipients, \n 'recipientsCount' => $recipientsCount,\n );\n }", "public function queue($numbers = null, $message = null, $type = null, $queue = null);", "public function testSendInvoiceToBatchSuccessfulSendViaSendThreshold()\n {\n $validator = new InvoiceValidator();\n $invoice = Invoice::load($this->getValidInvoiceData()[0], $validator);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessageBatch command for first batch of 10\n new Result([]),\n # Result for SendMessageBatch command for the final batch of 1\n new Result([])\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n for ($i = 0; $i < (SqsQueue::SEND_BATCH_SIZE + 1); $i++) {\n $invoice->setInvoiceId($invoice->getInvoiceId() . '-' . $i);\n $sqsQueue->sendInvoiceToBatch($invoice, $validator);\n }\n\n # Destroy the object. This should trigger the final batch send.\n unset($sqsQueue);\n\n # Confirm the stack is empty (ie. that the API calls HAVE been made)\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "public function testGetWebhookQueueAccountMessage()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueueAccountMessage(), 3);\n\n $webhook = $sw->getWebhookQueueAccountMessage();\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $webhook = $sw->getWebhookQueueAccountMessage(false);\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $webhook = $sw->getWebhookQueueAccountMessage(true);\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $this->checkGetRequests($container, [\n '/v4/webhooks/queues/account?delete=false',\n '/v4/webhooks/queues/account?delete=false',\n '/v4/webhooks/queues/account?delete=true'\n ]);\n }", "public function Queues();", "public function queueOn($queue, $numbers = null, $message = null, $type = null);", "public function sendMultiple(array $messages);", "function exec_queue()\n\t{\n\t\t$vbulletin =& $this->registry;\n\n\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t{\n\t\t\t// Lock mailqueue table so that only one process can\n\t\t\t// send a batch of emails and then delete them\n\t\t\t$vbulletin->db->lock_tables(array('mailqueue' => 'WRITE'));\n\t\t}\n\n\t\t$emails = $vbulletin->db->query_read(\"\n\t\t\tSELECT *\n\t\t\tFROM \" . TABLE_PREFIX . \"mailqueue\n\t\t\tORDER BY mailqueueid\n\t\t\tLIMIT \" . intval($vbulletin->options['emailsendnum'])\n\t\t);\n\n\t\t$mailqueueids = '';\n\t\t$newmail = 0;\n\t\t$emailarray = array();\n\t\twhile ($email = $vbulletin->db->fetch_array($emails))\n\t\t{\n\t\t\t// count up number of mails about to send\n\t\t\t$mailqueueids .= ',' . $email['mailqueueid'];\n\t\t\t$newmail++;\n\t\t\t$emailarray[] = $email;\n\t\t}\n\t\tif (!empty($mailqueueids))\n\t\t{\n\t\t\t// remove mails from queue - to stop duplicates being sent\n\t\t\t$vbulletin->db->query_write(\"\n\t\t\t\tDELETE FROM \" . TABLE_PREFIX . \"mailqueue\n\t\t\t\tWHERE mailqueueid IN (0 $mailqueueids)\n\t\t\t\");\n\n\t\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t\t{\n\t\t\t\t$vbulletin->db->unlock_tables();\n\t\t\t}\n\n\t\t\tif ($vbulletin->options['use_smtp'])\n\t\t\t{\n\t\t\t\t$prototype =& new vB_SmtpMail($vbulletin);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$prototype =& new vB_Mail($vbulletin);\n\t\t\t}\n\n\t\t\tforeach ($emailarray AS $index => $email)\n\t\t\t{\n\t\t\t\t// send those mails\n\t\t\t\t$mail = (phpversion() < '5' ? $prototype : clone($prototype)); // avoid ctor overhead\n\t\t\t\t$mail->quick_set($email['toemail'], $email['subject'], $email['message'], $email['header'], $email['fromemail']);\n\t\t\t\t$mail->send();\n\t\t\t}\n\n\t\t\t$newmail = 'data - ' . intval($newmail);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($vbulletin->options['usemailqueue'] == 2)\n\t\t\t{\n\t\t\t\t$vbulletin->db->unlock_tables();\n\t\t\t}\n\n\t\t\t$newmail = 0;\n\t\t}\n\n\t\t// update number of mails remaining\n\t\t$vbulletin->db->query_write(\"\n\t\t\tUPDATE \" . TABLE_PREFIX . \"datastore SET\n\t\t\t\tdata = \" . $newmail . \",\n\t\t\t\tdata = IF(data < 0, 0, data)\n\t\t\tWHERE title = 'mailqueue'\n\t\t\");\n\n\t\t// if we're using a alternate datastore, we need to give it an integer value\n\t\t// this may not be atomic\n\t\tif (method_exists($vbulletin->datastore, 'build'))\n\t\t{\n\t\t\t$mailqueue_db = $vbulletin->db->query_first(\"\n\t\t\t\tSELECT data\n\t\t\t\tFROM \" . TABLE_PREFIX . \"datastore\n\t\t\t\tWHERE title = 'mailqueue'\n\t\t\t\");\n\t\t\t$vbulletin->datastore->build('mailqueue', intval($mailqueue_db['data']));\n\t\t}\n\t}", "public function sendQueue(Swift_Mime_Message $message, &$failedRecipients = null)\n {\n $this->addToQueue = true;\n \n return $this->send($message, $failedRecipients);\n }", "public function runQueue();", "public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}", "public function sendResults( $results = array() ) {\n\n // dummy data:\n // $results = array(\n // (object)array(\n // \"id\" => \"484848484852bf4f6c7eca896c0030516ab2f228f157237712e52d66489d9960\",\n // \"result\" => 6,\n // \"sc\" => 1625125748\n // )\n // );\n\n $postdata = json_encode(\n (object)array(\n 'testResults' => $results\n )\n );\n\n $ch = curl_init();\n\n $curlOpts = array(\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => $postdata,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_SSLKEY => self::$keyFile,\n CURLOPT_SSLCERT => self::$certFile,\n CURLOPT_KEYPASSWD => self::$keyPass,\n CURLOPT_URL => self::getStageURL() . self::API_ENDPOINT_RESULTS,\n CURLOPT_HTTPHEADER => array('Content-Type: application/json'),\n );\n \n curl_setopt_array($ch , $curlOpts);\n \n $output = curl_exec( $ch ) ;\n \n if ( curl_errno( $ch ) ) {\n $error_msg = curl_error( $ch );\n print \"curl_error: $error_msg <br>\";\n } else {\n $status = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n if ( 204 === $status ) {\n return true;\n } else {\n $response = json_decode($output);\n if ( is_object( $response ) ) {\n return $response;\n } else {\n return (object)array(\n 'status' => $status,\n 'response' => $response\n );\n }\n }\n }\n }", "public function testMessageThreadsV2GetMessages0()\n {\n }", "public function testGetQueueUrlQueueCreated()\n {\n $queueUrl = 'my-invoice-queue-message-url';\n $results = [\n new Result(['QueueUrl' => $queueUrl])\n ];\n $sqsQueue = $this->getSqsQueueInstance($results);\n $this->assertEquals($queueUrl, $sqsQueue->getQueueUrl());\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "public function getMessageQueue()\n\t{\n\t\treturn $this->messages;\n\t}", "private function setQueue() {\n if (count($this->request->q) > 0) {\n try {\n $this->client->setQueue(array($this->request->q));\n $this->view->addParameter(\"result\", \"success\");\n } catch(Exception $e) {\n $this->view->addParameter(\"result\", \"failure\");\n $this->view->addParameter(\"data\", \"Failed to execute '{$this->request->action}' action\");\n }\n } else {\n $this->view->addParameter(\"result\", \"invalid\");\n $this->view->addParameter(\"data\", \"Query array must not be empty\");\n }\n }", "public function queued()\n {\n return $this->memory->get('orchestra.publisher.queue', []);\n }", "public function send( Execution $e ) {\n $this->queue[] = $e;\n $this->messagesAccepted++;\n }", "public function testEnqueueQueueJobs()\n {\n $queueJobTest1 = new TestQueueJob('price', 'ShopwarePriceImport');\n $queueJobTest2 = new TestQueueJob('product', 'ShopwareProductExport');\n\n $result = $this->queue->enqueue($queueJobTest1);\n $this->assertTrue($result);\n\n $result = $this->queue->enqueue($queueJobTest2);\n $this->assertTrue($result);\n\n $this->assertCount(2, $this->queueStorage->queue);\n }", "function getResultMessage() {\n return $this->memcached->getResultCode();\n }", "public function getQueuedPendingCount()\n {\n return $this->queuedPendingCount;\n }", "public function ReconcileQueues()\n {\n $xml = file_get_contents($this->StatsDir);\n $XML = simplexml_load_string($xml);\n foreach ($XML->data->queue as $i => $q) {\n $NAME = (string) $q->name[0];\n list($DOMAIN, $VMTA) = explode('/', $NAME);\n $LONGIP = ip2long(trim($VMTA));\n if (isset($this->TDOMS[$DOMAIN]) && ($DOMAIN!=='*') && ($VMTA!=='*'))\n if (!isset($this->PoolIPs[$LONGIP]))\n $this->ALERTS[] = FAIL.\" No Queued Jobs for \".$DOMAIN.' on VMTA: '.$VMTA.WHT;\n else {\n $POOL = $this->PoolIPs[$LONGIP];\n $TARGET = $this->TDOMS[$DOMAIN];\n $SIZE = (string) $q->rcp[0];\n $MODE = (string) $q->mode[0];\n $PAUSED = (string) $q->paused[0];\n $RETRY = empty($q->retryTime)?'00:00:00':(string) $q->retryTime[0];\n $ER = [];\n foreach ($q->event as $event)\n $ER[] = (string) $event->text[0];\n if ($SIZE >= $this->Low) \n unset($this->Pools[$POOL]['ips'][$LONGIP][$TARGET]);\n }\n }\n if (empty($this->Pools)) {\n $this->ALERTS[] = FAIL.\" No low Queues Found\";\n return false;\n }\n return $this->CompileJobs();\n }", "public function pauseQueue()\n {\n return $this->sendrequest('pause', null);\n }", "function submitBatch() {\n\tglobal $gMaxQueueLength;\n\t$submittedTests = countTestsWithCode(SUBMITTED);\n\t$unsubmitTests = obtainTestsWithCode(NOT_STARTED);\n\tif ( !isEmptyQuery($unsubmitTests) ) {\n\t\twhile ($row = mysqli_fetch_assoc($unsubmitTests)) {\n\t\t\tsubmitTest($row, 0);\n\t\t\t// Limit the number of in-flight tests\n\t\t\tif ($gMaxQueueLength) {\n\t\t\t\t$submittedTests++;\n\t\t\t\tif ($submittedTests >= $gMaxQueueLength)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}", "function messages_send($count = 5){\n\t\tfor($i=0;$i<$count;$i++)\n\t\t{\n\t\t\t$element = vazco_newsletter::queuePop('not_sent');\n\t\t\tif($element!==null)\n\t\t\t{\n\t\t\t\t$result = vazco_newsletter::sendMessage($element[0],$element[1]);\n\t\t\t\tif($result)\n\t\t\t\t\tvazco_newsletter::queuePush($element,'sent');\n\t\t\t\telse\n\t\t\t\t\tvazco_newsletter::queuePush($element,'error');\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function transactionGetResultsSuccess ($message);", "public function fetchQueuedMessagesForGraphWidget(array $params = array())\n {\n $responseParsed = array();\n $response = $this->request($this->getEndpointUrl(__FUNCTION__), $params);\n\n if (isset($response['messages_details']['samples'])) {\n foreach ($response['messages_details']['samples'] as $singleStat) {\n $responseParsed[] = [\n 'x' => $singleStat['timestamp'],\n 'y' => $singleStat['sample']\n ];\n }\n } else {\n $responseParsed = [\n [\n 'x' => 0,\n 'y' => 0,\n ],\n [\n 'x' => (int) gmdate('U') * 1000,\n 'y' => 0,\n ],\n ];\n }\n\n return array_reverse($responseParsed);\n }", "public function testMessageThreadsV2GetMessages()\n {\n }", "public function getQueue();", "public function getQueue();", "public function send() : array\n {\n $this->validateBeforePush();\n\n $results = [];\n\n // Loop through all apps in selected application group\n // and try and send the push message to each app.\n foreach ($applications = $this->appGroups[$this->appGroup] as $appName => $credentials) {\n\n // Skip empty credentials\n if ($this->hasEmptyCredentials($credentials)) {\n $results[$appName] = 'skipped - empty credentials';\n continue;\n }\n\n try {\n $UAData = [\n 'body' => json_encode($this->buildPushData()),\n 'auth' => [$credentials['app_key'], $credentials['master_secret']],\n ];\n\n if (!empty($this->proxy)) {\n $UAData['proxy'] = $this->proxy;\n }\n\n // Send request to Urban Airship\n $response = $this->getHttpClient()->post('/api/push', $UAData);\n\n // Validate response by looking at the received status code\n if (!in_array($response->getStatusCode(), [200, 201, 202])) {\n throw (new SendPushFailedException(sprintf('[%s] - [%s] Could not send push message. Status code received: %d %s',\n $this->appGroup, $appName, $response->getStatusCode(), $response->getReasonPhrase())))\n ->addMeta([\n 'responseCode' => $response->getStatusCode(),\n 'responseContent' => $response->getBody()->getContents()\n ]);\n }\n\n // Decode response\n $content = json_decode($response->getBody()->getContents(), true);\n\n // Handle potential errors\n if (empty($content['ok']) || !$content['ok']) {\n throw (new SendPushFailedException(sprintf('[%s]- [%s] Could not send push message. Reason: %s', $appName, $this->appGroup,\n $content->error), $content->error_code))\n ->addMeta([\n 'requestData' => $this->getRequestData(),\n 'responseCode' => $response->getStatusCode(),\n 'responseContent' => $content\n ]);\n }\n\n $results[] = $content;\n } catch (ClientException $e) {\n if(in_array($e->getCode(), ['503', '504']) && $this->retries < self::MAX_RETRIES) {\n $this->retries++;\n\n // Sleep 1, 2, 3\n $sleepSeconds = $this->retries ?: 1;\n\n sleep($sleepSeconds);\n\n return $this->send();\n }\n \n // Setting retries back, since the instance could be reused in a queue\n $this->retries = 0;\n\n throw (new SendPushFailedException(sprintf('[%s] - [%s] Could not send push message. Reason: %s', $this->appGroup, $appName,\n $e->getMessage())))\n ->addMeta([\n 'credentials' => $credentials,\n 'proxy' => $this->proxy,\n 'requestData' => $this->getRequestData(),\n 'responseCode' => $e->getResponse()->getStatusCode(),\n 'responseContent' => $e->hasResponse() ? $e->getResponse()->getBody()->getContents() : null\n ]);\n } catch (\\Throwable $e) {\n throw (new SendPushFailedException(sprintf('[%s] - [%] Could not send push message. Reason: %s', $this->appGroup, $appName,\n $e->getMessage()))\n )->addMeta([\n 'code' => $e->getCode(),\n 'credentials' => $credentials,\n 'proxy' => $this->proxy,\n 'requestData' => $this->getRequestData()\n ]);\n }\n }\n\n // Reset retries in case we are running in queue --demon mode\n $this->retries = 0;\n\n return $results;\n }", "public function testGetWebhookQueueTemplateMessage()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueueTemplateMessage(), 3);\n\n $webhook = $sw->getWebhookQueueTemplateMessage('TestingGUID');\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $webhook = $sw->getWebhookQueueTemplateMessage('TestingGUID', false);\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $webhook = $sw->getWebhookQueueTemplateMessage('TestingGUID', true);\n $this->assertInstanceOf(SmartwaiverWebhookMessage::class, $webhook);\n\n $this->checkGetRequests($container, [\n '/v4/webhooks/queues/template/TestingGUID?delete=false',\n '/v4/webhooks/queues/template/TestingGUID?delete=false',\n '/v4/webhooks/queues/template/TestingGUID?delete=true'\n ]);\n }", "public function getQueue()\n {\n return array();\n }", "public function testGetWebhookQueuesRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueues());\n\n $response = $sw->getWebhookQueuesRaw();\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkGetRequests($container, ['/v4/webhooks/queues']);\n }", "public function testMessageThreadsV2Post()\n {\n }", "function startQueue(){\n\n // Maintain the array checkLogQ as a FIFO buffer with length 4.\n // When a new entry is added, remove oldest entry and shuffle.\n function addCheckLog($message){\n global $checkLogQ;\n $length = 4;\n // If checkLogQ size is smaller than 4 add the message\n if(count($checkLogQ)<$length){\n $checkLogQ[] = $message;\n }\n // If checkLogQ size is bigger than 4 - Remove the oldest message and add the new one\n else{\n array_shift($checkLogQ);\n $checkLogQ[] = $message;\n }\n }\n // Prints all checkLogQ messages to the console \n function printCheckLogQ(){\n global $checkLogQ;\n foreach($checkLogQ as $message){\n print($message);\n }\n $checkLogQ = array(); // reset a variable to an empty array\n }\n \n try{\n while(true){\n addCheckLog(date('Y/m/d H:i:s').\" Awaiting a message...\\n\");\n\n // Receive messages from queue, maximum waits for 20 seconds for message\n // receive_request - contain all the queue messages\n global $sqs;\n $receive_request = $sqs->receiveMessage(array(\n 'QueueUrl' => ds_config(\"QUEUE_URL\"),\n 'WaitTimeSeconds' => 20,\n 'MaxNumberOfMessages' => 10\n ));\n // Count the amount of messages received\n $msgCount = 0;\n if($receive_request->getPath('Messages') !== NULL){\n $msgCount = count($receive_request->getPath('Messages'));\n }\n addCheckLog(date('Y/m/d H:i:s').\" found $msgCount message(s)\\n\");\n // If at least one message has been received\n if ($msgCount!=0) {\n printCheckLogQ();\n foreach ($receive_request->getPath('Messages') as $msg) {\n messageHandle($msg, $receive_request);\n }\n }\n }\n }\n catch (Exception $e) {\n printCheckLogQ();\n print(date('Y/m/d H:i:s').\" Queue receive error: $e\");\n sleep(5);\n global $restart;\n $restart = true;\n }\n }", "public function testListQueue()\n {\n $job = new JobQUeueList(self::$virtualHost, self::$queueName);\n $response = Bootstrap::getFactory()->getJobService()->execute($job);\n $body = $response->getBody();\n\n $this->assertTrue($response->isSuccess());\n $this->assertTrue(is_object($body));\n $this->assertEquals((string)self::$virtualHost, $body->vhost);\n $this->assertEquals((string)self::$queueName, $body->name);\n }", "public function getQueue()\n {\n return $this->doRequest('GET', \"queue\", []);\n }", "public function fetchMessageFromQueue()\n {\n $whereParams = [\n 'status' => 'PENDING',\n ];\n $orderBy = 'attempts';\n return $this->db->first($this->table, $whereParams, $orderBy);\n\n }", "public function batchSend()\n\t{\n\t\treturn $this->mailer->batchSend($this->message);\n\t}", "public function getStats()\n {\n $request = new TaskQueueFetchQueueStatsRequest();\n $response = new TaskQueueFetchQueueStatsResponse();\n\n $request->addQueueName($this->str_name);\n\n $this->makeCall('FetchQueueStats', $request, $response);\n \n return $response->getQueueStats(0);\n }", "public function sendMessage($queueId, $message, $options = null);", "private function sendMessage($database, $record){\n\n\t\t\t// Preparing message requests\n\t\t\t$messages = json_decode($record['message'], true);\n\n\t\t\t// Add headers for multiple parts\n\t\t\t$chunksId = '';\n\t\t\tif (count($messages)>1) $chunksId = md5(strtotime(\"now\"));\n\n\t\t\t// Sending long messages in chunks and short in a single go\n\t\t\tforeach ($messages as $messagePart){\n\n\t\t\t\t$request = array(\n\t\t\t\t\t'message' => $messagePart,\n\t\t\t\t\t'cellphone' => $record['cellphone'],\n\t\t\t\t);\t\n\n\t\t\t\t// Sending Message\n\t\t\t\t$accessKey = Config::params('sms_service')->access_key;\n\t\t\t\t$originator = Config::params('sms_service')->originator;\n\t\t\t\t$smsType = Config::params('sms_service')->type;\n\t\t\t\t$datacoding = Config::params('sms_service')->datacoding;\n\n\t\t\t\t$MessageBird = new \\MessageBird\\Client($accessKey);\n\t\t\t\t$Message = new \\MessageBird\\Objects\\Message();\n\t\t\t\t$Message->originator = $originator;\n\t\t\t\t$Message->recipients = (int)$request['cellphone'];\n\t\t\t\t$Message->body = $request['message'];\n\t\t\t\t$Message->type = $smsType;\n\t\t\t\t$Message->datacoding = $datacoding;\n\n\t\t\t\tif ($chunksId) $Message->typeDetails['udh'] = $chunksId;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t$MessageResult = $MessageBird->messages->create($Message);\n\t\t\t\t\t//print_r($MessageResult);\n\t\t\t\t} catch (\\MessageBird\\Exceptions\\AuthenticateException $e) {\n\t\t\t\t\t// That means that your accessKey is unknown\n\t\t\t\t\treturn array ('status' => self::FAILED, 'message' => 'SMS API Authentication Failed. Please contact to your Admininstrator.');\n\t\t\t\t} catch (\\MessageBird\\Exceptions\\BalanceException $e) {\n\t\t\t\t\t// That means that you are out of credits, so do something about it.\n\t\t\t\t\treturn array ('status' => self::FAILED, 'message' => 'SMS API Out of Credit. Please contact to your Admininstrator.');\n\t\t\t\t} catch (\\MessageBird\\Exceptions\\RequestException $e) {\n\t\t\t\t\t// That means that either submitted request is invalid or sms provider not supporting that country\n\t\t\t\t\t// updating request status as failed\n\t\t\t\t\t$this->updateRecord($database, $record, 2);\n\t\t\t\t\treturn array ('status' => self::FAILED, 'message' => $e->getMessage());\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\treturn array ('status' => self::FAILED, 'message' => $e->getMessage());\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $this->updateRecord($database, $record);\n\t}", "public function getQueue()\n {\n \treturn \"campaign-{$this->campaign->id}-worker-{$this->id}\";\n }", "public function transactionSucceeded ($resultsArr);", "public function pending()\n {\n $prefix = config('vapor-ui.queue.prefix');\n\n if (empty($prefix)) {\n return 0;\n }\n\n $queue = $this->queueResolver->__invoke();\n\n return collect($this->sqs->getQueueAttributes([\n 'AttributeNames' => [\n 'ApproximateNumberOfMessages',\n 'ApproximateNumberOfMessagesNotVisible',\n 'ApproximateNumberOfMessagesDelayed',\n ],\n 'QueueUrl' => \"$prefix/$queue\",\n ])['Attributes'])->sum();\n }", "public function flushQueue(Swift_Transport $transport, &$failedRecipients = null)\n {\n $failedRecipients = (array)$failedRecipients;\n $count = 0;\n $time = time();\n\n $maxNumberOfMessages = max(\n min(\n $this->getMessageLimit(),\n static::MAX_NUMBER_MESSAGES\n ),\n static::MIN_NUMBER_MESSAGES\n );\n\n $options = [\n 'MaxNumberOfMessages' => $maxNumberOfMessages,\n 'WaitTimeSeconds' => $this->longPollingTimeout\n ];\n\n while (true) {\n try {\n $response = $this->sqs->receiveMessage([\n 'QueueUrl' => $this->queueUrl,\n ] + $options);\n } catch (\\Exception $e) {\n $this->logError('Load messages from SQS', $e);\n return $count;\n }\n\n $messages = $response->get('Messages');\n if (!is_array($messages) || count($messages) == 0) {\n return $count;\n }\n\n foreach ($messages as $sqsMessage) {\n if (!$transport->isStarted()) {\n $transport->start();\n }\n\n $message = unserialize(gzuncompress(base64_decode((string)$sqsMessage['Body'])));\n\n try {\n $count += $transport->send($message, $failedRecipients);\n } catch (\\Exception $e) {\n $this->logError('Send e-mail', $e);\n }\n\n $this->removeSqsMessage((string)$sqsMessage['ReceiptHandle']);\n\n if ($this->getMessageLimit() && ($count >= $this->getMessageLimit())) {\n return $count;\n }\n\n if ($this->getTimeLimit() && ((time() - $time) >= $this->getTimeLimit())) {\n return $count;\n }\n }\n }\n\n return $count;\n }", "public function process()\r\n {\r\n $success = true;\r\n\r\n $items = Queue::find()\r\n ->where(['and', ['sent_time' => null], ['<', 'attempts', $this->maxAttempts]])\r\n ->orderBy(['created_at' => SORT_ASC])\r\n ->limit($this->mailsPerRound)\r\n ->all();\r\n\r\n if (!empty($items)) {\r\n $attributes = ['attempts', 'last_attempt_time'];\r\n foreach ($items as $item) {\r\n try{\r\n /** @var \\app\\models\\Queue $item */\r\n if ($message = $item->toMessage()) {\r\n if ($this->sendMessage($message)) {\r\n $item->delete();\r\n } else {\r\n throw new Exception('An error occurred while sending the message');\r\n }\r\n }\r\n } catch (Exception $e) {\r\n $success = false;\r\n $item->attempts++;\r\n $item->last_attempt_time = new Expression('NOW()');\r\n $item->updateAttributes($attributes);\r\n }\r\n }\r\n }\r\n\r\n return $success;\r\n }", "public function testSendInvoiceToBatchUnsuccessfulSendViaDestructor()\n {\n $validator = new InvoiceValidator();\n\n $sqsClient = $this->getMockedAwsSdk()->createSqs(['version' => '2012-11-05']);\n $cmd = $sqsClient->getCommand('SendMessage', [\n 'QueueName' => 'my-queue-name'\n ]);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessage command\n new AwsException('Exception message', $cmd)\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n foreach ($this->getValidInvoiceData() as $data) {\n $invoice = Invoice::load($data, $validator);\n $sqsQueue->sendInvoiceToBatch($invoice, $validator);\n }\n # Destroy the object. This should trigger the batch send.\n unset($sqsQueue);\n }", "public function get_queued_status() {\n\t\treturn '';\n\t}", "public function getResultMessage()\n {\n return $this->resultMessage;\n }", "public function getResultMessage()\n\t{\n\t\t// TODO: Implement getResultMessage() method.\n\t\t$message = array();\n\n\t\t$message[] = '';\n\t\t$message[] = 'Wordpress has been installed succesfully.';\n\t\t$message[] = '';\n\t\t$message[] = 'Credentials:';\n\t\t$message[] = 'Admin user : ' . $this->config->get('admin_user');\n\t\t$message[] = 'Admin password : ' . $this->config->get('admin_password');\n\t\t$message[] = '';\n\n\t\treturn $message;\n\t}", "public function GetSendingJobStatusCodes()\n\t{\n\t\treturn array ('i', 'r');\n\t}", "public function purgeAllQueues() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('purgeAllQueues', func_get_args()));\n }", "public function purgeAllQueues() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('purgeAllQueues', func_get_args()));\n }", "public function FlushQueue()\n {\n do\n {\n $result = $this->FlushMsg();\n } while ($result);\n }", "public function processMessages() {\n while ( ( $execution = array_shift($this->queue) ) ) { \n $execution->event('continue');\n $this->messagesDelivered++;\n }\n }", "public function send()\n {\n if (!isset($this->message))\n {\n return FALSE;\n }\n\n $this->sqs_client->sendMessage([\n 'MessageGroupId'\t\t\t=> '1',\n 'MessageDeduplicationId'\t=> mt_rand(),\n 'QueueUrl' \t\t\t\t=> SQS_VIDEO_URL,\n 'MessageBody' \t\t\t\t=> json_encode($this->message)\n ]);\n\n return TRUE;\n }", "public function testGetWebhookQueueAccountMessageRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueueAccountMessage());\n\n $response = $sw->getWebhookQueueAccountMessageRaw();\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkGetRequests($container, ['/v4/webhooks/queues/account?delete=false']);\n }", "public function send_queue()\n\t{\n\t\t$sql = 'SELECT *\n\t\t\t\tFROM ' . SQL_PREFIX . 'notify\n\t\t\t\tORDER BY notify_time';\n\t\t$result = Fsb::$db->query($sql, 'notify_');\n\t\tif ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\t// Suppression des elements directement, afin d'eviter un double envoie\n\t\t\t$sql = 'DELETE FROM ' . SQL_PREFIX . 'notify';\n\t\t\tFsb::$db->query($sql);\n\t\t\tFsb::$db->destroy_cache('notify_');\n\n\t\t\t// Envoie du message\n\t\t\tdo\n\t\t\t{\n\t\t\t\t$this->method = (isset($this->ext[$row['notify_method']])) ? $row['notify_method'] : NOTIFY_MAIL;\n\t\t\t\t$this->subject = $row['notify_subject'];\n\t\t\t\t$this->body = $row['notify_body'];\n\t\t\t\t$this->bcc = explode(\"\\n\", $row['notify_bcc']);\n\t\t\t\t$return = $this->send(false);\n\t\t\t\t$this->reset();\n\n\t\t\t\t// En cas d'echec du message on le reinsere dans la base de donnee\n\t\t\t\tif (!$return && $row['notify_try'] < Notify::MAX_TRY)\n\t\t\t\t{\n\t\t\t\t\t$row['notify_try']++;\n\t\t\t\t\tunset($row['notify_id']);\n\t\t\t\t\tforeach ($row AS $k => $v)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (is_numeric($k))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($row[$k]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tFsb::$db->insert('notify', $row, 'INSERT', true);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile ($row = Fsb::$db->row($result));\n\t\t\tFsb::$db->query_multi_insert();\n\t\t}\n\t\tFsb::$db->free($result);\n\t}", "public function testGetWebhookQueues()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueues());\n\n $webhook = $sw->getWebhookQueues();\n $this->assertInstanceOf(SmartwaiverWebhookQueues::class, $webhook);\n\n $this->checkGetRequests($container, ['/v4/webhooks/queues']);\n }", "public function getResult($queueJobId);", "public function getResultMessage()\n {\n return $this->_resultMessage;\n }", "public function execute() {\n\t\t$outfile = $this->getOption( 'outfile' );\n\t\t$conditions = [];\n\t\t$gateway = $this->getOption( 'gateway' );\n\t\tif ( $gateway ) {\n\t\t\t$conditions['gateway'] = $gateway;\n\t\t}\n\n\t\t$consumer = new QueueFileDumper(\n\t\t\t$this->getOption( 'queue' ),\n\t\t\t$this->getOption( 'max-messages' ),\n\t\t\t$outfile,\n\t\t\t$conditions\n\t\t);\n\n\t\t$startTime = time();\n\t\t$messageCount = $consumer->dequeueMessages();\n\n\t\t$elapsedTime = time() - $startTime;\n\t\tLogger::info(\n\t\t\t\"Dumped $messageCount messages to $outfile in $elapsedTime seconds.\"\n\t\t);\n\t}", "public function StartQueue() {\n\t\t$timestart = microtime(true);\n\t\t$current_job_pointer = 0;\n\t\techo \"Job count is \" .$this->_job_count.\"<br/>\";\n\t\tif ($this->_slots > $this->_job_count) $this->_slots = $this->_job_count;\n\t\tfor ($slotcount=0; $slotcount < $this->_slots + 1; $slotcount++) {\n\t\t\techo \"Finished count is \" . $this->_finished_count . \"<br/>\";\n\t\t\techo \"Slots are \" .$this->_slots . \" <br/>\";\n\t\t\t$this->AddJobs();\n\t\t}\n\n\t\t$loop = 0;\n\t\twhile($this->_finished_count < $this->_job_count) {\n\t\t\techo \"<br/>Loop is $loop<br/>\";\n\t\t\tsleep(1);\n\t\t\t$this->PollJobs();\n\t\t\techo \"Finished count is \" . $this->_finished_count . \"<br/>\";\n\t\t\techo \"Slots are \" .$this->_slots . \"<br/>\";\n\t\t\twhile($this->_slots > 0) {\n\t\t\t\t$this->LogEntry($this->_slots . \" slots left and \".count($this->_waiting_queue).\" jobs waiting. <br/>\");\n\t\t\t\t$this->AddJobs();\n\t\t\t}\n\n\t\t\tif ($this->_vars['timeout'] !== 0) {\n\t\t\t\tif (round(microtime(true) - $timestart) > $this->_vars['timeout']) {\n\t\t\t\t\t$this->LogEntry(\"Timeout reached.\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$loop++;\n\n\t\t}\n\n\t\t$execution = round(microtime(true) - $timestart, 2);\n\t\t$this->LogEntry(\"Finished after $execution seconds. \". $this->_finished_count .\" jobs completed.\\n\");\n\t\treturn $this->_log;\n\t}", "public function testSendInvoiceToBatchSuccessfulSendViaDestructor()\n {\n $validator = new InvoiceValidator();\n $invoice = Invoice::load($this->getValidInvoiceData()[0], $validator);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessageBatch command\n new Result([])\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n $sqsQueue->sendInvoiceToBatch($invoice, $validator);\n # Destroy the object. This should trigger the batch send.\n unset($sqsQueue);\n\n # Confirm the stack is empty (ie. that the API calls HAVE been made)\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "public abstract function sendJobs();", "public function status() {\n\t\t$output = array(\n\t\t\tarray('CURRENT', ''),\n\t\t array('Queue', 'Size'),\n\t\t array('----', '---'),\n\t\t);\n\n\t\tforeach($this->queues as $queue) {\n\t\t $output[] = array( $queue, ResqueProxy::size( $queue ) );\n\t\t}\n\n\t\t$output[] = array( 'failed', ResqueProxy::redis()->llen('failed') );\n\n\n\t\t$output[] = array('----', '---');\n\t\t$output[] = array('TOTALS', '');\n\t\t$output[] = array( 'processed', ResqueProxy::redis()->get('resque:stat:processed') );\n\t\t$output[] = array( 'failed', ResqueProxy::redis()->get('resque:stat:failed') );\n\n\t\t$this->columns($output);\n\t}", "public function queue(): string\n {\n return $this->queue;\n }", "protected function addResultMessage() {\n\t\tif ($this->amountOfMigratedRecords > 0) {\n\t\t\t$headline = LocalizationUtility::translate('migrationSuccessful', 'dam_falmigration');\n\t\t\t$message = LocalizationUtility::translate('migratedFiles', 'dam_falmigration', array(0 => $this->amountOfMigratedRecords));\n\t\t} else {\n\t\t\t$headline = LocalizationUtility::translate('migrationNotNecessary', 'dam_falmigration');;\n\t\t\t$message = LocalizationUtility::translate('allFilesMigrated', 'dam_falmigration');\n\t\t}\n\n\t\t$messageObject = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Messaging\\\\FlashMessage', $message, $headline);\n\t\t// addMessage is a magic method realized by __call()\n\t\tFlashMessageQueue::addMessage($messageObject);\n\t}", "private function addFurtherMessageToQueue($project, $versionId, $directory)\n {\n $message = [\n 'project' => $project,\n 'versionId' => $versionId,\n 'directory' => $directory\n ];\n\n $pDependMessage = $message;\n $pDependMessage['type'] = 'analyze';\n\n $exchange = $this->container->getParameter('messagequeue.exchange');\n $this->getMessageQueue()->sendSimpleMessage($message, $exchange, 'analysis.phploc');\n $this->getMessageQueue()->sendSimpleMessage($message, $exchange, 'analysis.linguist');\n $this->getMessageQueue()->sendSimpleMessage($pDependMessage, $exchange, 'analysis.pdepend');\n }", "public function rewardsSmsQueue()\n {\n $sms_queue = RewardSms::where(\"sent\", 0)->get()->take(5);\n \n foreach ($sms_queue as $key => $queue) {\n \n $this->sendSms($queue->phone, $queue->text);\n \n $sms_obj = RewardSms::where(\"rewards_sms_id\", $queue->rewards_sms_id)->get()->first();\n $sms_obj->sent = 1;\n $sms_obj->save();\n }\n }", "public function testSendInvoiceToBatchUnsuccessfulSendViaDestructorLogEntry()\n {\n $validator = new InvoiceValidator();\n\n $sqsClient = $this->getMockedAwsSdk()->createSqs(['version' => '2012-11-05']);\n $cmd = $sqsClient->getCommand('SendMessage', [\n 'QueueName' => 'my-queue-name'\n ]);\n\n $results = [\n # Result for GetQueueUrl command\n new Result(['QueueUrl' => 'my-queue-url']),\n # Result for SendMessage command\n new AwsException('Exception message', $cmd)\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n\n foreach ($this->getValidInvoiceData() as $data) {\n $invoice = Invoice::load($data, $validator);\n $sqsQueue->sendInvoiceToBatch($invoice, $validator);\n }\n\n try {\n # Destroy the object. This should trigger the batch send.\n unset($sqsQueue);\n } catch (Exception $e) {\n # Ignore\n }\n\n $logEntries = explode(\"\\n\", trim($this->getLogFileContents()));\n # 1 log entry per invoice in the batch\n $this->assertEquals(count($this->getValidInvoiceData()), count($logEntries));\n\n $this->assertEquals(\n SqsQueue::LOG_RC_SQS_MESSAGE_INVOICE_SENDBATCH_EXCEPTION,\n $this->getLogEntryResultCode($logEntries[0])\n );\n\n $this->assertEquals(\n SqsQueue::LOG_RC_SQS_MESSAGE_INVOICE_SENDBATCH_EXCEPTION,\n $this->getLogEntryResultCode($logEntries[1])\n );\n }", "public function getQueues() {\n return $this->queues;\n }", "public function testDeleteWebhookQueueAccountMessageRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueueAccountMessageDelete());\n\n $response = $sw->deleteWebhookQueueAccountMessageRaw('MessageId');\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkDeleteRequests($container, ['/v4/webhooks/queues/account/MessageId']);\n }", "public function doQueueCommand()\n {\n $result = new ezcMvcResult;\n $command = $_POST['MergeCommand'];\n\n try {\n $queueOperation = mm\\Daemon\\Queue::add( new mm\\Operations\\Merge( $command ) );\n } catch( Exception $e ) {\n $result->variables['result'] = 'ko';\n $result->variables['message'] = $e->getMessage();\n $result->variables['d'] = $_POST['MergeCommand'];\n return $result;\n }\n\n $result->variables['status'] = 'ok';\n $result->variables['operation_hash'] = $queueOperation->hash;\n $result->variables['target_size'] = $queueOperation->object->targetFileSize;\n $result->variables['target_file'] = $queueOperation->object->targetFile;\n $result->variables['command'] = $command;\n\n return $result;\n }", "public function testGetQueueUrlViaQueueCreation()\n {\n $queueUrl = 'my-invoice-queue-message-url';\n\n $sqsClient = $this->getMockedAwsSdk()->createSqs(['version' => '2012-11-05']);\n $cmd = $sqsClient->getCommand('GetQueueUrl', [\n 'QueueName' => 'my-queue-name'\n ]);\n\n $results = [\n # Exception for inital GetQueueUrl command\n new SqsException('No Attribute MD5 found', $cmd, ['code' => 'AWS.SimpleQueueService.NonExistentQueue']),\n # Result for CreateQueue command for creation of dead letter queue\n new Result(['QueueUrl' => 'my-deadletter-queue-url']),\n # Result for GetQueueAttributes command (to fetch ARN of dead letter queue)\n new Result(['Attributes' => ['QueueArn' => 'arn:deadletter-queue']]),\n # Result for creation of invoice message queue\n new Result(['QueueUrl' => $queueUrl])\n ];\n\n $sqsQueue = $this->getSqsQueueInstance($results);\n $this->assertEquals($queueUrl, $sqsQueue->getQueueUrl());\n $this->assertEquals(0, $this->getAwsMockHandlerStackCount());\n }", "public function getQueueJob(array $data);", "private function getCompleteResult()\n\t{\n\t\tif($this->complete_result)\n\t\t{\n\t\t\treturn $this->complete_result;\n\t\t}\n\n\t\t$message = $this->amqp->GetMessageBody($this->connection, $this->task_id,$this->connection_details['result_expire'], true);\n\t\t\n\t\tif($message !== false)\n\t\t{\n\t\t\t$this->complete_result = $message['complete_result'];\n\t\t\t$this->body = json_decode(\n\t\t\t\t$message['body']\n\t\t\t);\n\t\t}\n\n\t\treturn false;\n\t}", "public function getMessageAction() {\n\n //this will return One message which is inserted first of All exist in Current Queue\n $result = $this->messageQueue->Get();\n $this->code = ($result)? 200 : 404;\n return new \\Symfony\\Component\\HttpFoundation\\Response(json_encode(array('result'=>$result)), $this->code , array(\n 'Content-Type' => 'application/json'\n ));\n }", "function sendMessageToQueue($messageObj){\n\tglobal $LAS_CFG;\n\t\n\t$daemon_host = $LAS_CFG->las_daemon_server['host'];\n\t$daemon_port = $LAS_CFG->las_daemon_server['port'];\n\t$daemon_url = 'tcp://'.$daemon_host.':'.$daemon_port;\n\t\n\t$client_timeout = $LAS_CFG->las_daemon_server['timeout'];\n\t\n\t$exchange_name = $LAS_CFG->message_server['taskQueue'];\n\t$new_routing_key = $exchange_name . $messageObj->routing_key;\n\t$messageObj->routing_key = $new_routing_key;\n\t\n\t// Convert JSON message to String\n\t$message = json_encode($messageObj);\n\t\n\t$server = new LasManager($daemon_url);\n\treturn $server->clientSendMessage($message, $client_timeout);\n}", "public function count() {\n return count($this->queues);\n }", "public function testQueue() {\n $node = $this->node;\n $message = Message::create([\n 'template' => 'foo',\n ]);\n\n $subscribe_options = [];\n $subscribe_options['save message'] = FALSE;\n\n try {\n $this->messageSubscribers->sendMessage($node, $message, [], $subscribe_options);\n $this->fail('Can add a non-saved message to the queue.');\n }\n catch (MessageSubscribeException $e) {\n $this->assertTrue(TRUE, 'Cannot add a non-saved message to the queue.');\n }\n\n // Assert message was saved and added to queue.\n $uids = array_fill(1, 10, new DeliveryCandidate([], [], 1));\n foreach ($uids as $uid => $candidate) {\n $candidate->setAccountId($uid);\n }\n $subscribe_options = [\n 'uids' => $uids,\n 'skip context' => TRUE,\n 'range' => 3,\n ];\n $queue = \\Drupal::queue('message_subscribe');\n $this->assertEquals($queue->numberOfItems(), 0, 'Queue is empty');\n $this->messageSubscribers->sendMessage($node, $message, [], $subscribe_options);\n $this->assertTrue((bool) $message->id(), 'Message was saved');\n $this->assertEquals($queue->numberOfItems(), 1, 'Message added to queue.');\n\n // Assert queue-item is processed and updated. We mock subscription\n // of users to the message. It will not be sent, as the default\n // notifier is disabled.\n $item = $queue->claimItem();\n $item_id = $item->item_id;\n\n // Add the queue information, and the user IDs to process.\n $subscribe_options['queue'] = [\n 'uids' => $uids,\n 'item' => $item,\n 'end time' => FALSE,\n ];\n\n $this->messageSubscribers->sendMessage($node, $message, [], $subscribe_options);\n\n // Reclaim the new item, and assert the \"last UID\" was updated.\n $item = $queue->claimItem();\n $this->assertNotEquals($item_id, $item->item_id, 'Queue item was updated.');\n $this->assertEquals($item->data['subscribe_options']['last uid'], 3, 'Last processed user ID was updated.');\n }", "private function parseResponses() \r\n {\r\n $validStates = array('Response', 'Response30');\r\n $messages = $this->MessageQueue->find('all', array(\r\n 'fields' => array('messageIdentity', 'message', 'processState', 'isCopied', 'sourceDeviceAlias'),\r\n 'conditions' => array(\r\n 'mailbox' => $this->CurrentDevice->deviceAlias,\r\n 'processState' => $validStates\r\n ),\r\n 'order' => 'createDate'\r\n ));\r\n \r\n // Start a transaction\r\n $this->MessageQueue->transaction(null, true);\r\n\r\n // Process all the messages. Any messages that fail will be placed into the $errors array.\r\n $errors = array();\r\n $processed = array();\r\n foreach($messages as $message)\r\n {\r\n $message = $message['MessageQueue'];\r\n\r\n try\r\n {\r\n libxml_use_internal_errors(true);\r\n $xml = Xml::build($message['message']);\r\n $namespaces = array_flip($xml->getNamespaces(true));\r\n\r\n // Convert the XML to an array and pass the resulting message to the correct processing function.\r\n $payload = Set::reverse($xml);\r\n // Set messageQuery to the payload array for message handling.\r\n $this->messageQuery[] = $payload['LawEnforcementTransaction']['Transaction']['Response'];\r\n\r\n if ($this->{\"handle{$message['processState']}\"}($message, $payload, $namespaces))\r\n $processed[] = $message['messageIdentity'];\r\n else\r\n $errors[] = array(\r\n 'message' => $message,\r\n 'error' => 'Message id ' . $message['messageIdentity'] . ' failed to process.'\r\n );\r\n }\r\n catch(Exception $e)\r\n {\r\n $errors[] = array(\r\n 'message' => $message,\r\n 'error' => 'Exception thrown while processing Message id ' . $message['messageIdentity'] . ': '\r\n . $e->getMessage()\r\n );\r\n }\r\n }\r\n \r\n // Just send the raw LawEnforcementTransaction to the user as is with a statement indicating the error.\r\n if (!empty($errors))\r\n {\r\n $copy = $errors;\r\n foreach($copy as $index => $error) {\r\n try\r\n {\r\n $this->queueErrorResponse($error['error'], $error['message']);\r\n $processed[] = $error['message']['messageIdentity'];\r\n unset($copy[$index]);\r\n }\r\n catch(Exception $e)\r\n {\r\n $errors[$index]['error'] = \"Failed to enqueue message that failed processing. \" \r\n . \"Original Error:\\n\\n\" . $error['error'];\r\n }\r\n }\r\n }\r\n\r\n // Dequeue all processed messages.\r\n if (!empty($processed))\r\n $this->MessageQueue->deleteAll(array('messageIdentity' => $processed));\r\n \r\n // Deal with any errors that failed to get directed towards the user. All we can do is change them in the queu\r\n // to a new state (so they're not lost) and log them in the CLIPS error log.\r\n //\r\n // This should almost never happen.\r\n if (!empty($errors)) {\r\n $ids = Set::extract($errors, '{n}.message.messageIdentity');\r\n \r\n // Log each of the messages that failed\r\n foreach($errors as $id => $error) {\r\n CakeLog::write('error', \"Message (id {$error['message']['messageIdentity']}) failed to process. \" \r\n . \"{$error['error']}\\n{$error['message']['message']}\");\r\n }\r\n \r\n // UpdateAll doesn't behave like other Cake model functions. We have to quote the param ourself.\r\n $this->MessageQueue->updateAll(\r\n array('processState' => '\\'CLIPS_Error\\''),\r\n array('messageIdentity' => $ids)\r\n );\r\n }\r\n\r\n return $this->MessageQueue->transaction(true, true);\r\n }", "public function getRedisMsgs()\n {\n return [[], [], [], 0, []];\n }", "public function getMessagesAndFlush() {}", "protected static function getQueueStatus()\n {\n $result = [];\n\n try {\n $repository = RepositoryRegistry::getQueueItemRepository();\n\n $query = new QueryFilter();\n $query->where('status', Operators::NOT_EQUALS, QueueItem::COMPLETED);\n\n $result = $repository->select($query);\n } catch (RepositoryNotRegisteredException $e) {\n } catch (QueryFilterInvalidParamException $e) {\n } catch (RepositoryClassException $e) {\n }\n\n return static::formatJsonOutput($result);\n }", "public function main()\n {\n $sms = $this->SmsService->smsList();\n $sendId= [];\n $cnt = count($sms);\n $this->log(\"Send Message count \".$cnt,'debug');\n if($cnt>0){\n $refKey = \"FCCTV\".time();\n $api = new gabiaSmsApi('brickcommerce','6caf388099c1c8f8a782dfa57534b1dc');\n\n foreach($sms as $key => $info){\n try{\n //$sendId[]=$info->id;\n $r = $api->sms_send($info->recv_phone_number, \"070-5015-6383\",$info->message,$refKey);\n\n if ($r == gabiaSmsApi::$RESULT_OK)\n {\n $this->log(\"Send Message \".$info->id.\" : number : \".$info->recv_phone_number. \" : \" . $api->getResultMessage() . \"이전 : \" . $api->getBefore() . \" : 이후 : \" . $api->getAfter(),'debug');\n $this->SmsService->smsSendUpdate($info->id);\n }\n\n //$this->log(\"Send Message \".$info->id.\" : number : \".$info->recv_phone_number,'debug');\n }catch (Exception $e){\n $this->log($e->getMessage(),'error');\n }\n\n }\n\n $result = $api->get_status_by_ref($refKey);\n $this->log(\"CODE : \".$result[\"CODE\"].\"::::::MESG : \".$result[\"MESG\"],'debug');\n\n }\n }", "public function isSent(): bool\n {\n return $this->status === static::STATUS_QUEUED || $this->status === static::STATUS_COMPLETE;\n }", "public function GetQueuedJobs()\n {\n $JOBS = $this->DB->GET('MUP.injector.jobs', ['status' => 'QUEUED', 'pmta' => $this->HOSTID, 'active' => '1', 'ORDER' => ['date' => 'ASC']], ['id', 'target', 'pool'], 100000);\n if (empty($JOBS)) {\n $this->ALERTS[] = FAIL.\" ~ <<< No Jobs to Inject...\";\n }else{\n if (isset($JOBS['id']))\n $JOBS = [$JOBS['id']=> $JOBS];\n foreach ($JOBS as $ID => $JOB) \n if (!isset($this->QueuedJobs[$JOB['pool']][$JOB['target']])) \n $this->QueuedJobs[$JOB['pool']][$JOB['target']] = ltrim($ID, '0');\n $this->Debug('QUEUED JOBS', $this->QueuedJobs);\n }\n }", "public function getQueueLength( $queueName = null ){\n\n if( !empty( $queueName ) ){\n $queue = $queueName;\n } elseif( !empty( $this->queueName ) ) {\n $queue = $this->queueName;\n } else {\n throw new \\Exception( 'No queue name provided.' );\n }\n\n $queue_inteface_url = INIT::$QUEUE_JMX_ADDRESS . \"/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost,destinationType=Queue,destinationName=$queue/QueueSize\";\n\n $mHandler = new MultiCurlHandler();\n\n $options = array(\n CURLOPT_HEADER => false,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_USERAGENT => INIT::MATECAT_USER_AGENT . INIT::$BUILD_NUMBER,\n CURLOPT_CONNECTTIMEOUT => 5, // a timeout to call itself should not be too much higher :D\n CURLOPT_SSL_VERIFYPEER => true,\n CURLOPT_SSL_VERIFYHOST => 2,\n CURLOPT_HTTPHEADER => array( 'Authorization: Basic '. base64_encode(\"admin:admin\") )\n );\n\n $resource = $mHandler->createResource( $queue_inteface_url, $options );\n $mHandler->multiExec();\n $result = $mHandler->getSingleContent( $resource );\n $mHandler->multiCurlCloseAll();\n $result = json_decode( $result, true );\n\n Utils::raiseJsonExceptionError();\n return $result[ 'value' ];\n\n }" ]
[ "0.6040951", "0.56192476", "0.5537163", "0.55119437", "0.5408537", "0.53977305", "0.53054947", "0.5264364", "0.5251886", "0.5233471", "0.5219818", "0.5163005", "0.5141143", "0.5122098", "0.5097336", "0.50799805", "0.50676286", "0.5051978", "0.50303143", "0.49821743", "0.49724948", "0.496063", "0.49496973", "0.4945617", "0.4938601", "0.49367458", "0.49351364", "0.49200755", "0.49051932", "0.49038368", "0.48912916", "0.48903722", "0.48751092", "0.4866163", "0.48634395", "0.48610035", "0.4859763", "0.48592135", "0.48592135", "0.4843112", "0.48416215", "0.4824659", "0.48176143", "0.47988766", "0.4797411", "0.47919044", "0.47853607", "0.4783148", "0.4768308", "0.47648838", "0.47507802", "0.4750426", "0.47484908", "0.47416154", "0.47372347", "0.47356713", "0.47292334", "0.4728787", "0.47260568", "0.47192666", "0.4717159", "0.47099575", "0.47081923", "0.47081923", "0.47070435", "0.47065863", "0.47057003", "0.4685807", "0.46854493", "0.46770775", "0.46620858", "0.46585485", "0.4650266", "0.46500197", "0.46476233", "0.46456698", "0.46415225", "0.46403128", "0.46370658", "0.4630157", "0.46268114", "0.4617133", "0.46138293", "0.4609308", "0.46011242", "0.45980942", "0.45971784", "0.45967185", "0.45954394", "0.45896515", "0.45780864", "0.45635334", "0.45532182", "0.45471692", "0.4542096", "0.45402917", "0.45385668", "0.45103619", "0.45065135", "0.45061302" ]
0.76263034
0
Define the model's default state.
public function definition() { return [ 'sour' => $this->faker->word(), 'titl' => $this->faker->word(), 'auth', 'data' => $this->faker->word(), 'text' => $this->faker->word(), 'publ' => $this->faker->text(), 'abbr' => $this->faker->word(), 'name' => $this->faker->word(), 'description' => $this->faker->word(), 'repository_id' => Repository::factory(), 'author_id' => Author::factory(), 'publication_id' => Publication::factory(), 'type_id' => Type::factory(), 'is_active', 'group' => $this->faker->word(), 'gid' => $this->faker->word(), 'quay' => $this->faker->word(), 'page' => $this->faker->word() ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDefaultState()\r\n\t{\r\n\t}", "static function get_default_state();", "public function getDefaultUserState();", "private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamName, 0);\n }\n }", "abstract protected function getDefaultModel();", "public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }", "protected function getDefaultModelObject() : void\n {\n return;\n }", "public function applyDefaultValues()\n {\n $this->active = false;\n }", "protected function makeDefault()\n {\n $this->options = [];\n $this->menuSource = MenuSource::STATIC_SOURCE;\n $this->action = new Action(ActionType::MENU(), 'Default menu name', 'Default menu text');\n }", "public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }", "public function __default()\n\t{\n\n\t}", "protected function initial_set_default() {\n\t\tif ( isset( $this->field[ 'config' ][ 'default' ] ) ) {\n\t\t\t$this->default = $this->field[ 'config' ][ 'default' ];\n\t\t} else {\n\t\t\t$this->default = '';\n\t\t}\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->type = 1;\n\t\t$this->total_index = 0;\n\t\t$this->is_published = true;\n\t\t$this->is_featured = false;\n\t\t$this->comments_count = 0;\n\t}", "public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }", "function getDefaultState(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_default'=>true));\r\n\t\t$recordSet = $this->db->get(TBL_MST_STATES);\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data[0]->id;\r\n\t}", "public function setValueDefault()\n {\n $this->isActive = true;\n $this->createdAt = new \\DateTime();\n }", "public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }", "public function default() {\n \n $this->data = ModuleConfig::settings();\n // [Module_Data]\n }", "public function getDefaultStateName() {\n return $this->values->get('DefaultStateName');\n }", "public static function bootStateMachine()\n {\n static::creating(function ($model) {\n $fieldState = $model->getFieldState();\n if (empty($model->$fieldState)) {\n $model->$fieldState = $model->getInitialState();\n }\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::created(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n static::saving(function ($model) {\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::saved(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n }", "function _setModelState()\r\n {\r\n $state = parent::_setModelState(); \r\n $app = JFactory::getApplication();\r\n $model = $this->getModel( $this->get('suffix') );\r\n $ns = $this->getNamespace();\r\n\r\n $state['filter_id_from'] = $app->getUserStateFromRequest($ns.'id_from', 'filter_id_from', '', '');\r\n $state['filter_id_to'] = $app->getUserStateFromRequest($ns.'id_to', 'filter_id_to', '', '');\r\n $state['filter_name'] = $app->getUserStateFromRequest($ns.'name', 'filter_name', '', '');\r\n $state['filter_enabled'] = $app->getUserStateFromRequest($ns.'enabled', 'filter_enabled', '', '');\r\n $state['filter_taxclass'] = $app->getUserStateFromRequest($ns.'taxclass', 'filter_taxclass', '', '');\r\n $state['filter_shippingtype'] = $app->getUserStateFromRequest($ns.'shippingtype', 'filter_shippingtype', '', '');\r\n \r\n foreach (@$state as $key=>$value)\r\n {\r\n $model->setState( $key, $value ); \r\n }\r\n return $state;\r\n }", "public function getInitialState(): StateContract\n {\n return $this->newState(['value' => 1]);\n }", "public function state();", "public function setUserDefaultStatus($userDefaultStatus);", "public function setStateModel($stateModel) {}", "public function getBaseState() {}", "public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('DefaultMetadataValue');\r\n }", "public function set_to_default()\n\t{\n\t\t// SimpleDB requires a value for every attribue...\n\t\t$this->_name = NULL;\n\t\t$this->_contextid = NULL;\n\t\t$this->_userid = NULL;\n $this->_deleted = 0;\n\t\t$this->_lastmodified = 0;\t\n\t}", "public function create_default() {\n if (!$this->model->has_default()) {\n $default_data = [\n 'id' => 1,\n 'name' => 'Beregu',\n 'desc' => 'team vs team',\n ];\n $this->model->create_default($default_data);\n\n $default_data = [\n 'id' => 2,\n 'name' => 'Individu',\n 'desc' => 'individu vs individu',\n ];\n $this->model->create_default($default_data);\n }\n }", "public function __construct(State $model)\n\t{\n\t\t$this->model = $model;\n\t}", "public function getStateModel() {}", "public function set_default_data() {\n\t\t$this->button_text_color = '#FFFFFF';\n\t\t$this->button_background_color = '#6699CC';\n\n\t\t$this->header_text_color = '#FFFFFF';\n\t\t$this->header_background_color = '#6699CC';\n\n\t\t$this->button_text = 'Do Not Sell My Data';\n\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\n\t\t$this->ot_logo = '';\n\t\t$this->display_position = 'right';\n\t\t$this->floating_button\t= '';\n\t\t$this->isLinkEnabled \t= 'textlink';\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$this->show_birthdate = 1;\n\t\t$this->show_address = 1;\n\t\t$this->show_relationship_status = 1;\n\t\t$this->credit = 0;\n\t\t$this->login = 0;\n\t}", "public function initializeDefaults()\n {\n }", "public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}", "private function _set_default()\r\n\t{\r\n\t\tif($this->input->post('default'))\r\n\t\t{\r\n\t\t\t$this->db->update('showcases',array('default' => 0));\r\n\t\t\t$this->db->where('id', $this->input->post('default'));\r\n\t\t\t$this->db->update('showcases',array('default' => 1));\r\n\t\t\t\r\n\t\t\t$this->set_message('success', 'Vetrina predefinita aggiornata con successo!');\r\n\t\t\tredirect($this->list);\r\n\t\t}\r\n\t}", "public function __default()\r\n \t{\r\n \t if( self::isArg( 'notifwindow') )\r\n \t {\r\n $this->view = \"common_notifwindow\";\r\n \t $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n \t }\r\n \t else\r\n \t {\r\n $this->view = \"dummygame_dummygame\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n \t}", "public function setDefaultAttribute($value){\n $this->attributes['default'] = ($value === 'true' || $value ? true : false);\n}", "public function applyDefaultValues()\n {\n $this->is_not = false;\n $this->rank = 0;\n }", "private function _load_default_model(){\n\n\t\t$default_model_name = strtolower(get_class($this)) . '_model';\n\n\t\tif(file_exists(APPPATH . 'models/' . $default_model_name . '.php')){\n\n\t\t\t$this->load->model($default_model_name, strtolower(get_class($this)));\n\t\t\t$this->_default_model = strtolower(get_class($this));\n\t\t}\n\n\t}", "public function model()\n {\n return State::class;\n }", "public function model()\n {\n return State::class;\n }", "public function getDefault();", "public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}", "protected function initialiseModel()\n {\n parent::initialiseModel();\n\n $this->SelectedTab = 0;\n }", "final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }", "public function useDefaults()\n\t{\n\t\t$this->use_defaults = true;\n\t}", "public function set_behaviors_default_data() {\n\n\t\t$this->is_google_personalize_enabled = 'checked';\n\t\t$this->google_confirmation_title = 'Personalized advertisements';\n\t\t$this->google_confirmation_message = 'Turning this off will opt you out of personalized advertisements delivered from Google on this website.';\n\t\t$this->confirmbutton = 'Confirm';\n\t\t$this->is_email_enabled = 'checked';\n\t\t$this->email_address = '';\n\t\t$this->popup_main_title = 'Do Not Sell My Personal Information';\n\t\t$this->link_text = 'Privacy Policy';\n\t\t$this->link_url = '';\n\t\t$this->privacy_policy_message = 'Exercise your consumer rights by contacting us below';\n\t\t$this->is_phone_enabled = 'checked';\n\t\t$this->phone_number = '';\n\t\t$this->form_link_text = 'Exercise Your Rights';\n\t\t$this->form_link_url = '';\n\t\t$this->form_enable = 'checked';\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\t\t$this->selectuseroption\t\t\t\t = 'All';\n\t\t$this->isIABEnabled \t\t\t\t = 'checked';\n\t\t$this->isLSPAenable \t\t\t\t = '';\n\t}", "public function makeDefault() {\n $this->update([\n 'color' => null,\n 'size' => null\n ]);\n }", "protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\t}", "public function applyDefaultData()\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $config = $objectManager->get('\\Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n\n $this->setsup_is_active(1);\n $this->setsup_locale($config->getValue('general/locale/code'));\n $this->setsup_currency($config->getValue('currency/options/base'));\n $this->setsup_country($config->getValue('general/country/default'));\n\n return $this;\n }", "public function setDefaultStateName($stateName) {\n $this->values->put('DefaultStateName', $stateName);\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "function init() {\n $this->options['selected'] = isset($this->options['value']) ?\n true : @(bool)$this->options['default'];\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function __construct()\n {\n $this->applyDefaultValues();\n }", "public function init() {\n\t\t// use this method to initialize default values.\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "public function applyDefaultValues()\n\t{\n\t}", "protected function cliModelInit()\n {\n }", "function getDefaultValue() \n {\n return $this->getValueByFieldName( 'statevar_default' );\n }", "public function __default()\r\n {\r\n if( self::isArg( 'notifwindow') ) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n } else {\r\n $this->view = \"thecrew_thecrew\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n }", "public function toggleDefault()\n {\n $this->language->default = ! $this->language->default;\n }", "public static function set_default_values() {\n\t\t?>\n\t\tcase \"nu_phone\" :\n\t\t\tfield.label = \"Phone\";\n\t\t\tfield.isRequired = true;\n\t\t\tfield.description = \"Numbers only. e.g. 8885551212\";\n\t\t\tbreak;\n\t\t<?php\n\t}", "function post_model_init($from_cache = FALSE)\n {\n }", "public static function preModel(){\n\t\t\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "protected function get_default() {\n\t\treturn false;\n\t}", "protected function setDefaultTemplate(): void\n {\n $this->setDefaultData(function(Generator $faker) {\n return [\n 'password' => 'xx',\n 'username' => $faker->email,\n 'modified' => time(),\n // set the model's default values\n // For example:\n // 'name' => $faker->lastName\n ];\n });\n }", "public function __default()\r\n {\r\n if (self::isArg('notifwindow')) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg(\"table\", AT_posint, true);\r\n } else {\r\n $this->view = \"lettertycoon_lettertycoon\";\r\n self::trace(\"Complete reinitialization of board game\");\r\n }\r\n }", "function setDefault($value)\n {\n $this->_defValue = $value;\n }", "protected function setDefaults()\n {\n return;\n }", "public function defaultData();", "public function getStatesModel()\n\t{\n\t\treturn $this->statesModel = new StatesModel();\n\t}", "public function getDefaultValue();", "public function getDefaultValue();", "public function applyDefaultValues()\n\t{\n\t\t$this->closed = 0;\n\t\t$this->lastfmid = 0;\n\t\t$this->hasphotos = 0;\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->platform = 'pc';\n\t\t$this->experience_score = 0;\n\t\t$this->up_votes = 0;\n\t\t$this->down_votes = 0;\n\t\t$this->is_guest = 0;\n\t\t$this->is_admin = 0;\n\t\t$this->today_votes = 0;\n\t\t$this->email_on = 1;\n\t}", "private function getStateDefaultStatus($state)\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$status = false;\n $stateNode = $this->_getState($state);\n if ($stateNode) {\n $status = $this->quoteStatusFactory->create()->loadDefaultByState($state);\n $status = $status->getStatus();\n }\n return $status;\n\t\t}\n\t}" ]
[ "0.7775949", "0.72252816", "0.6857476", "0.67937565", "0.6766527", "0.64325684", "0.6407807", "0.6370427", "0.61886984", "0.6186448", "0.6159167", "0.615307", "0.6152126", "0.61423063", "0.61151105", "0.61073995", "0.61045927", "0.6039108", "0.6037578", "0.60210526", "0.59866166", "0.5985851", "0.5977551", "0.59646267", "0.59483707", "0.5901375", "0.5882144", "0.5878956", "0.58717626", "0.58509266", "0.5841849", "0.58408177", "0.58322364", "0.58253735", "0.5823871", "0.5804363", "0.58035797", "0.5803552", "0.580313", "0.57668966", "0.57426137", "0.57426137", "0.57422745", "0.5727579", "0.5712659", "0.5691636", "0.56731665", "0.5668569", "0.56647056", "0.5659874", "0.5659193", "0.5648312", "0.5637622", "0.5637622", "0.5637622", "0.5637622", "0.5637622", "0.5637622", "0.5637622", "0.5637622", "0.5637622", "0.56345963", "0.56336147", "0.5626688", "0.5626688", "0.5626688", "0.5626688", "0.5626688", "0.56198186", "0.56158245", "0.56158245", "0.56158245", "0.5600535", "0.55942094", "0.5589326", "0.5570889", "0.5569593", "0.5565116", "0.5555828", "0.55455023", "0.55455023", "0.55455023", "0.55455023", "0.55455023", "0.55455023", "0.55455023", "0.55455023", "0.55455023", "0.55455023", "0.5529327", "0.5528949", "0.5528246", "0.5526709", "0.55125105", "0.5509641", "0.5508925", "0.5507763", "0.5507763", "0.5507002", "0.55049354", "0.54837024" ]
0.0
-1
Get the value of Codigo Cliente
public function getCodigoCliente() { return $this->codigoCliente; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClientValue()\n {\n return $this->ClientValue;\n }", "public function getCodigoClient()\n {\n return $this->codigo_client;\n }", "public function getcliente()\r\n {\r\n return $this->cliente;\r\n }", "public function getCodCliente()\n {\n return $this->codCliente;\n }", "public function getCliente();", "public function getClient()\r\n {\r\n \t$this->db->from('vclient');\r\n \t$query = $this->db->get();\r\n \treturn $query->result();\r\n\r\n }", "public function getCodigo(){\n return $this->codigo;\n }", "public function getIdcliente() {\n\t\t\t\treturn $this->id_cliente ?? \"Id do Cliente não solicitado !!\";\n\t\t\t}", "public function getCliente()\n {\n return $this->cliente;\n }", "public function getCodeClient(): ?string {\n return $this->codeClient;\n }", "public function getCodeClient(): ?string {\n return $this->codeClient;\n }", "public function getCodeClient(): ?string {\n return $this->codeClient;\n }", "public function getCodeClient(): ?string {\n return $this->codeClient;\n }", "public function getCodeClient(): ?string {\n return $this->codeClient;\n }", "public function getCodeClient(): ?string {\n return $this->codeClient;\n }", "public function getCodeClient(): ?string {\n return $this->codeClient;\n }", "public function getCodeClient(): ?string {\n return $this->codeClient;\n }", "public function getCodeClient(): ?string {\n return $this->codeClient;\n }", "public function getidcliente(){\n\t\treturn $this->_idcliente;\n\t}", "public function getCodServico()\n {\n return $this->cod_servico;\n }", "public function getClient(){ return UserData::getById($this->client_id); }", "public function getClientes_idclient(){\n return $this->clientes_idclient;\n }", "public function getCodeClient() {\n return $this->codeClient;\n }", "public function getCodeClient() {\n return $this->codeClient;\n }", "public function getCodeClient() {\n return $this->codeClient;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodice() \n\t{\n return $this->codice;\n }", "public function getCodcaj(){\n\t\treturn $this->codcaj;\n\t}", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getNomeCliente(){/*Retorna o nome_cliente*/\n\t\t\treturn $this-> nome_cliente;\n\t\t}", "public function getClient()\n {\n return $this->neo;\n }", "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "public function getIdCliente(){\r\n return $this->idCliente;\r\n }", "public function getClientId(): string\n {\n return (string) data_get($this->args, 'credentials.id');\n }", "public function getCodice()\n {\n return $this->codice;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getNom_client()\n {\n return $this->nom_client;\n }", "public function getCodigo()\n\t{\n\t\tif($this->input->post('codigo')){\t\t\n\t\t\t$control = $this->m_entes->controlCodigo($this->input->post('codigo'), $this->input->post('id_ente'));\n\t\t\t\n\t\t\techo $control;\n\t\t}else{\n\t\t\techo 2;\n\t\t}\t\t\t\n\t}", "public function getCodare(){\n\t\treturn $this->codare;\n\t}", "function getIdCliente()\r\n\t {\r\n\t\t return $this->id_cliente;\r\n\t }", "function getClient() {\r\n require_once JPSPAN . 'CodeWriter.php';\r\n $Code = & new JPSpan_CodeWriter();\r\n $this->ClientGenerator->generate($Code);\r\n return $Code->toString();\r\n }", "function getComienzaCon(){\n\t\treturn $this->comienza_con;\n\t}", "public function getClient(): string\n {\n return $this->client;\n }", "public function getCedente() {\n return $this->oCedente;\n }", "public function getCidade(){\n return $this->cidade;\n }", "public function getClient() {}", "public function get_clientid() {\n return $this->clientid;\n }", "public function getClientId(): string\n {\n return $this->configuration[ConfigurationInterface::CLIENT_ID];\n }", "static public function ctrMostrarIdCliente($valor){\n\n $respuesta = ModeloClientes::mdlMostrarIdCliente($valor);\n\t\treturn $respuesta;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getClientId()\n {\n return $this->getParameter('clientId');\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getIdClient()\n {\n return $this->idClient;\n }", "public function getNomClient() {\n return $this->nomClient;\n }", "public function getClientId() : string\n {\n return $this->clientId;\n }", "public function getClientId() : string\n {\n return $this->clientId;\n }", "public function getCep()\n\t{\t\n\t\t/**\n\t\t * retorno Cep cliente\n\t\t * @return Cep\n\t\t */\n\t\treturn $this->cep;\n\t}", "function getCodUsu() {\n return $this->codUsu;\n }", "abstract public function getClientInformation();", "public function getClient() {\n return $this->_get( 'client' );\n }", "public static function getClient($id){\n return (new Database('cliente'))->select('id = '.$id)->fetchObject(self::class);\n }", "public function getBtcPayClient();", "public function getCodigo(){\n\t\treturn $this->rg_codigo;\n\t}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getClient();", "public function getClient();", "public function getC() {}", "public function getFabricante():string{\n return $this->fabricante;\n }", "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientId()\n {\n return $this->client_id;\n }", "public function getClientId()\n {\n return $this->client_id;\n }" ]
[ "0.7327119", "0.72841024", "0.6872339", "0.68485546", "0.6760139", "0.66761076", "0.6645127", "0.66248816", "0.6619576", "0.6596993", "0.6596993", "0.6596993", "0.6596993", "0.6596993", "0.6596993", "0.6596993", "0.6596993", "0.6596993", "0.6594314", "0.65183675", "0.65177214", "0.651215", "0.6498689", "0.6498689", "0.6498689", "0.6471866", "0.6471866", "0.6471866", "0.6442906", "0.6437182", "0.6430668", "0.6403047", "0.6372938", "0.6371443", "0.6371443", "0.6365961", "0.6354313", "0.63269687", "0.62972224", "0.62972224", "0.62972224", "0.62972224", "0.62972224", "0.62953746", "0.62902266", "0.62702346", "0.6225223", "0.62178564", "0.6207868", "0.6204035", "0.6202253", "0.6186892", "0.6184067", "0.6152855", "0.6140406", "0.61318105", "0.6123849", "0.6123849", "0.61154884", "0.61128825", "0.61128825", "0.61073345", "0.60995525", "0.60995525", "0.6097926", "0.60835373", "0.6069207", "0.60588866", "0.6055831", "0.6055083", "0.60513645", "0.60507935", "0.60507935", "0.60507935", "0.60507935", "0.60507935", "0.60507536", "0.60507536", "0.60507536", "0.60507536", "0.60507536", "0.60507536", "0.60507536", "0.60507536", "0.60507536", "0.60507536", "0.60507536", "0.60507536", "0.60507536", "0.60507536", "0.6044737", "0.6044737", "0.6044519", "0.603885", "0.5994152", "0.5994152", "0.5994152", "0.5994152" ]
0.67131126
7
Set the value of Codigo Cliente
public function setCodigoCliente($codigoCliente) { $this->codigoCliente = $codigoCliente; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetCodeClient() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }", "public function testSetCodeClient() {\n\n $obj = new AppelsEnCours();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }", "public function setclient_id($value);", "public function testSetCodeClient() {\n\n $obj = new ChantiersFrequencesControlesQualite();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }", "public function setClientId($value);", "public function setCliente(Cliente $cliente);", "function setIdCliente($id_cliente)\r\n\t {\r\n\t\t $this->id_cliente = $id_cliente;\r\n\t }", "public function testSetCodeClient() {\n\n $obj = new Materiels();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }", "public function setCodice($codice) \n\t{\n $this->codice = $codice;\n }", "public function setClient($client);", "public function setClientID($value)\r\n {\r\n $this->assertValidClientID($value, false);\r\n\r\n $this->clientID = $value;\r\n }", "public function testSetClient()\n {\n $change = new Change($this->p4);\n $change->setDescription('test')->save();\n $oldClient = $change->getClient();\n\n $this->p4->getService('clients')->grab();\n $change->setClient($this->p4->getClient());\n $change->save();\n $this->p4->getService('clients')->release();\n\n $this->assertFalse(\n $oldClient == Change::fetch($change->getId(), $this->p4)->getClient(),\n 'expected client change to have saved.'\n );\n }", "public function setCodiCasa($value) {\n\t\t//validando de que el valor sea un id\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_casa = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t}\n\t}", "function altaCliente ($cliente){\r\n $this->clientes[] = $cliente; /// Este es el ejemplo de altaCliente que ha echo Jesús.\r\n }", "public function setCodigo($codigo){\n $this->codigo = $codigo;\n }", "function setCausaleEvasione($codice)\n {\n $this->cauEvasione = $codice; \n }", "public function setCompte() {\n $id = Session::get('id');\n $identite = Request::input('identite');\n $adresse = Request::input('adresse');\n $login = Request::input('login');\n $pwd = Request::input('pwd');\n $id_categorie = Request::input('cbCategorie');\n\n\n $client = new Client();\n try{\n $client->updateClient($id, $identite, $adresse, $login, $pwd, $id_categorie);\n\n } catch (Exception $ex) {\n return $this->getCompte($erreur = '');\n }\n return redirect('/');\n\n }", "public function cliente($key, $value=null)\n {\n if (is_array($key) || is_object($key)) {\n \tsettype($key, 'array');\n foreach ($key as $k=>$v) {\n $this->cliente((string) $k, (string) $v);\n }\n return;\n }\n foreach (self::$_substitutos_cliente as $chave=>$valores) {\n foreach ($valores as $item) {\n \tif ($key==$item) {\n \t$key = $chave;\n }\n }\n }\n if (in_array($key, self::$_itens_cliente)) {\n $this->cliente[$key] = $value;\n }\n }", "public function setClient($client)\n\t{\n\t\t$this->client = $client;\n\t}", "public function testSetNomClient() {\n\n $obj = new AppelsEnCours();\n\n $obj->setNomClient(\"nomClient\");\n $this->assertEquals(\"nomClient\", $obj->getNomClient());\n }", "public function set_clientes(objeto_cliente $cliente){\n\t$consulta_insertar = new Conectar();\n\t$consulta_insertar = $consulta_insertar->conexion();\n\t$query=\"insert into clientes (cliente_id, nombre, celular, pais, correo) values (:cl_id, :nom, :cel, :pais, :corr)\";\n\n\t$resultado=$consulta_insertar->prepare($query);\n\n\t$resultado->execute(array(\":cl_id\"=>$cliente->get_cliente_id(),\":nom\"=>$cliente->get_nombre(),\":cel\"=>$cliente->get_celular(),\":pais\"=>$cliente->get_pais(),\":corr\"=>$cliente->get_correo()));\n\n\n\t}", "public function setCliente(Cliente $cliente)\n {\n $this->cliente = $cliente;\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }", "public function setClientID($value)\n {\n return $this->set('ClientID', $value);\n }" ]
[ "0.7000034", "0.6918391", "0.681739", "0.6766011", "0.67217255", "0.6655183", "0.65434587", "0.6519402", "0.6359152", "0.63569707", "0.6332833", "0.6280186", "0.62150776", "0.6179122", "0.6175749", "0.6164914", "0.6120532", "0.6109901", "0.6078936", "0.6073969", "0.6066266", "0.60283995", "0.6011643", "0.6011643", "0.6011643", "0.6011643", "0.6011643", "0.6011643", "0.6011643", "0.6011643", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.60112107", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205", "0.6011205" ]
0.0
-1
Get the value of Codigo Empresa
public function getCodigoEmpresa() { return $this->codigoEmpresa; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "public function getCodeEmploi() {\n return $this->codeEmploi;\n }", "public function getId_empresa()\n {\n return $this->id_empresa;\n }", "public function getNombre_empresa(){\n return $this->nombre_empresa;\n }", "public function getCompanyNameByCompanyCode()\n {\n $nombre = $this->db->select(\"t.empresa as value\")\n ->from(\"token t\") \n ->where(\"t.codigo\", $this->codigo)\n ->get()->row();\n\n // echo '<pre>' . var_dump($nombre) . '</pre>';\n return $nombre;\n }", "public function getEmpleado() {\r\n return $this->empleado;\r\n }", "public function getNit_empresa(){\n return $this->nit_empresa;\n }", "function getEmperor(){\r\n\t\t$this->retriveDataRow();\r\n\r\n\t\tif(!is_null($this->data)){\r\n\t\t\treturn $this->data['czlonek_1'];\r\n\t\t}else{\r\n\t\t\treturn NULL;\r\n\t\t}\r\n\t}", "public function getCD_Empresa()\n {\n return $this->CD_Empresa;\n }", "public function getempleado()\r\n {\r\n return $this->empleado;\r\n }", "public function getempleado()\r\n {\r\n return $this->empleado;\r\n }", "function getCodUsuario() {\n return $this->codUsuario;\n }", "public function getNombreEmpresa()\n {\n return $this->nombreEmpresa;\n }", "function getCodUsu() {\n return $this->codUsu;\n }", "public function getCriadoEm()\n {\n return $this->criadoEm;\n }", "public function getEmailEmpresa()\n {\n return $this->emailEmpresa;\n }", "function dame_codigo($codigo) {\n $query = $this->db->query(\"select nExpedienteCodigo from tb_sistram_expediente where nExpedienteId= $codigo\");\n if ($query->num_rows() > 0) {\n $row = $query->row();\n $tipo = $row->nExpedienteCodigo;\n return $tipo;\n }\n }", "public function Get_Esta()\n {\n\t\t\t$empr_id = empresa();\n\t\t\t//$url = 'http://localhost:9132/oeosft/api/rest/esta';\n\t\t\t$url = AJST.'/services/asp/ALMDataService/establecimientos/empresa/'.$empr_id;\n $array = $this->rest->callAPI(\"GET\",$url);\n $resp = json_decode($array['data']);\t\t\n return $resp->establecimientos->establecimiento;\n\t}", "public function getCodigo(){\n return $this->codigo;\n }", "public function getIdempresa(){\n return $this->idempresa;\n }", "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "public function getFacebookEmpresa()\n {\n return $this->facebookEmpresa;\n }", "public function getPaisEmpresa()\n {\n return $this->paisEmpresa;\n }", "public function selecionarEmpresaContratada()\n {\n try\n {\n $sql = \"SELECT * FROM empresa_contratada\";\n $busca = $this->conexao->conectar()->prepare($sql);\n $busca->execute();\n return $busca->fetchALL(PDO::FETCH_OBJ);\n }\n catch(PDOException $erro)\n {\n echo \"Erro\" . $erro->getMessage();\n }\n\n }", "public function getCodUsuario()\n {\n return $this->codUsuario;\n }", "public function getConsulta(){\n\t\t\treturn $this -> resultado;\n\t\t}", "public function getNombreEmpresa(){\n $empresa=DatosEmpresa::datosGenerales($this->idempresa);\n if($empresa==null)\n return '';\n else\n return $empresa->razonsocial;\n }", "public function getDescripcionEmpresa()\n {\n return $this->descripcionEmpresa;\n }", "public function ConsultarEmpleado(){\n\t\t$sql = \"CALL HAR_ConsultarEmpleado(?)\";\n\t\t$stm = $this->db->prepare($sql);\n\t\t$stm ->bindParam(1, $this->CedulaEmpleado);\n\t\t$stm->execute();\n\t\t//Fetch retorna solo un valor, el fetchall varios\n\t\treturn $stm->fetch();\n\n\t\t}", "function getSorpresa(){\r\n return $this->sorpresa;\r\n }", "public function empleado()\n {\n return \\App\\Models\\Empleado::where('user_id', $this->user_id)->first();\n }", "public function getEmpleado_idemp(){\n return $this->empleado_idemp;\n }", "public function getCodeEmploye(): ?string {\n return $this->codeEmploye;\n }", "public function getCodeEmploye(): ?string {\n return $this->codeEmploye;\n }", "public function getCodPersona()\n {\n return $this->codPersona;\n }", "public function getCidade(){\n return $this->cidade;\n }", "public function getCuentaUsuario(){\n return $this->cuentaUsuario;\n }", "public function getIdade() {\r\n return $this->idade;\r\n }", "function nombreEmpresa($usuario){\n $db = obtenerBaseDeDatos();\n $sentencia = $db->prepare(\"SELECT * FROM proveedores WHERE id = ?\");\n $sentencia->execute([$usuario]);\n return $sentencia->fetchObject();\n }", "public function getPasswordEmpresa()\n {\n return $this->passwordEmpresa;\n }", "function f_get_row($cod_pk){\n\t\t\tif(!$cod_pk)return false;\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t$query = \"select * from empleado where cod_empleado = $cod_pk\";\n\t\t\t$row = $db->consultar_registro($query);\n\t\t\t\n\t\t\treturn $row;\n\t\t\t\n\t\t\n\t\t}", "private function getCodigoPresupuestarioVehiculo()\r\n\t\t{\r\n\t\t\t$codigoPresupuesto['codigo'] = '301020800';\r\n\t\t\treturn $codigo = self::getCodigoPresupuestarioByCodigo($codigoPresupuesto['codigo']);\r\n\t\t}", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getLongitudEmpresa()\n {\n return $this->longitudEmpresa;\n }", "public function GetCadastroNoticia(){\r\n return $this -> __cadastro; \r\n \r\n }", "public function getCodigo()\n {\n return $this->codigo;\n }", "public function getValor(){\n return $this->_data['valor'];\n }", "public function GetCodigoRespuesta(){\n return $this->codigoRespuesta;\n }", "public function ComprobarEmpresa($empresa_id, $usuario_id){\r\r\n $empresa = Empresa::Where('id', $empresa_id)\r\r\n ->where('id_usuario', $usuario_id)\r\r\n ->first();\r\r\n \r\r\n if ($empresa){\r\r\n return $empresa;\r\r\n }\r\r\n else{\r\r\n return false;\r\r\n }\r\r\n }", "public function getCodice() \n\t{\n return $this->codice;\n }", "public function getCodare(){\n\t\treturn $this->codare;\n\t}", "public function obtenerEmpresaPorId($empresa_id=0){ \t\n return self::find() \n ->select('candidato_id,ruc,razon_social,correo_electronico,estado,contrasena')\n ->where('empresa_id='.$empresa_id)\n ->one(); \n }", "public function get($codigo=\"\"){\n if($codigo!=\"\"){\n $this->parametros = array($codigo);\n $this->sp = \"str_consultaBanco_info\";\n $this->executeSPConsulta();\n }\n\n if (count($this->rows)>=1){\n foreach($this->rows[0] as $propiedad=>$valor){\n $this->$propiedad=$valor;\n }\n $this->mensaje=\"Banco encontrado\";\n }else{\n $this->mensaje=\"Banco no encontrado\";\n }\n }", "public function get_Code_utilisateur(): int { return $this->Code_utilisateur; }", "function consultarDatosEstudiante($cod_estudiante) {\r\n $cadena_sql_est=$this->sql->cadena_sql(\"datos_estudiante\", $cod_estudiante);\r\n $resultado_est=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql_est,\"busqueda\");\r\n return $resultado_est[0];\r\n }", "public function getCodigo()\n\t{\n\t\tif($this->input->post('codigo')){\t\t\n\t\t\t$control = $this->m_entes->controlCodigo($this->input->post('codigo'), $this->input->post('id_ente'));\n\t\t\t\n\t\t\techo $control;\n\t\t}else{\n\t\t\techo 2;\n\t\t}\t\t\t\n\t}", "function getDescUsuario() {\n return $this->descUsuario;\n }", "public function getUsuario(){\n\n $usuario = null;\n $abmUs = new abmUsuario();\n $list = $abmUs->buscar(['idUsuario' => $_SESSION['idUsuario']]);\n if (count($list) > 0) {\n $usuario = $list[0];\n }\n return $usuario;\n }", "public function getCodServico()\n {\n return $this->cod_servico;\n }", "public function datos_empresa_controlador($tipo,$codigo){\n\t\t$codigo=mainModel::decryption($codigo);\n\t\t$tipo=mainModel::limpiar_cadena($tipo);\n\n\t\treturn empresaModelo::datos_empresa_modelo($tipo,$codigo);\n\t}", "public function getCodCliente()\n {\n return $this->codCliente;\n }", "public function getCod_entidad()\n {\n return $this->cod_entidad;\n }", "public function get_proveedor($idProveedor,$idEmpresa){\n if($idProveedor != '' || $idEmpresa != ''){\n\n $this->_query =\n \"\n select \n idproveedor,\n idempresa,\n nombre_proveedor,\n descripcion_proveedor,\n telefono01,\n telefono02,\n correo,\n celular,\n direccion,\n idestado,\n fecha_alta,\n fecha_um,\n idusuario_alta,\n idusuario_um\n from \n proveedores \n WHERE \n idproveedor = $idProveedor AND\n idempresa = '$idEmpresa' \n ORDER BY nombre_proveedor DESC \n \";\n\n $this->get_result_query();\n\n }\n\n if(count($this->_rows) == 1){\n\n foreach ($this->_rows[0] as $campo => $valor){\n $this->$campo = $valor ;\n }\n\n $this->_confirm = true ;\n $this->_message = \"Se encontro el proveedor\";\n\n }else{\n $this->_confirm = false ;\n $this->_message = \"No se encontro el proveedor\" ;\n }\n\n }", "public function obtenerValor() {\n return $this->valor;\n }", "public function getCodcaj(){\n\t\treturn $this->codcaj;\n\t}", "public function getcliente()\r\n {\r\n return $this->cliente;\r\n }", "public function getPessoa(){\n return $this->pessoa;\n }", "public function getPessoa(){\n return $this->pessoa;\n }", "public function getPessoa(){\n return $this->pessoa;\n }", "public function getBannerEmpresa()\n {\n return $this->bannerEmpresa;\n }", "public function pegaUm()\n\t{\n\t\t// return mysqli_fetch_assoc($this->resultado);\n\t\treturn $this->resultado->fetch(PDO::FETCH_ASSOC);\n\t}", "public function getNamaPelajaran();", "function getNombre(){\n //Creamos la consulta\n $sql = \"SELECT nombre FROM usuarios WHERE id_usuario = \".$this->id_user.\";\";\n //obtenemos el array\n $data = $this->getArraySQL($sql);\n //obtenemos el primer elemento, ya que así no tenemos que extraerlo posteriormente\n return $data[0][0];\n }", "public function getNombreUsuario(){\n return $this->nombreUsuario;\n }", "function get_empresa_by_id($empresa_id) {\n\t\t$this -> db -> where('empresa_id', $empresa_id);\n\t\t$this -> db -> from('empresas');\n\t\t$query = $this -> db -> get();\n\t\tif ($query -> num_rows() == 1)\n\t\t\treturn $query -> row();\n\t\treturn NULL;\n\t}", "public function getIdUsuario(){\n return $this->idUsuario;\n }", "public function getEscalaValor( ){\n\t\t\treturn $this->escalaValor;\n\t\t}", "public function show(Empresa $empresa)\n {\n return $empresa;\n }", "public function getidcliente(){\n\t\treturn $this->_idcliente;\n\t}", "function get_tipo_empresa_by_id($tipo_empresa_id) {\n\t\t$this -> db -> select();\n\t\t$this -> db -> where('tipo_empresa_id', $tipo_empresa_id);\n\n\t\t$query = $this -> db -> get('tipo_empresa');\n\t\tif ($query -> num_rows() == 1)\n\t\t\treturn $query -> row();\n\t\treturn NULL;\n\t}", "public function getTelefonoUsuario(){\n return $this->telefonoUsuario;\n }", "public function getClasseUsuario()\n {\n return $this->classe_usuario;\n }", "public function getIdentificacao();", "public function getViajePorIdViajeEmpleado($data){\n\t\t$sql = 'select idViaje, nroViaje, DATE_FORMAT(pc.fechaInicio,\"%d/%m/%Y\") as fechaInicio, DATE_FORMAT(pc.fechaFin,\"%d/%m/%Y\") as fechaFin,\n\t\t\t\tidViajeEmpleado, \n\t\t\t\tgetCodigoViaje(idViaje) as codigoViaje, \n\t\t\t\tCONCAT_WS(\"\\\\\\\", laborAreaDeAplicacion, laborActividad) as laborActividad,\n\t\t\t\tCONCAT_WS(\"\\\\\\\", provincia, destino) as destino\n\t\t\t\tfrom viajes as pc\n\t\t\t\tinner join laboresActividad as sa using (idLaborActividad)\n\t\t\t\tinner join laboresAreaDeAplicacion as sada using (idLaborAreaDeAplicacion)\n\t\t\t\tinner join destinos as d using (idDestino)\n\t\t\t\tinner join provincias as p using (idProvincia)\n\t\t\t\tinner join viajes_empleados as pce using (idViaje)\n\t\t\t\twhere idViajeEmpleado = '.$data['idViajeEmpleado'].'\n\t\t\t\tgroup by nroViaje\n ';\n\t\t//die($sql);\n\t\ttry {\n\t\t\t$ro = $this->conn->prepare($sql);\n\t\t\t$ro->execute();\n\t\t\techo json_encode(array_map('setHtmlEntityDecode', $ro->fetchAll(PDO::FETCH_ASSOC)));\n\t\t}catch(Exception $e) {\n\t\t\t$this->result->setStatus(STATUS_ERROR);\n\t\t\t$this->result->setMessage('ERROR: Ocurrió un error al realizar la operación. Reintente o contactese con el Administrador.');\n\t\t\tmyExceptionHandler($e);\n\t\t}\n\t\treturn;\n\t}", "public function getIdcliente() {\n\t\t\t\treturn $this->id_cliente ?? \"Id do Cliente não solicitado !!\";\n\t\t\t}", "public function getPersona()\n\t{\n\t $persona=Persona::model()->find(\"id_usuario = \".$this->id);\n\t if($persona)\n\t \treturn $persona->nombre.', '.$persona->apellido;\n\t else\n\t \treturn \"Falta completar datos\";\n\t}", "public function getLogoEmpresa()\n {\n return $this->logoEmpresa;\n }", "public function buscar_cliente1()\n\t\t{\n\t\t\t$sql =\"SELECT nom_empresa, razon_social FROM empresas\";\t\n\t\t\t$query = $this->db->query($sql);\n\t\t\treturn $query->result();\n\t\t}", "public function getCodice()\n {\n return $this->codice;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "public function getCodigo() {\n return $this->iCodigo;\n }", "function geraCodigo(){\r\n\t\t$fComp = new fachada_logcomprovante();\r\n\t\treturn $fComp->geraCodigo();\r\n\t}", "public function getValorDocumento()\n {\n return $this->ValorDocumento;\n }" ]
[ "0.7696263", "0.7696263", "0.73079205", "0.7253348", "0.7064705", "0.7039722", "0.7016448", "0.69793797", "0.69291216", "0.6926977", "0.6893247", "0.6893247", "0.6848697", "0.68153757", "0.6769732", "0.6739347", "0.66967726", "0.6680921", "0.66635424", "0.6630958", "0.65931064", "0.6567926", "0.6567926", "0.6563489", "0.65627486", "0.656078", "0.6505527", "0.6498408", "0.6479155", "0.647343", "0.6462744", "0.6453256", "0.6451934", "0.64289343", "0.6418349", "0.6418349", "0.63745683", "0.63556886", "0.6355094", "0.6347132", "0.63332677", "0.6322875", "0.63183486", "0.6317227", "0.6317139", "0.6317139", "0.6317139", "0.6311666", "0.6296399", "0.62881035", "0.6276616", "0.6274018", "0.62694216", "0.623501", "0.621654", "0.62048054", "0.6198755", "0.619857", "0.619005", "0.61888504", "0.61844534", "0.61694485", "0.61575717", "0.61464673", "0.6146416", "0.60961026", "0.6094757", "0.60816175", "0.60752195", "0.60746133", "0.60745424", "0.60745424", "0.60745424", "0.606538", "0.60649705", "0.606045", "0.60584563", "0.60552615", "0.6053658", "0.60499144", "0.60467255", "0.6042603", "0.60390526", "0.6029084", "0.60281634", "0.60131735", "0.6009045", "0.60084313", "0.6004769", "0.6003014", "0.5998554", "0.59983927", "0.5997847", "0.59915763", "0.59915763", "0.59915763", "0.59915763", "0.59915763", "0.5979892", "0.5977527" ]
0.7620602
2
Set the value of Codigo Empresa
public function setCodigoEmpresa($codigoEmpresa) { $this->codigoEmpresa = $codigoEmpresa; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSorpresa($_caja){\r\n $this->sorpresa=$_caja;\r\n }", "function setEmpresa($empresa, $puesto, $depto = \"\", $idempleado = \"\", $nss = 0, $ExtTelefonica = 0 ){\n\t\t$this->mClaveEmpresa\t= $empresa;\n\t\t$this->mPuesto\t\t\t= $puesto;\n\t\t$this->mDepto\t\t\t= $depto;\n\t\t$this->mIDEmpleado\t\t= $idempleado;\n\t\t$this->mNSS\t\t\t\t= $nss;\n\t\t$this->mExtTelefonica\t= $ExtTelefonica;\n\t\t//iniciar domicilio?\n\t\t$xEmp\t\t\t\t\t= new cEmpresas($this->mCodigoPostal);\n\t\tif($xEmp->init() == true){\n\t\t\t$this->mNombreEmpresa\t= $xEmp->getNombreCorto();\n\t\t\t$this->mDomicilio\t\t= $xEmp->getDomicilio();\n\t\t\t$OPers\t\t\t\t\t= $xEmp->getOPersona();\n\t\t\tif($OPers != null){\n\t\t\t\t$xViv\t\t\t\t= $OPers->getODomicilio();\n\t\t\t\tif($xViv != null){\n\t\t\t\t\t$this->mClaveDeEstado\t\t= $xViv->getClaveDeEstado();\n\t\t\t\t\t$this->mClaveDeMunicipio\t= $xViv->getClaveDeMunicipio();\n\t\t\t\t\t$this->mClaveDeLocalidad\t= $xViv->getClaveDeLocalidad();\n\t\t\t\t\t\n\t\t\t\t\t$this->mNombreDeLocalidad\t= $xViv->getLocalidad();\n\t\t\t\t\t$this->mNombreDeMunicipio\t= $xViv->getMunicipio();\n\t\t\t\t\t$this->mNombreDeEstado\t\t= $xViv->getEstado();\n\t\t\t\t\t$this->mCodigoPostal\t\t= $xViv->getCodigoPostal();\n\t\t\t\t\t$this->mIDDomicilio\t\t\t= $xViv->getClaveUnica();\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "public function setEmpresa($value = false) {\n $this->_empresa = $value;\n return $this;\n }", "public function setEmpresa($value = false) {\n $this->_empresa = $value;\n return $this;\n }", "public function getCodigoEmpresa()\n {\n return $this->codigoEmpresa;\n }", "public function setIdempresa($idempresa){\n $this->idempresa = $idempresa;\n }", "public function setCodigo($codigo){\n $this->codigo = $codigo;\n }", "public function testSetCodeEmploye() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setCodeEmploye(\"codeEmploye\");\n $this->assertEquals(\"codeEmploye\", $obj->getCodeEmploye());\n }", "function setCausaleEvasione($codice)\n {\n $this->cauEvasione = $codice; \n }", "public function setIdusuario($value){\n $this->idusuario = $value;\n }", "public function asignarCodigo($codigo){\n\t\t$this->codigo = $codigo;\n\t}", "public function setSaldo($nuevo_saldo, $id_empresa){\n }", "function modificarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_ime';\n\t\t$this->transaccion='DIR_EMP_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_empresa','id_empresa','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('tipo_sociedad','tipo_sociedad','varchar');\n\t\t$this->setParametro('objeto','objeto','text');\n\t\t$this->setParametro('dir_comercial','dir_comercial','varchar');\n\t\t$this->setParametro('nit','nit','varchar');\n\t\t$this->setParametro('clase','clase','varchar');\n\t\t$this->setParametro('domicilio','domicilio','text');\n\t\t$this->setParametro('matricula','matricula','int8');\n\t\t$this->setParametro('renovado','renovado','int4');\n\t\t$this->setParametro('domicilio_legal','domicilio_legal','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('seccion','seccion','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('divission','divission','varchar');\n\t\t$this->setParametro('estado_matricula','estado_matricula','varchar');\n\t\t$this->setParametro('mail','mail','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getId_empresa()\n {\n return $this->id_empresa;\n }", "public function edit(Empresa $empresa)\n {\n \n }", "public function setCodiCasa($value) {\n\t\t//validando de que el valor sea un id\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_casa = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t}\n\t}", "public function setNombre_empresa($nombre_empresa){\n $this->nombre_empresa = $nombre_empresa;\n }", "public function edit(Empresa $empresa)\n {\n //\n }", "public function setCodiEmis($value) {\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_emis = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t}\n\t}", "public function saveUsuario(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_usuario SET usuario = \"%s\" password = \"%s\" WHERE usuario_id = %d',\n $this->usuario,\n $this->password,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_usuario ( usuario, password) VALUES (\"%s\", \"%s\")',\n $this->usuario,\n $this->password );\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "public function testSetCodeEmploye() {\n\n $obj = new PointBonTrav();\n\n $obj->setCodeEmploye(\"codeEmploye\");\n $this->assertEquals(\"codeEmploye\", $obj->getCodeEmploye());\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 modificarEmpleado(){\n\t$ced=$this->objEmpleado->getCedula();\n\t$nom=$this->objEmpleado->getNombre();\n\t$fechaIng=$this->objEmpleado->getFechaIngreso();\n\t$fechaRet=$this->objEmpleado->getFechaRetiro();\n\t$salBas=$this->objEmpleado->getSalarioBasico();\n\t$ded=$this->objEmpleado->getDeducciones();\n\t$foto=$this->objEmpleado->getFoto();\n\t$hojaV=$this->objEmpleado->getHojaVida();\n\t$email=$this->objEmpleado->getEmail();\n\t$tel=$this->objEmpleado->getTelefono();\n\t$cel=$this->objEmpleado->getCelular();\n\t$estado=$this->objEmpleado->getEstado();\n\t$usuario=$this->objEmpleado->getUsuario();\n\t$contrasena=$this->objEmpleado->getContrasena();\n\t$nomTmp=$this->objEmpleado->getNombreTmp();\n\t$fotoTmp=$this->objEmpleado->getFotoTmp();\n\t$hojaVTmp=$this->objEmpleado->getHojaVidaTmp();\n\t$emailTmp=$this->objEmpleado->getEmailTmp();\n\t$telTmp=$this->objEmpleado->getTelefonoTmp();\n\t$celTmp=$this->objEmpleado->getCelularTmp();\n\n\t$objConexion = new ControlConexion();\n\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t$comandoSql=\"UPDATE EMPLEADO SET NOMBRE_TMP='\".$nomTmp.\"', FECHAINGRESO='\".$fechaIng.\"', \n\tSALARIOBASICO='\".$salBas.\"', DEDUCCIONES='\".$ded.\"', FOTO_TMP='\".$fotoTmp.\"', HOJAVIDA_TMP='\".$hojaVTmp.\"', EMAIL_TMP='\".$emailTmp.\"',\n\tTELEFONO_TMP='\".$telTmp.\"', CELULAR_TMP='\".$celTmp.\"',CONTRASENA='\".$contrasena.\"' WHERE CEDULA='\".$ced.\"'\";\n\t$objConexion->ejecutarComandoSql($comandoSql);\n\t$objConexion->cerrarBd();\n}", "function insertarEmpresa(){\n\t\t$this->procedimiento='dir.f_empresa_ime';\n\t\t$this->transaccion='DIR_EMP_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('tipo_sociedad','tipo_sociedad','varchar');\n\t\t$this->setParametro('actividad','actividad','text');\n\t\t$this->setParametro('actividad_esp','actividad_esp','varchar');\n\t\t$this->setParametro('nit','nit','varchar');\n\t\t$this->setParametro('actividad_gral','actividad_gral','varchar');\n\t\t$this->setParametro('domicilio','domicilio','text');\n\t\t$this->setParametro('matricula','matricula','int8');\n\t\t$this->setParametro('renovado','renovado','int4');\n\t\t$this->setParametro('actividad_prim','actividad_prim','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('departamento','departamento','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('municipio','municipio','varchar');\n\t\t$this->setParametro('estado_matricula','estado_matricula','varchar');\n\t\t$this->setParametro('mail','mail','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function setCodigo($codigo)\n {\n $this->codigo = $codigo;\n }", "public function setCodigo($codigo)\n {\n $this->codigo = $codigo;\n }", "public function setEmpleado_idemp($empleado_idemp){\n $this->empleado_idemp = $empleado_idemp;\n }", "public function setNit_empresa($nit_empresa){\n $this->nit_empresa = $nit_empresa;\n }", "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 testSetEmploi() {\n\n $obj = new Employes();\n\n $obj->setEmploi(\"emploi\");\n $this->assertEquals(\"emploi\", $obj->getEmploi());\n }", "public function setCodice($codice) \n\t{\n $this->codice = $codice;\n }", "public function setIdUsuario($idUsuario){\n $this->idUsuario = $idUsuario;\n }", "function set_proyecto(){\n\n\t\tif($this->input->post('id')){\n\t\t\t\n\t\t\t$id = $this->input->post('id',true);\n\n\t\t\t$user = $this->session->userdata('cliente_id');\n\n\t\t\t//Validar que existe el proyecto\n\n\t\t\t$proyecto = applib::get_table_field(applib::$proyectos_table,array('id' => $id,'status' => 1),'*');\n\n\t\t\tif($proyecto == \"\"){\n\t\t\t\techo json_encode(array('res' => 'error'));\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t//Verificar si ha seleccionado un proyecto para no volver a mostrar\n\n\t\t\t$cliente = applib::get_table_field(applib::$clientes_table,array('id' => $user),'*');\n\t\t\t\n\t\t\tif($cliente['proyecto_id'] != null){\n\t\t\t\techo json_encode(array('res' => 'error'));\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t//Colocar proyecto \n\n\t\t\tapplib::update(array('id' => $user),applib::$clientes_table,array('proyecto_id' => $id));\n\n\t\t\techo json_encode(array('res' => 'success'));\n\t\t}\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 setEstanteria($_codigoEstanteria){\r\n $this->estanteria=$_codigoEstanteria;\r\n }", "public function setidExamen($Valor){\r\n $this->idExamen = trim($Valor);\r\n }", "public function testSetNumeroOrdre() {\n\n $obj = new EmpRecapCodePenibilite();\n\n $obj->setNumeroOrdre(10);\n $this->assertEquals(10, $obj->getNumeroOrdre());\n }", "public function testSetCodeEtablissement() {\n\n $obj = new Employes();\n\n $obj->setCodeEtablissement(10);\n $this->assertEquals(10, $obj->getCodeEtablissement());\n }", "public function testSetCodeOfficielCommune() {\n\n $obj = new Employes();\n\n $obj->setCodeOfficielCommune(\"codeOfficielCommune\");\n $this->assertEquals(\"codeOfficielCommune\", $obj->getCodeOfficielCommune());\n }", "public function setNome($nome){$this->nome = $nome;}", "public function setCodare($codare){\n\t\t$this->codare = $codare;\n\t}", "public function setIdEmpresa($value,$options=array('required'=>true)){ \n $this->_data['id_empresa'] = new ZendT_Type_Number($value,array('numDecimal'=>null));\n if ($options['db'])\n $this->_data['id_empresa']->setValueFromDb($value);\n \n if (!$options['db']){\n \n if ($options['required'])\n $this->isRequired($value,'id_empresa');\n \n }\n return $this;\n }", "public function setCodEmpresa($codEmpresa)\n {\n $this->codEmpresa = $codEmpresa;\n\n return $this;\n }", "public function setCodEmpresa($codEmpresa)\n {\n $this->codEmpresa = $codEmpresa;\n\n return $this;\n }", "public function _setCodigoCliente($entregableid, $codigo_cliente)\n {\n $id = (int)$entregableid;\n $row = $this->fetchRow('cod_le = ' . $id);\n if (!$row) {\n throw new Exception(\"No hay resultados para ese transmittal\");\n }\n $row->codigo_cliente = $codigo_cliente;\n $row->save();\n if ($row->codigo_anddes != null && $row->codigo_anddes != '' &&\n $row->codigo_cliente != null && $row->codigo_cliente != '' &&\n $row->estado_entregable != 7) {\n $row->estado_entregable = 7;\n }\n $row->save();\n }", "public function setCodeEmploi($codeEmploi) {\n $this->codeEmploi = $codeEmploi;\n return $this;\n }", "public function __set($propriedade, $valor) {\n $this->data[$propriedade] = $valor;\n }", "private function iniciar_indice_empresas(){\n\t\t//==========necesarios para empresa================\n\t\trequire_once 'inc/clases/public/empresa.class.php';\t\t\t//pagina de empresa (y empresas)\n\t\trequire_once 'inc/clases/config/builder_config.class.php';\t//clase builder(reservas)\n\t\trequire_once 'inc/clases/public/salida_anuncios.class.php';\n\n\t\t$this->Empresa = new Empresa();\n\t\t$this->Modulos = new Salida_anuncios();\n\t\t// if(is_null($this->Empresa->user)){\n\t\t// \t//es null, devolvera inmobiliarias\n\t\t// }else if($this->Empresa->user == false){\n\t\t// \t$this->forzar_404();\n\t\t// }else{\n\t\t// \t//es bien\n\t\t// \t$this->empresa = $this->Empresa->salida;\n\t\t// }\n\t}", "public function setId($valor){\n\t\t\t$this->id = $valor;\n\t\t}", "public function setCodope($codope){\n\t\t$this->codope = $codope;\n\t}", "public function set_clientes(objeto_cliente $cliente){\n\t$consulta_insertar = new Conectar();\n\t$consulta_insertar = $consulta_insertar->conexion();\n\t$query=\"insert into clientes (cliente_id, nombre, celular, pais, correo) values (:cl_id, :nom, :cel, :pais, :corr)\";\n\n\t$resultado=$consulta_insertar->prepare($query);\n\n\t$resultado->execute(array(\":cl_id\"=>$cliente->get_cliente_id(),\":nom\"=>$cliente->get_nombre(),\":cel\"=>$cliente->get_celular(),\":pais\"=>$cliente->get_pais(),\":corr\"=>$cliente->get_correo()));\n\n\n\t}", "public function saveEntidad(){\n\t\t$conexion = new Database();\n if ($this->codigo){\n $query = sprintf('UPDATE agenda_entidades SET entidad = \"%s\" WHERE entidad_id = %d',\n $this->entidad,\n $this->codigo);\n $rows = $conexion->exec( $query );\n }\n else{\n $query = sprintf('INSERT INTO agenda_entidades(entidad) VALUES (\"%s\")',\n $this->usuario);\n\t\t\t$rows = $conexion->exec( $query );\n $this->codigo = $conexion->lastInsertId();\n }\n }", "public function testSetNumeroEmploye() {\n\n $obj = new AttestationCacm();\n\n $obj->setNumeroEmploye(\"numeroEmploye\");\n $this->assertEquals(\"numeroEmploye\", $obj->getNumeroEmploye());\n }", "function setIdCliente($id_cliente)\r\n\t {\r\n\t\t $this->id_cliente = $id_cliente;\r\n\t }", "function set_employee($emp)\n\t\t{\n\t\t\t$this->employee = $emp;\n\t\t}", "function modificar_empresa($empresa_id, $data, $tabla = NULL) {\n\n\t\tif (is_null($tabla)) {\n\t\t\t$c = 'empresa_id';\n\t\t\t$t = 'empresas';\n\t\t} else {\n\t\t\t$c = 'cuentaregistro_id';\n\t\t\t$t = $tabla;\n\t\t}\n\n\t\t//Audit field\n\t\t$data['user'] = $this->auth_frr->is_logged_in();\n\n\t\t$this -> db -> where($c, $empresa_id);\n\n\t\tif ($this -> db -> update($t, $data)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function setcadastracliente($nome,$cpf,$email,$telefone,$idestado,$idcidade,$rua,$bairro,$numero,$cep,$login,$senha)\n { \n $bdLeilao = new bd_leilao();\n $sql = \"insert into cliente values(\".\"NULL\".\"','\".$nome.\"','\".$cpf.\"','\".$email.\"','\".$telefone.\"','\".$idestado.\"','\".$idcidade.\"','\".$rua.\"','\".$bairro.\"','\".$numero.\"','\".$cep.\"','\".$login.\"','\".$senha.\")\";\n $bdLeilao->execute($sql);\n }", "public function testSetCodeClient() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }", "public function setCodiNoti($value) {\n\t\t//validando de que el valor sea un id\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_noti = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t}\n\t}", "public function set ($data=array()){\n if (array_key_exists('banc_nombre',$data) ){\n\t\t\tforeach($data as $campo=>$valor){\n\t\t\t\t$$campo=$valor;\n\t\t\t}\n\t\t\t$this->parametros = array($banc_nombre,$_SESSION['usua_codigo']);\n\t\t\t$this->sp = \"str_consultaBanco_add\";\n\t\t\t$this->executeSPAccion();\n\t\t\tif($this->filasAfectadas>0){\n\t\t\t\t$this->mensaje=\"Banco agregado exitosamente\";\n\t\t\t}else{\n\t\t\t\t$this->mensaje=\"No se ha agregado el Banco\";\n }\n }else{\n $this->mensaje=\"No se ha agregado el Banco\";\n }\n }", "public function editar(){\r\n\t\tif(!$this->_validarCampos())\r\n\t\t\t// levantando a excessao CamposObrigatorios //\r\n\t\t\tthrow new CamposObrigatorios();\r\n\t\t\r\n\t\tif($this->_testarServicoExisteEdicao($this->getId(), $this->getNome()))\r\n\t\t\t// levanto a excessao//\r\n\t\t\tthrow new Exception(\"Servico já cadastrado en nossa base de dados\");\r\n\t\t\r\n\t\t// recuperando a instancia da classe de acesso a dados //\r\n\t\t$instancia = ServicoDAO::getInstancia(); \r\n\t\t// retornando o Usuario //\r\n\t\treturn $servico = $instancia->editar($this);\r\n\t}", "public function __set($nome, $valor) {\n $this->nome = $valor;\n }", "function __set($modelo, $valor)\n\t{\n\t\t$this->modelo = $modelo;\n\t}", "function asignar_valores(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->cedula=$_POST['cedula'];\n\t\t$this->correo=$_POST['correo'];\n\t}", "public function setEscalaValor( $escalaValor ){\n\t\t\t$this->escalaValor = $escalaValor ;\n\t\t}", "public function setVida($valor){\n $this->vida=$valor;\n }", "public function setCliente(Cliente $cliente);", "function setEpoca($iepoca = '')\n {\n $this->iepoca = $iepoca;\n }", "public function setUsuarioEmpresa($oUsuarioEmpresa) {\n $this->UsuarioEmpresa = $oUsuarioEmpresa;\n }", "public function setUsuario( $usuario ){\n\t\t \t$this->usuario = $usuario;\n\t\t }", "public function setNome(string $nome)\n {\n $this->nome = $nome;\n }", "public function editarAporte(){ \n if(isset($_POST[\"valueE\"]) && isset($_POST[\"bankE\"]) && isset($_POST[\"accountE\"]))\n {\n \n\t\t\t$valx = \"0\";\n\t\t\tif (isset($_POST[\"transactionE\"]) && (strlen(trim($_POST[\"transactionE\"]))>=3))\n\t\t\t{\n\t\t\t\t$valx = $_POST[\"transactionE\"];\n }\n \n if((isset($_POST[\"idxE\"]))&& (strlen(trim($_POST[\"valueE\"]))>=1)\n && (strlen(trim($_POST[\"bankE\"]))>=3)\n && (strlen(trim($_POST[\"accountE\"]))>=3) \n )\n {\n $aporte=new Aporte($this->adapter);\n $aporte->setAporteID($_POST[\"idxE\"]);\n $aporte->setValue(trim($_POST[\"valueE\"]));\n $aporte->setBank(trim($_POST[\"bankE\"]));\n $aporte->setAccount(trim($_POST[\"accountE\"]));\n $aporte->setTransactionID($valx);\n \n $save=$aporte->update(); // Manda a actualizar la moto en el modelo\n if ($save == TRUE)\n {\n $aporte->phpAlert(\"Aporte actualizado con éxito\",$this->baseUrl(\"BandejaCallcenters\", \"index\")); // Alerta y redirige\n }\n else\n {\n $aporte->phpAlert(\"Error con la actualización. Interente nuevamente\",$this->baseUrl(\"BandejaCallcenters\", \"index\")); // Alerta y redirige\n \n } \n \n }\n else\n {\n $aportex = new Aportante($this->adapter);\n $aportex->phpAlert(\"Complete todos los campos para almacenar.\",$this->baseUrl(\"BandejaCallcenters\", \"index\")); // Alerta y redirige\n }\n } \n else\n {\n $aportex = new Aportante($this->adapter);\n $aportex->phpAlert(\"Complete todos los campos para almacenar.\",$this->baseUrl(\"BandejaCallcenters\", \"index\")); // Alerta y redirige\n } \n //$this->redirect(\"BandejaCallcenters\", \"index\"); // COntrolador + Vista\n }", "public function setNome($valor){\n\t\t\t$this->nome = $valor;\n\t\t}", "public function setResaca($resaca){\n $this->resaca=$resaca;\n }", "public function testSetNumero() {\n\n $obj = new Employes();\n\n $obj->setNumero(\"numero\");\n $this->assertEquals(\"numero\", $obj->getNumero());\n }", "private function iniciar_pagina_empresas(){\n\t\t//==========necesarios para empresa================\n\t\trequire_once 'inc/clases/public/empresa.class.php';\t\t\t//pagina de empresa (y empresas)\n\t\trequire_once 'inc/clases/config/builder_config.class.php';\t//clase builder(reservas)\n\t\trequire_once 'inc/clases/form_busqueda_builder.class.php';\t//para formularios ($Form)\n\t\trequire_once 'inc/clases/public/salida_anuncios.class.php';\n\n\t\t$this->Empresa = new Empresa();\n\t\t$this->Modulos = new Salida_anuncios();\n\t\tif(is_null($this->Empresa->user)){\n\t\t\t//es null, devolvera inmobiliarias\n\t\t}else if($this->Empresa->user == false){\n\t\t\t$this->forzar_404();\n\t\t}else{\n\t\t\t//es bien\n\t\t\t$this->empresa = $this->Empresa->salida;\n\t\t}\n\t}", "public static function updateProfiloPersonale()\n {\n define(\"nome_completo_regexpr\", \"/^[a-zA-Z \\xE0\\xE8\\xE9\\xEC\\xF2\\xF9]{3,64}/\");\n define(\"email_personale_regexpr\", \"/^\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}$/\");\n define(\"username_regexpr\", \"/^[A-Za-z0-9\\xE0\\xE8\\xE9\\xEC\\xF2\\xF9 ]{3,64}$/\");\n define(\"password_regexpr\", \"/^[a-zA-Z0-9\\xE0\\xE8\\xE9\\xEC\\xF2\\xF9]+$/\");\n $name = trim($_REQUEST['nome_completo_azienda']);\n $task = trim($_REQUEST['tipo_incarichi_id']);\n $mail = trim($_REQUEST['email_personale_azienda']);\n $username = trim($_REQUEST['username_azienda']);\n $pass = trim($_REQUEST['password_azienda']);\n $id = $_SESSION['current_user']->getId();\n $error_rec = 0; //verifica la presenza di un generico errore\n \n $utente = new Azienda();\n // verifica la correttezza dei valori inseriti nella compliazione del form\n if (!empty($name)) {\n unset($_SESSION['nome_completo_azienda']);\n if (1 === preg_match(nome_completo_regexpr, $name)) {\n $utente->setNomeCompleto($name);\n } else {\n $_SESSION['nome_completo_azienda'] = \"<div class='messaggio-errore'>Il campo nome completo contiene caratteri non validi.<br>Verifica eventuali errori di battitura.</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['nome_completo_azienda'] = \"<div class='messaggio-errore'>Il campo nome completo &egrave; vuoto</div>\";\n $error_rec++;\n }\n if (!empty($task)) {\n unset($_SESSION['tipo_incarichi_id']);\n $utente->setTipo_incarichi_id($task);\n }\n if ($task == \"-1\") {\n $_SESSION['tipo_incarichi_id'] = \"<div class='messaggio-errore'>Il campo tipo di incarico non &egrave; stato schelto</div>\";\n $error_rec++;\n }\n if (!empty($mail)) {\n unset($_SESSION['email_personale_azienda']);\n if (1 === preg_match(email_personale_regexpr, $mail)) {\n $valido = UtenteFactory::cercaEmailUpdate($mail, 1, $id);\n if ($valido == 'SI') {\n $utente->setEmailPersonale($mail);\n } else {\n $_SESSION['email_personale_azienda'] = \"<div class='messaggio-errore'>Questa email &egrave; gi&agrave; stato utilizzata<br></div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['email_personale_azienda'] = \"<div class='messaggio-errore'>Questo indirizzo email non &egrave; valido.<br>Verifica eventuali errori di battitura.<br>Esempio email valida: [email protected]</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['email_personale_azienda'] = \"<div class='messaggio-errore'>Il campo email &egrave; vuoto</div>\";\n $error_rec++;\n }\n if (!empty($username)) {\n unset($_SESSION['username_azienda']);\n if (1 === preg_match(username_regexpr, $username)) {\n $valido = UtenteFactory::cercaUsernameUpdate($username, 1, $id);\n if ($valido == 'SI') {\n $utente->setUsername($username);\n } else {\n $_SESSION['username_azienda'] = \"<div class='messaggio-errore'>Questo Username &egrave; gi&agrave; stato utilizzato<br>scegline un altro</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['username_azienda'] = \"<div class='messaggio-errore'>Il campo username completo contiene caratteri non validi.<br>Verifica eventuali errori di battitura.</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['username_azienda'] = \"<div class='messaggio-errore'>Il campo username completo &egrave; vuoto</div>\";\n $error_rec++;\n }\n if (!empty($pass)) {\n unset($_SESSION['password_azienda']);\n if (1 === preg_match(password_regexpr, $pass)) {\n $utente->setPassword($pass);\n } else {\n $_SESSION['password_azienda'] = \"<div class='messaggio-errore'>Il campo password non &egrave; valido.<br>Verifica eventuali errori di battitura.</div>\";\n $error_rec++;\n }\n } else {\n $_SESSION['password_azienda'] = \"<div class='messaggio-errore'>Il campo password &egrave; vuoto</div>\";\n $error_rec++;\n }\n if ($error_rec == 0) {\n $update = UtenteFactory::updateProfiloPersonale($id, $utente);\n if ($update == 'INSUCCESSO') {\n $_SESSION['errore'] = 6;\n } elseif ($update == 'SUCCESSO') {\n $_SESSION['errore'] = 5;\n }\n }\n \n $vd = new ViewDescriptor();\n $vd->setTitolo(\"SardiniaInFood: Profilo\");\n $vd->setLogoFile(\"../view/in/logo.php\");\n $vd->setMenuFile(\"../view/in/menu_modifica_profilo.php\");\n $vd->setContentFile(\"../view/in/azienda/modifica_profilo_personale.php\");\n $vd->setErrorFile(\"../view/in/error_in.php\");\n $vd->setFooterFile(\"../view/in/footer_empty.php\");\n \n require_once '../view/Master.php';\n }", "public function setValor($valor)\n {\n $this->valor = $valor;\n }", "public function testSetCodeTypeSal() {\n\n $obj = new Employes();\n\n $obj->setCodeTypeSal(\"codeTypeSal\");\n $this->assertEquals(\"codeTypeSal\", $obj->getCodeTypeSal());\n }", "public function __construct(){\n $this->idade = 10;\n }", "public function testSetControleur() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setControleur(\"controleur\");\n $this->assertEquals(\"controleur\", $obj->getControleur());\n }", "public function examen(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idExamen=\"\";\t\t\r\n\t\t$this->tipoExamen=\"\";\t\r\n\t\t$this->descripcion=\"\";\r\n\t}", "public function setUsuario($operacao, $usuario) {\n switch ($operacao) {\n case 'I' :\n \n break;\n\n case 'A' :\n\n\n break;\n\n case 'D' :\n\n\n break;\n\n default :\n break;\n }\n }", "public function setcedulaPaciente($value){\n\n\t\t$this->_cedulaPaciente = $value;\n\t}", "public function getCodeEmploi() {\n return $this->codeEmploi;\n }", "function modificar(){\n global $conexion, $data;\n $id = $data[\"id\"];\n $usuario = $data[\"usuario\"];\n $email = $data[\"email\"];\n $clave = $data[\"clave\"];\n $tipo = $data[\"tipo\"];\n $estado = $data[\"estado\"];\n $resultado = mysqli_query($conexion,\"UPDATE usuario SET usu_clave='$clave', usu_id_tipo_usuario='$tipo', usu_estado='$estado' WHERE usu_id='$id'\");\n echo validarError($conexion, true, $resultado);\n }", "public function getCD_Empresa()\n {\n return $this->CD_Empresa;\n }", "public function edit(){\n $carros = array();\n\n $nomes[] = 'Astra';\n $nomes[] = 'Caravan';\n $nomes[] = 'Ipanema';\n $nomes[] = 'Kadett';\n $nomes[] = 'Monza';\n $nomes[] = 'Opala';\n $nomes[] = 'Veraneio';\n\n $this->set('carros',$nomes);\n }", "function asignar_valores(){\n\t\t$this->codigo=$_POST['codigo'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->hotel=$_POST['hoteles'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->lugar=$_POST['lugar'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->detal=$_POST['detal'];\n\t\t$this->mayor=$_POST['mayor'];\n\t\t$this->limite=$_POST['limite'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->segmento=$_POST['segmento'];\n\t\t$this->principal=$_POST['principal'];\n\t\t\n\t\t\n\t}", "public function testSetNumeroCarteSejour() {\n\n $obj = new Employes();\n\n $obj->setNumeroCarteSejour(\"numeroCarteSejour\");\n $this->assertEquals(\"numeroCarteSejour\", $obj->getNumeroCarteSejour());\n }", "public function getPaisEmpresa()\n {\n return $this->paisEmpresa;\n }", "function asignar_valores(){\n\t\t$this->tabla=$_POST['tabla'];\n\t\t$this->pertenece=$_POST['pertenece'];\n\t\t$this->asunto=$_POST['asunto'];\n\t\t$this->descripcion=$_POST['contenido'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->hora=$_POST['hora'];\n\t\t$this->fechamod=$_POST['fechamod'];\n\t}", "public function getNit_empresa(){\n return $this->nit_empresa;\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function testSetCodeVentilCompta() {\n\n $obj = new Collaborateurs();\n\n $obj->setCodeVentilCompta(\"codeVentilCompta\");\n $this->assertEquals(\"codeVentilCompta\", $obj->getCodeVentilCompta());\n }", "public function setCodigo($iCodigo) {\n $this->iCodigo = $iCodigo;\n }", "public function setCodigo($iCodigo) {\n $this->iCodigo = $iCodigo;\n }" ]
[ "0.70174265", "0.6840311", "0.6811886", "0.6811886", "0.6706626", "0.6706626", "0.6692006", "0.66891843", "0.6640556", "0.6544893", "0.64908814", "0.6459203", "0.64244086", "0.6410608", "0.6380377", "0.63475657", "0.6327189", "0.632219", "0.6307523", "0.6300579", "0.62462485", "0.6237701", "0.6185738", "0.6151504", "0.6128835", "0.6121559", "0.6104895", "0.6104785", "0.6104785", "0.61011326", "0.60779417", "0.6070453", "0.6059117", "0.6049075", "0.6042261", "0.6034093", "0.60255635", "0.6025085", "0.6022894", "0.5993297", "0.5989098", "0.59645617", "0.5956663", "0.59480566", "0.59450316", "0.5935946", "0.5935946", "0.59358394", "0.5933138", "0.5929357", "0.5922496", "0.5905284", "0.59007764", "0.5889765", "0.58643126", "0.5862694", "0.5843474", "0.5825857", "0.58252215", "0.58247274", "0.5819225", "0.5817659", "0.58158517", "0.58046097", "0.58042717", "0.5802213", "0.5793341", "0.57926416", "0.5788958", "0.5768403", "0.5768294", "0.5765749", "0.5761344", "0.5757563", "0.5741549", "0.5741118", "0.5735219", "0.5732456", "0.57301587", "0.5728253", "0.571719", "0.57153344", "0.57111245", "0.5708786", "0.5704764", "0.569527", "0.5683708", "0.5679984", "0.56789523", "0.5674716", "0.56630677", "0.5661906", "0.56608343", "0.56538296", "0.5653156", "0.5653115", "0.5644312", "0.5641979", "0.5641182", "0.5641182" ]
0.56774074
89
Get the value of Codigo Producto
public function getCodigoProducto() { return $this->codigoProducto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCodigoProducto()\n {\n return $this->CodigoProducto;\n }", "public function getCodProducto()\n {\n return $this->codProducto;\n }", "public function getProducte()\n {\n return $this->producte;\n }", "public function getOneProducto()\n {\n $sql = \"SELECT * FROM productos WHERE id = {$this->getId()}\";\n $query = $this->conexion->query($sql);\n\n if ($query == true) {\n\n $resultado = $query->fetch_object();\n return $resultado;\n }\n }", "public function getIdProducto()\n {\n return $this->idProducto;\n }", "public function getProduct();", "public function getProducto(){\n $sql='SELECT idProducto, nombre, precio, descripcion, foto, estado, idCategoria, cantidad, idProveedor from producto WHERE idProducto = ?';\n $params=array($this->id);\n return Database::getRow($sql,$params);\n }", "public function getIdProducto()\n {\n return $this->id_producto;\n }", "public function getIdProducto()\n {\n return $this->id_producto;\n }", "public function CodigoProducto()\n\t{\n\t\tself::SetNames();\n\n\t\t$sql = \" select codproducto from productos order by codproducto desc limit 1\";\n\t\tforeach ($this->dbh->query($sql) as $row){\n\n\t\t\t$codproducto[\"codproducto\"]=$row[\"codproducto\"];\n\n\t\t}\n\t\tif(empty($codproducto[\"codproducto\"]))\n\t\t{\n\t\t\techo $nro = '00001';\n\n\t\t} else\n\t\t{\n\t\t\t$resto = substr($codproducto[\"codproducto\"], 0, -0);\n\t\t\t$coun = strlen($resto);\n\t\t\t$num = substr($codproducto[\"codproducto\"] , $coun);\n\t\t\t$dig = $num + 1;\n\t\t\t$codigo = str_pad($dig, 5, \"0\", STR_PAD_LEFT);\n\t\t\techo $nro = $codigo;\n\t\t}\n\t}", "public function findValueProd($id){\n return Product::where('id',$id)->first()->value;\n }", "function getId_Producto(){\r\n\t\treturn $this->nId_Producto;\r\n\t}", "public function getProductValueById()\n\t{\n\t\t$product_id = $this->input->post('product_id');\n\t\tif ($product_id) {\n\t\t\t$product_data = $this->model_products->getProductData($product_id);\n\t\t\techo json_encode($product_data);\n\t\t}\n\t}", "public function getIdProducto()\n {\n return $this->idProducto;\n }", "function obtenerProducto($codProducto){\n\t\t$x = $this->pdo->prepare('SELECT * FROM producto where codProducto = ?');\n\t\t$x->execute(array($codProducto));\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "public function getId_produto()\n {\n return $this->id_produto;\n }", "public function GetIdProducto()\n\t{\n\t\treturn $this->idProd;\n\t}", "public function getProduct_code () {\n\t$preValue = $this->preGetValue(\"product_code\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->product_code;\n\treturn $data;\n}", "public function getProduct() {\n return $this->getValueOrDefault('Product');\n }", "public function getNombreProducto()\n {\n return $this->nombreProducto;\n }", "public function getId_producto()\n {\n return $this->id_producto;\n }", "public function getProduct()\n\t{\n\t\treturn $this->getKeyValue('product'); \n\n\t}", "public function getIdproducto()\n {\n return $this->idproducto;\n }", "function getIdkitprodutos() {\n return $this->idkitprodutos;\n }", "public function getIdproducto()\n {\n return $this->idproducto;\n }", "public function getProductId(): string;", "public function getProducto($codigo) {\r\n $pdo = Database::connect();\r\n $sql = \"select * from producto where codigo=?\";\r\n $consulta = $pdo->prepare($sql);\r\n $consulta->execute(array($codigo));\r\n //obtenemos el objeto especifico:\r\n $res=$consulta->fetch(PDO::FETCH_ASSOC);\r\n $producto=new Producto($res['codigo'], $res['descripcion'], $res['cantidad'], $res['precio']);\r\n Database::disconnect();\r\n //retornamos el objeto encontrado:\r\n return $producto;\r\n }", "function getNombreProducto()\n {\n return $this->NombreProducto;\n }", "function getProductCode()\n {\n return $this->productCode;\n }", "public function getProd_niche () {\n\t$preValue = $this->preGetValue(\"prod_niche\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->getClass()->getFieldDefinition(\"prod_niche\")->preGetData($this);\n\treturn $data;\n}", "public function getProductos(){\n\t\n\treturn $this->productos;\n\t}", "public function getIdProduto()\n\t\t{\n\t\t\treturn $this -> idproduto;\n\t\t}", "public function getCodProy() {\n return $this->codProy;\n }", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValor(){\n return $this->_data['valor'];\n }", "public function getCdProduto()\n {\n return $this->Cd_produto;\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getDocumentProductCod()\n {\n return (string) $this->document_product_cod;\n }", "public function getProdCode()\n {\n return $this->prod_code;\n }", "public function getOne(){\n //hacemos la consulta y lo guardamos en una variable\n $producto=$this->db->query(\"SELECT * FROM pedidos where id={$this->getId()};\");\n //devolvemos un valor en especifico y lo comvertimos a un objeto completamente usable.\n return $producto->fetch_object();\n }", "public function getCodProy() {\n return $this->codProy;\n }", "public function product()\n {\n return $this->m_product;\n }", "public function get_valor() {\n\t\t\n\t\t$dato = self::get_dato();\n\t\t/*\n\t\t$separator = ' , ';\n\t\tif($this->modo=='list') $separator = '<br>';\n\n\t\tif (is_array($valor)) {\n\t\t\t# return \"Not string value\";\n\t\t\t$string \t= '';\n\t\t\t$n \t\t\t= count($valor);\n\t\t\tforeach ($valor as $key => $value) {\n\n\t\t\t\tif(is_array($value)) $value = print_r($value,true);\n\t\t\t\t$string .= \"$key : $value\".$separator;\n\t\t\t}\n\t\t\t$string = substr($string, 0,-4);\n\t\t\treturn $string;\n\n\t\t}else{\n\t\t\t\n\t\t\treturn $valor;\n\t\t}\n\t\t*/\n\t\tif(isset($dato['counter'])) {\n\t\t\t$valor = $this->tipo.'-'.$dato['counter'];\n\t\t}else{\n\t\t\t$valor = $this->tipo;\n\t\t}\n\n\t\treturn $valor;\n\t}", "public function getProduct()\r\n {\r\n return $this->_params['product'];\r\n }", "public function getProdutos()\n {\n return $this->produtos;\n }", "public function gerencial_valorInventario(){\n\t\t\n\t\t$resultado = 0;\n\t\t\n\t\t$query = \"SELECT cantidad, idProducto\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_productos_sucursal\";\n\t\t\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n \tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n \t\n\t\t\t\t$idproducto = $filas['idProducto'];\n\t\t\t\t$cantidad\t= $filas['cantidad']; \n\t\t\t\t\n\t\t\t\t$query2 = \"SELECT precio \n\t\t\t\t\t\t\tFROM tb_productos WHERE idProducto = '$idproducto'\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif($res2 = $conexion->query($query2)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t while ($filas2 = $res2->fetch_assoc()) {\n\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t$precio = str_replace('.', '',$filas2['precio']);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$subtotal = $precio * $cantidad;\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t $resultado = $resultado + $subtotal;\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\n\t\t\t\t\t\t}\t\n\t\t\t\t\n } \n \n }//fin if\n\t\t\n return $resultado;\t\n\t\t\n\t}", "public function getCodice() \n\t{\n return $this->codice;\n }", "public function getProductOption();", "public function getValue(){ }", "function get_product_price($field_product_id){\r\n\r\n $this->load->model('logistics_model');\r\n $result = $this->logistics_model->get_product_price($field_product_id);\r\n $value = $result->price;\r\n echo $value;\r\n }", "public function getCdProduto()\n {\n return $this->cd_produto;\n }", "public function getProduct()\r\n {\r\n return $this->product;\r\n }", "public function get_valor() {\n\t\t\n\t\t$ar_list_of_values\t= $this->get_ar_list_of_values();\n\t\t$dato \t\t\t\t= $this->get_dato();\n\t\t\n\t\tif (is_array ($ar_list_of_values)) foreach ($ar_list_of_values as $value => $rotulo) {\n\t\t\t\t\t\t\t\t\t\n\t\t\tif( $dato == $value ) {\n\t\t\t\t\n\t\t\t\t$this->valor = $rotulo; \n\t\t\t\t\n\t\t\t\treturn $this->valor;\n\t\t\t}\n\t\t\t#echo \"<br> - $dato - $value => $rotulo \";\n\t\t}\t\t\t\t\t\n\t}", "public function getValue(){\n return $this->getData();\n }", "public function getProdutos()\n { \n $query = $this->db->get(\"produtos\");\n return $query->result();\n }", "public function getProductId(): int;", "public function getCodigo(){\n return $this->codigo;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValue() {\n\n }", "public function get_value()\n {\n }", "public function get_value()\n {\n }" ]
[ "0.7543214", "0.7257408", "0.7175672", "0.7009522", "0.70019805", "0.6991427", "0.69376636", "0.6918813", "0.6918813", "0.68695515", "0.68563527", "0.6836596", "0.68336266", "0.68281275", "0.6752512", "0.674717", "0.67102736", "0.6692392", "0.6653594", "0.6647063", "0.66326326", "0.66231245", "0.66194767", "0.6601732", "0.6587074", "0.6575255", "0.65557647", "0.65480834", "0.6522362", "0.6517589", "0.65134025", "0.6502478", "0.6471575", "0.64525485", "0.64525485", "0.64525485", "0.64525485", "0.64525485", "0.64525485", "0.64525485", "0.64525485", "0.64525485", "0.64525485", "0.64525485", "0.64525485", "0.64525485", "0.64525485", "0.6452536", "0.6452536", "0.6452536", "0.6452536", "0.6452536", "0.6429206", "0.6396943", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.639028", "0.6374114", "0.6369696", "0.6326907", "0.63097644", "0.6274714", "0.62713593", "0.6265679", "0.62632257", "0.6243068", "0.6228929", "0.62095433", "0.62089026", "0.61877215", "0.61750704", "0.61721855", "0.61536515", "0.6142275", "0.61390513", "0.61188924", "0.6116643", "0.6115787", "0.6115787", "0.61149204", "0.61097157", "0.61097157" ]
0.7268723
1
Set the value of Codigo Producto
public function setCodigoProducto($codigoProducto) { $this->codigoProducto = $codigoProducto; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setProducto($pro){ $this->producto = $pro;}", "public function setIdProducto($idProducto)\n {\n $this->idProducto = $idProducto;\n\n return $this;\n }", "function actualizar_producto($objeto){\n\t// Anti hack\n\t\tforeach ($objeto as $key => $value) {\n\t\t\t$datos[$key]=$this->escapalog($value);\n\t\t}\n\n\t// Valida el tipo de producto: 5-> Receta, 4-> Insumo preparado\n\t\t$tipo = ($datos['tipo'] == 1) ? 5 : 4 ;\n\n\t// Guarda la receta y regresa el ID\n\t\t$sql = \"UPDATE app_productos SET codigo = '\" . $datos['codigo'] . \"', nombre = '\" . $datos['nombre'] . \"', minimos = \" . $datos['cant_min'] . \", factor= '\".$datos['factor'].\"' WHERE id=\".$datos['id_receta'];\n\t\t// return $sql;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}", "protected function setProduct_id($value)\n\t{\n\t\tif (isInt($value) || is_null($value)) { $this->product_id = $value; }\n\t}", "public function setProduto($produto)\r\n {\r\n $this->produto = $produto;\r\n }", "public function setIdProducto($idProducto)\n {\n return $this->idProducto=$idProducto;\n }", "function __set($modelo, $valor)\n\t{\n\t\t$this->modelo = $modelo;\n\t}", "public function __set($propriedade, $valor) {\n $this->data[$propriedade] = $valor;\n }", "public function setProduct(Product $product);", "public function product($prod) {\n\t\t$this->upsProductCode = $prod;\n\t}", "function setProduct( $product )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n if ( get_class( $product ) == \"ezproduct\" )\n {\n $this->ProductID = $product->id();\n }\n }", "public function jeiAction(Request $request){\n\t $value= $request->get('value');\n\t $field = $request->get('id');\n\t $field= explode(\"|\", $field);\n\t $fields = array(\"nombreProducto\",\"piezas\",\"fbe\");\n\t if(in_array($field[0],$fields)){\n\t\t $em = $this->getDoctrine()->getManager();\n\t\t\t$entity = $em->getRepository('VCReservasBundle:ReservaProducto')->find($field[1]);\n\t\t\t$f = ucfirst($field[0]);\n $str = \"\\$entity->set{$f}(\\$value);\";\n\t\t\teval($str);\n\t\t\t$em->persist($entity);\n\t\t\t$em->flush();\n\t }\n\n\t\treturn new Response($value);\n\n }", "function getCodigoProducto()\n {\n return $this->CodigoProducto;\n }", "public function getIdProducto()\n {\n return $this->idProducto;\n }", "function setIdkitprodutos($idkitprodutos) {\n $this->idkitprodutos = $idkitprodutos;\n }", "function setSorpresa($_caja){\r\n $this->sorpresa=$_caja;\r\n }", "public function setCodigo($codigo){\n $this->codigo = $codigo;\n }", "public function setCodice($codice) \n\t{\n $this->codice = $codice;\n }", "public function setProduct()\n {\n // get the existing products array\n $products = $this->getProducts();\n // push the new product to the array\n array_push($products, $this);\n $file = fopen($_SERVER['DOCUMENT_ROOT'] . \"/mpm_challenge/problem4/db/db.json\", \"w+\") or die(\"not opened\");\n fwrite($file, json_encode($products));\n fclose($file);\n }", "function set($idModelo, $idPedido=NULL, $idProduccion=NULL, $belongsTo=NULL, $idVenta=NULL){\r\n\t\t\r\n\t\ttry{\r\n\t\t\t$prod = array('modelos_id'=>$idModelo);\r\n\t\t\tif($idPedido != NULL)$prod['pedidos_id']= $idPedido;\r\n\t\t\tif($idProduccion != NULL)$prod['producciones_id']= $idProduccion;\r\n\t\t\tif($idVenta != NULL)$prod['ventas_id']= $idVenta;\r\n\t\t\tif($belongsTo != NULL)$prod['belongsTo']= $belongsTo;\r\n\t\t\t\r\n\t\t\tif(!$this->create($prod))\r\n\t\t\t\tthrow new BadRequestException('Hubo un error al agregar el producto a la cola de impresión.');\r\n\r\n\t\t\t//Agrego los modelos\r\n\t\t\t$idImp = $this->con->lastInsertID('colaimpresion', 'id');\r\n\t\t\t$prod['id']=$idImp;\r\n\t\t\t\t\t\t\t\r\n\t\t\treturn array('success'=>true, 'ColaImpresion'=>$prod);\r\n\t\t\t\r\n\t\t} catch (Exception $e) {\r\n\t\t\t\r\n\t\t\treturn array('success'=>false, 'msg'=>$e->getMsg());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public function getCodProducto()\n {\n return $this->codProducto;\n }", "function setSyncItemsCodeProduct()\n {\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function getCodigoProducto()\n {\n return $this->codigoProducto;\n }", "public function CodigoProducto()\n\t{\n\t\tself::SetNames();\n\n\t\t$sql = \" select codproducto from productos order by codproducto desc limit 1\";\n\t\tforeach ($this->dbh->query($sql) as $row){\n\n\t\t\t$codproducto[\"codproducto\"]=$row[\"codproducto\"];\n\n\t\t}\n\t\tif(empty($codproducto[\"codproducto\"]))\n\t\t{\n\t\t\techo $nro = '00001';\n\n\t\t} else\n\t\t{\n\t\t\t$resto = substr($codproducto[\"codproducto\"], 0, -0);\n\t\t\t$coun = strlen($resto);\n\t\t\t$num = substr($codproducto[\"codproducto\"] , $coun);\n\t\t\t$dig = $num + 1;\n\t\t\t$codigo = str_pad($dig, 5, \"0\", STR_PAD_LEFT);\n\t\t\techo $nro = $codigo;\n\t\t}\n\t}", "function set_proyecto(){\n\n\t\tif($this->input->post('id')){\n\t\t\t\n\t\t\t$id = $this->input->post('id',true);\n\n\t\t\t$user = $this->session->userdata('cliente_id');\n\n\t\t\t//Validar que existe el proyecto\n\n\t\t\t$proyecto = applib::get_table_field(applib::$proyectos_table,array('id' => $id,'status' => 1),'*');\n\n\t\t\tif($proyecto == \"\"){\n\t\t\t\techo json_encode(array('res' => 'error'));\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t//Verificar si ha seleccionado un proyecto para no volver a mostrar\n\n\t\t\t$cliente = applib::get_table_field(applib::$clientes_table,array('id' => $user),'*');\n\t\t\t\n\t\t\tif($cliente['proyecto_id'] != null){\n\t\t\t\techo json_encode(array('res' => 'error'));\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t//Colocar proyecto \n\n\t\t\tapplib::update(array('id' => $user),applib::$clientes_table,array('proyecto_id' => $id));\n\n\t\t\techo json_encode(array('res' => 'success'));\n\t\t}\n\t}", "public function __set($atributo, $valor) {\n\t\t\t// $this->modelo = $valor;\n\t\t\t$this->$atributo = $valor;\n\t\t}", "function setProductCode($productCode)\n {\n $this->productCode = $productCode;\n }", "public function setValor($valor)\n {\n $this->valor = $valor;\n }", "public function updateProducto(){\n $sql='UPDATE producto set nombre = ?, precio = ?, descripcion = ?, foto = ?, estado = ?, idCategoria = ?, idProveedor = ? where idProducto = ?';\n $params= array($this->nombre, $this->precio, $this->descripcion, $this->foto, $this->estado, $this->categoria, $this->proveedor, $this->id);\n return Database::executeRow($sql,$params);\n }", "function Proveeedor($cedulaProveedor, $nombre, $telefono, $productos) {\n $this->cedulaProveedor = $cedulaProveedor;\n $this->nombre = $nombre;\n $this->telefono = $telefono;\n $this->productos = $productos;\n }", "public function setId($valor){\n\t\t\t$this->id = $valor;\n\t\t}", "public function set_data($id_producto,$proveedores_id_proveedor,$categoria_id_Categoria,$nom_producto,$pre_producto,$can_producto)\n {\n $this->id_producto=$id_producto;\n $this->proveedores_id_proveedor=$proveedores_id_proveedor;\n $this->categoria_id_Categoria=$categoria_id_Categoria;\n $this->nom_producto=$nom_producto;\n $this->pre_producto=$pre_producto;\n $this->can_producto=$can_producto;\n }", "public function setQuantite($quantite)\n{\n$this->quantite = $quantite;\n\nreturn $this;\n}", "public function produto($produto)\n {\n if ('array' === gettype($produto) && isset($produto[0])) {\n foreach ($produto as $item) {\n $this->produto($item);\n }\n return;\n }\n settype($produto, 'array');\n foreach (self::$_substitutos_produtos as $chave=>$substs) {\n foreach ($substs as $item) {\n if (isset($produto[$item]) && $produto[$item]) {\n $valor = $produto[$item];\n unset($produto[$item]);\n $produto[$chave] = $valor;\n }\n }\n }\n $chaves = array_keys($produto);\n foreach (self::$_itens_produtos_obrigatorios as $item) {\n if (!in_array($item, $chaves)) {\n throw new Exception('This product does not have the obrigatory '\n .'key: '.$item);\n }\n }\n settype($produto, 'object');\n $produto->valor = $this->numero($produto->valor);\n if (isset($produto->frete)) {\n $produto->frete = $this->numero($produto->frete);\n }\n if (isset($produto->peso)) {\n $produto->peso = $this->numero($produto->peso, false);\n }\n $p = array();\n foreach ($produto as $chave => $valor) {\n if (in_array($chave, self::$_itens_produto)) {\n $p[$chave] = $valor;\n }\n }\n $this->produtos[] = (object) $p;\n }", "public function salvarAtributo($valor){\n if($this->obterIdOpcao($valor)){\n return false; \n }\n $attribute_code = Mage::getStoreConfig('cores/config/codigo_cor'); \n $attribute_model = Mage::getModel('eav/entity_attribute');\n //$attribute_options_model= Mage::getModel('eav/entity_attribute_source_table') ;\n $attribute_code = $attribute_model->getIdByCode('catalog_product', $attribute_code);\n $attribute = $attribute_model->load($attribute_code);\n //$attribute_table = $attribute_options_model->setAttribute($attribute);\n //$options = $attribute_options_model->getAllOptions(false);\n $value['option'] = array($valor,$valor);\n $result = array('value' => $value);\n $attribute->setData('option',$result);\n return $attribute->save();\n }", "public function getIdProducto()\n {\n return $this->id_producto;\n }", "public function getIdProducto()\n {\n return $this->id_producto;\n }", "function getId_Producto(){\r\n\t\treturn $this->nId_Producto;\r\n\t}", "public function setVida($valor){\n $this->vida=$valor;\n }", "public function setProyecto( $proyecto ){\n\t\t\t$this->proyecto= $proyecto;\n\t\t}", "public function setProductId($value)\n {\n return $this->set(self::product_id, $value);\n }", "public function __construct(){\n $this->productos = new Producto();\n }", "function updateTest()\n {\n $this->cD->updateElement(new Product(1, \"Trang\"));\n }", "function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}", "public function getIdProducto()\n {\n return $this->idProducto;\n }", "public function testSetCodeProduit() {\n\n $obj = new AppelsEnCours();\n\n $obj->setCodeProduit(\"codeProduit\");\n $this->assertEquals(\"codeProduit\", $obj->getCodeProduit());\n }", "public function setIdProducto($id_producto)\n {\n $this->id_producto = $id_producto;\n\n return $this;\n }", "public function setIdProducto($id_producto)\n {\n $this->id_producto = $id_producto;\n\n return $this;\n }", "public function testSetPriceProduct()\n {\n $product = new Product();\n $value = 10.99;\n $product->setPrice($value);\n $this->assertEquals($value, $product->getPrice());\n }", "function datosNuevoProducto($id_nombre_producto = NULL,$nombre,$codigo,$version,$familia) {\n\t\t$this->id_nombre_producto = $id_nombre_producto;\n\t\t$this->nombre = $nombre;\n\t\t$this->codigo = $codigo;\n\t\t$this->version = $version;\n\t\t$this->familia = $familia;\n\t}", "public function setCodope($codope){\n\t\t$this->codope = $codope;\n\t}", "public function setPrix($prix)\n{\n$this->prix = $prix;\n\nreturn $this;\n}", "public function __construct(){\n $this->idade = 10;\n }", "public static function product($product)\n {\n static::$product = $product;\n }", "public function setCodProy($codProy) {\n $this->codProy = $codProy;\n }", "function editar_pr_factura(){\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 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 setProducto(Request $request){\n\n $json_datos= $request[\"json_datos\"];\n $json_datos = str_replace(\"[\",\"\",$json_datos);\n $json_datos = str_replace(\"]\",\"\",$json_datos);\n $datos = json_decode($json_datos);\n $response = ProductoModel::crearProducto($datos);\n return $response;\n }", "public function GetIdProducto()\n\t{\n\t\treturn $this->idProd;\n\t}", "public function setPrix($Prix)\n{\n$this->Prix = $Prix;\nreturn $this;\n}", "public function setPriceProduct($value)\n {\n $this->priceProduct = $value;\n }", "public function setProductNum($value)\n {\n return $this->set(self::product_num, $value);\n }", "public function setCodiNoti($value) {\n\t\t//validando de que el valor sea un id\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_noti = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t}\n\t}", "public function salvar()\r\n {\r\n $fabCtrl = new FabricanteController();\r\n $catCtrl = new CategoriaController();\r\n \r\n $fabObj = $fabCtrl->buscarNome($_POST['fabricante']);\r\n $catObj = $catCtrl->buscarNome($_POST['categoria']);\r\n \r\n $produto = new Produto;\r\n\r\n $produto->setNome($_POST['nomeProduto']);\r\n $produto->setDescricao($_POST['descricaoProduto']);\r\n $produto->setEstoque($_POST['estoque']);\r\n $produto->setPrecoCusto($_POST['precoCusto']);\r\n $produto->setPrecoVenda($_POST['precoVenda']);\r\n $produto->setImg($_POST['imgProduto']);\r\n $produto->setFabricante($fabObj);\r\n $produto->setCategoria($catObj);\r\n \r\n Produto::startConexao();\r\n $produto->salvar();\r\n \r\n Sessao::gravaIdObjeto($produto,'Produto');\r\n\r\n $this->redirect('/App/Views/caracteristica_view.php');\r\n }", "public function setProductId($product_id){\n $this->product_id = $product_id;\n }", "public function SetIdConvocatoria($valor){\n\t\t $this->id_convocatoria= $valor;\n\t }", "public function editarProducto($datos){\n $con= new conectar();\n $conexion= $con->conexion();\n $sql= \"UPDATE producto set nombre='$datos[0]',descripcion='$datos[1]',imagen='$datos[2]', \n codigo_categoria='$datos[3]', stock='$datos[4]', precio='$datos[5]' WHERE id='$datos[6]'\";\n return $result= mysqli_query($conexion, $sql);\n }", "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 setValue($value) {\n $this->value = $value;\n }", "public function SalvarProducto($categoria_id, $marca_id, $nombre, $titulo, $descripcion, $tags, $stock, $precio,\n $destacado, $estado, $fecha, $imagen, $imagenes, $productos, $caracteristica, $porciento,\n $precioEspecial, $archivo, $disponibilidadInmediata, $formaPago, $terminoDespacho)\n {\n $em = $this->getDoctrine()->getManager();\n $resultado = array();\n\n $entity = new Entity\\Producto();\n\n $entity->setNombre($nombre);\n $entity->setTitulo($titulo);\n $entity->setDescripcion($descripcion);\n $entity->setCaracteristica($caracteristica);\n $entity->setEstado($estado);\n $entity->setStock($stock);\n $entity->setPrecio($precio);\n $entity->setDestacado($destacado);\n $entity->setTags($tags);\n $entity->setDisponibilidadInmediata($disponibilidadInmediata);\n $entity->setFormaPago($formaPago);\n $entity->setTerminoDespacho($terminoDespacho);\n\n if ($precioEspecial != \"\") {\n $entity->setPrecioEspecial($precioEspecial);\n }\n\n if ($fecha != \"\") {\n $fecha = \\DateTime::createFromFormat('d/m/Y H:i', $fecha);\n $entity->setFechapublicacion($fecha);\n }\n\n $categoria = $em->find('IcanBundle:Categoria', $categoria_id);\n if ($categoria != null) {\n $entity->setCategoria($categoria);\n }\n\n $marca = $em->find('IcanBundle:Marca', $marca_id);\n if ($marca != null) {\n $entity->setMarca($marca);\n }\n\n $porciento = $this->getDoctrine()->getRepository('IcanBundle:Porciento')\n ->findOneBy(array('valor' => $porciento));\n if ($porciento != null) {\n $entity->setPorciento($porciento);\n }\n\n //Hacer Url \n $url = $this->HacerUrl($nombre);\n $i = 1;\n $paux = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->BuscarPorUrl($url);\n while (!empty($paux)) {\n $url = $this->HacerUrl($nombre) . \"-\" . $i;\n $paux = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->BuscarPorUrl($url);\n $i++;\n }\n\n $entity->setUrl($url);\n\n //stock 0 si estado es 0\n if ($estado != 1) {\n $entity->setStock(0);\n }\n\n\n $em->persist($entity);\n $em->flush();\n\n //Salvar imagen\n $imagen = $this->RenombrarImagen($url, $imagen);\n $entity->setImagen($imagen);\n\n //Salvar ficha\n $ficha = $this->RenombrarFicha($url, $archivo);\n $entity->setFicha($ficha);\n\n if ($imagenes != \"\") {\n $imagenes = explode(',', $imagenes);\n $cont = 1;\n foreach ($imagenes as $value) {\n $value = $this->RenombrarImagen($url, $value, $cont);\n if ($value != \"\") {\n $productoimagen = new Entity\\ProductoImagen();\n $productoimagen->setProducto($entity);\n $productoimagen->setImagen($value);\n $em->persist($productoimagen);\n\n $cont++;\n }\n }\n }\n\n //Relacionados\n if (count($productos) > 0) {\n foreach ($productos as $value) {\n $relacionado_id = $value['producto_id'];\n\n $productoRelacion = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->find($relacionado_id);\n if ($productoRelacion != null) {\n $productorelacion = new Entity\\ProductoRelacion();\n\n $productorelacion->setProducto($entity);\n $productorelacion->setProductoRelacion($productoRelacion);\n\n $em->persist($productorelacion);\n\n $productorelacion2 = new Entity\\ProductoRelacion();\n\n $productorelacion2->setProducto($productoRelacion);\n $productorelacion2->setProductoRelacion($entity);\n\n $em->persist($productorelacion2);\n }\n }\n }\n\n $em->flush();\n $resultado['success'] = true;\n\n return $resultado;\n }", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setObjetcustomer($objetcustomer)\n{\n$this->objetcustomer = $objetcustomer;\n\nreturn $this;\n}", "function editProducto($producto)\n{\n\t\t$con = getDBConnection();\n\t\t$sql = \"UPDATE productos SET nombre = :nombre, descripcion = :descripcion, precio = :precio WHERE id = :id\";\n\t\t$stmt = $con->prepare($sql);\n\t\t$stmt->bindParam(':id', $producto->id);\n\t\t$stmt->bindParam(':nombre', $producto->nombre);\n\t\t$stmt->bindParam(':descripcion', $producto->descripcion);\n\t\t$stmt->bindParam(':precio', $producto->precio);\n\t\t$stmt->execute();\n}", "public function setProductByCode($code)\n\t{\n\t\tif (empty($this->brand)) {\n\t\t\tthrow new \\Exception('Must Set Brafore before Product');\n\t\t}\n\t\t$criteria = Criteria::create()\n\t\t->where(Criteria::expr()->eq(\"code\", $code));\n\t\n\t\t$this->product = $this->brand->getProducts()->matching($criteria)->first();\n\t\n\t\tif (empty($this->producct)) {\n\t\t\tthrow new \\Exception(sprtintf(\"Product '%s' not found\",$code));\n\t\t}\n\t\n\t\t$this->logger->debug(sprintf(\"Code: '%s' Product: '%s'\", $code, $this->product));\n\t}", "public function updatedSelectedPsicologo($pisocologo_id)\n {\n }", "function valor($valor) {\n\n $this->_valorUpdate = $valor;\n\n if (in_array($this->_tipo, $this->_controlesMultiples)) {\n\n foreach ($this->_selectoresOpcion as $key => $selector) {\n if ($selector->attr('value') == $valor) {\n $selector->attr('checked', 'checked');\n }\n }\n\n } else\n if ($this->type == 'select') {\n foreach ($this->_selectoresOpcion as $key => $selector) {\n if ($selector->attr('value') == $valor) {\n $selector->attr('selected', 'selected');\n }\n }\n\n } elseif ($this->type == \"textarea\") {\n $this->innerHTML($valor);\n } else {\n $this->attr('value', $valor);\n }\n\n }", "public function setVoiture($voiture){\n $this->$voiture = $voiture;\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}", "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 actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "public function asignarCodigo($codigo){\n\t\t$this->codigo = $codigo;\n\t}", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setProdId($value);\n break;\n case 1:\n $this->setProdPriceId($value);\n break;\n case 2:\n $this->setProdName($value);\n break;\n case 3:\n $this->setProdAlt1($value);\n break;\n case 4:\n $this->setProdAlt2($value);\n break;\n case 5:\n $this->setProdAlt3($value);\n break;\n case 6:\n $this->setProdAlt4($value);\n break;\n case 7:\n $this->setProdCode($value);\n break;\n case 8:\n $this->setProdCategory($value);\n break;\n case 9:\n $this->setProdCategoryShipping($value);\n break;\n case 10:\n $this->setProdWriteup($value);\n break;\n case 11:\n $this->setProdLength($value);\n break;\n case 12:\n $this->setProdWingspan($value);\n break;\n case 13:\n $this->setProdHeight($value);\n break;\n case 14:\n $this->setProdScale($value);\n break;\n case 15:\n $this->setProdLinks($value);\n break;\n case 16:\n $this->setProdLinkdescription($value);\n break;\n case 17:\n $this->setProdFront($value);\n break;\n case 18:\n $this->setProdKeywords($value);\n break;\n case 19:\n $this->setProdKeywordsWriteup($value);\n break;\n case 20:\n $this->setProdTitle($value);\n break;\n case 21:\n $this->setProdDescription($value);\n break;\n case 22:\n $this->setProdGeneral($value);\n break;\n case 23:\n $this->setProdEra($value);\n break;\n case 24:\n $this->setProdCompany($value);\n break;\n case 25:\n $this->setProdRelated($value);\n break;\n case 26:\n $this->setProdRelatedPa($value);\n break;\n case 27:\n $this->setProdRelatedM3($value);\n break;\n case 28:\n $this->setProdRelated2($value);\n break;\n case 29:\n $this->setProdSaveas($value);\n break;\n case 30:\n $this->setProdAircraftreg($value);\n break;\n case 31:\n $this->setMb($value);\n break;\n case 32:\n $this->setPa($value);\n break;\n case 33:\n $this->setM3($value);\n break;\n } // switch()\n\n return $this;\n }", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);" ]
[ "0.76188314", "0.6478032", "0.6384443", "0.632999", "0.6246652", "0.6204257", "0.62000275", "0.6195033", "0.6193219", "0.6170861", "0.6160234", "0.6123752", "0.6115678", "0.6089331", "0.6070243", "0.60492563", "0.6046533", "0.60300815", "0.60235465", "0.6020508", "0.5961364", "0.59540844", "0.5944398", "0.5942171", "0.59361196", "0.59333235", "0.5909277", "0.59075445", "0.5895193", "0.58908796", "0.5847366", "0.58400935", "0.583863", "0.5828935", "0.5823091", "0.5821673", "0.5815725", "0.5815725", "0.58133835", "0.58131033", "0.5809819", "0.5783932", "0.5774432", "0.5765494", "0.57636374", "0.57554555", "0.57502425", "0.57500595", "0.57500595", "0.5748744", "0.5747381", "0.5739553", "0.5739007", "0.573829", "0.5737711", "0.5737527", "0.5727901", "0.5711579", "0.57039607", "0.5703252", "0.57014596", "0.56998986", "0.5699026", "0.56980497", "0.56939083", "0.56870705", "0.5671629", "0.5664836", "0.566205", "0.5660817", "0.56596506", "0.56596506", "0.5658468", "0.5658468", "0.5658468", "0.5658468", "0.5658468", "0.5658468", "0.5658468", "0.5658468", "0.5658468", "0.5658468", "0.5658468", "0.5655713", "0.5653849", "0.56484056", "0.56460965", "0.5637191", "0.56358457", "0.5633484", "0.5628445", "0.56261194", "0.5615277", "0.5606569", "0.55992025", "0.55992025", "0.55992025", "0.55992025", "0.55992025", "0.55992025", "0.55992025" ]
0.0
-1
Get the value of Precio
public function getPrecio() { return $this->precio; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getPrecio()\n {\n return $this->precio;\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue(){\n \treturn $this->value;\n }", "public function getPico();", "public function getValue()\n {\n\treturn $this->value;\n }", "public function getValue() {\n\n\t\treturn trim(\n\t\t\tfile_get_contents(\n\t\t\t\tself::PINDIR.'/gpio'.$this->iPinNumber.'/value'\n\t\t\t)\n\t\t);\n\t}", "public function getValue()\n {\n\t\treturn $this->value;\n\t}", "public function &getValue();", "function getValue(){\r\n\t\treturn $this->value;\r\n\t}", "public function getPoliceValide()\n {\n return $this->policeValide;\n }", "public function getValue() {\n\t\treturn $this -> value;\n\t}", "public function value();", "public function value();", "public function value();", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function GetValue() {\n\t\treturn $this->_value;\n\t}", "public function value() { return $this->_m_value; }", "public function getValue()\n\t{\n\t\treturn $this->data['value'];\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->value;\n\t}", "public function getValue(){\n return $this->value;\n }", "public function getValue(){\n return $this->value;\n }", "abstract public function getValue();", "abstract public function getValue();", "abstract public function getValue();", "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "public function getValue() {\n\t\treturn $this->data[\"value\"];\n\t}", "public function value()\n {\n return $this->getValue();\n }", "public function getValue()\r\n\t{\r\n\t\treturn $this->value;\r\n\t}", "public function get_value()\n {\n }", "public function get_value()\n {\n }", "public function getPrecio1()\n {\n return $this->precio1;\n }", "public function getPR() {}", "public function getValue() {\n \n return $this->toScalar();\n }", "public function getValue(){\n return $this->_value;\n }", "function sequence_value() {\n\t\treturn $this->data[$this->sequence_field];\n\t}", "public function getValue()\r\n {\r\n return $this->value;\r\n }", "function getValue() { return $this->readText(); }", "public function value()\n {\n return $this->value;\n }", "public function value()\n {\n return $this->value;\n }", "public function value()\n {\n return $this->value;\n }", "public function value()\n {\n return $this->value;\n }", "public function value()\n {\n return $this->value;\n }", "public function value()\n {\n return $this->value;\n }", "public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}", "public function getValue()\n\t{\n\t\treturn $this->_value;\n\t}", "public function get_value()\n\t{\n\t\treturn $this->value;\n\t}", "abstract protected function getValue();", "function getValue() { return $this->readText(); }", "public function getValue() {\n return $this->value;\n }" ]
[ "0.63961315", "0.63087165", "0.63087165", "0.63087165", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6124279", "0.6104078", "0.60564804", "0.6016601", "0.59536725", "0.59437853", "0.5929474", "0.5923021", "0.58992684", "0.58917487", "0.5886287", "0.5886287", "0.5886287", "0.5881581", "0.5881581", "0.5881581", "0.5881581", "0.5881581", "0.5881581", "0.5881581", "0.5881581", "0.5881581", "0.5881581", "0.5881581", "0.5881581", "0.5881581", "0.5881581", "0.58799803", "0.58799803", "0.58799803", "0.58799803", "0.58799803", "0.58620334", "0.5858393", "0.5857728", "0.58495426", "0.58495426", "0.58495426", "0.58495426", "0.58495426", "0.58495426", "0.58444685", "0.58444685", "0.5843209", "0.5843209", "0.58426374", "0.58401287", "0.58401287", "0.5838581", "0.5835296", "0.58325154", "0.5825877", "0.5825877", "0.5825716", "0.58203506", "0.5814677", "0.58136445", "0.5802399", "0.57888985", "0.57852995", "0.5784866", "0.5784866", "0.5784866", "0.5784866", "0.5784866", "0.5784866", "0.5784391", "0.5784391", "0.5778456", "0.57778573", "0.5763368", "0.5754315" ]
0.6303903
8
Set the value of Precio
public function setPrecio($precio) { $this->precio = $precio; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_par($p,$v)\n {\n $this->__par[$p] = $v;\n }", "public function setPR($r) {}", "public function setValue($v){\n $this->value = $v;\n }", "function __set($var,$val){\n\t\t\t\tif($var=='width' || ($var=='height' && $val>0)){\n\t\t\t\t\t$this->$var=$val;\n\t\t\t\t\t$this->ratio=(intval($this->height)>0 ? floatval($this->width)/$this->height : 0);\n\t\t\t\t}else if($var=='height'){\n\t\t\t\t\t$this->$var=0;\n\t\t\t\t\t$this->ratio=0;\n\t\t\t\t}else if($var == 'data'){\n\t\t\t\t\t$this->$var($val);\n\t\t\t\t}else{\n\t\t\t\t\t$this->$var=$val;\n\t\t\t\t}\n\t\t\t}", "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "public function setStructureRightParalPanoramic($value) {\n switch ($value) {\n case 0 : // Sin da�o\n return 0;\n break;\n case 7 : // Deformacion Fuerte\n return 44;\n break;\n case 8 : // Deformacion medio\n return 42;\n break;\n case 6 : // Malo\n return 50;\n break;\n case 9 : // Golpe\n return 0;\n break;\n case 10 : // Rayon\n return 2;\n break;\n case 11 : // Reparacion Buena\n return 0;\n break;\n case 12 : // Reparacion Mala\n return 40;\n break;\n case 13 : // Sumido\n return 5;\n break;\n }\n }", "function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}", "public function pi_setPiVarDefaults() {}", "public function set_correlativo( $param )\n {\n #uniendo con el detalle de venta\n $corr = 0;\n $data_update = array();\n switch ($param['tipo']) {\n case 'F':\n $data_update['correlativo_factura'] = $param['corr'];\n break;\n case 'B':\n $data_update['correlativo_boleta'] = $param['corr'];\n break;\n }\n DB::table('config')\n ->where('id', 1)\n ->update( $data_update );\n #\n }", "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "abstract public function setValue($value);", "public function set()\n {\n if ( ! $this->value ) {\n $this->generate();\n }\n }", "function setValue(&$value) {\n if (!is_array($value) || count($value) != 4) {\n trigger_error(\"Array of four PdfNumericType values only accepted\\n\" . var_export($value, true), E_USER_ERROR);\n }\n $this->_value = & $value;\n }", "function setValue($value) {\n $this->value = $value;\n }", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "function set_value($value)\n\t{\n\t\t$this->value = $value;\n\t}", "function value( $value )\n\t{\n\t\t$this->value = $value;\n\t}", "public function setPrecio($precio)\n {\n $this->precio = $this->db->real_escape_string($precio);\n\n return $this;\n }", "public function setVida($valor){\n $this->vida=$valor;\n }", "public function __set($propriedade, $valor) {\n $this->data[$propriedade] = $valor;\n }", "function setValue ($value) {\n\t\t$this->_value = $value;\n\t}", "public function setValue($value){\n $this->_value = $value;\n }", "public function setValue($value)\n {\n $value = arr::get($value, 'value', NULL);\n\n if ($value !== NULL)\n {\n //pokud prisla prazdna hodnota, tak do modelu ukladam NULL\n if (empty($value))\n {\n $value = NULL;\n }\n\n parent::setValue($value);\n }\n }", "public function setStructureLeftParalPanoramic($value) {\n switch ($value) {\n case 0 : // Sin da�o\n return 0;\n break;\n case 7 : // Deformacion Fuerte\n return 44;\n break;\n case 8 : // Deformacion medio\n return 42;\n break;\n case 6 : // Malo\n return 50;\n break;\n case 9 : // Golpe\n return 0;\n break;\n case 10 : // Rayon\n return 2;\n break;\n case 11 : // Reparacion Buena\n return 0;\n break;\n case 12 : // Reparacion Mala\n return 40;\n break;\n case 13 : // Sumido\n return 5;\n break;\n }\n }", "protected function setVida() {\n $this->vida = 200;\n }", "function __set($modelo, $valor)\n\t{\n\t\t$this->modelo = $modelo;\n\t}", "function __set($name, $value) {\r\n if ($name == 'mr') {\r\n $this->max_rating = intval($value);\r\n } else if ($name == 'st') {\r\n $this->step = intval($value);\r\n } else if ($name == 'vis') {\r\n $this->visible = $value == '1';\r\n } else if ($name == 'seq') {\r\n $this->sequence = intval($value);\r\n } else if ($name == 'cr') {\r\n $this->created = DateTime::createFromFormat('Y-m-d H:i:s', $value);\r\n } else if ($name == 'upd') {\r\n $this->updated = DateTime::createFromFormat('Y-m-d H:i:s', $value);\r\n } else if ($name == 'num') {\r\n $this->num_ratings = intval($value);\r\n } else if ($name == 'total') {\r\n $this->tot_ratings = floatval($value);\r\n }\r\n\r\n }", "public function setValue($value) {\n // Nevim jestli ma smysl definovat ty defaultni hodnoty jako atributy, pripadne v configu nebo vys\n $this->model->watermark_pos = arr::get($value, 'x', 0);\n// $this->model->watermark_y = arr::get($value, 'y', 0);\n $this->model->watermark_width = arr::get($value, 'width', 20);\n $this->model->watermark_opacity = arr::get($value, 'opacity', 50);\n \n // Nevolame parent::setValue($val), protoze tento prvek je virtuani (nevaze se primo na jeden atribut modelu)\n }", "public function setVoiture($voiture){\n $this->$voiture = $voiture;\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function setValue($bibtex_key, $p, $v) // {{{\n {\n $entry = $this->m_entries[$bibtex_key];\n $entry[$p] = $v;\n $entry[\"raw\"][$p] = $v;\n $this->m_entries[$bibtex_key] = $entry;\n }", "public function setProgress($p)\r\n {\r\n // 0.0 <= $p <= 1.0\r\n $this->progress = intval( $p * 100 );\r\n }", "public function setProyecto( $proyecto ){\n\t\t\t$this->proyecto= $proyecto;\n\t\t}", "protected function doSet($value)\n {\n }", "public function SetValue($value)\n\t{\n\t\t$this->value = $value;\n\t}", "public function setValue( $value ) { \n $this->inputValue = $value; \n $this->value = $value;\n }", "public function __set($atributo, $valor) {\n\t\t\t// $this->modelo = $valor;\n\t\t\t$this->$atributo = $valor;\n\t\t}", "public function setValue(array $arr){\r\n $this->_valores = $arr;\r\n }", "public function presetCamaraPresidencia($posicion) {\n\n self::$presidencia->preset($posicion);\n\n }", "public function set($parameter, $value);", "abstract public function set();", "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 setValue($m)\n\t{\n\t\t$this->value = $m;\n\t\treturn $this;\n\t}", "public function setValue($value) {\n $this->value = $value->value;\n }", "function PdfType(&$value) {\n $this->setValue($value);\n }", "public function setProducto($pro){ $this->producto = $pro;}", "public function __set($name, $value){\n switch ($name) {\n case '_patente':\n $this->_patente = $value;\n case '_marca':\n $this->_marca= $value;\n case '_color':\n $this->_color= $value;\n case '_precio':\n $this->_precio= $value;\n default:\n \"No se existe la varible\";\n break;\n }\n $this->$name = $value;\n }", "public function __set($param, $value);", "public function setVal($val){\n\t\t\t$this->_val = $val;\n\t\t}", "public function setPrecio($precio)\n {\n $this->precio = $this->db->real_escape_string($precio);\n\n return $this;\n }", "public function setR($r) {}", "public function set($data);", "public function setValue($value, $load = false);", "public function setValor($valor)\n {\n $this->valor = $valor;\n }", "public function __SET($att, $valor){\r\n $this->$att = $valor;\r\n}", "public function __set($propiedad, $valor)\n {\n if (property_exists(get_class(), $propiedad)) {\n $this->datos($propiedad) = $valor;\n }\n }", "public function __set($varible, $value) {\n\t\t$this->$varible = $value;\n\t}", "public function set_value($value) {\n\t\t$this->_value = $value + 0;\n\t}", "public function set($value = null);", "public function __set($param, $value)\n\t{\n\t\tswitch($param)\n\t\t{\n\t\t\tcase 'type':\n\t\t\t\tif(in_array($type, array('data', 'xref') ) )\n\t\t\t\t\t$this->type = $type;\n\t\t\t\tbreak;\n\t\t\tcase 'caption':\n\t\t\tcase 'class':\n\t\t\tcase 'id':\n\t\t\tcase 'xref_x':\n\t\t\t\tif(is_string($value))\n\t\t\t\t\t$this->$param = $value;\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function __SET($attr, $value){ //Establece valor y atributo\n\n\t\t\t$this->$attr=$value;\n\t\t}", "function setValue( $value )\r\n {\r\n $newValue = number_format( $value, 4, \".\", \"\" );\r\n $value = (double) $newValue;\r\n $this->Value = $value;\r\n }", "public function setValue( $value )\r\n\t{\r\n\t\t$this->value = $value;\r\n\t}", "public function setValue($value)\n {\n $r = $value['r'] / 255;\n $g = $value['g'] / 255;\n $b = $value['b'] / 255;\n\n $this->out = sprintf($this->format, $r, $g, $b, $value['t']);\n }", "function setValue(int $field, $value) : void;", "function setReal($real) {/*{{{*/\n $this->real = floatval($real);\n }", "public function set_value( $value ) {\n $this->value = $value;\n }", "function setNum($num)\n {\n $this->num = $num;\n }", "public function set(Note $note, $input, $data = []);", "public function setSequenceValue() { $args = func_get_args(); return $this->__call(__FUNCTION__, $args); }", "public function setPaper($value)\n {\n $this->paper = $value;\n }", "protected function setFieldValue ($field) {\n if ($this->$field instanceof Newforms_File)\n $this->$field->setValue('');\n if (!$this->__bound) return;\n if (is_array($this->__Data)) {\n if (isset($this->__Data[$field])) {\n $this->$field->setValue ($this->__Data[$field]);\n return;\n }\n return;\n }\n if (is_object ($this->__Data)) {\n if (isset($this->__Data->$field)) {\n $this->$field->setValue ($this->__Data->$field);\n return;\n }\n return;\n }\n }", "abstract public function set($in): void;", "public function setRawValue($value) {\n\n $this->rawValue = $value;\n }" ]
[ "0.5823458", "0.580693", "0.56758004", "0.5567571", "0.55591804", "0.55098236", "0.54930294", "0.54618573", "0.5432783", "0.5408748", "0.5408748", "0.5402365", "0.5402365", "0.5402365", "0.5402365", "0.5402365", "0.5402365", "0.5402365", "0.5402365", "0.5402365", "0.5402365", "0.5402365", "0.5402195", "0.5402195", "0.53601414", "0.5334252", "0.53324246", "0.5332233", "0.5323217", "0.5323217", "0.5323217", "0.5323217", "0.5323217", "0.5323217", "0.5323217", "0.5323217", "0.5323217", "0.5323217", "0.5275804", "0.52672875", "0.52608204", "0.52361226", "0.523421", "0.522151", "0.52103037", "0.5182334", "0.51761395", "0.51593405", "0.51507366", "0.51483494", "0.51482975", "0.5143234", "0.5141124", "0.5117929", "0.5107706", "0.5089007", "0.50859934", "0.507273", "0.50693846", "0.5067789", "0.5062757", "0.50534886", "0.5051822", "0.50435275", "0.50388366", "0.50330955", "0.5029484", "0.5027409", "0.5021204", "0.5018595", "0.501249", "0.50108665", "0.49865094", "0.49855852", "0.4985046", "0.4978887", "0.4978331", "0.49755853", "0.49678344", "0.49642286", "0.49622834", "0.49618948", "0.49573302", "0.49517703", "0.49497223", "0.49480343", "0.4943069", "0.49421287", "0.49210164", "0.4920497", "0.49197438", "0.49167833", "0.49110234", "0.49091807", "0.49061632", "0.49027193", "0.49016356" ]
0.5182095
49
Get the value of Cantidad
public function getCantidad() { return $this->cantidad; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCantidad()\n {\n return $this->Cantidad;\n }", "public function getCidade(){\n return $this->cidade;\n }", "public function getCantidad()\r\n {\r\n return $this->Cantidad;\r\n }", "public function getCantidad(){\n\t\t return $this->cantidad;\n\t\t }", "function getcantidad(){\n\t\treturn $this->cantidad;\n\t}", "public function getCantidad()\n {\n return $this->cantidad;\n }", "public function getValoracion() {\n return $this->valoracion;\n }", "public function getVarComentario()\n {\n return $this->varComentario;\n }", "function getCantidad()\n {\n if (!isset($this->icantidad) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->icantidad;\n }", "function getCantidad()\n {\n if (!isset($this->icantidad) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->icantidad;\n }", "public function getDataCriacao()\n {\n return $this->data_criacao;\n }", "public function val_cantidad($cantida){\n if($cantida!=0){\n switch($cantida){\n case 1:\n return \"1\";\n break;\n case 2 :\n return \"2\"; \n break;\n case 3:\n return \"3\";\n break;\n case 4:\n return \"4\";\n break;\n }\n }else{\n return false;\n }\n }", "public function getDIRECCIONC()\r\n {\r\n return $this->DIRECCIONC;\r\n }", "public function getValor(){\n return $this->_data['valor'];\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getMontacargasC()\n {\n\n return $this->montacargas_c;\n }", "public function getCodcaj(){\n\t\treturn $this->codcaj;\n\t}", "public function getCiudad()\n {\n return $this->ciudad;\n }", "function getDatosCantidad()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'cantidad'));\n $oDatosCampo->setEtiqueta(_(\"cantidad\"));\n return $oDatosCampo;\n }", "public function getCilindrada()\n {\n return $this->cilindrada;\n }", "public function getConta() {\n return $this->conta;\n }", "public function getCesta()\n {\n return $this->cesta;\n }", "public function getCesta()\n {\n return $this->cesta;\n }", "public function getComentario()\n {\n return $this->comentario;\n }", "public function getId_ciudad()\n {\n return $this->id_ciudad;\n }", "public function getIdcotizacion(){\n return $this->idcotizacion;\n }", "public function getCarrera() {\n return $this->carrera;\n }", "function getDatosCantidad()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'cantidad'));\n $oDatosCampo->setEtiqueta(_(\"cantidad\"));\n return $oDatosCampo;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValor()\n {\n return $this->valor;\n }", "public function getValorDiaria()\n {\n return $this->valorDiaria;\n }", "public function getMontoCuota()\n {\n return $this->monto_cuota;\n }", "public function getComentario()\n {\n return $this->comentario;\n }", "public function getCriacao()\n {\n return $this->criacao;\n }", "function getCantidadPaises(){\n\t\treturn $this->cantidad_paises;\n\t}", "public function getCedente() {\n return $this->oCedente;\n }", "public function get_valor() {\n\t\t\n\t\t$dato = self::get_dato();\n\t\t/*\n\t\t$separator = ' , ';\n\t\tif($this->modo=='list') $separator = '<br>';\n\n\t\tif (is_array($valor)) {\n\t\t\t# return \"Not string value\";\n\t\t\t$string \t= '';\n\t\t\t$n \t\t\t= count($valor);\n\t\t\tforeach ($valor as $key => $value) {\n\n\t\t\t\tif(is_array($value)) $value = print_r($value,true);\n\t\t\t\t$string .= \"$key : $value\".$separator;\n\t\t\t}\n\t\t\t$string = substr($string, 0,-4);\n\t\t\treturn $string;\n\n\t\t}else{\n\t\t\t\n\t\t\treturn $valor;\n\t\t}\n\t\t*/\n\t\tif(isset($dato['counter'])) {\n\t\t\t$valor = $this->tipo.'-'.$dato['counter'];\n\t\t}else{\n\t\t\t$valor = $this->tipo;\n\t\t}\n\n\t\treturn $valor;\n\t}", "function getId_carrera(){\n\t\treturn $this->id_carrera;\n\t}", "public function getCoMantenimiento()\n\t{\n\t\treturn $this->co_mantenimiento;\n\t}", "public function citas_tatalCitas(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idAgendaCita) as cantidadCitas from tb_agendaCitas \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadCitas'];\t\t\t\n\t\t\t\n\t\t\t\n }", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getCODValue(){ \n $query = \"SELECT * FROM tbl_payment WHERE id ='3'\"; // id = 3 for Check Cash on delivery\n $result = $this->db->select($query);\n return $result;\n }", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getStatutCadre() {\n return $this->statutCadre;\n }", "public function obtenerValor() {\n return $this->valor;\n }", "public function getCoCiudad()\n\t{\n\t\treturn $this->co_ciudad;\n\t}", "public function getCodare(){\n\t\treturn $this->codare;\n\t}", "public function getCidadeId() {\r\n return $this->cidadeId;\r\n }", "public function NuevoCapacidad() {\r\n\t$nuevo = \"SELECT co_capacidad FROM tr012_capacidad\r\n\t\tORDER BY co_capacidad DESC \r\n\t\tLIMIT 1;\";\r\n\t$c = $this->pdo->_query($nuevo);\r\n\t\r\n\t//if(is_object($this->pdo->monitor) && $this->pdo->monitor->notify_select)\r\n\t\t//$this->popNotify(); // Libera posicion reg_padre\r\n\t\t\t\r\n\treturn $c;\r\n }", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getValue();", "public function getCdCaixa()\n {\n return $this->cd_caixa;\n }", "public function buscarCantidad(){\n $this -> Conexion -> abrir();\n $this -> Conexion -> ejecutar( $this -> ProductoDAO -> buscarCantidad());\n $res = $this -> Conexion -> extraer();\n $this -> Conexion -> cerrar();\n return $res[0];\n }", "public static function getCiudad() {\n return ClienteDao::getCiudades();\n }", "public function buscarCantidad(){\n $this -> conexion -> abrir();\n $this -> conexion -> ejecutar( $this -> AdministradorDAO -> buscarCantidad());\n $res = $this -> conexion -> extraer();\n $this -> conexion -> cerrar();\n return $res[0];\n }", "public function getValorVenta()\n {\n return $this->valorVenta;\n }", "public function getValorCofins()\n {\n return $this->valorCofins;\n }", "public function getAgenciaConta();", "public function totalColecao(){\r\n $oSicasEspecialidadeMedicaBD = new SicasEspecialidadeMedicaBD();\r\n return $oSicasEspecialidadeMedicaBD->totalColecao();\r\n }" ]
[ "0.7493811", "0.73951733", "0.73616976", "0.72871464", "0.7258474", "0.6962389", "0.69622713", "0.69293445", "0.6883144", "0.6883144", "0.6851626", "0.6772305", "0.67597216", "0.6755466", "0.66542536", "0.66542536", "0.66496414", "0.6600946", "0.6598147", "0.6528917", "0.64938986", "0.6485817", "0.6481717", "0.6481717", "0.6466206", "0.64506066", "0.64459074", "0.64444506", "0.642954", "0.6417768", "0.6417768", "0.6415147", "0.6411397", "0.6406337", "0.63983184", "0.63685215", "0.636486", "0.63609916", "0.63565415", "0.63527024", "0.6352606", "0.63472956", "0.63472956", "0.63472956", "0.63472956", "0.63472956", "0.63472956", "0.63472956", "0.63472956", "0.63472956", "0.63472956", "0.63472956", "0.63472956", "0.63472956", "0.63472956", "0.6346684", "0.63465583", "0.63465583", "0.63465583", "0.63465583", "0.63465583", "0.633523", "0.63351935", "0.6332317", "0.6308913", "0.63066155", "0.62997764", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.62983996", "0.6286522", "0.6283794", "0.6274272", "0.6245409", "0.623894", "0.6236528", "0.62109727", "0.62032765" ]
0.6994612
8
Set the value of Cantidad
public function setCantidad($cantidad) { $this->cantidad = $cantidad; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCantidad($icantidad = '')\n {\n $this->icantidad = $icantidad;\n }", "function setCantidad($icantidad = '')\n {\n $this->icantidad = $icantidad;\n }", "public function setCantidad($cantidad){\n\t\t $this->cantidad = $cantidad;\n\t\t }", "public function setCantidad($cantidad)\n {\n $this->cantidad = $cantidad;\n }", "public function setCantidad($cantidad)\n {\n $this->cantidad = $cantidad;\n }", "public function setVida($valor){\n $this->vida=$valor;\n }", "protected function setVida() {\n $this->vida = 200;\n }", "public function setCantidad($Cantidad)\r\n {\r\n $this->Cantidad = $Cantidad;\r\n\r\n return $this;\r\n }", "public function setCodiCasa($value) {\n\t\t//validando de que el valor sea un id\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_casa = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t}\n\t}", "public function SetIdConvocatoria($valor){\n\t\t $this->id_convocatoria= $valor;\n\t }", "function setSumarPais(){\n\t\t$this->cantidad_paises++;\n\t}", "function setCiudad ($ciudad) {\r\n $this->cicudad = $ciudad;\r\n }", "function setCausaleEvasione($codice)\n {\n $this->cauEvasione = $codice; \n }", "public function setCantidad($cantidad)\n {\n return $this->cantidad=$cantidad;\n }", "public function testSetControleur() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setControleur(\"controleur\");\n $this->assertEquals(\"controleur\", $obj->getControleur());\n }", "public function testSetStatutCadre() {\n\n $obj = new AttestationCacm();\n\n $obj->setStatutCadre(true);\n $this->assertEquals(true, $obj->getStatutCadre());\n }", "public function setCantidad($cantidad)\n {\n $this->cantidad = $cantidad;\n\n return $this;\n }", "function setAgregarUnPais(){\n\t\t$this->comienza_con++;\n\t}", "public function cortesia()\n {\n $this->costo = 0;\n }", "public function set_cidade($cidade) : void\n {\n try {\n $this->cidade = Validador::Cidade()::validar_id($cidade);\n } catch (Exception $e) {\n $this->cidade = Validador::Cidade()::filtrar_id($cidade);\n }\n }", "public function setidExamen($Valor){\r\n $this->idExamen = trim($Valor);\r\n }", "public function setdia_semana($valor)\n {\n if (($valor <= 0) || ($valor > 7)) :\n echo \"Tentou atribuir {$valor} para dia da semana!\";\n die();\n endif;\n\n $this->data['dia_semana'] = $valor;\n }", "public function __construct($cantidad){\n\t\t $this->cantidad = $cantidad;\n\t\t }", "public function __construct(){\n $this->idade = 10;\n }", "public function setValorDiaria($valorDiaria)\n {\n $this->valorDiaria = $valorDiaria;\n\n \n\n }", "public function set_cidade(Cidade $object)\n {\n $this->cidade = $object;\n $this->cidade_id = $object->id;\n }", "public function testSetAutreContrat() {\n\n $obj = new AttestationCacm();\n\n $obj->setAutreContrat(\"autreContrat\");\n $this->assertEquals(\"autreContrat\", $obj->getAutreContrat());\n }", "public function setIdConteudo($value,$options=array('required'=>true)){ \n $this->_data['id_conteudo'] = new ZendT_Type_Number($value,array('numDecimal'=>null));\n if ($options['db'])\n $this->_data['id_conteudo']->setValueFromDb($value);\n \n if (!$options['db']){\n \n if ($options['required'])\n $this->isRequired($value,'id_conteudo');\n \n }\n return $this;\n }", "public function setValor($valor)\n {\n $this->valor = $valor;\n }", "public function testSetCodeChantier() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setCodeChantier(\"codeChantier\");\n $this->assertEquals(\"codeChantier\", $obj->getCodeChantier());\n }", "public function setIdusuario($value){\n $this->idusuario = $value;\n }", "public function setIdcotizacion($idcotizacion){\n $this->idcotizacion = $idcotizacion;\n }", "public function setId($valor){\n\t\t\t$this->id = $valor;\n\t\t}", "public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "public function setCodiEmis($value) {\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_emis = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t}\n\t}", "public function setCodiNoti($value) {\n\t\t//validando de que el valor sea un id\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_noti = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t}\n\t}", "public function set_view_contato_anunciante(View_Contato_Anunciante $view_contato_anunciante) : void\r\n {\r\n self::$view_contato_anunciante = $view_contato_anunciante;\r\n }", "public function setConta($conta) {\n $this->conta = $conta;\n }", "public function setEdad($valor){\n\t\t\t$this->edad = $valor;\n\t\t}", "public function setFechaCargueAttribute($value)\n {\n $string_date = ($value instanceof DateTime) ? $value->format('Y-m-d') : $value;\n $this->attributes['fecha_cargue'] = date('Y-m-d', strtotime($string_date === NULL ? '' : $string_date));\n }", "public function __set($atributo, $valor) {\n\t\t\t// $this->modelo = $valor;\n\t\t\t$this->$atributo = $valor;\n\t\t}", "function __set($modelo, $valor)\n\t{\n\t\t$this->modelo = $modelo;\n\t}", "public function __set($propriedade, $valor) {\n $this->data[$propriedade] = $valor;\n }", "public function setContenu(string $contenu): void\n {\n $this->contenu= $contenu;\n }", "function asignar_valores(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->cedula=$_POST['cedula'];\n\t\t$this->correo=$_POST['correo'];\n\t}", "public function testSetCodeChantier() {\n\n $obj = new ChantiersFrequencesControlesQualite();\n\n $obj->setCodeChantier(\"codeChantier\");\n $this->assertEquals(\"codeChantier\", $obj->getCodeChantier());\n }", "public function testSetTypeControle() {\n\n $obj = new ChantiersFrequencesControlesQualite();\n\n $obj->setTypeControle(\"typeControle\");\n $this->assertEquals(\"typeControle\", $obj->getTypeControle());\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function testSetAccesDossierCpta() {\n\n $obj = new Collaborateurs();\n\n $obj->setAccesDossierCpta(\"accesDossierCpta\");\n $this->assertEquals(\"accesDossierCpta\", $obj->getAccesDossierCpta());\n }", "public function testSetTypeControle() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setTypeControle(\"typeControle\");\n $this->assertEquals(\"typeControle\", $obj->getTypeControle());\n }", "public function actionSetCiudad()\r\n {\r\n require_once Yii::app()->basePath . '/extensions/booster/widgets/TbActiveForm.php';\r\n $ciudad = new ProgramaHasCiudad();\r\n $form = new TbActiveForm();\r\n $i = Yii::app()->request->getParam('i');\r\n $i++;\r\n\r\n Yii::app()->clientScript->scriptMap['jquery.js'] = false;\r\n Yii::app()->clientScript->scriptMap['jquery.min.js'] = false;\r\n header(\"Content-type: application/json\");\r\n echo CJSON::encode(array(\r\n 'div'=>$this->renderPartial('_ciudad',array('ciudad'=>$ciudad,'i'=>$i,'form'=>$form),true,true)\r\n ));\r\n exit;\r\n }", "public function __set($nome, $valor) {\n $this->dados[$nome] = $valor;\n }", "public function setDataCadastro($v)\n\t{\n\t\t$dt = PropelDateTime::newInstance($v, null, 'DateTime');\n\t\tif ($this->data_cadastro !== null || $dt !== null) {\n\t\t\t$currentDateAsString = ($this->data_cadastro !== null && $tmpDt = new DateTime($this->data_cadastro)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n\t\t\tif ($currentDateAsString !== $newDateAsString) {\n\t\t\t\t$this->data_cadastro = $newDateAsString;\n\t\t\t\t$this->modifiedColumns[] = UsuarioPeer::DATA_CADASTRO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "public function setC($x) { $this->c = $x; }", "public function setNuestroSonido( $comando ) {\n \n $this->nuestroSonido=$comando;\n $this->enviarNuestroSonido();\n $this->activarPantalla();\n //activar y enviar comando\n }", "public function __set($propiedad, $valor)\n {\n if (property_exists(get_class(), $propiedad)) {\n $this->datos($propiedad) = $valor;\n }\n }", "public function setValorAttribute($value)\n {\n $this->attributes['valor'] = str_replace(\",\", \".\", str_replace(\".\", \"\", $value));\n }", "public function __set($nombre,$valor){\n $class = get_class($this);\n $nombre = strtolower($nombre); // se ponen los nombres en mayusculas ya que en la base de datos estan asi y estan en minusculas no funcionan las consultas\n if(property_exists($class,$nombre)){\n $this->$nombre = $valor; // le asignas al campo de igual nombre en la BD el valor pasado por parametro.\n }\n }", "private function modificarCita(){\n $query = \"UPDATE \" . $this->table . \" SET PacienteId ='\" . $this->idpaciente . \"',Fecha = '\" . $this->fecha . \"', HoraInicio = '\" . $this->horarioIn . \"', HoraFin = '\" .\n $this->horarioFn . \"', Motivo = '\" . $this->motivo . \"' WHERE CitaId = '\" . $this->idcita . \"'\"; \n $resp = parent::nonQuery($query);\n if($resp >= 1){\n return $resp;\n }else{\n return 0;\n }\n }", "public function setAcciNoti($value) {\n\t\t//validando de que el valor sea alfabetico y que sea mayor a uno y menor a cien\n\t\tif ($this->validateAlphanumeric($value, 1, 400)) {\n\t\t\t//seteando valor a la variable de nombre de categoria\n\t\t\t$this->acci_noti = $value;\n\t\t\t//retornando respuesta true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornando respuesta false\n\t\t\treturn false;\n\t\t}\n\t}", "public function testSetFicheContradictoire() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setFicheContradictoire(true);\n $this->assertEquals(true, $obj->getFicheContradictoire());\n }", "public function testSetStatutJuridique() {\n\n $obj = new AttestationCacm();\n\n $obj->setStatutJuridique(\"statutJuridique\");\n $this->assertEquals(\"statutJuridique\", $obj->getStatutJuridique());\n }", "function set_cc($direcciones = array())\n\t{\n\t\t$this->cc = $direcciones;\n\t}", "public function setValue($valor)\n {\n $this->_value = $valor;\n return $this;\n }", "public function setFechaNacimientoAttribute($value)\n {\n if(!empty($value))\n {\n $this->attributes['fecha_nacimiento'] = date_format(date_create(substr($value, 3, 2) . '/' . substr($value, 0, 2) . '/' . substr($value, 6, 4)), 'Y-m-d');\n }\n }", "public function setDados($d){\n\t\t$this->dados = $d;\n\t}", "function getCantidad()\n {\n return $this->Cantidad;\n }", "public function setTipo(string $tipo)\n {\n if (!is_null($this->tipo)) {\n return;\n }\n\n switch ($tipo) {\n case 'cc':\n $this->saldo = 20;\n break;\n case 'cp':\n $this->saldo = 70;\n break;\n default:\n die('<h3>Tipo de Conta inválida! Insira somente cc ou cp!</h3>');\n }\n\n $this->tipo = $tipo;\n }", "public function testSetNumeroAttestation() {\n\n $obj = new AttestationCacm();\n\n $obj->setNumeroAttestation(\"numeroAttestation\");\n $this->assertEquals(\"numeroAttestation\", $obj->getNumeroAttestation());\n }", "public function setCodare($codare){\n\t\t$this->codare = $codare;\n\t}", "public function setCodice($codice) \n\t{\n $this->codice = $codice;\n }", "public function setcedulaPaciente($value){\n\n\t\t$this->_cedulaPaciente = $value;\n\t}", "public function set_id_clases($value = \"\"){ \n $this->_id_clases= \\helpers\\Validator::valInt('f_id_clases',$value,TRUE);\n}", "public function __set($nome, $valor) {\n $this->nome = $valor;\n }", "public function setDiaBaja($data)\n {\n\n if ($data == '0000-00-00 00:00:00') {\n $data = null;\n }\n\n if ($data === 'CURRENT_TIMESTAMP') {\n $data = \\Zend_Date::now()->setTimezone('UTC');\n }\n\n if ($data instanceof \\Zend_Date) {\n\n $data = new \\DateTime($data->toString('yyyy-MM-dd HH:mm:ss'), new \\DateTimeZone($data->getTimezone()));\n\n } elseif (!is_null($data) && !$data instanceof \\DateTime) {\n\n $data = new \\DateTime($data, new \\DateTimeZone('UTC'));\n }\n\n if ($data instanceof \\DateTime && $data->getTimezone()->getName() != 'UTC') {\n\n $data->setTimezone(new \\DateTimeZone('UTC'));\n }\n\n\n if ($this->_diaBaja != $data) {\n $this->_logChange('diaBaja');\n }\n\n\n $this->_diaBaja = $data;\n return $this;\n }", "public function testSetTypeContrat() {\n\n $obj = new AttestationCacm();\n\n $obj->setTypeContrat(10);\n $this->assertEquals(10, $obj->getTypeContrat());\n }", "function setSorpresa($_caja){\r\n $this->sorpresa=$_caja;\r\n }", "function setRestarPais(){\n\t\t$this->cantidad_paises--;\n\t}", "public function setDataCalculo($dtDataCalculo) {\n $this->dtDataCalculo = $dtDataCalculo;\n }", "public function set_data($id_producto,$proveedores_id_proveedor,$categoria_id_Categoria,$nom_producto,$pre_producto,$can_producto)\n {\n $this->id_producto=$id_producto;\n $this->proveedores_id_proveedor=$proveedores_id_proveedor;\n $this->categoria_id_Categoria=$categoria_id_Categoria;\n $this->nom_producto=$nom_producto;\n $this->pre_producto=$pre_producto;\n $this->can_producto=$can_producto;\n }", "public function getCidade(){\n return $this->cidade;\n }", "public function testSetCleCcnPaie() {\n\n $obj = new Collaborateurs();\n\n $obj->setCleCcnPaie(\"cleCcnPaie\");\n $this->assertEquals(\"cleCcnPaie\", $obj->getCleCcnPaie());\n }", "public function getCantidad()\r\n {\r\n return $this->Cantidad;\r\n }", "public function testSetDernierEmploi() {\n\n $obj = new AttestationCacm();\n\n $obj->setDernierEmploi(\"dernierEmploi\");\n $this->assertEquals(\"dernierEmploi\", $obj->getDernierEmploi());\n }", "public function setIdTipoDonacion($idTipoDonacion){\n $this->idTipoDonacion = $idTipoDonacion;\n }", "function evt__form_asignacion__agregar_catedra (){\n $this->s__datos_form_asignacion=$this->dep('form_asignacion')->get_datos();\n $this->set_pantalla('pant_catedra');\n }", "public function testSetAnnulationDossierCpta() {\n\n $obj = new Collaborateurs();\n\n $obj->setAnnulationDossierCpta(true);\n $this->assertEquals(true, $obj->getAnnulationDossierCpta());\n }", "public function set_correlativo( $param )\n {\n #uniendo con el detalle de venta\n $corr = 0;\n $data_update = array();\n switch ($param['tipo']) {\n case 'F':\n $data_update['correlativo_factura'] = $param['corr'];\n break;\n case 'B':\n $data_update['correlativo_boleta'] = $param['corr'];\n break;\n }\n DB::table('config')\n ->where('id', 1)\n ->update( $data_update );\n #\n }", "public function testSetCodeVentilCompta() {\n\n $obj = new Collaborateurs();\n\n $obj->setCodeVentilCompta(\"codeVentilCompta\");\n $this->assertEquals(\"codeVentilCompta\", $obj->getCodeVentilCompta());\n }", "function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}", "public function setNumero_chambre($numero_chambre)\n{\n$this->numero_chambre = $numero_chambre;\n\nreturn $this;\n}", "public function setIdcontenu($idcontenu)\n {\n if(is_numeric($idcontenu)) {\n $this->idcontenu = (int)$idcontenu;\n }\n }", "public function set_id_poblacion($value = \"\"){ \n $this->_id_poblacion= \\helpers\\Validator::valInt('f_id_poblacion',$value,TRUE);\n}", "public function setCodigo($codigo){\n $this->codigo = $codigo;\n }", "function setValSubNode($nombre,$valor){\n\t\t$clase=$this->nmclass;\n\t\t$this->nodos[$clase][$nombre]=$valor;\n\t\t$this->anode=$nombre;\n\t\treturn 0;\n\t}", "public function setCot_estado($cot_estado){\n $this->cot_estado = $cot_estado;\n }", "function setFecha($fecha) {\r\n $this->fecha = $fecha;\r\n }", "function asignar_valores3(){\n\t\t//$this->ciudad=$_SESSION['ciudad_admin'];\n\t\t\n\t\t$this->id=$_POST['id'];\n\t\t$this->temporada=$_POST['temporada'];\n\t\t$this->nombre=$_POST['nombre_plan'];\n\t\t$this->descripcion=$_POST['descripcion_plan'];\n\t\t$this->precio=$_POST['precio_plan'];\n\t\t$this->maxadultos=$_POST['maxadultos'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->mostrar=$_POST['publica'];\n\t\t\n\t}", "public function setDataContratacao($v)\n\t{\n\t\t$dt = PropelDateTime::newInstance($v, null, 'DateTime');\n\t\tif ($this->data_contratacao !== null || $dt !== null) {\n\t\t\t$currentDateAsString = ($this->data_contratacao !== null && $tmpDt = new DateTime($this->data_contratacao)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newDateAsString = $dt ? $dt->format('Y-m-d') : null;\n\t\t\tif ($currentDateAsString !== $newDateAsString) {\n\t\t\t\t$this->data_contratacao = $newDateAsString;\n\t\t\t\t$this->modifiedColumns[] = UsuarioPeer::DATA_CONTRATACAO;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}" ]
[ "0.7306208", "0.7306208", "0.706701", "0.6663815", "0.6663815", "0.66040075", "0.64426047", "0.63816583", "0.63794875", "0.6253348", "0.6194119", "0.61898607", "0.61820066", "0.61036086", "0.608466", "0.60560066", "0.6045989", "0.6044943", "0.60346544", "0.603212", "0.59679437", "0.5957391", "0.59561765", "0.5948921", "0.59417516", "0.59314805", "0.58890027", "0.58801854", "0.5869095", "0.58552265", "0.58138555", "0.58121824", "0.5807423", "0.57986575", "0.579254", "0.5780816", "0.57792914", "0.5771922", "0.57712287", "0.57522446", "0.5736077", "0.57356197", "0.57329005", "0.5729605", "0.5713175", "0.5711372", "0.5709122", "0.5698457", "0.56812596", "0.5677753", "0.5676406", "0.5650577", "0.56503254", "0.5632398", "0.5614258", "0.56100297", "0.5607857", "0.55945116", "0.5574664", "0.5567743", "0.5564613", "0.55326986", "0.55314404", "0.5529564", "0.55260473", "0.55232906", "0.5514161", "0.5505296", "0.55044204", "0.54938453", "0.54927933", "0.5492251", "0.5486777", "0.54865134", "0.54729205", "0.5471647", "0.54677016", "0.54668236", "0.54664004", "0.5464179", "0.5460998", "0.5454664", "0.5453537", "0.54521304", "0.5448763", "0.54352975", "0.542683", "0.5420349", "0.5415141", "0.5408934", "0.5406393", "0.54048485", "0.5404039", "0.5401378", "0.54003644", "0.53904146", "0.5389909", "0.53854185", "0.53828996" ]
0.572791
45
Gets the transaction_history (and agent first/last name) for a single transaction
public function getHistory($transaction_id) { $query = "SELECT h.*, a.name_last, a.name_first FROM transaction_history h JOIN agent a on a.agent_id = h.agent_id WHERE h.transaction_id = ? ORDER BY h.date_created DESC"; $result = DB_Util_1::queryPrepared( $this->db, $query, array( $transaction_id, ) ); return $result->fetchAll(PDO::FETCH_OBJ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getCallsLogByTransaction($transaction_id) {\r\r\n $criteria = new CDbCriteria;\r\r\n $criteria->compare('t.transaction_id', $transaction_id);\r\r\n $criteria->compare('t.status', STATUS_ACTIVE);\r\r\n $criteria->order = 'date ASC';\r\r\n\r\r\n $models = self::model()->findAll($criteria);\r\r\n if ($models) {\r\r\n return $models;\r\r\n }\r\r\n return;\r\r\n }", "public function getTransactions();", "public function getTransactionDetails(array &$transaction) {\n\t\t$transactionIds = $this->find('transactions', array(\n\t\t\t'transaction_id' => Hash::extract($transaction['orders'], '{n}.transaction_id')\n\t\t));\n\t\tif (empty($transactionIds)) {\n\t\t\treturn;\n\t\t}\n\t\t$transactionIds = array_flip($transactionIds);\n\t\tforeach ($transaction['orders'] as &$order) {\n\t\t\t$order['infinitas_payment_log_id'] = $transactionIds[$order['transaction_id']];\n\t\t}\n\t}", "function getAllTransactions()\n {\n $transactions = $this->all();\n\n /* Add additional attributes to each Stock */\n foreach ($transactions as $transaction)\n {\n // Add a link to each stock's history page\n $transaction->href = '/transaction/' . $transaction->DateTime;\n }\n\n return $transactions;\n }", "public function getTransactionInfos() {\n return $this->transactionInfos;\n }", "public function getTransaction();", "abstract protected function getTransactions();", "public function getTransactions()\r\n {\r\n return $this->transactions;\r\n }", "public function getTransactions()\r\n {\r\n return $this->transactions;\r\n }", "public function getTransactions()\r\n {\r\n return $this->transactions;\r\n }", "public function getTransactions()\n {\n return $this->transactions;\n }", "public function getTransactions()\n\t{\n\t\treturn $this->data['transactions'];\n\t}", "public function getMyTransactionHistory($patron, $params)\n {\n $pageSize = $params['limit'] ?? 50;\n $offset = isset($params['page']) ? ($params['page'] - 1) * $pageSize : 0;\n $sortOrder = isset($params['sort']) && 'checkout asc' === $params['sort']\n ? 'asc' : 'desc';\n $result = $this->makeRequest(\n ['v3', 'patrons', $patron['id'], 'checkouts', 'history'],\n [\n 'limit' => $pageSize,\n 'offset' => $offset,\n 'sortField' => 'outDate',\n 'sortOrder' => $sortOrder,\n 'fields' => 'item,outDate'\n ],\n 'GET',\n $patron\n );\n if (isset($result['code'])) {\n return [\n 'success' => false,\n 'status' => 146 === $result['code']\n ? 'ils_transaction_history_disabled'\n : 'ils_connection_failed'\n ];\n }\n $transactions = [];\n foreach ($result['entries'] as $entry) {\n $transaction = [\n 'id' => '',\n 'item_id' => $this->extractId($entry['item']),\n 'checkoutDate' => $this->dateConverter->convertToDisplayDate(\n 'Y-m-d', $entry['outDate']\n )\n ];\n // Fetch item information\n $item = $this->makeRequest(\n ['v3', 'items', $transaction['item_id']],\n ['fields' => 'bibIds,varFields'],\n 'GET',\n $patron\n );\n $transaction['volume'] = $this->extractVolume($item);\n if (!empty($item['bibIds'])) {\n $transaction['id'] = $item['bibIds'][0];\n\n // Fetch bib information\n $bib = $this->getBibRecord(\n $transaction['id'], 'title,publishYear', $patron\n );\n if (!empty($bib['title'])) {\n $transaction['title'] = $bib['title'];\n }\n if (!empty($bib['publishYear'])) {\n $transaction['publication_year'] = $bib['publishYear'];\n }\n }\n $transactions[] = $transaction;\n }\n\n return [\n 'count' => $result['total'] ?? 0,\n 'transactions' => $transactions\n ];\n }", "public function getTransactions() {\n\t\treturn $this->transactions;\n\t}", "public function getTransactionByHistory($query)\n {\n $granularity = $this->getGranularity($query['startDate'], $query['endDate']);\n if($granularity == 'month') {\n $dateQuery = 'to_char(orders.created_at, \\'YYYY-MM\\') as date';\n $dateGroupBy = array('date');\n $dateOrder = 'date asc';\n } else if($granularity == 'day') {\n $dateQuery = 'to_char(orders.created_at, \\'YYYY-MM-DD\\') as date';\n $dateGroupBy = array('date');\n $dateOrder = 'date asc';\n }\n\n DB::enableQueryLog();\n // execute\n $transaction = DB::connection('virtual_market')\n ->table('orders')\n ->join('order_statuses', 'orders.order_status', '=', 'order_statuses.id')\n ->select(DB::raw($query['aggregate'].'as value, count(*),'.$dateQuery))\n ->where('orders.created_at', '>=', $query['startDate'])\n ->where('orders.created_at', '<=', $query['endDate'])\n ->where('status', '=', $this->successStatus)\n ->whereIn('order_statuses.name', [$this->successName])\n ->groupBy($dateGroupBy)\n ->orderByRaw($dateOrder)\n // ->toSql();\n ->get();\n // dd ($data);\n\n $data = array();\n $data['granularity'] = $granularity;\n $data['transaction'] = $transaction;\n $status = $this->setStatus();\n\n return response()->json([\n 'status' => $status,\n 'data' => $data\n ]);\n }", "public function getTransactionByHistory($query)\n {\n $granularity = $this->getGranularity($query['startDate'], $query['endDate']);\n if($granularity == 'month') {\n $dateQuery = 'to_char(orderlines.created_at, \\'YYYY-MM\\') as date';\n $dateGroupBy = array('date');\n $dateOrder = 'date asc';\n } else if($granularity == 'day') {\n $dateQuery = 'to_char(orderlines.created_at, \\'YYYY-MM-DD\\') as date';\n $dateGroupBy = array('date');\n $dateOrder = 'date asc';\n }\n\n DB::enableQueryLog();\n // execute\n $transaction = DB::connection('marketplace')\n ->table('orderlines')\n ->join('orderline_statuses','orderlines.orderline_status_id','orderline_statuses.id')\n ->select(DB::raw($query['aggregate'].'as value, count(*),'.$dateQuery))\n ->where('orderlines.created_at', '>=', $query['startDate'])\n ->where('orderlines.created_at', '<=', $query['endDate'])\n ->where('orderline_statuses.name', '=', $this->successStatus)\n ->groupBy($dateGroupBy)\n ->orderByRaw($dateOrder)\n // ->toSql();\n ->get();\n // dd ($data);\n\n $data = array();\n $data['granularity'] = $granularity;\n $data['transaction'] = $transaction;\n $status = $this->setStatus();\n\n return response()->json([\n 'status' => $status,\n 'data' => $data\n ]);\n }", "public function getAccountTransactionHistory($accountNumber) {\n $stmt = $this->conn->stmt_init ();\n $stmt->prepare ( \"call getAccountTransactionHistory (?)\" );\n $stmt->bind_param ( 's', $accountNumber );\n $stmt->execute ();\n \n return $stmt->get_result ();\n }", "public function getAll()\n {\n return $this->transactions;\n }", "public function gettransaction($transaction){\n return $this->bitcoin->gettransaction($transaction);\n }", "public function get_transaction_backtrace() {\n\t\tif (!$this->debug_enabled) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn isset($this->debug_log['transactions']) ? $this->debug_log['transactions'] : [];\n\t}", "public function transaction()\n {\n return $this->hasMany(Transaction::class, 'transaction_detailID');\n }", "public function getPaymentHistory(){\r\n\t\t$result = array();\r\n\t\treturn $result;\r\n\t}", "public static function getTransaction()\n {\n $query = new Query;\n return $query->select([ 'c.*', 'u.username', 'u.email','t.transaction_id', 't.transaction_amount',\n 't.payment_date as tn_payment_date'])\n ->from('contest as c')\n ->LeftJoin('transaction_details as t', 't.contest_id=c.id')\n ->LeftJoin('user as u', 'u.id=c.user_id')\n ->orderBy(['t.payment_date' => SORT_DESC]); \n }", "public function transaction()\n {\n return $this->hasMany('App\\Transaction');\n }", "public function transactions()\n {\n return $this->hasMany(Transaction::class);\n }", "public function transactions()\n {\n return $this->hasMany(Transaction::class);\n }", "public function transactionDetails()\n {\n return $this->hasMany(TransactionDetail::class);\n }", "function get_history() {\n\t\treturn $this->history;\n\t}", "public function getTransactionLog()\n {\n if($this->transactionLog==null)\n {\n $this->transactionLog = new TransactionLog();\n }\n return $this->transactionLog;\n }", "public function getTransaction($txid);", "public function transactions()\n {\n return $this->hasMany(Transaction::class, $this->getForeignKey());\n }", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getTransaction()\n {\n return $this->transaction;\n }", "public function getLogHistory() {\n\t\treturn $this->log;\n\t}", "public function transactions()\n {\n return $this->hasManyThrough('App\\Transaction', 'App\\Individual',\n 'sacco_id', // Foreign key on Individuals table...\n 'individual_id', // Foreign key on Transactions table...\n 'id', // Local key on saccos table...\n 'id' // Local key on Individuals table...\n );\n }", "public function getTransaction()\r\n\t{\r\n\t\treturn $this->transaction;\r\n\t}", "public function traderHistory (Trader $trader)\n {\n // get days we pended on\n $historyCount = DB::table(static function ($query) use ($trader) {\n $query->selectRaw(\"SUBSTR(`voucher_states`.`created_at`, 1, 10) as pendedOn\")\n ->from('vouchers')\n // use inner join\n ->join('voucher_states', 'vouchers.id', 'voucher_states.voucher_id')\n ->where('voucher_states.to', 'payment_pending')\n ->where('vouchers.trader_id', $trader->id)\n // cut down the recorded\n ->where('vouchers.currentstate', '!=', 'recorded')\n ->groupBy('pendedOn')\n ->orderByDesc('pendedOn');\n }, 'daysFromQuery')\n ->select('pendedOn')\n ->paginate()\n ->toArray();\n\n // if there are any, make a query\n if ($historyCount[\"total\"] === 0) {\n $history = [];\n } else {\n // get the first and last dates from that.\n $toDate = Arr::first($historyCount[\"data\"])->pendedOn . ' 23:59:59';\n $fromDate = Arr::last($historyCount[\"data\"])->pendedOn . ' 00:00:00';\n// $toDate = $historyCount->items()->first()->pendedOn . ' 23:59:59';\n// $fromDate = $historyCount->lastItem()->pendedOn . ' 00:00:00';\n\n // get histories between those dates.\n $histories = TraderController::paymentHistoryBetweenDateTimes($trader, $fromDate, $toDate)->all();\n\n // process the data into an array\n $history = TraderController::historyGroupByDate($histories);\n \n }\n\n $paginate = function($items, $perPage = 25, $page = null){\n $page = $page ?: (Paginator::resolveCurrentPage() ?: 1);\n $total = count($items);\n $currentpage = $page;\n $offset = ($currentpage * $perPage) - $perPage ;\n $itemstoshow = array_slice($items , $offset , $perPage);\n return new LengthAwarePaginator($itemstoshow ,$total ,$perPage);\n };\n\n $history = $paginate($history,25,null,$trader)->withPath(route('admin.trader-payment-history.show', ['trader' => $trader->id ]) );\n\n return view('service.payments.paymentHistory', compact( 'history'));\n }", "private function getTransactions()\n {\n //====================================================================//\n // Load All Transactions on this Order\n /** @var Transaction $model */\n $model = Mage::getModel('sales/order_payment_transaction');\n\n return $model->getCollection()\n ->setOrderFilter($this->payment->getOrder())\n ->addPaymentIdFilter($this->payment->getId())\n ->setOrder('transaction_id', Varien_Data_Collection::SORT_ORDER_ASC);\n }", "public function tradinghistory()\n {\n\n return view('user.thistory')\n ->with(array(\n\n 't_history' => tp_transactions::where('user', Auth::user()->id)\n ->where('type', 'ROI')\n ->orderBy('id', 'desc')\n ->get(),\n 'title' => 'Trading History',\n 'settings' => settings::where('id', '=', '1')->first(),\n ));\n }", "public function getHistory()\r\r\n {\r\r\n return $this->history;\r\r\n }", "public function getHistory()\n {\n return $this->history;\n }", "public function transactions()\n {\n return $this->hasMany(Transaction::class, $this->getForeignKey())->orderBy('created_at', 'desc');\n }", "public function transactions()\n {\n \treturn $this->hasMany('App\\Transaction');\n }", "public function history()\n {\n return $this->hasMany('App\\legalEntityHistory','legal_entity_id','id');\n }", "public function getActiveTransactions()\n\t{\n\t\treturn $this->active_transactions;\n\t}", "public function getTransaction(): Transaction\n {\n return $this->transaction;\n }", "public function getTransaction(): Transaction\n {\n return $this->transaction;\n }", "public static function transaction($transactionId) {\n //Get information on a single transaction\n\t\t\treturn self::get(self::transaction_index() . $transactionId);\n\t\t}", "public function getHistory(): array\n {\n return $this->history;\n }", "public function getHistory(): array\n {\n return $this->history;\n }", "public function getRecipeHistory()\n {\n $recipe_ids = $this->getAttribute('recipe_history', array());\n return RecipePeer::retrieveByPKs($recipe_ids);\n }", "public function all($transactionToken = null)\n {\n $append = '';\n\n if ($transactionToken) {\n $append = '?since_token='.$transactionToken;\n }\n\n return $this->client->get('v1/transactions.json'.$append);\n }", "public function getTransactionRecord()\n {\n return $this->transactionRecord;\n }", "public function getTransfers()\n {\n return Wrapper\\Player\\Senior::transfershistory($this->getId());\n }", "public function getHistory()\n\t{\n\t\t$log = $this->getLog();\n\t\t$history = array($this->initial);\n\t\t/* if our log is empty (or incorrect), then we cannot walk it at all */\n\t\tif (!isset($log[$this->initial]))\n\t\t\treturn $history;\n\t\t$next = $log[$this->initial]->next_action_id;\n\t\t/* log always has the latest entry,\n\t\t\t so build it walking to the next item,\n\t\t\t starting from the initial step */\n\t\twhile (!is_null($next)) {\n\t\t\t$history[] = $next;\n\t\t\tif (isset($log[$next])) {\n\t\t\t\t$next = $log[$next]->next_action_id;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $history;\n\t}", "public function getHistory()\n {\n return $this->_history;\n }", "public static function allTransactionHistory($limit, $offset, $sort, $order, $searchByUser, $searchByTransactionID, $searchByTransactionStatus, $searchByTransactionType, $searchByFromUserName, $searchByToUserName, $searchByTransactionCreatedAt, $adminId = null)\n {\n $allTransactions = UserTransaction::join('users AS from_user', 'from_user.id', '=', 'user_transactions.from_user_id')\n ->leftJoin('users AS to_user', 'to_user.id', '=', 'user_transactions.to_user_id')\n ->leftJoin('users AS agent_user', 'agent_user.id', '=', 'user_transactions.commission_agent_id')\n ->leftJoin('roles AS from_user_role', 'from_user_role.id', '=', 'from_user.role_id')\n ->leftJoin('roles AS to_user_role', 'to_user_role.id', '=', 'to_user.role_id')\n ->leftJoin('user_beneficiaries','user_beneficiaries.id','=','user_transactions.beneficiary_id')\n ->leftJoin('external_users','external_users.id','=','user_transactions.external_user_id');\n\n // Get history of given admin id\n if ($adminId != null) {\n $allTransactions = $allTransactions->where('user_transactions.created_by', $adminId);\n }\n\n // Search by user\n if ($searchByUser !== null) {\n $allTransactions = $allTransactions->where(function ($query) use ($searchByUser) {\n $query->where('user_transactions.to_user_id', '=', $searchByUser)\n ->orWhere('user_transactions.from_user_id', '=', $searchByUser);\n });\n }\n\n // Search by transaction ID\n if ($searchByTransactionID !== null) {\n $allTransactions = $allTransactions->where('user_transactions.transaction_id', 'LIKE', \"%$searchByTransactionID%\");\n }\n\n // Search by transaction status\n if ($searchByTransactionStatus !== null) {\n $allTransactions = $allTransactions->where('user_transactions.transaction_status', $searchByTransactionStatus);\n }\n\n // Search by transaction created date\n if ($searchByTransactionCreatedAt !== null) {\n $allTransactions = $allTransactions->where(DB::raw('DATE_FORMAT(user_transactions.created_at, \"%Y-%m-%d, %h:%i:%s %p\")'), 'LIKE', \"%$searchByTransactionCreatedAt%\");\n }\n\n // Search by transaction type\n if ($searchByTransactionType !== null) {\n $allTransactions = $allTransactions->where('user_transactions.transaction_type', $searchByTransactionType);\n }\n\n // Search by From user name\n if ($searchByFromUserName !== null) {\n $allTransactions = $allTransactions->where(DB::raw('CASE WHEN user_transactions.transaction_type=' . Config::get('constant.ADD_MONEY_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.HELAPAY_ADMIN_NAME') . '\" ELSE CASE WHEN from_user.verification_status=' . Config::get('constant.UNREGISTERED_USER_STATUS') . ' THEN from_user.mobile_number ELSE from_user.full_name END END'), 'LIKE', \"%$searchByFromUserName%\");\n }\n\n // Search by To user name\n if ($searchByToUserName !== null) {\n $allTransactions = $allTransactions->where(DB::raw('CASE WHEN user_transactions.transaction_type=' . Config::get('constant.ADD_MONEY_TRANSACTION_TYPE') . ' THEN CASE WHEN from_user.verification_status=' . Config::get('constant.UNREGISTERED_USER_STATUS') . ' THEN from_user.mobile_number ELSE from_user.full_name END WHEN user_transactions.transaction_type=' . Config::get('constant.WITHDRAW_MONEY_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.HELAPAY_ADMIN_NAME') . '\" WHEN user_transactions.transaction_type =' . Config::get('constant.BENEFICIARY_TRANSFER_TYPE') . ' THEN user_beneficiaries.name WHEN user_transactions.transaction_type = ' . Config::get('constant.ADD_COMMISSION_TO_WALLET_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.SELF_USER') . '\" WHEN user_transactions.transaction_type =' . Config::get('constant.WITHDRAW_MONEY_FROM_COMMISSION_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.HELAPAY_ADMIN_NAME') . '\" WHEN user_transactions.transaction_type = ' . Config::get('constant.E_VOUCHER_TRANSACTION_TYPE') . ' THEN CASE WHEN user_transactions.to_user_id IS NULL THEN \"' . Config::get('constant.SELF_USER') . '\" ELSE CASE WHEN to_user.verification_status=' . Config::get('constant.UNREGISTERED_USER_STATUS') . ' THEN to_user.mobile_number ELSE to_user.full_name END END WHEN user_transactions.transaction_type = ' . Config::get('constant.REDEEMED_TRANSACTION_TYPE') . ' THEN CASE WHEN user_transactions.to_user_id IS NULL THEN \"' . Config::get('constant.SELF_USER') . '\" ELSE CASE WHEN to_user.verification_status=' . Config::get('constant.UNREGISTERED_USER_STATUS') . ' THEN to_user.mobile_number ELSE to_user.full_name END END ELSE CASE WHEN to_user.verification_status=' . Config::get('constant.UNREGISTERED_USER_STATUS') . ' THEN to_user.mobile_number ELSE to_user.full_name END END'), 'LIKE', \"%$searchByToUserName%\");\n }\n\n $allTransactions = $allTransactions->orderBy($sort, $order)\n ->orderBy('id', 'DESC')\n ->take($limit)\n ->offset($offset)\n ->get([\n 'user_transactions.id',\n 'user_transactions.transaction_id',\n 'user_transactions.amount',\n 'user_transactions.net_amount',\n 'user_transactions.total_commission_amount',\n 'user_transactions.admin_commission_amount',\n 'user_transactions.admin_commission_amount_from_receiver',\n 'user_transactions.agent_commission_amount',\n 'user_transactions.created_at',\n 'user_transactions.description',\n 'agent_user.full_name AS agent_full_name',\n 'agent_user.mobile_number AS agent_mobile_number',\n DB::raw('CASE WHEN user_transactions.transaction_type=' . Config::get('constant.ADD_MONEY_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.HELAPAY_ADMIN_NAME') . '\" ELSE CASE WHEN from_user.verification_status=' . Config::get('constant.UNREGISTERED_USER_STATUS') . ' THEN from_user.mobile_number ELSE from_user.full_name END END AS from_user_name'),\n DB::raw('CASE \n WHEN user_transactions.transaction_type=' . Config::get('constant.ADD_MONEY_TRANSACTION_TYPE') . ' THEN \n CASE WHEN from_user.verification_status=' . Config::get('constant.UNREGISTERED_USER_STATUS') . ' THEN from_user.mobile_number \n ELSE from_user.full_name END \n WHEN user_transactions.transaction_type=' . Config::get('constant.WITHDRAW_MONEY_TRANSACTION_TYPE') . ' THEN \n CASE WHEN user_transactions.external_user_id is not null THEN external_users.name\n ELSE \"' . Config::get('constant.HELAPAY_ADMIN_NAME') . '\" \n END \n WHEN user_transactions.transaction_type = ' . Config::get('constant.ADD_COMMISSION_TO_WALLET_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.SELF_USER') . '\" \n WHEN user_transactions.transaction_type =' . Config::get('constant.WITHDRAW_MONEY_FROM_COMMISSION_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.HELAPAY_ADMIN_NAME') . '\" \n WHEN user_transactions.transaction_type = ' . Config::get('constant.E_VOUCHER_TRANSACTION_TYPE') . ' THEN \n CASE WHEN user_transactions.to_user_id IS NULL THEN \"' . Config::get('constant.SELF_USER') . '\" \n ELSE CASE WHEN to_user.verification_status=' . Config::get('constant.UNREGISTERED_USER_STATUS') . ' THEN to_user.mobile_number \n ELSE to_user.full_name END \n END \n WHEN user_transactions.transaction_type = ' . Config::get('constant.REDEEMED_TRANSACTION_TYPE') . ' THEN \n CASE WHEN user_transactions.to_user_id IS NULL THEN \"' . Config::get('constant.SELF_USER') . '\" \n ELSE CASE WHEN to_user.verification_status=' . Config::get('constant.UNREGISTERED_USER_STATUS') . ' THEN to_user.mobile_number \n ELSE to_user.full_name END \n END \n WHEN user_transactions.transaction_type=' . Config::get('constant.BENEFICIARY_TRANSFER_TYPE') . ' THEN user_beneficiaries.name \n ELSE CASE WHEN to_user.verification_status=' . Config::get('constant.UNREGISTERED_USER_STATUS') . ' THEN to_user.mobile_number ELSE to_user.full_name END \n END AS to_user_name'),\n DB::raw('CASE \n WHEN user_transactions.transaction_type=' . Config::get('constant.ADD_MONEY_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.SUPER_ADMIN_ROLE_NAME') . '\" \n ELSE from_user_role.name END AS from_user_role'),\n DB::raw('CASE \n WHEN user_transactions.transaction_type=' . Config::get('constant.ADD_MONEY_TRANSACTION_TYPE') . ' THEN from_user_role.name \n WHEN user_transactions.transaction_type=' . Config::get('constant.WITHDRAW_MONEY_TRANSACTION_TYPE') . ' THEN \n CASE WHEN user_transactions.external_user_id is not null THEN \"' . Config::get('constant.EXTERNAL_USER') . '\"\n ELSE \"' . Config::get('constant.SUPER_ADMIN_ROLE_NAME') . '\"\n END \n WHEN user_transactions.transaction_type = ' . Config::get('constant.E_VOUCHER_TRANSACTION_TYPE') . ' THEN \n CASE WHEN user_transactions.to_user_id IS NULL THEN from_user_role.name \n ELSE to_user_role.name \n END \n WHEN user_transactions.transaction_type = ' . Config::get('constant.REDEEMED_TRANSACTION_TYPE') . ' THEN \n CASE WHEN user_transactions.to_user_id IS NULL THEN from_user_role.name \n ELSE to_user_role.name \n END \n ELSE to_user_role.name \n END AS to_user_role'),\n\n DB::raw('CASE\n WHEN user_transactions.transaction_type=' . Config::get('constant.ADD_MONEY_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.ADDED_TO_WALLET') . '\"\n WHEN user_transactions.transaction_type=' . Config::get('constant.WITHDRAW_MONEY_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.MONEY_WITHDRAW') . '\"\n WHEN user_transactions.transaction_type=' . Config::get('constant.ADD_COMMISSION_TO_WALLET_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.ADDED_COMMISSION_TO_WALLET') . '\"\n WHEN user_transactions.transaction_type=' . Config::get('constant.WITHDRAW_MONEY_FROM_COMMISSION_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.WITHDRAW_COMMISSION_FROM_WALLET') . '\"\n WHEN user_transactions.transaction_type=' . Config::get('constant.ONE_TO_ONE_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.TRANSFER_MONEY') . '\"\n WHEN user_transactions.transaction_type=' . Config::get('constant.E_VOUCHER_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.E_VOUCHER_SENT_STATUS') . '\"\n WHEN user_transactions.transaction_type=' . Config::get('constant.REDEEMED_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.E_VOUCHER_REDEEM_STATUS') . '\"\n WHEN user_transactions.transaction_type=' . Config::get('constant.E_VOUCHER_CASHOUT_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.E_VOUCHER_CASHOUT_STATUS') . '\"\n WHEN user_transactions.transaction_type=' . Config::get('constant.CASH_IN_TRANSACTION_TYPE') . ' THEN \"' . Config::get('constant.CASE_IN') . '\"\n WHEN user_transactions.transaction_type=' . Config::get('constant.BENEFICIARY_TRANSFER_TYPE') . ' THEN \"' . Config::get('constant.BENEFICIARY_TRANSFER') . '\"\n ELSE \"' . Config::get('constant.CASE_OUT') . '\"\n END\n AS transaction_type'),\n DB::raw('CASE\n WHEN user_transactions.transaction_status=' . Config::get('constant.PENDING_TRANSACTION_STATUS') . ' THEN \"' . Config::get('constant.PENDING_TRANSACTION') . '\"\n WHEN user_transactions.transaction_status=' . Config::get('constant.SUCCESS_TRANSACTION_STATUS') . ' THEN \"' . Config::get('constant.SUCCESS_TRANSACTION') . '\"\n WHEN user_transactions.transaction_status=' . Config::get('constant.REJECTED_TRANSACTION_STATUS') . ' THEN \"' . Config::get('constant.REJECTED_TRANSACTION') . '\"\n ELSE \"' . Config::get('constant.FAILED_TRANSACTION') . '\"\n END\n AS transaction_status'),\n ]);\n return $allTransactions;\n }", "public function transaction()\n {\n \treturn $this->hasMany('App\\Wages\\Transaction');\n }", "static function getPaymentBookingHistory() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \"SELECT t.reservation_id, t.booking_reference, t.first_name, t.last_name, t.email, t.vendor_tx_code, t.payment_amount, a.auth_status, a.auth_status_detail, a.card_type, a.last_4_digits, a.processed_date\n FROM wp_sagepay_transaction t\n INNER JOIN wp_sagepay_tx_auth a ON t.vendor_tx_code = a.vendor_tx_code\n WHERE t.reservation_id IS NOT NULL\n UNION ALL \n SELECT reservation_id, booking_reference, first_name, last_name, email, vendor_tx_code, \n payment_amount, auth_status, auth_status_detail, card_type, last_4_digits, processed_date\n FROM wp_stripe_transaction\n WHERE processed_date IS NOT NULL\n AND booking_reference IS NOT NULL\n ORDER BY processed_date DESC\n LIMIT 100\" );\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n return $resultset;\n }", "public function marketHistory($market = 'BTC-LTC')\n {\n return $this->_call('public/getmarkethistory', [\n 'market' => $market,\n ], false);\n }", "public static function getTransferHistory($model){\n \n $trans=Transfer::model()->with('from_user')->findAll(array(\n\t\t 'condition'=>' object_id=:obj ',\n\t\t 'params'=>array(':obj'=>$model->object_id),\n\t\t 'order'=>'transfer_id ASC'\n\t\t));\n\t\t\n\t\t$trans_list=\"<ul>\";\n\t\t\n\t\t$trans_list.=\"<li>- <b>\".$model->author->display_name.\"</b> \".t(\"created on\").\" <b>\".date('m/d/Y H:i:s',$model->object_modified).\"</b></li>\";\n\t\t//Start to Translate all the Transition\n\t\tforeach($trans as $tr){\n\t\t\tif($tr->type==ConstantDefine::TRANS_STATUS){\n\t\t\t\t$temp=\"<li>- <b>\".$tr->from_user->display_name.\"</b> \".t(\"changed status to\").\" <b>\".self::convertObjectStatus($tr->after_status).\"</b> \".t(\"on\").\" <b>\".date('m/d/Y H:i:s',$tr->time).\"</b></li>\";\n\t\t\t}\n\t\t\tif($tr->type==ConstantDefine::TRANS_ROLE){\n\t\t\t\t$temp=\"<li>- <b>\".$tr->from_user->display_name.\"</b> \".t(\"modified and sent to\").\" <b>\".ucfirst($tr->note).\"</b> \".t(\"on\").\" <b>\".date('m/d/Y H:i:s',$tr->time).\"</b></li>\";\n\t\t\t}\n\t\t\tif($tr->type==ConstantDefine::TRANS_PERSON){\n\t\t\t\t$to_user=User::model()->findbyPk($tr->to_user_id);\n\t\t\t\t$name=\"\";\n\t\t\t\tif($to_user!=null) $name=$to_user->display_name; \n\t\t\t\t$temp=\"<li>- <b>\".$tr->from_user->display_name.\"</b> \".t(\"modified and sent to\").\" <b>\".ucfirst($name).\"</b> \".t(\"on\").\" <b>\".date('m/d/Y H:i:s',$tr->time).\"</b></li>\";\n\t\t\t}\n\t\t\t$trans_list.=$temp;\n\t\t}\n\t\t$trans_list.='</ul>';\n \n return $trans_list;\n }", "static function getRefundHistory() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \"SELECT r.id, r.reservation_id, r.booking_reference, r.email, r.first_name, r.last_name, r.amount, r.description, \n sf.charge_id, sr.auth_vendor_tx_code, COALESCE(sf.ref_status, sr.ref_status) AS refund_status, \n sr.refund_status_detail, COALESCE(sf.ref_response, sr.ref_response) AS refund_response,\n COALESCE(sf.last_updated_date, sr.last_updated_date, r.last_updated_date) AS last_updated_date \n FROM wp_tx_refund r \n LEFT OUTER JOIN wp_stripe_tx_refund sf ON sf.id = r.id\n LEFT OUTER JOIN wp_sagepay_tx_refund sr ON sr.id = r.id\n ORDER BY r.id DESC\" );\n \n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n return $resultset;\n }", "public function transaction(){\n return $this->hasMany(Transaction::class);\n }", "public function event_history(/* ... */)\n {\n return $this->_event_history;\n }", "function getHistory()\n\t{\n\t\tif (intval($this->id)==0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// $db = Zend_Registry::get('db');\n\t\t// $sql = sprintf('select * from object_history where link_to=%d and link_id=%d order by cts desc',$ot,$id);\n\t\t// $rs = $db->fetch_all($sql);\n\t\t// return $rs;\n\n\t\t$s = 'select id,auth_user_id,ctime,link,f,v0,v1 from base_diff ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t// $s.= ' order by ctime ';\n\t\t$s.= ' union all ';\n\t\t$s.= 'select id,auth_user_id,cts,link,\\'-None-\\',message,null from object_history ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t$s.= ' order by ctime desc ';\n\n\t\t// $s = $d->select();\n\t\t// $s->from('object_history');\n\t\t// $s->where('link = ?', $this->link() );\n\t\t// $s->order('cts');\n\t\t$r = SQL::fetch_all($s);\n\t\treturn $r;\n\t}", "public function depositHistory($currency = null) {\n $parameters = [];\n if(!is_null($currency)) $parameters['currency'] = $currency;\n\n return $this->_call('account/getdeposithistory', $parameters, true);\n }", "public function transactions(){\n\n return $this->hasMany(Account_transactions::class);\n\n }", "public function show(Transaction $transaction)\n {\n $transaction = Transaction::with([\n 'payment',\n 'customer',\n ])->where('id',$transaction->id)->get()->toArray();\n return $transaction;\n }", "function getHistory() {\n\t\treturn db_query_params ('SELECT * FROM artifact_history_user_vw WHERE artifact_id=$1 ORDER BY entrydate DESC, id ASC',\n\t\t\t\t\tarray ($this->getID())) ;\n\t}", "public function getTransactionReference()\n {\n $reference = [];\n\n foreach (['SecurityKey', 'TxAuthNo', 'VPSTxId', 'VendorTxCode'] as $key) {\n $value = $this->getDataItem($key);\n\n if ($value !== null) {\n $reference[$key] = $value;\n }\n }\n\n // The reference is null if we have no transaction details.\n\n if (empty($reference)) {\n return;\n }\n\n // Remaining transaction details supplied by the merchant site\n // if not already in the response (it will be for Sage Pay Form).\n\n if (! array_key_exists('VendorTxCode', $reference)) {\n $reference['VendorTxCode'] = $this->getTransactionId();\n }\n\n ksort($reference);\n\n return json_encode($reference);\n }", "public function getAction(Transaction $transaction)\n {\n return $transaction;\n }", "public function history()\n\t{\n\t\t$res = $this->hasManyThrough(Revision::class, RevisionSet::class, 'id', 'revision_set_id', 'revision_set_id')\n\t\t\t->where(\n\t\t\t\tfunction ($query) {\n\t\t\t\t\treturn $query->where('revisions.created_at', '<', $this->created_at);\n\t\t\t\t})\n\t\t\t->select('revisions.id', 'revisions.title', 'revisions.created_at', 'revisions.layout_name', 'revisions.layout_version');\n\t\treturn $res;\n\t}", "public function get_wallet_history_info($token) {\n $wallet = $this->db->select('id,token,user_provider_id,type,current_wallet,credit_wallet,debit_wallet,avail_wallet,total_amt,fee_amt,reason,created_at')->from('wallet_transaction_history')->\n where('token', $token)->order_by('id', 'DESC')->\n get()->result_array();\n return $wallet;\n }", "public function getHistory() {\n $rentalModel = new RentalModel($this->db);\n\n try {\n $rentals = $rentalModel->getAll();\n } catch (\\Exception $e) {\n $properties = ['errorMessage' => 'Error getting rental history.'];\n return $this->render('error.twig', $properties);\n }\n\n $properties = [\"rentals\" => $rentals];\n return $this->render('history.twig', $properties);\n }", "public function getTransactionReference()\n {\n foreach (['vpc_MerchTxnRef', 'vpc_TransactionNo'] as $key) {\n if (isset($this->data[$key])) {\n return $this->data[$key];\n }\n }\n }", "public static function get_transactions()\n\t{\n\t\tglobal $user_ID;\n\t\t\n\t\t$args = array(\n\t\t\t'posts_per_page'\t=> -1,\n\t\t\t'post_type'\t\t\t=> 'pxp_transactions',\n\t\t\t'post_status'\t\t=> 'private',\n\t\t\t'order'\t\t\t\t=> 'date',\n\t\t\t'orderby'\t\t\t=> 'ASC',\n\t\t\t'author'\t\t\t=> $user_ID\n\t\t);\n\n\t\t$query = get_posts( $args );\n\t\t\n\t\t$transactions = array();\n\t\t\n\t\tforeach( $query as $transaction )\n\t\t{\n\t\t\t$transactions[] = array(\n\t\t\t\t'ID'\t\t\t\t\t\t=> $transaction->ID,\n\t\t\t\t'transaction_description'\t=> $transaction->post_content,\n\t\t\t\t'transaction_date'\t\t\t=> date( 'F j, Y g:i A', strtotime( $transaction->post_date ) ),\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $transactions;\n\t}", "function get_all_transactions(){\n $str_query=\"select * from pos_transaction\";\n if(!$this->query($str_query)){\n return false;\n }\n return $this->fetch();\n }", "public function saveTransactionDetails(array &$transaction) {\n\t\t$data = array(\n\t\t\t'token' => $transaction['token'],\n\t\t\t'transaction_id' => $transaction['transaction_id'],\n\t\t\t'transaction_type' => $transaction['transaction_type'],\n\t\t\t'transaction_fee' => $transaction['transaction_fee'],\n\t\t\t'transaction_date' => date('Y-m-d H:i:s', strtotime($transaction['order_time'])),\n\t\t\t'protection' => $transaction['protection_eligibility'],\n\t\t\t'total' => $transaction['total'],\n\t\t\t'tax' => $transaction['tax'],\n\t\t\t'raw_request' => $transaction['raw']['request'],\n\t\t\t'raw_response' => $transaction['raw']['response'],\n\t\t);\n\n\t\t$ids = array();\n\t\tforeach ($transaction['orders'] as &$order) {\n\t\t\t$this->create();\n\t\t\t$saved = $this->save(array_merge($data, array(\n\t\t\t\t'transaction_id' => $order['transaction_id'],\n\t\t\t\t'transaction_type' => $order['transaction_type'],\n\t\t\t\t'transaction_status' => $order['transaction_status'],\n\t\t\t\t'transaction_fee' => $order['transaction_fee'],\n\t\t\t\t'transaction_date' => date('Y-m-d H:i:s', strtotime($order['order_time'])),\n\t\t\t\t'protection' => $order['protection_eligibility'],\n\t\t\t\t'status' => $order['status'],\n\t\t\t\t'currency_code' => $order['currency_code'],\n\t\t\t\t'total' => $order['total'],\n\t\t\t\t'tax' => $order['tax'],\n\t\t\t)));\n\t\t\t$order['infinitas_payment_log_id'] = null;\n\t\t\tif ($saved) {\n\t\t\t\t$ids[] = $order['infinitas_payment_log_id'] = $this->id;\n\t\t\t}\n\t\t}\n\n\t\treturn $ids;\n\t}", "private function transactions()\n {\n $invoiceModel = new InvoiceModel();\n $transactions = $invoiceModel->getAllInvoices();\n\n $csvData = [];\n $csvData[] = [\"Invoice ID\", \"Company Name\", \"Invoice Amount\"];\n if (!empty($transactions)) {\n foreach ($transactions as $transaction) {\n $csvData[] = [$transaction[\"id\"], $transaction[\"client\"], $transaction[\"invoice_amount_plus_vat\"]];\n }\n }\n\n $this->getCsvFile($csvData, \"transactions_\" . time() . \".csv\");\n }", "public function transactions(){\n return $this->hasMany('App\\Transaction');\n }", "public function history( Agent $agent){\n //agents revenue\n //$pending = $agent->revenue()\n //not in remittance\n // ->sum('amount');\n\n $history = Remittance::where('agent_id',$agent->id)->get();\n\n return response()->json([\n 'status' => 'success',\n 'data' => [\n 'amount' => $history\n ]\n ]);\n }", "public function gettransaction($txid)\n\t{\n\t\treturn $this->connect('gettransaction', array((string) $txid));\n\t}", "public function orderHistory($market = null) {\n $parameters = [];\n if(!is_null($market)) $parameters['market'] = $market;\n\n return $this->_call('account/getorderhistory', $parameters, true);\n }", "public function withdrawHistory($currency = null) {\n $parameters = [];\n if(!is_null($currency)) $parameters['currency'] = $currency;\n\n return $this->_call('account/getwithdrawalhistory', $parameters, true);\n }", "private function getHistory()\n {\n $history = [];\n\n foreach ($this->getResponse()->data as $k => $v) {\n $history[$k]['tanggal'] = Utils::setDate($v->Tanggal);\n\n switch ($v->StatusInternal) {\n case 'Baru':\n $history[$k]['posisi'] = preg_replace('/Diterima di Sales Counter (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Manifest Pickup':\n $posisi = preg_replace('/Di pickup oleh petugas (.*)/', '$1', $v->TrackStatusNama);\n $history[$k]['posisi'] = $posisi;\n $this->kotaPengirim = strtoupper($posisi);\n break;\n\n case 'Serah Terima Pickup':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Moda Angkutan':\n $history[$k]['posisi'] = preg_replace('/Pengiriman dari (.*) ke (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Serah Terima Surat Muatan':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Serah Terima Manifest':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Surat Jalan Kurir':\n $history[$k]['posisi'] = preg_replace('/Proses pengantaran oleh kurir (.*), (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Terkirim/Diterima':\n $history[$k]['posisi'] = 'Diterima';\n $this->tanggalTerima = $v->Tanggal;\n $this->namaPenerima = preg_replace('/Diterima oleh (.*)\\((.*)/', '$1', $v->TrackStatusNama);\n break;\n\n default:\n $history[$k]['posisi'] = null;\n break;\n }\n\n $history[$k]['message'] = $v->TrackStatusNama;\n }\n\n return $history;\n }", "public function viewHistory() {\n $historyRows = $this->db->query(\"SELECT * FROM history\");\n if (!$historyRows) die(\"Fatal Error.\");\n\n // Looping through all rows in the histoy table.\n $history = [];\n foreach($historyRows as $historyRow) {\n $regNr = htmlspecialchars($historyRow[\"regNr\"]);\n $ssNr = htmlspecialchars($historyRow[\"ssNr\"]);\n $checkOut = htmlspecialchars($historyRow[\"checkOutTime\"]);\n $checkIn = htmlspecialchars($historyRow[\"checkInTime\"]);\n $days = htmlspecialchars($historyRow[\"days\"]);\n $cost = htmlspecialchars($historyRow[\"cost\"]);\n\n // Setting 0 as default value on days and cost if car not checked in yet.\n if (!$checkIn) {\n $checkIn = \"Checked Out\";\n $days = 0;\n $cost = 0;\n }\n \n $histor = [\"regNr\" => $regNr,\n \"ssNr\" => $ssNr, \n \"checkOut\" => $checkOut,\n \"checkIn\" => $checkIn, \n \"days\" => $days,\n \"cost\" => $cost,\n \"days\" => $days];\n \n $history[] = $histor;\n }\n return $history;\n }", "public function transhistory()\n {\n $User = User::where('id', Auth::user()->id)->first();\n $Trans = Transaction::where('user_id', Auth::user()->id)->where('trans_type', 'topup')->get();\n \n return view('wallet.transhistory',compact('User','Trans'));\n }", "public function transistionHistories()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n return $this->hasMany('App\\TransistionHistory','sp_id','sp_id');\n }", "public function transaction_log() {\n $data['title'] = 'Transaction Log';\n $data['transactions'] = Transaction::where('user_id', Auth::id())->with('user')\n ->latest('updated_at')->paginate(5);\n\n return view('user-dashboard.transaction-log', $data);\n }", "public function getItemsHistory()\n {\n return $this->get(self::_ITEMS_HISTORY);\n }", "public function ordersHistory() {\n return $this->hasMany(OrderHistory::class);\n }", "public function get_transaction( $space_id, $transaction_id ) {\n\t\treturn $this->get_transaction_service()->read( $space_id, $transaction_id );\n\t}", "public function getApplicationPaypalRecordsTransaction($transaction_ids) {\n $em = $this->em;\n $paypal_transactions = $em->getRepository('SixthContinentConnectBundle:SixthcontinentconnectPaymentTransaction')\n ->getAppPaypalTransactions($transaction_ids);\n return $paypal_transactions;\n }", "public function getFullHistory($id)\n {\n $data = [];\n if (!$id) {\n throw new InputException(__('Id required'));\n }\n /** @var OrderInterface $entity */\n $order = $this->_objectManager->create('Magento\\Sales\\Model\\Order')->loadByIncrementId($id);\n if (!$order->getEntityId()) {\n throw new NoSuchEntityException(__('Requested entity doesn\\'t exist'));\n }\n\n $history = [];\n foreach ($order->getAllStatusHistory() as $orderComment) {\n $history['order'][] = $this->_prepareHistoryItem(\n $orderComment->getStatusLabel(),\n $orderComment->getIsCustomerNotified(),\n $orderComment->getCreatedAt(),\n $orderComment->getComment()\n );\n }\n\n foreach ($order->getCreditmemosCollection() as $_memo) {\n $history['memo'][] = $this->_prepareHistoryItem(\n __('Credit memo #%1 created', $_memo->getIncrementId()),\n $_memo->getEmailSent(),\n $this->getOrderAdminDate($_memo->getCreatedAt())\n );\n\n foreach ($_memo->getCommentsCollection() as $_comment) {\n $history[] = $this->_prepareHistoryItem(\n __('Credit memo #%1 comment added', $_memo->getIncrementId()),\n $_comment->getIsCustomerNotified(),\n $_comment->getCreatedAt(),\n $_comment->getComment()\n );\n }\n }\n\n foreach ($order->getShipmentsCollection() as $_shipment) {\n $history['shipment'][] = $this->_prepareHistoryItem(\n __('Shipment #%1 created', $_shipment->getIncrementId()),\n $_shipment->getEmailSent(),\n $_shipment->getCreatedAt()\n );\n\n foreach ($_shipment->getCommentsCollection() as $_comment) {\n $history[] = $this->_prepareHistoryItem(\n __('Shipment #%1 comment added', $_shipment->getIncrementId()),\n $_comment->getIsCustomerNotified(),\n $_comment->getCreatedAt(),\n $_comment->getComment()\n );\n }\n }\n\n foreach ($order->getInvoiceCollection() as $_invoice) {\n $history['invoice'][] = $this->_prepareHistoryItem(\n __('Invoice #%1 created', $_invoice->getIncrementId()),\n $_invoice->getEmailSent(),\n $_invoice->getCreatedAt()\n );\n\n foreach ($_invoice->getCommentsCollection() as $_comment) {\n $history[] = $this->_prepareHistoryItem(\n __('Invoice #%1 comment added', $_invoice->getIncrementId()),\n $_comment->getIsCustomerNotified(),\n $_comment->getCreatedAt(),\n $_comment->getComment()\n );\n }\n }\n\n foreach ($order->getTracksCollection() as $_track) {\n $history['tracking'][] = $this->_prepareHistoryItem(\n __('Tracking number %1 for %2 assigned', $_track->getNumber(), $_track->getTitle()),\n false,\n $_track->getCreatedAt()\n );\n }\n\n $data[] = $history;\n\n return $data;\n }", "public function getTransactionsAttribute() {\n return DB::table('transactions')\n -> leftjoin('accounts as paying', 'transactions.paying_id', '=', 'paying.id')\n -> leftjoin('accounts as receiving', 'transactions.receiving_id', '=', 'receiving.id')\n -> leftjoin('banks as paying_bank', 'paying.bank_id', '=', 'paying_bank.id')\n -> leftjoin('banks as receiving_bank', 'receiving.bank_id', '=', 'receiving_bank.id')\n -> leftjoin('users as payer', 'paying.user_id', '=', 'payer.id')\n -> leftjoin('users as receiver', 'receiving.user_id', '=', 'receiver.id')\n -> where('payer.id', $this -> id)\n -> orWhere('receiver.id', $this -> id)\n -> get(['transactions.id',\n 'paying.id as paying_account_id',\n 'payer.first_name as paying_first',\n 'payer.last_name as paying_last',\n 'paying_bank.id as paying_bank_id',\n 'paying_bank.name as paying_bank_name',\n 'receiving.id as receiving_account_id',\n 'receiver.first_name as receiving_first',\n 'receiver.last_name as receiving_last',\n 'receiving_bank.id as receiving_bank_id',\n 'receiving_bank.name as receiving_bank_name',\n 'transactions.ammount as ammount',\n 'transactions.created_at as created_at']) -> all();\n }", "public function accounthistory()\n {\n\n return view('user.transactions')\n ->with(array(\n\n 't_history' => tp_transactions::where('user', Auth::user()->id)\n ->where('type', '<>', 'ROI')\n ->orderBy('id', 'desc')\n ->get(),\n 'withdrawals' => withdrawals::where('user', Auth::user()->id)->orderBy('id', 'desc')\n ->get(),\n 'deposits' => deposits::where('user', Auth::user()->id)->orderBy('id', 'desc')\n ->get(),\n 'title' => 'Account Transactions History',\n 'settings' => settings::where('id', '=', '1')->first(),\n ));\n }", "public function getTransactionId();", "public function getTransactionId();", "public function getHistory()\n {\n return Wrapper\\Player\\Senior::history($this->getId());\n }" ]
[ "0.65027875", "0.6466763", "0.625794", "0.62398183", "0.62250084", "0.61974525", "0.6170981", "0.6164785", "0.6164785", "0.6164785", "0.6151405", "0.6137095", "0.61225694", "0.6108571", "0.60953087", "0.60938996", "0.60662717", "0.60387385", "0.60361505", "0.6023784", "0.59762645", "0.59676105", "0.5947411", "0.59410393", "0.5917588", "0.5917588", "0.58916724", "0.58916473", "0.58684725", "0.5866031", "0.5850651", "0.5828817", "0.5828817", "0.5828817", "0.58231837", "0.582183", "0.5813473", "0.58058167", "0.5795479", "0.57902426", "0.5787653", "0.5786838", "0.5782169", "0.5777151", "0.5756238", "0.57191074", "0.57025015", "0.57025015", "0.5685436", "0.56714916", "0.56714916", "0.56671554", "0.56638294", "0.56622446", "0.5660445", "0.5656278", "0.56494194", "0.56467295", "0.56396735", "0.56366056", "0.56352764", "0.56215173", "0.56177783", "0.561763", "0.5609253", "0.5599937", "0.5586037", "0.55721664", "0.55699366", "0.5561409", "0.555783", "0.55441564", "0.5542615", "0.553798", "0.5525298", "0.5503355", "0.5499078", "0.549817", "0.54918927", "0.54879785", "0.5480314", "0.5473394", "0.54691994", "0.5467563", "0.5466772", "0.5442401", "0.54380655", "0.5436334", "0.5422259", "0.542023", "0.54152", "0.5402014", "0.5393709", "0.5392404", "0.538339", "0.53827673", "0.53595954", "0.5358421", "0.5358421", "0.5353559" ]
0.7644228
0
moved body of construct so we can reset the deck when a new game is started!
public function resetDeck(){ $this->startCard = new Card(14); for ($i = 1; $i <= 13; $i++) { if ($i == 6 or $i == 9) { continue; } else { if ($i == 1) { for ($j = 0; $j < 5; $j++) { $card = new Card($i); $this->cards[] = $card; } } else { for ($j = 0; $j < 4; $j++) { $card = new Card($i); $this->cards[] = $card; } } } } //Shuffle deck shuffle($this->cards); // card back $this->cardDrawn = new Card(14); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n\t\t$this->cardHand = new Deck();\n\t\t$this->cardHand->setName(\"Hand\");\n\t\t$this->cardHand->setState(Card::STATE_FACEDOWN);\n\n\t\t$this->cardPublicStand = new Deck();\n\t\t$this->cardPublicStand->setName(\"Market stand\");\n\t\t$this->cardPublicStand->setState(Card::STATE_FACEUP);\n\n\t\t$this->cardHiddenStand = new Deck();\n\t\t$this->cardHiddenStand->setName(\"Contraband Stash\");\n\t\t$this->cardHiddenStand->setState(Card::STATE_FACEDOWN);\n\n\t\t$this->cardAux = new Deck();\n\t\t$this->cardAux->setName(\"Aux Deck\");\n\t\t$this->cardAux->setState(Card::STATE_FACEDOWN);\n\t}", "function __construct(Deck $deck){\n\n $this->cards = [];\n array_push($this->cards, $deck->drawCard(), $deck->drawCard()); // twice because 2 cards\n }", "public function __construct()\n {\n //create a new deck object (copied from example.php)\n $deck = new Deck(); //refers to Deck.php\n $deck->shuffle();\n $this->deck=$deck; //$this->deck ipv $deck!!!\n\n //instantiate the Player class twice, insert it into the player property and a dealer property.\n $this->player = new Player($this->deck); // pass the deck to the player\n $this->dealer = new Dealer($this->deck);\n }", "public function __construct()\n {\n //$this->player=$player;\n //$this->dealer=$dealer;\n $this->deck=new Deck();\n $this->deck->shuffle();\n $this->player= new Player($this->deck);\n $this->dealer= new Dealer($this->deck);\n\n }", "protected function resetDeckPrepare()\n {\n // only symbolic functionality... rest is handled below\n $this->result()\n ->changeRequest('toggle_edit_show', true)\n ->setCurrent('Decks_edit');\n }", "public function generateGameDeck()\n {\n $suits = array('C', 'D', 'H', 'S');\n $newGameDeck = $this->generateSuits($suits);\n $this->addCardsToTop($newGameDeck);\n $this->shuffleDeck();\n }", "public function initCard()\n {\n $baseCard = $this->getBaseCard();\n /*\n * fix return;\n */\n if(!$baseCard)\n return false;\n $this->current_hp = $this->hp;\n $this->current_name = $baseCard->name;\n $this->current_defense = $this->defense;\n $this->current_dmg_min = $this->dmg_min;\n $this->current_dmg_max = $this->dmg_max;\n $this->current_dmg_critical = $this->dmg_critical;\n $this->current_critical_chance = $this->critical_chance;\n $this->update();\n }", "#[NoReturn] function takeControl(): void {\r\n $this\r\n ->initDecks(Settings::getInstance()->getInt(Settings::SETTINGS_DECK_COUNT)) //// grabs cards from configured number of decks\r\n ->shuffle() /// shuffles cards\r\n ->initPlayers(Settings::getInstance()->getInt(Settings::SETTINGS_PLAYER_COUNT)) /// creates requested amount of players\r\n ->dealer()\r\n ->clear() /// clears the dealer's card\r\n ->deal($this->cards, $this->players); /// deal 2 cards to each player and to the dealer\r\n\r\n echo PHP_EOL, 'Game Started', PHP_EOL, PHP_EOL;\r\n echo 'Cards have been dealt', PHP_EOL, PHP_EOL;\r\n\r\n $this->printStatus(); /// prints all the\r\n\r\n foreach ($this->players as $player) {\r\n /// serve the current player\r\n $this->dealer->serve($player, $this->cards);\r\n }\r\n\r\n /// the dealer can play now\r\n $this->dealer->play($this->cards);\r\n\r\n /// all players have played, state scores now\r\n $this->stateScores();\r\n }", "function makeCards() {\n\t\t\n\t\t$cards = explode(\" \", $this->me->get(\"cards\"));\n\t\t$i = 0;\n\t\t$rv = \"gamestate.cards = [];\";\n\t\t\n\t\tforeach ($cards as $value) {\n\t\t\t$name = getOneThing(\"name\", \"gamedata_cards\", \"id=\".$value);\n\t\t\t$description = getOneThing(\"description\", \"gamedata_cards\", \"id=\".$value);\n\t\t\t$rv .= \"gamestate.cards[\".$i.\"] = new Object();\\n\";\n\t\t\t$rv .= \"gamestate.cards[\".$i.\"].name = '\".$name.\"';\\ngamestate.cards[\".$i.\"].description = '\".$description.\"';\\n\";\n\t\t\t$i++;\n\t\t\t}\n\t\t\n\t\n\t\treturn $rv;\n\t\t\n\t\n\t}", "public function card();", "public function putInDeck()\n {\n $this->inPlay = false;\n $this->dealt = false;\n\n return $this;\n }", "private function createCreatureBack()\n {\n\n }", "public function initializeCards()\n {\n\n for($i=0;$i<count($this->suits);$i++){\n for($j=0;$j<count($this->rank);$j++){\n $this->deckofCards[$i][$j] = $this->rank[$j].\" \".$this->suits[$i];\n }\n }\n return $this->deckofCards;\n }", "public function shuffleDeck()\n {\n for ($i = 0; $i < $this->size; $i++)\n {\n $randIndex = rand(0, $this->size - 1);\n $temp = $this->cards[$i];\n $this->cards[$i] = $this->cards[$randIndex];\n $this->cards[$randIndex] = $temp;\n }\n }", "function __construct( )\n {\n // Here, you can assign labels to global variables you are using for this game.\n // You can use any number of global variables with IDs between 10 and 99.\n // If your game has options (variants), you also have to associate here a label to\n // the corresponding ID in gameoptions.inc.php.\n // Note: afterwards, you can get/set the global variables with getGameStateValue/setGameStateInitialValue/setGameStateValue\n parent::__construct();\n\n self::initGameStateLabels(array(\n // P.I. is played over 3 \"mini games\". Here we store in which of\n // these games we are. Valid values: 1, 2, 3\n \"minigame\" => 10,\n\n // The inner-minigame round. Required to determine how many points\n // players score when solving. All players that solve in the same\n // round score the same, then the score drops. Also a minigame ends\n // when a new round begins and only 1 player is left with an\n // unsolved case. That player then scores 0 for that minigame and a\n // new one starts (or game end).\n \"minigame_round\" => 11,\n\n // The current value of points a player would get if they would\n // score correctly now. Decreases after rounds in that a player (or\n // multiple) successfully scored.\n \"points_winnable\" => 12,\n\n // \"my_first_game_variant\" => 100,\n // \"my_second_game_variant\" => 101,\n ));\n\n $this->cards = self::getNew(\"module.common.deck\");\n $this->cards->init(\"card\");\n $this->tokens = new Tokens();\n }", "public function __construct(Game $game, $post)\n {\n $this->game = $game;\n\n if (isset($post['playerTurn']))\n {\n $this->game->incrementTurn();\n\n }\n\n if (isset($post['clear']))\n {\n // We are starting a new game\n $this->game->newGame();\n }\n else if (isset($post['c'])) {\n // We are in cheat mode\n // Need to check if we actually need a cheat mode\n // Though, I forgot\n\n }\n\n // if player is drawing a card\n else if (isset($post['draw']))\n {\n //case Cards::TWO_CARD:\n //drawCardAgain\n //Check if user flipped the card over (maybe by using getter)\n //Move the card to the \"Discard here\" area, or check if it's in discard pile\n //Next person's turn (but do we need a getter for this?\n //Or is the getter for that getCurrentTurn() in game class?\n\n\n }\n //I think that before the player clicks on a node to move their pawn to\n //There is a lot of logic that has to be taken care of\n else if (isset($post['pawn']))\n {\n $xy_string = explode(',', $post['pawn']);\n\n\n $x = (int)$xy_string[0];\n $y = (int)$xy_string[1];\n print_r(\"HELLO?\");\n //print_r($game->getBoard()->GetBoardSquares()[13][2]->getBackwardNeighbors());\n //$distance = 5;\n $distance = $this->game->getCards()->getCurrentCardValue();\n\n // 4 card moves backwards 4 spaces\n if ($distance == 4) {\n $distance = $distance * -1;\n }\n\n $this->game->doTurn([$x, $y], $distance);\n //This is where we find out which pawn the player will\n //choose to move if they have >1 pawn on the board currently\n\n //Looks to me like you can only split your moves between 2 pawns\n //if you draw a 7 card\n\n //I have this for now, but this getter will likely be moved from\n //player class to either board or game class\n //$this->player->getActive();\n\n //More than 1 active pawn on board? Pick one to move first\n // User should select the pawn they want to move\n //Make setter for setting the piece that player will move\n }\n\n //Checking if user has clicked on a node to move their pawn to\n else if (isset($post['click']))\n {\n //find the current position of the pawn the player wants to move\n $this->pawn->getPosition();\n\n // card 4, card 10 can move backwards\n // Other \"backwards\" one are \"move the pawn back to start location\", which I think is different\n\n // get value of card drawn by player that will move\n $this->card->getValue();\n\n //if the card is a card_4 or card_10, call backwardsSearchReachable\n $this->node->backwardsSearchReachable();\n // if it's any other type of card, just search reachable\n $this->node->searchReachable();\n//click on the pawn\n //and move the pawn however many spaces the card tells it to\n //if you click on empty node, it does nothing\n //click on a pawn and it should move one space forward\n //it should happen regardless of whose turn it is\n\n\n }\n\n else if (isset($post['card'])) {\n $this->game->draw();\n }\n\n\n\n }", "public function __construct($card)\n {\n $this->card = $card;\n }", "public function __construct() {\n $round = apc_fetch('game_round');\n if ($round === false) {\n $this->start_round();\n }\n\n $board = apc_fetch('game_board');\n if ($board === false) {\n $board = $this->__reload_board($round);\n }\n \n $this->_BOARD = $board;\n $this->_ROUND = $round;\n }", "public function __construct()\n\t{\n\t\tforeach ( range(0, 51) AS $selCard ) :\n\t\t\tarray_push($this->cards, new Card( $selCard ) );\n\t\tendforeach;\n\t}", "public function newgame()\n {\n $this->gamerounds = [];\n $this->roundsum = 0;\n $this->dice = new Dice();\n }", "public function __construct()\n {\n parent::__construct();\n $this->redCardsJSON = $this->encodeCards($this->redCards);\n $this->greenCardsJSON = $this->encodeCards($this->greenCards);\n }", "function custom_construction() {\r\n\t\r\n\t\r\n\t}", "public function create()\n {\n $this->deck = [];\n foreach($this->suits as $suit) {\n foreach($this->indices as $index) {\n $this->deck[] = $this->createCard($suit, $index);\n }\n }\n\n return $this;\n }", "public function run()\n {\n $suits = ['spades', 'hearts', 'clubs', 'diamonds'];\n $values = range(2, 10);\n $values[] = 'jack';\n $values[] = 'queen';\n $values[] = 'king';\n array_unshift($values, 'ace');\n\n foreach($suits as $suit) {\n foreach($values as $value) {\n Card::create([\n 'suit' => $suit,\n 'value' => $value,\n 'readable' => ucfirst($value) . ' of ' . ucfirst($suit),\n ]);\n\n }\n }\n\n }", "public function initGame(){\r\n $this->board = new Board();\r\n }", "function createDeck()\n {\n // suit, bool, val\n // 4 arrays\n $suit = \"\";\n $drawn = FALSE;\n \n $deck = array();\n \n for ($i = 0; $i < 4; $i++)\n { // suit type\n switch($i) \n {\n case 0:\n $suit = \"heart\";\n for ($j = 0; $j < 12; $j++)\n {\n $card = array($suit, $j + 1, $drawn);\n array_push($deck, $card); \n }\n break;\n case 1:\n $suit = \"diamond\";\n for ($j = 0; $j < 12; $j++)\n {\n $card = array($suit, $j + 1, $drawn);\n array_push($deck, $card); \n }\n break;\n case 2:\n $suit = \"spade\";\n for ($j = 0; $j < 12; $j++)\n {\n $card = array($suit, $j + 1, $drawn);\n array_push($deck, $card); \n }\n break;\n case 3:\n $suit = \"clover\";\n for ($j = 0; $j < 12; $j++)\n {\n $card = array($suit, $j + 1, $drawn);\n array_push($deck, $card); \n }\n break;\n default:\n break;\n }\n }\n \n // checks what the array is\n var_dump($deck);\n }", "public function addCard()\n {\n }", "public function __construct ($cde='---') {\n\t\t$gc = 'AHKMNPSTXYZbdhkmstwxz2349' ;\n\t\t$l = strlen ( $gc ) - 1 ;\n\t\tif($cde=='---'||$cde='')$this->code = $gc [ rand ( 0, $l ) ] . $gc [ rand ( 0, $l ) ] . $gc [ rand ( 0, $l ) ] ;\n\t\t//include required files\n\t\t$this->basePath = dirname ( __FILE__ ) . '/..' ;\n\t\t\n\t\trequire_once $this->basePath . '/classes/fontLoader.php' ;\n\t\trequire_once $this->basePath . '/classes/imageMask.php' ;\n\t\trequire_once $this->basePath . '/classes/surfaceCreator.php' ;\n\t\trequire_once $this->basePath . '/classes/model.php' ;\n\t\trequire_once $this->basePath . '/classes/point.php' ;\n\t\trequire_once $this->basePath . '/classes/camera.php' ;\n\t\trequire_once $this->basePath . '/classes/color.php' ;\n\t\t\n\t\t//init font\n\t\t$this->font = FontLoader::LoadFont ( $this->basePath . '/lib/fonts/' ) ;\n\t\t$this->bgColor = new Color(255, 255, 255);\n\t\n\t}", "public function run() {\n\n\t\t$category_ids = Category::pluck('id');\n\t\tfactory(Card::class, 50)\n\t\t\t->create()\n\t\t\t->each(function ($card) use ($category_ids) {\n\t\t\t\t$card->categories()->sync($category_ids->random(3));\n\t\t\t});\n\t}", "public function cardsInitialize()\n {\n $deck = [];\n $k=0;\n\n for($i=0;$i<count($this->suits);$i++){\n for($j=0;$j<count($this->rank);$j++){\n $deck[$k++] = $this->rank[$j].$this->suits[$i];\n }\n }\n return $deck;\n }", "function initialMeld($card_id) {\n // Check that this is the player's turn and that it is a \"possible action\" at this game state\n self::checkAction('initialMeld');\n $player_id = self::getCurrentPlayerId();\n\n // Check if the player really has this card\n $card = self::getCardInfo($card_id);\n \n if ($card['owner'] != $player_id || $card['location'] != \"hand\") {\n // The player is cheating...\n throw new BgaUserException(self::_(\"You do not have this card in hand [Press F5 in case of troubles]\"));\n }\n \n // No cheating here\n \n // Stats\n self::setStat(1, 'turns_number', $player_id); // First turn for this player\n if (self::getStat('turns_number') == 0) {\n self::setStat(1, 'turns_number'); // First turn for the table\n }\n \n // Mark it as selected\n self::markAsSelected($card_id, $player_id);\n \n // Notify\n self::notifyPlayer($player_id, 'log', clienttranslate('${You} choose a card.'), array(\n 'You' => 'You' \n ));\n \n self::notifyAllPlayersBut($player_id, 'log', clienttranslate('${player_name} chooses a card.'), array(\n 'player_name' => self::getPlayerNameFromId($player_id)\n ));\n \n // If that was the last player to choose his card, go on for the next state (whoBegins?), else, wait for remaining players\n $this->gamestate->setPlayerNonMultiactive($player_id, '');\n }", "public function init()\n {\n $this->_createBoard();\n $this->_createSlots();\n }", "public function __construct(){\r\n\t\t$this->clearCart();\r\n\t}", "public function newDeck()\n {\n return response()->json(\\Deck::newDeck(false));\n }", "public function __construct()\n\t{\n\t\t$this->game = new BowlingGame;\n\t}", "function generateDeck() {\n $suits = array(\"clubs\", \"spades\", \"hearts\", \"diamonds\");\n $deck = array();\n for($i=0;$i<=3;$i++){\n for($j=1;$j<=13;$j++){\n $card = array(\n 'suit' => $suits[$i],\n 'value' => $j\n );\n $deck[] = $card;\n }\n }\n shuffle($deck);\n return $deck;\n }", "function generateHand($deck) {\n shuffle($deck);\n $hand = array(); \n \n for ($i = 0; $i < 3; $i++) {\n $cardNum = array_pop($deck);\n $card = mapNumberToCard($cardNum); \n array_push($hand, $card); \n }\n \n return $hand; \n }", "function gameSetup() {\n\t// create an array for cards\n\t$suits = ['C', 'H', 'S', 'D'];\n\t$cards = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', 'King'];\n\t//take player name\n\t$name = enterName();\n\t//Build the deck of cards\n\t$deck = buildDeck($cards, $suits);\n\t// initialize a dealer and player hand\n\t$dealer = [];\n\t$player = [];\n\t$bankroll = determineBankroll();\n\t$bet = enterBet($bankroll);\n\tdrawHand($deck, $player);\n\tdrawHand($deck, $dealer);\n\techoDealer($dealer, true);\n\techoPlayer($player, $name);\n\tgamePlay($deck, $player, $dealer, $name, $bankroll, $bet);\n}", "function make_ecard()\n\t{\n\t\tglobal $template;\n\n\t\tif (!defined(\"admin\")) {\n\t\t\t$this->ecard_init(\"FRONT\");\n\n\t\t\t// Frontend\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_front.html\")) {\n\t\t\t\tif (@$this->checked->action) $this->switch_front_actions($this->checked->action);\n\t\t\t\t$this->switch_front();\n\n\t\t\t\t$this->content->template['front_link_ecard']='./plugin.php?menuid='.$this->checked->menuid.'&template=ecard/templates/ecard_front.html';\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Backend\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_back.html\")) {\n\t\t\t\t$this->user->check_intern();\n\t\t\t\t$this->ecard_init(\"BACK\");\n\t\t\t\t$this->switch_back(@$this->checked->action);\n\t\t\t}\n\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_back_cards.html\")) {\n\t\t\t\t$this->user->check_intern();\n\t\t\t\t$this->ecard_init(\"BACK\");\n\t\t\t\t$this->switch_back_babies(@$this->checked->action);\n\t\t\t}\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_back_galerien.html\")) {\n\t\t\t\t$this->user->check_intern();\n\t\t\t\t$this->ecard_init(\"BACK\");\n\t\t\t\t$this->switch_back_galerien(@$this->checked->action);\n\t\t\t}\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_back_einbindung.html\")) {\n\t\t\t\t$this->user->check_intern();\n\t\t\t\t$this->ecard_init(\"BACK\");\n\t\t\t}\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_back_einstellungen.html\")) {\n\t\t\t\t$this->user->check_intern();\n\t\t\t\t$this->ecard_init(\"BACK\");\n\t\t\t\t$this->switch_back_einstellungen(@$this->checked->action);\n\t\t\t}\n\t\t}\n\t}", "private function initArmory(){\n\t\t\t// init the Battle.net armory object\n\t\t\t$serverLoc = $this->config->get('uc_server_loc') ? $this->config->get('uc_server_loc') : 'eu';\n\t\t\t$this->game->new_object('bnet_armory', 'armory', array($serverLoc, $this->config->get('uc_data_lang')));\n\t\t}", "function my_magic_cards_grid_setup() {\r\n\r\n\r\n}", "public function run()\n {\n\t\tforeach( $this->formats as $format) {\n\t\t\tDeckFormat::create( ['name' => ucwords( $format )] );\n\t\t}\n }", "public function run()\n {\n // tempoary hard code...\n $sp = [\n ['BasicCardTrim_Iron', 'BasicCardTrim'],\n ['BasicCardLength_Iron', 'BasicCardLength'],\n ['BasicCardUpperCase_Iron', 'BasicCardUpperCase'],\n ['BasicCardLowerCase_Iron', 'BasicCardLowerCase'],\n ['BasicCardIndexOf_Iron', 'BasicCardIndexOf'],\n ['AthenaLight_Iron', 'AthenaLight'],\n ['AthenaLight_Copper', 'AthenaLight'],\n ['AthenaLight_Silver', 'AthenaLight'],\n ['AthenaLight_Gold', 'AthenaLight'],\n ['AthenaLight_Diamond', 'AthenaLight'],\n ['HeavenlyDevil_Iron', 'HeavenlyDevil'],\n ['HeavenlyDevil_Copper', 'HeavenlyDevil'],\n ['HeavenlyDevil_Silver', 'HeavenlyDevil'],\n ['HeavenlyDevil_Gold', 'HeavenlyDevil'],\n ['HeavenlyDevil_Diamond', 'HeavenlyDevil'],\n ['Magicthief_Iron', 'Magicthief'],\n ['Magicthief_Copper', 'Magicthief'],\n ['Magicthief_Silver', 'Magicthief'],\n ['Magicthief_Gold', 'Magicthief'],\n ['Magicthief_Diamond', 'Magicthief'],\n ['ThousandDisappear_Iron', 'ThousandDisappear'],\n ['ThousandDisappear_Copper', 'ThousandDisappear'],\n ['ThousandDisappear_Silver', 'ThousandDisappear'],\n ['ThousandDisappear_Gold', 'ThousandDisappear'],\n ['SevenInjuriesBoxing_Iron', 'SevenInjuriesBoxing'],\n ['SevenInjuriesBoxing_Copper', 'SevenInjuriesBoxing'],\n ['SevenInjuriesBoxing_Silver', 'SevenInjuriesBoxing'],\n ['SevenInjuriesBoxing_Gold', 'SevenInjuriesBoxing'],\n ['SevenInjuriesBoxing_Diamond', 'SevenInjuriesBoxing'],\n ['GulityBreaker_Iron', 'GulityBreaker'],\n ['GulityBreaker_Copper', 'GulityBreaker'],\n ['GulityBreaker_Silver', 'GulityBreaker'],\n ['GulityBreaker_Gold', 'GulityBreaker'],\n ['GulityBreaker_Diamond', 'GulityBreaker'],\n ['BloodyArmour_Iron', 'BloodyArmour'],\n ['BloodyArmour_Copper', 'BloodyArmour'],\n ['BloodyArmour_Silver', 'BloodyArmour'],\n ['BloodyArmour_Gold', 'BloodyArmour'],\n ['BloodyArmour_Diamond', 'BloodyArmour'],\n ['LilyGift_Iron', 'LilyGift'],\n ['LilyGift_Copper', 'LilyGift'],\n ['LilyGift_Silver', 'LilyGift'],\n ['LilyGift_Gold', 'LilyGift'],\n ['LilyGift_Diamond', 'LilyGift'],\n ['ForCard_Root_Iron', 'ForCard_Root'],\n ['StringAssignment_entry', 'StringAssignmentCard'],\n ['StringAssignment_easy', 'StringAssignmentCard'],\n ['StringAssignment_med', 'StringAssignmentCard'],\n ['StringAssignment_hard', 'StringAssignmentCard'],\n ['IntegerAssignmentCard_entry', 'IntegerAssignmentCard'],\n ['IntegerAssignmentCard_easy', 'IntegerAssignmentCard'],\n ['IntegerAssignmentCard_med', 'IntegerAssignmentCard'],\n ['IntegerAssignmentCard_hard', 'IntegerAssignmentCard'],\n ['IntegerAddAssignmentCard_entry', 'IntegerAddAssignmentCard'],\n ['IntegerAddAssignmentCard_easy', 'IntegerAddAssignmentCard'],\n ['IntegerAddAssignmentCard_med', 'IntegerAddAssignmentCard'],\n ['IntegerAddAssignmentCard_hard', 'IntegerAddAssignmentCard'],\n ['IntegerSubstractAssignmentCard_entry', 'IntegerSubstractAssignmentCard'],\n ['IntegerSubstractAssignmentCard_easy', 'IntegerSubstractAssignmentCard'],\n ['IntegerSubstractAssignmentCard_med', 'IntegerSubstractAssignmentCard'],\n ['IntegerSubstractAssignmentCard_hard', 'IntegerSubstractAssignmentCard'],\n ['IntegerMutliplyAssignmentCard_entry', 'IntegerMutliplyAssignmentCard'],\n ['IntegerMutliplyAssignmentCard_easy', 'IntegerMutliplyAssignmentCard'],\n ['IntegerMutliplyAssignmentCard_med', 'IntegerMutliplyAssignmentCard'],\n ['IntegerMutliplyAssignmentCard_hard', 'IntegerMutliplyAssignmentCard'],\n ['IntegerDivisionAssignmentCard_entry', 'IntegerDivisionAssignmentCard'],\n ['IntegerDivisionAssignmentCard_easy', 'IntegerDivisionAssignmentCard'],\n ['IntegerDivisionAssignmentCard_med', 'IntegerDivisionAssignmentCard'],\n ['IntegerDivisionAssignmentCard_hard', 'IntegerDivisionAssignmentCard'],\n ['ForLoopCard_entry', 'ForLoopCard'],\n ['ForLoopCard_easy', 'ForLoopCard'],\n ['ForLoopCard_med', 'ForLoopCard'],\n ['ForLoopCard_hard', 'ForLoopCard'],\n ['BasicStatmentsNForBodyCard_entry', 'BasicStatmentsNForBodyCard'],\n ['BasicStatmentsNForBodyCard_easy', 'BasicStatmentsNForBodyCard'],\n ['BasicStatmentsNForBodyCard_med', 'BasicStatmentsNForBodyCard'],\n ['BasicStatmentsNForBodyCard_hard', 'BasicStatmentsNForBodyCard'],\n ['BasicStatmentsNIfBodyCard_entry', 'BasicStatmentsNIfBodyCard'],\n ['BasicStatmentsNIfBodyCard_easy', 'BasicStatmentsNIfBodyCard'],\n ['BasicStatmentsNIfBodyCard_med', 'BasicStatmentsNIfBodyCard'],\n ['BasicStatmentsNIfBodyCard_hard', 'BasicStatmentsNIfBodyCard'],\n ['ForLoopWithEqualCard_entry', 'ForLoopWithEqualCard'],\n ['ForLoopWithEqualCard_easy', 'ForLoopWithEqualCard'],\n ['ForLoopWithEqualCard_med', 'ForLoopWithEqualCard'],\n ['ForLoopWithEqualCard_hard', 'ForLoopWithEqualCard'],\n ['BasicStatmentsNForBodyWithEqualCard_entry', 'BasicStatmentsNForBodyWithEqualCard'],\n ['BasicStatmentsNForBodyWithEqualCard_easy', 'BasicStatmentsNForBodyWithEqualCard'],\n ['BasicStatmentsNForBodyWithEqualCard_med', 'BasicStatmentsNForBodyWithEqualCard'],\n ['BasicStatmentsNForBodyWithEqualCard_hard', 'BasicStatmentsNForBodyWithEqualCard'],\n ['BasicStatmentsNIfBodyUpdateCard_entry', 'BasicStatmentsNIfBodyUpdateCard'],\n ['BasicStatmentsNIfBodyUpdateCard_easy', 'BasicStatmentsNIfBodyUpdateCard'],\n ['BasicStatmentsNIfBodyUpdateCard_med', 'BasicStatmentsNIfBodyUpdateCard'],\n ['BasicStatmentsNIfBodyUpdateCard_hard', 'BasicStatmentsNIfBodyUpdateCard'],\n ['ForLoopDecrementCard_entry', 'ForLoopDecrementCard'],\n ['ForLoopDecrementCard_easy', 'ForLoopDecrementCard'],\n ['ForLoopDecrementCard_med', 'ForLoopDecrementCard'],\n ['ForLoopDecrementCard_hard', 'ForLoopDecrementCard'],\n ['ForLoopDecrementWithEqualCard_entry', 'ForLoopDecrementWithEqualCard'],\n ['ForLoopDecrementWithEqualCard_easy', 'ForLoopDecrementWithEqualCard'],\n ['ForLoopDecrementWithEqualCard_med', 'ForLoopDecrementWithEqualCard'],\n ['ForLoopDecrementWithEqualCard_hard', 'ForLoopDecrementWithEqualCard'],\n ];\n\n\n foreach ($sp as $key => $value) {\n $s = Scenario::where('name', '=', $value[0])->get()->first();\n\n $p = Prefab::where('name', '=', $value[1])->get()->first();\n\n $s->prefabs()->attach($p);\n }\n }", "private function createCreatureFront()\n {\n\n }", "public function __construct($_cardType = NULL,$_cardNumber = NULL,$_bankName = NULL,$_bankCode = NULL)\n {\n parent::__construct(array('CardType'=>$_cardType,'CardNumber'=>$_cardNumber,'BankName'=>$_bankName,'BankCode'=>$_bankCode),false);\n }", "private function reconstructCombatants() {\n $Character = CD();\n if($this->type == \"pvp\") {\n if($this->combatantAID == $Character->id) {\n $this->combatantA = $Character;\n } else {\n $this->combatantB = $Character;\n }\n } else {\n $this->combatantA = $Character;\n }\n }", "function setup() {\n // Players take a seat at a table.\n seatPlayers();\n\n // Dealer is selected.\n selectDealer();\n\n // Cards taken out of box.\n takeCardsOutOfBox();\n\n // Dealer shuffles the cards.\n shuffleCards();\n\n // Player to the right of the deal cuts the cards.\n cutCards();\n\n // Dealer deals cards according to the rules, starting to the left, and around to him or herself\n deal();\n}", "public function __construct()\n {\n $this->id = rand(1, 10000);\n $this->createCartStructure();\n }", "public function __construct()\n {\n for ($x = -self::BOARD_SIZE; $x <= self::BOARD_SIZE; $x++) {\n for ($y = -self::BOARD_SIZE; $y <= self::BOARD_SIZE; $y++) {\n if (abs($x) >= self::SIDE_SIZE && abs($y) >= self::SIDE_SIZE) {\n continue;\n }\n $this->board[$x][$y] = self::STONE;\n }\n }\n\n $this->board[0][0] = self::EMPTY_SLOT;\n }", "public function prepareCard()\r\n\t\t{\r\n\t\t\t$mysqli = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);\r\n\t\t\t$query = 'SELECT * FROM card WHERE id_votes =\"'.$this->voteId.'\" and gtv=\"'.$this->cardId.'\" ORDER BY id_option ASC ';\r\n\t\t\t\r\n\t\t\tif ($result = $mysqli->query($query))\r\n\t\t\t{\r\n\t\t\t\twhile($obj = $result->fetch_object())\r\n\t\t\t\t{\r\n\t\t\t\t\t$card = new Card($obj->id,$this->voteId,$obj->id_option,$obj->gtv,$obj->Pog,$obj->gyv,$obj->sig);\r\n\t\t\t\t\tarray_push($this->cardList,$card);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t$mysqli->close(); \r\n\t\t}", "public function __construct(){\n $this->cases = array();\n\n for ($i=0; $i < self::NBROWS; $i++) {\n $this->cases[$i] = array();\n for ($j = 0; $j < self::NBCOLS; $j++)\n $this->cases[$i][$j] = PieceQuantik::initVoid();\n }\n }", "public function __construct(ScratchCard $scratch_card)\n {\n $this->scratch_card = $scratch_card;\n }", "public function __construct() //card is our node value\n\t{\n\t\t$this->head = null; // starts here...\n\t}", "public function onConstruct()\n {\n $this->name = NULL;\n $this->description = NULL;\n }", "public function afterConstruct()\n {\n\n }", "public function __construct($deck, $hand, $graveyard, ManaPoolInterface $manaPool)\n {\n// also Hand and GraveYard objects needs to be passed as arguments\n $this->playerDeck = $deck;\n $this->playerHand = $hand;\n $this->playerGraveyard = $graveyard;\n $this->manaPool = $manaPool;\n }", "public function __construct()\n {\n $this->cart = Cart::content();\n $this->checkStock();\n }", "public function setUp()\n\t{\n\t\t$this->state_data = new Blackbox_StateData();\n\t\t$this->target = new Blackbox_Target();\n\t}", "public function __construct()\n {\n $this->suits = \\Config::get('enums.card_suits');\n $this->values = \\Config::get('enums.card_values');\n }", "public function __construct() {\n\t\tparent::__construct(\n\t \t\t'skill_card', // Base ID\n\t\t\t'Skill Card', // Name\n\t\t\tarray( 'description' => __( 'I box animati', 'text_domain' ), ) // Args\n\t\t);\n\t}", "function buildDeck($cards, $suits) {\n\t$deck = [];\n\tforeach ($suits as $suit) {\n\t\tforeach ($cards as $card) {\n\t\t\t$deck[] = ['card' => $card, 'suit' => $suit];\n\t\t}\n\t}\n\tshuffle($deck);\n\treturn $deck;\n}", "public function run()\n {\n Card::create([\n \"name\" => \"Card Name\",\n \"slug\" => \"card-name\",\n \"image\" => \"imagem\",\n \"limit\" => 1499.99,\n \"annual_fee\" => 99.90,\n \"brand\" => \"visa\",\n \"category_id\" => Category::first()->id\n ]);\n }", "function CardInfo(){\r\n }", "protected function burn_card() {\n $this->burned_cards[] = array_pop($this->deck);\n return $this;\n }", "private function playMachine()\n {\n do {\n echo \"Jugador Maquina pide carta.\\n\";\n\n $card = new Card($this->memory);\n $this->machine->receiveCard($card);\n $this->memory->add($card);\n $points = $this->machine->getPoints();\n\n echo \"\\tHa sacado \" . $card . '. LLeva ' . $points . ' punto' . $points > 1 ? 's' : '' . \"\\n\";\n\n } while ($this->machine->willContinue($this->memory) && !$this->machine->isOver());\n\n if (!$this->machine->isOver())\n echo \"Jugador Máquina se planta.\\n\";\n\n }", "protected function seed()\n {\n }", "public function construct() {\n $this->initiate(\"skin_bank\");\n\n $code_bank = $this->bank_switch();\n\n return $code_bank;\n }", "private function createCreatureTop()\n {\n\n }", "public function __construct()\n {\n $this->handFinder = new HandFinder(new CardValidator());\n $this->winnerFinder = new WinnerFinder($this->handFinder);\n }", "function buildDeck($suits, $cards) {\n\t$deck = [];\n\tforeach ($cards as $card) {\n\t\tforeach($suits as $suit) {\n\t\t\t$deck[] = \"$card\" . \"\" . \"$suit\";\n\t\t}\n\t}\n\tif(shuffle($deck)) {\n\t\treturn $deck;\n\t}\n}", "public function run()\n {\n $data = [\n [ 'description' => 'Visa' ],\n [ 'description' => 'Master Card' ],\n [ 'description' => 'American Express' ],\n [ 'description' => 'Diners Club' ],\n ];\n foreach ($data as $element) {\n CardType::create([\n 'description' => $element['description'],\n ]);\n }\n }", "function _construct() {\n \t\n\t\t\n\t}", "function deal() {\r\n for($i=0; $i<1; $i++) {\r\n global $deck;\r\n $card = array_pop($deck);\r\n return $card['value'] . ' of ' . $card['suit'] . '<br />';\r\n\r\n //create card values\r\n }\r\n}", "public function __construct($hand_pairs_of_game)\n {\n $this->_hand_pairs_of_game = $hand_pairs_of_game;\n }", "public function beforeLoop()\n {\n $this->createSavegame();\n }", "public function __construct()\n {\n $this->dice = new DiceImage();\n $this->resetVariables();\n }", "public function __construct()\n {\n $this->dice = new DiceImage();\n $this->resetVariables();\n }", "function let()\n {\n $this->cardFactory = new CardFactory();\n $this->beConstructedWith([], $this->cardFactory);\n }", "public function dealCards(): void\n {\n foreach ($this->players as $player) {\n $playerCardsCount = $player->getCards()->count();\n $neededCountForDealing = 2 - $playerCardsCount;\n if ($neededCountForDealing > 0) {\n $cards = $this->deckOfCards->dealRandomCards($neededCountForDealing);\n foreach ($cards as $card) {\n $player->addCard($card);\n }\n }\n }\n\n $tableCardsCount = $this->getCards()->count();\n $neededCountForDealing = 5 - $tableCardsCount;\n if ($neededCountForDealing > 0) {\n $cards = $this->deckOfCards->dealRandomCards($neededCountForDealing);\n foreach ($cards as $card) {\n $this->addCard($card);\n }\n }\n }", "public function __construct(){\n\n // Update the session keys for this object\n $this->session_key = 'BATTLES';\n $this->session_token = 'battle_token';\n $this->session_id = 'battle_id';\n $this->class = 'battle';\n $this->multi = 'battles';\n\n // Create any required sub-objects\n $this->queue['sound_effects'] = array();\n\n // Collect any provided arguments\n $args = func_get_args();\n\n // Collect current battle data from the function if available\n $this_battleinfo = isset($args[0]) ? $args[0] : array('battle_id' => 0, 'battle_token' => 'battle');\n\n // Now load the battle data from the session or index\n $this->battle_load($this_battleinfo);\n\n // Return true on success\n return true;\n\n }", "public function setUp()\n {\n $rolls = [5, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n $frame = 0;\n\n $this->spare = new Spare($rolls, $frame);\n }", "public function __construct() {\n $this->reset();\n }", "public function __construct() {\n $this->reset();\n }", "public function __construct() {\n $this->reset();\n }", "public function __construct() {\n $this->reset();\n }", "public function __construct() {\n $this->reset();\n }", "public function __construct() {\n $this->reset();\n }", "public function __construct() {\n $this->reset();\n }", "public function __construct() {\n $this->reset();\n }", "public function __construct() {\n $this->reset();\n }", "public function __construct() {\n $this->reset();\n }", "function createGame(): void\n{\n // load a list of words\n $wordList = [\n 'horse',\n 'carnivale',\n 'random',\n ];\n\n // save the state in the session\n $randomWord = getRandomWord($wordList);\n $game = new Game($randomWord);\n saveGame($game);\n}", "public function constructAllUp(){\n $this->freeSeating = true;\n $this->notSquared = false;\n $this->nbRows = 0;\n $this->nbSeatsPerRow = 0;\n $this->rowLabel = 1;\n $this->seatLabel = 1;\n }", "function __construct() {\n\t\t$this->reset();\n\t}", "function __construct() {\n\t\t$this->reset();\n\t}", "function start()\n\t{\n\t\t$this->score = 0;\n\t\t$this->won = false;\n\t\t$this->over = false;\n\t}", "function __construct() {\n\n $this->setAttack();\n $this->setHP();\n $this->setName();\n $this->setStrategyIndex();\n $this->setIsFidai();\n\n }", "function __construct($code, $material, $content, $color, $height, $width, $depth, $date, $shelf, $rackPos, $corridor, $dateOut){\n parent::__construct($code, $material, $content, $color, $height, $width, $depth);\n $this->setDate($date);\n $this->setShelf($shelf);\n $this->setRackPos($rackPos);\n $this->setCorridor($corridor);\n $this->setDateOut($dateOut);\n }", "public function askForCard()\n {\n }", "public function construct()\n\t\t{\n\t\t}" ]
[ "0.6731327", "0.6697731", "0.63194466", "0.623935", "0.62231576", "0.6169787", "0.6117226", "0.60270745", "0.5968058", "0.5951144", "0.590135", "0.5790197", "0.5726359", "0.56830144", "0.5657663", "0.56167006", "0.5597553", "0.55824167", "0.55805516", "0.55763495", "0.5566274", "0.5565141", "0.55183095", "0.55047476", "0.550329", "0.5497334", "0.5493802", "0.5480178", "0.5477111", "0.5453732", "0.5449987", "0.5443842", "0.54428476", "0.5440941", "0.5440705", "0.5436019", "0.543486", "0.5426147", "0.5406756", "0.53906024", "0.5390047", "0.5384914", "0.5383355", "0.53830457", "0.5381039", "0.53647715", "0.5363906", "0.53606325", "0.53497815", "0.5344569", "0.53316957", "0.531785", "0.5317735", "0.5300432", "0.52827585", "0.52750164", "0.52543026", "0.5246077", "0.5239763", "0.5230247", "0.5228499", "0.5197627", "0.5194921", "0.51920426", "0.51912296", "0.5189658", "0.51734394", "0.5152709", "0.51461345", "0.51409626", "0.51401424", "0.51392186", "0.51320624", "0.5130244", "0.512891", "0.51279426", "0.51279426", "0.5124945", "0.5124187", "0.51226187", "0.512016", "0.5108617", "0.5108617", "0.5108617", "0.5108617", "0.5108617", "0.5108617", "0.5108617", "0.5108617", "0.5108617", "0.5108617", "0.51036805", "0.51014864", "0.50979465", "0.50979465", "0.5084257", "0.5083686", "0.50830394", "0.5076758", "0.50718033" ]
0.6587906
2
Handle an incoming request.
public function handle($request, Closure $next) { // Pre-Middleware Action $response = $next($request); // Post-Middleware Action return $this->logActivity($request, $response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function handle_request();", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "protected abstract function handleRequest();", "abstract public function handleRequest($request);", "abstract public function handleRequest(Request $request);", "public function handle($request);", "public function handleRequest() {}", "function handleRequest() ;", "public function handle(Request $request);", "protected function handle(Request $request) {}", "public function handle(array $request);", "public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }", "public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'checkoutLocker':\n $this->handleCheckoutLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'remindLocker':\n $this->handleRemindLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'returnLocker':\n $this->handleReturnLocker();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on Locker resource'));\n }\n }", "abstract protected function process(Request $request);", "public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }", "abstract function handle(Request $request, $parameters);", "protected function handle_request() {\r\n global $wp;\r\n $film_query = $wp->query_vars['films'];\r\n \r\n if (!$film_query) { // send all films\r\n $raw_data = $this->get_all_films();\r\n }\r\n else if ($film_query == \"featured\") { // send featured films\r\n $raw_data = $this->get_featured_films();\r\n }\r\n else if (is_numeric($film_query)) { // send film of id\r\n $raw_data = $this->get_film_by_id($film_query);\r\n }\r\n else { // input error\r\n $this->send_response('Bad Input');\r\n }\r\n\r\n $all_data = $this->get_acf_data($raw_data);\r\n $this->send_response('200 OK', $all_data);\r\n }", "public function handle(ServerRequestInterface $request);", "public function handleRequest()\n {\n $route = $this->router->match();\n\n if ($route) {\n $controllerName = $route['target']['controllerName'];\n $methodName = $route['target']['methodName'];\n\n $controller = new $controllerName();\n\n $controller->$methodName($route['params']);\n } else {\n header(\"HTTP:1.0 404 not Found\");\n echo json_encode([\n \"error_code\" => 404,\n \"reason\" => \"page not found\"\n ]);\n }\n }", "function handle(Request $request = null, Response $response = null);", "public function processRequest();", "public abstract function processRequest();", "public function handleRequest(Request $request, Response $response);", "abstract public function processRequest();", "public function handle(array $request = []);", "public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }", "public function handle(Request $request)\n {\n if ($request->header('X-GitHub-Event') === 'push') {\n return $this->handlePush($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'pull_request') {\n return $this->handlePullRequest($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'ping') {\n return $this->handlePing();\n }\n\n return $this->handleOther();\n }", "protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }", "public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }", "public static function handleRequest($request)\r\n {\r\n // Load controller for requested resource\r\n $controllerName = ucfirst($request->getRessourcePath()) . 'Controller';\r\n\r\n if (class_exists($controllerName))\r\n {\r\n $controller = new $controllerName();\r\n\r\n // Get requested action within controller\r\n $actionName = strtolower($request->getHTTPVerb()) . 'Action';\r\n\r\n if (method_exists($controller, $actionName))\r\n {\r\n // Do the action!\r\n $result = $controller->$actionName($request);\r\n\r\n // Send REST response to client\r\n $outputHandlerName = ucfirst($request->getFormat()) . 'OutputHandler';\r\n\r\n if (class_exists($outputHandlerName))\r\n {\r\n $outputHandler = new $outputHandlerName();\r\n $outputHandler->render($result);\r\n }\r\n }\r\n }\r\n }", "public function process(Request $request, Response $response, RequestHandlerInterface $handler);", "public function handle(Request $request)\n {\n $handler = $this->router->match($request);\n if (!$handler) {\n echo \"Could not find your resource!\\n\";\n return;\n }\n\n return $handler();\n }", "public function handleRequest() {\n\t\t\n\t\tif (is_null($this->itemObj)) {\n\t\t\t$this->itemObj = MovieServices::getVcdByID($this->getParam('vcd_id'));\n\t\t}\n\t\t\n\t\t$action = $this->getParam('action');\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'upload':\n\t\t\t\t$this->uploadImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'fetch':\n\t\t\t\t$this->fetchImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\n\t\t\tdefault:\n\t\t\t\tredirect();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function handle(Request $request): Response;", "public static function process_http_request()\n {\n }", "public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }", "abstract public function handle(ServerRequestInterface $request): ResponseInterface;", "public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "function handleRequest (&$request, &$context) {\n\n\t\t/* cycle through our process callback queue. using each() vs.\n\t\t * foreach, etc. so we may add elements to the callback array\n\t\t * later. probably primarily used for conditional callbacks. */\n\t\treset ($this->_processCallbacks);\n\t\twhile ($c = each ($this->_processCallbacks)) {\n\n\t\t\t// test for a successful view dispatch\n\t\t\tif ($this->_processProcess ($this->_processCallbacks[$c['key']],\n\t\t\t $request,\n\t\t\t $context))\n\t\t\t\treturn;\n\t\t}\n\n\t\t// if no view has been found yet attempt our default\n\t\tif ($this->defaultViewExists ())\n\t\t\t$this->renderDefaultView ($request, $context);\n\t}", "public function handle($request, $next);", "public function handle(): void\n {\n $globals = $_SERVER;\n //$SlimPsrRequest = ServerRequestFactory::createFromGlobals();\n //it doesnt matters if the Request is of different class - no need to create Guzaba\\Http\\Request\n $PsrRequest = ServerRequestFactory::createFromGlobals();\n //the only thing that needs to be fixed is the update the parsedBody if it is NOT POST & form-fata or url-encoded\n\n\n //$GuzabaPsrRequest =\n\n //TODO - this may be reworked to reroute to a new route (provided in the constructor) instead of providing the actual response in the constructor\n $DefaultResponse = $this->DefaultResponse;\n //TODO - fix the below\n// if ($PsrRequest->getContentType() === ContentType::TYPE_JSON) {\n// $DefaultResponse->getBody()->rewind();\n// $structure = ['message' => $DefaultResponse->getBody()->getContents()];\n// $json_string = json_encode($structure, JSON_UNESCAPED_SLASHES);\n// $StreamBody = new Stream(null, $json_string);\n// $DefaultResponse = $DefaultResponse->\n// withBody($StreamBody)->\n// withHeader('Content-Type', ContentType::TYPES_MAP[ContentType::TYPE_JSON]['mime'])->\n// withHeader('Content-Length', (string) strlen($json_string));\n// }\n\n $FallbackHandler = new RequestHandler($DefaultResponse);//this will produce 404\n $QueueRequestHandler = new QueueRequestHandler($FallbackHandler);//the default response prototype is a 404 message\n foreach ($this->middlewares as $Middleware) {\n $QueueRequestHandler->add_middleware($Middleware);\n }\n $PsrResponse = $QueueRequestHandler->handle($PsrRequest);\n $this->emit($PsrResponse);\n\n }", "public function HandleRequest(Request $request)\r\n {\r\n $command = $this->_commandResolver->GetCommand($request);\t// Create command object for Request\r\n $response = $command->Execute($request);\t\t\t\t\t// Execute the command to get response\r\n $view = ApplicationController::GetView($response);\t\t\t\t\t// Send response to the appropriate view for display\r\n $view->Render();\t\t\t\t\t\t\t\t\t\t\t// Display the view\r\n }", "public function process($path, Request $request);", "public function handle(string $query, ServerRequestInterface $request);", "public function handleRequest()\n\t{\n\t\t$fp = $this->fromRequest();\n\t\treturn $fp->render();\n\t}", "private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}", "public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}", "public function handle($request)\n {\n $this->setRouter($this->app->compose('Cygnite\\Base\\Router\\Router', $request), $request);\n\n try {\n $response = $this->sendRequestThroughRouter($request);\n /*\n * Check whether return value is a instance of Response,\n * otherwise we will try to fetch the response form container,\n * create a response and return to the browser.\n *\n */\n if (!$response instanceof ResponseInterface && !is_array($response)) {\n $r = $this->app->has('response') ? $this->app->get('response') : '';\n $response = Response::make($r);\n }\n } catch (\\Exception $e) {\n $this->handleException($e);\n } catch (Throwable $e) {\n $this->handleException($e);\n }\n\n return $response;\n }", "public function handleRequest()\n\t{\n $response = array();\n switch ($this->get_server_var('REQUEST_METHOD')) \n {\n case 'OPTIONS':\n case 'HEAD':\n $response = $this->head();\n break;\n case 'GET':\n $response = $this->get();\n break;\n case 'PATCH':\n case 'PUT':\n case 'POST':\n $response = $this->post();\n break;\n case 'DELETE':\n $response = $this->delete();\n break;\n default:\n $this->header('HTTP/1.1 405 Method Not Allowed');\n }\n\t\treturn $response;\n }", "public function handleRequest(Zend_Controller_Request_Http $request)\n {\n \n }", "final public function handle(Request $request)\n {\n $response = $this->process($request);\n if (($response === null) && ($this->successor !== null)) {\n $response = $this->successor->handle($request);\n }\n\n return $response;\n }", "public function process(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n\t\ttry {\r\n\t\t\t// Identify the path component we will use to select a mapping\r\n\t\t\t$path = $this->processPath($request, $response);\r\n\t\t\tif (is_null($path)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (self::$log->isDebugEnabled()) {\r\n\t\t\t\tself::$log->debug('Processing a \"' . $request->getMethod() . '\" for path \"' . $path . '\"');\r\n\t\t\t}\r\n\r\n\t\t\t// Select a Locale for the current user if requested\r\n\t\t\t$this->processLocale($request, $response);\r\n\r\n\t\t\t// Set the content type and no-caching headers if requested\r\n\t\t\t$this->processContent($request, $response);\r\n\t\t\t$this->processNoCache($request, $response);\r\n\r\n\t\t\t// General purpose preprocessing hook\r\n\t\t\tif (!$this->processPreprocess($request, $response)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Identify the mapping for this request\r\n\t\t\t$mapping = $this->processMapping($request, $response, $path);\r\n\t\t\tif (is_null($mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for any role required to perform this action\r\n\t\t\tif (!$this->processRoles($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process any ActionForm bean related to this request\r\n\t\t\t$form = $this->processActionForm($request, $response, $mapping);\r\n\t\t\t$this->processPopulate($request, $response, $form, $mapping);\r\n\t\t\tif (!$this->processValidate($request, $response, $form, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process a forward or include specified by this mapping\r\n\t\t\tif (!$this->processForward($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!$this->processInclude($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Create or acquire the Action instance to process this request\r\n\t\t\t$action = $this->processActionCreate($request, $response, $mapping);\r\n\t\t\tif (is_null($action)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Call the Action instance itself\r\n\t\t\t$forward = $this->processActionPerform($request, $response, $action, $form, $mapping);\r\n\r\n\t\t\t// Process the returned ActionForward instance\r\n\t\t\t$this->processForwardConfig($request, $response, $forward);\r\n\t\t} catch (ServletException $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "function handleRequest() {\n // I. On récupère l'action demandée par l'utilisateur, avec retrocompatibilité\n // Controller et Entité\n $entityName = (isset($_GET['controller']) ? $_GET['controller'] : \"article\");\n // on retravaille le nom pour obtenir un nom de la forme \"Article\"\n $entityName = ucfirst(strtolower($entityName));\n\n // Action\n $actionName = (isset($_GET['action']) ? $_GET['action'] : \"index\");\n $actionName = strtolower($actionName);\n\n // II à IV sont maintenant dans loadDep\n $controller = $this->loadDependencies($entityName);\n\n // V. On regarde si l'action de controller existe, puis on la charge\n // on retravaille la var obtenue pour obtenir un nom de la forme \"indexAction\"\n $action = $actionName . \"Action\";\n\n // si la méthode demandée n'existe pas, remettre \"index\"\n if (!method_exists($controller, $action)) {\n $actionName = \"index\";\n $action = \"indexAction\";\n }\n\n // on stock le titre sous la forme \"Article - Index\"\n $this->title = $entityName . \" - \" . $actionName;\n\n // on appelle dynamiquement la méthode de controller\n $this->content = $controller->$action();\n }", "public function handle(RequestInterface $request): ResponseInterface;", "public function handleRequest() {\n $this->loadErrorHandler();\n\n $this->sanitizeRequest();\n $this->modx->invokeEvent('OnHandleRequest');\n if (!$this->modx->checkSiteStatus()) {\n header('HTTP/1.1 503 Service Unavailable');\n if (!$this->modx->getOption('site_unavailable_page',null,1)) {\n $this->modx->resource = $this->modx->newObject('modDocument');\n $this->modx->resource->template = 0;\n $this->modx->resource->content = $this->modx->getOption('site_unavailable_message');\n } else {\n $this->modx->resourceMethod = \"id\";\n $this->modx->resourceIdentifier = $this->modx->getOption('site_unavailable_page',null,1);\n }\n } else {\n $this->checkPublishStatus();\n $this->modx->resourceMethod = $this->getResourceMethod();\n $this->modx->resourceIdentifier = $this->getResourceIdentifier($this->modx->resourceMethod);\n if ($this->modx->resourceMethod == 'id' && $this->modx->getOption('friendly_urls', null, false) && !$this->modx->getOption('request_method_strict', null, false)) {\n $uri = $this->modx->context->getResourceURI($this->modx->resourceIdentifier);\n if (!empty($uri)) {\n if ((integer) $this->modx->resourceIdentifier === (integer) $this->modx->getOption('site_start', null, 1)) {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL);\n } else {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL) . $uri;\n }\n $this->modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));\n }\n }\n }\n if (empty ($this->modx->resourceMethod)) {\n $this->modx->resourceMethod = \"id\";\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $this->modx->resourceIdentifier = $this->_cleanResourceIdentifier($this->modx->resourceIdentifier);\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $found = $this->findResource($this->modx->resourceIdentifier);\n if ($found) {\n $this->modx->resourceIdentifier = $found;\n $this->modx->resourceMethod = 'id';\n } else {\n $this->modx->sendErrorPage();\n }\n }\n $this->modx->beforeRequest();\n $this->modx->invokeEvent(\"OnWebPageInit\");\n\n if (!is_object($this->modx->resource)) {\n if (!$this->modx->resource = $this->getResource($this->modx->resourceMethod, $this->modx->resourceIdentifier)) {\n $this->modx->sendErrorPage();\n return true;\n }\n }\n\n return $this->prepareResponse();\n }", "public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n );", "protected function handleRequest() {\n\t\t// TODO: remove conditional when we have a dedicated error render\n\t\t// page and move addModule to Mustache#getResources\n\t\tif ( $this->adapter->getFormClass() === 'Gateway_Form_Mustache' ) {\n\t\t\t$modules = $this->adapter->getConfig( 'ui_modules' );\n\t\t\tif ( !empty( $modules['scripts'] ) ) {\n\t\t\t\t$this->getOutput()->addModules( $modules['scripts'] );\n\t\t\t}\n\t\t\tif ( $this->adapter->getGlobal( 'LogClientErrors' ) ) {\n\t\t\t\t$this->getOutput()->addModules( 'ext.donationInterface.errorLog' );\n\t\t\t}\n\t\t\tif ( !empty( $modules['styles'] ) ) {\n\t\t\t\t$this->getOutput()->addModuleStyles( $modules['styles'] );\n\t\t\t}\n\t\t}\n\t\t$this->handleDonationRequest();\n\t}", "public function handleHttpRequest($requestParams)\n\t{\n\t\t$action = strtolower(@$requestParams[self::REQ_PARAM_ACTION]);\t\t\n\t\t$methodName = $this->actionToMethod($action);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->$methodName($requestParams);\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\techo \"Error: \".$e->getMessage();\n\t\t}\n\t}", "public static function handleRequest()\n\t{\n\t\t// Load language strings\n\t\tself::loadLanguage();\n\n\t\t// Load the controller and let it run the show\n\t\trequire_once dirname(__FILE__).'/classes/controller.php';\n\t\t$controller = new LiveUpdateController();\n\t\t$controller->execute(JRequest::getCmd('task','overview'));\n\t\t$controller->redirect();\n\t}", "public function handle() {\n $this->initDb(((!isset(self::$_config['db']['type'])) ? 'mysql' : self::$_config['db']['type']));\n $request = new corelib_request(self::$_config['routing'], self::$_config['reg_routing']);\n $path = parse_url($_SERVER['REQUEST_URI']);\n\n if (self::$_config['home'] == \"/\" || self::$_config['home'] == \"\") {\n $uri = ltrim($path['path'], '/');\n } else {\n $uri = str_replace(self::$_config['home'], '', $path['path']);\n }\n\n if (\"\" == $uri || \"/\" == $uri) {\n $uri = self::$_config['routing']['default']['controller'] . '/' . self::$_config['routing']['default']['action'];\n }\n self::$isAjax = $request->isAjax();\n self::$request = $request->route($uri);\n self::$request['uri'] = $uri;\n\n if (self::$request['action'] == \"\")\n self::$request['action'] = self::$_config['routing']['default']['action'];\n\n $this->_run( self::$request['params'] );\n }", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function handle() {\n if(method_exists($this->class, $this->function)) {\n echo $this->class->{$this->function}($this->request);\n }else {\n echo Response::response(['error' => 'function does not exist on ' . get_class($this->class)], 500);\n }\n }", "public function handle(ClientInterface $client, RequestInterface $request, HttpRequest $httpRequest);", "public function handleRequest() {\n $questions=$this->contactsService->getAllQuestions(\"date\");\n //load all the users\n $userList = User::loadUsers();\n //load all the topics\n \t\t$topics = $this->contactsService2->getAllTopics(\"name\");\n \t\t\n\t\t\t\trequire_once '../view/home.tpl';\n\t}", "public function serve_request()\n {\n }", "public static function process($request){\r\n\t\tcall_user_func($request -> action, $request -> params);\r\n\t}", "function process($request) {\n\t//$logFusion =& LoggerManager::getLogger('fusion');\n//PBXFusion begin\n\t$request=$this->mapRequestVars($request);\n $mode = $request->get('callstatus');\n\t//$logFusion->debug(\"PBX CONTROLLER PROCESS mode=\".$mode);\n//PBXFusion end\n switch ($mode) {\n\t//PBXFusion begin\n \t case \"CallStart\" :\n $this->processCallStart($request);\n break;\n\t//PBXFusion end\n case \"StartApp\" :\n $this->processStartupCallFusion($request);\n break;\n case \"DialAnswer\" :\n $this->processDialCallFusion($request);\n break;\n case \"Record\" :\n $this->processRecording($request);\n break;\n case \"EndCall\" :\n $this->processEndCallFusion($request);\n break;\n case \"Hangup\" :\n $callCause = $request->get('causetxt');\n if ($callCause == \"null\") {\n break;\n }\n $this->processHangupCall($request);\n break;\n }\n }", "public function handle() {\n\t\n\t\t$task = $this->request->getTask();\n\t\t$handler = $this->resolveHandler($task);\n\t\t$action = $this->request->getAction();\n\t\t$method = empty($action) ? $this->defaultActionMethod : $action.$this->actionMethodSuffix;\n\t\t\n\t\tif (! method_exists($handler, $method)) {\n\t\t\tthrow new Task\\NotHandledException(\"'{$method}' method not found on handler.\");\n\t\t}\n\t\t\n\t\t$handler->setRequest($this->request);\n\t\t$handler->setIo($this->io);\n\t\t\n\t\treturn $this->invokeHandler($handler, $method);\n\t}", "private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }", "function handle()\n {\n $this->verifyPost();\n\n $postTarget = $this->determinePostTarget();\n\n $this->filterPostData();\n\n switch ($postTarget) {\n case 'upload_media':\n $this->handleMediaFileUpload();\n break;\n case 'feed':\n $this->handleFeed();\n break;\n case 'feed_media':\n $this->handleFeedMedia();\n break;\n case 'feed_users':\n $this->handleFeedUsers();\n break;\n case 'delete_media':\n $this->handleDeleteMedia();\n break;\n }\n }", "public function run() {\n\t\t// If this particular request is not a hook, something is wrong.\n\t\tif (!isset($this->server[self::MERGADO_HOOK_AUTH_HEADER])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s is to be used only for handling hooks sent from Mergado.\n\t\t\t\tMergado-Apps-Hook-Auth is missing.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t}\n\n\t\tif (!$decoded = json_decode($this->rawRequest, true)) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle request, because the data to be handled is empty.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t} elseif (!isset($decoded['action'])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle the hook, because the hook action is undefined.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t};\n\n\t\t$this->handle($decoded['action'], $decoded);\n\n\t}", "public function handleRequest()\n {\n $version = $this->versionEngine->getVersion();\n $queryConfiguration = $version->parseRequest($this->columnConfigurations);\n $this->provider->prepareForProcessing($queryConfiguration, $this->columnConfigurations);\n $data = $this->provider->process();\n return $version->createResponse($data, $queryConfiguration, $this->columnConfigurations);\n }", "public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}", "public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }", "final public function handle()\n {\n \n $this->_preHandle();\n \n if ($this->_request->getActionName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the action name.');\n }\n\n if ($this->_request->getProviderName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the provider name.');\n }\n \n ob_start();\n \n try {\n $dispatcher = new ZendL_Tool_Rpc_Endpoint_Dispatcher();\n $dispatcher->setRequest($this->_request)\n ->setResponse($this->_response)\n ->dispatch();\n \n } catch (Exception $e) {\n //@todo implement some sanity here\n die($e->getMessage());\n //$this->_response->setContent($e->getMessage());\n return;\n }\n \n if (($content = ob_get_clean()) != '') {\n $this->_response->setContent($content);\n }\n \n $this->_postHandle();\n }", "public function RouteRequest ();", "public function handle(ServerRequestInterface $request, $handler, array $vars): ?ResponseInterface;", "public function DispatchRequest ();", "protected function handleRequest() {\n\t\t// FIXME: is this necessary?\n\t\t$this->getOutput()->allowClickjacking();\n\t\tparent::handleRequest();\n\t}", "public function listen() {\n\t\t// Checks the user agents match\n\t\tif ( $this->user_agent == $this->request_user_agent ) {\n\t\t\t// Determine if a key request has been made\n\t\t\tif ( isset( $_GET['key'] ) ) {\n\t\t\t\t$this->download_update();\n\t\t\t} else {\n\t\t\t\t// Determine the action requested\n\t\t\t\t$action = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_STRING );\n\n\t\t\t\t// If that method exists, call it\n\t\t\t\tif ( method_exists( $this, $action ) )\n\t\t\t\t\t$this->{$action}();\n\t\t\t}\n\t\t}\n\t}", "abstract public function request();", "public function run() {\r\n $this->routeRequest(new Request());\r\n }", "public function processAction(Request $request)\n {\n // Get the request Vars\n $this->requestQuery = $request->query;\n\n // init the hybridAuth instance\n $provider = trim(strip_tags($this->requestQuery->get('hauth_start')));\n $cookieName = $this->get('azine_hybrid_auth_service')->getCookieName($provider);\n $this->hybridAuth = $this->get('azine_hybrid_auth_service')->getInstance($request->cookies->get($cookieName), $provider);\n\n // If openid_policy requested, we return our policy document\n if ($this->requestQuery->has('get') && 'openid_policy' == $this->requestQuery->get('get')) {\n return $this->processOpenidPolicy();\n }\n\n // If openid_xrds requested, we return our XRDS document\n if ($this->requestQuery->has('get') && 'openid_xrds' == $this->requestQuery->get('get')) {\n return $this->processOpenidXRDS();\n }\n\n // If we get a hauth.start\n if ($this->requestQuery->has('hauth_start') && $this->requestQuery->get('hauth_start')) {\n return $this->processAuthStart();\n }\n // Else if hauth.done\n elseif ($this->requestQuery->has('hauth_done') && $this->requestQuery->get('hauth_done')) {\n return $this->processAuthDone($request);\n }\n // Else we advertise our XRDS document, something supposed to be done from the Realm URL page\n\n return $this->processOpenidRealm();\n }", "public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }", "public function handle(Request $request, Response|JsonResponse|BinaryFileResponse|StreamedResponse $response, int $length);", "public function handle(Request $request, Closure $next);", "public function handleGetRequest($id);", "abstract function doExecute($request);", "public function parseCurrentRequest()\n {\n // If 'action' is post, data will only be read from 'post'\n if ($action = $this->request->post('action')) {\n die('\"post\" method action handling not implemented');\n }\n \n $action = $this->request->get('action') ?: 'home';\n \n if ($response = $this->actionHandler->trigger($action, $this)) {\n $this->getResponder()->send($response);\n } else {\n die('404 not implemented');\n }\n }", "abstract public function mapRequest($request);", "public function handle(ServerRequestInterface $request)\n {\n $router = $this->app->get(RouterInterface::class);\n $response = $router->route($request);\n\n if (! headers_sent()) {\n\n // Status\n header(sprintf(\n 'HTTP/%s %s %s',\n $response->getProtocolVersion(),\n $response->getStatusCode(),\n $response->getReasonPhrase()\n ));\n\n // Headers\n foreach ($response->getHeaders() as $name => $values) {\n foreach ($values as $value) {\n header(sprintf('%s: %s', $name, $value), false);\n }\n }\n }\n\n echo $response->getBody()->getContents();\n }", "abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);", "private function handleRequest()\n {\n // we check the inputs validity\n $validator = Validator::make($this->request->only('rowsNumber', 'search', 'sortBy', 'sortDir'), [\n 'rowsNumber' => 'required|numeric',\n 'search' => 'nullable|string',\n 'sortBy' => 'nullable|string|in:' . $this->columns->implode('attribute', ','),\n 'sortDir' => 'nullable|string|in:asc,desc',\n ]);\n // if errors are found\n if ($validator->fails()) {\n // we log the errors\n Log::error($validator->errors());\n // we set back the default values\n $this->request->merge([\n 'rowsNumber' => $this->rowsNumber ? $this->rowsNumber : config('tablelist.default.rows_number'),\n 'search' => null,\n 'sortBy' => $this->sortBy,\n 'sortDir' => $this->sortDir,\n ]);\n } else {\n // we save the request values\n $this->setAttribute('rowsNumber', $this->request->rowsNumber);\n $this->setAttribute('search', $this->request->search);\n }\n }", "public function handle() {\n\t\t\n\t\t\n\t\t\n\t\theader('ApiVersion: 1.0');\n\t\tif (!isset($_COOKIE['lg_app_guid'])) {\n\t\t\t//error_log(\"NO COOKIE\");\n\t\t\t//setcookie(\"lg_app_guid\", uniqid(rand(),true),time()+(10*365*24*60*60));\n\t\t} else {\n\t\t\t//error_log(\"cookie: \".$_COOKIE['lg_app_guid']);\n\t\t\t\n\t\t}\n\t\t// checks if a JSON-RCP request has been received\n\t\t\n\t\tif (($_SERVER['REQUEST_METHOD'] != 'POST' && (empty($_SERVER['CONTENT_TYPE']) || strpos($_SERVER['CONTENT_TYPE'],'application/json')===false)) && !isset($_GET['d'])) {\n\t\t\t\techo \"INVALID REQUEST\";\n\t\t\t// This is not a JSON-RPC request\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\t// reads the input data\n\t\tif (isset($_GET['d'])) {\n\t\t\tdefine(\"WEB_REQUEST\",true);\n\t\t\t$request=urldecode($_GET['d']);\n\t\t\t$request = stripslashes($request);\n\t\t\t$request = json_decode($request, true);\n\t\t\t\n\t\t} else {\n\t\t\tdefine(\"WEB_REQUEST\",false);\n\t\t\t//error_log(file_get_contents('php://input'));\n\t\t\t$request = json_decode(file_get_contents('php://input'),true);\n\t\t\t//error_log(print_r(apache_request_headers(),true));\n\t\t}\n\t\t\n\t\terror_log(\"Method: \".$request['method']);\n\t\tif (!isset($this->exemptedMethods[$request['method']])) {\n\t\t\ttry {\n\t\t\t\t$this->authenticate();\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->authenticated = false;\n\t\t\t\t$this->handleError($e);\n\t\t\t}\n\t\t} else {\n\t\t\t//error_log('exempted');\n\t\t}\n\t\ttrack_call($request);\n\t\t//error_log(\"RPC Method Called: \".$request['method']);\n\t\t\n\t\t//include the document containing the function being called\n\t\tif (!function_exists($request['method'])) {\n\t\t\t$path_to_file = \"./../include/methods/\".$request['method'].\".php\";\n\t\t\tif (file_exists($path_to_file)) {\n\t\t\t\tinclude $path_to_file;\n\t\t\t} else {\n\t\t\t\t$e = new Exception('Unknown method. ('.$request['method'].')', 404, null);\n \t$this->handleError($e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t// executes the task on local object\n\t\ttry {\n\t\t\t\n\t\t\t$result = @call_user_func($request['method'],$request['params']);\n\t\t\t\n\t\t\tif (!is_array($result) || !isset($result['result']) || $result['result']) {\n\t\t\t\t\n\t\t\t\tif (is_array($result) && isset($result['result'])) unset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'result' => $result,\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tunset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'error' => $result\n\t\t\t\t\t\t\t\t );\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$response = array (\n\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t'result' => NULL,\n\t\t\t\t\t\t\t\t'error' => $e->getMessage()\n\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t}\n\t\t// output the response\n\t\tif (!empty($request['id'])) { // notifications don't want response\n\t\t\theader('content-type: text/javascript');\n\t\t\t//error_log(@print_r($response));\n\t\t\tif (isset($_GET['d'])) $str_response = $_GET['jsoncallback'].\"(\".str_replace('\\/','/',json_encode($response)).\")\";\n\t\t\telse $str_response = str_replace('\\/','/',json_encode($response));\n\t\t\t\n\t\t\tif ($_SERVER['SERVER_ADDR']=='192.168.1.6') {\n\t\t\t\t//error_log($str_response);\n\t\t\t}\n\t\t\techo $str_response;\n\t\t}\n\t\t\n\t\t\n\t\t// finish\n\t\treturn true;\n\t}", "protected function handle(Request $request)\n {\n return 1;\n }", "public function __invoke(Request $request, RequestHandler $handler) {\n R::setup('mysql:host=127.0.0.1;dbname=cellar','root','');\n \n $response = $handler->handle($request);\n R::close();\n return $response;\n }", "public function handle($req)\n {\n $params = $req->post ?: [];\n\n $files = $this->transformFiles($req->files);\n\n $cookies = $req->cookie ?: [];\n\n $server = $this->transformHeadersToServerVars(array_merge($req->header, [\n 'PATH_INFO' => array_get($req->server, 'path_info'),\n ]));\n $server['X_REQUEST_ID'] = Str::uuid()->toString();\n\n $requestUri = $req->server['request_uri'];\n if (isset($req->server['query_string']) && $req->server['query_string']) {\n $requestUri .= \"?\" . $req->server['query_string'];\n }\n\n $resp = $this->call(\n strtolower($req->server['request_method']),\n $requestUri, $params, $cookies, $files,\n $server, $req->rawContent()\n );\n\n return [\n 'status' => $resp->getStatusCode(),\n 'headers' => $resp->headers,\n 'body' => $resp->getContent(),\n ];\n }", "public function handle(Request $request)\n {\n $route_params = $this->_router->match($request->getUri());\n $route = $route_params['route'];\n $params = $route_params['params'];\n\n $func = reset($route) . self::CONTROLLER_METHOD_SUFIX;\n $class_name = key($route);\n $controller = new $class_name($request);\n\n $response = call_user_func_array(\n [\n $controller,\n $func,\n ],\n [$params]\n );\n\n if ($response instanceof Response) {\n return $response;\n } else {\n throw new InvalidHttpResponseException();\n }\n }" ]
[ "0.8299201", "0.8147294", "0.8147294", "0.8147294", "0.8127764", "0.7993589", "0.7927201", "0.7912899", "0.7899075", "0.76317674", "0.75089735", "0.7485808", "0.74074036", "0.7377414", "0.736802", "0.7294553", "0.72389543", "0.7230166", "0.72108", "0.71808434", "0.7170364", "0.71463037", "0.7126907", "0.7122795", "0.71225274", "0.7116879", "0.70607233", "0.6981947", "0.6966695", "0.69393975", "0.6912079", "0.68985975", "0.6887614", "0.68774897", "0.6806274", "0.67969805", "0.67778915", "0.6762979", "0.67565143", "0.67533374", "0.67192745", "0.6683243", "0.66487724", "0.66395754", "0.6634629", "0.66283566", "0.6617558", "0.6610097", "0.6610011", "0.6544976", "0.653806", "0.6512757", "0.64682734", "0.64381886", "0.6416964", "0.63373476", "0.63359964", "0.6334543", "0.63308066", "0.6321675", "0.63176167", "0.631661", "0.6310991", "0.63108873", "0.6295945", "0.6279438", "0.62778515", "0.62508965", "0.62422955", "0.62321424", "0.62237644", "0.6203428", "0.61954546", "0.6191255", "0.61774665", "0.61682004", "0.6151806", "0.61271876", "0.61257905", "0.6116093", "0.61126447", "0.6112368", "0.6101652", "0.60893977", "0.60871464", "0.60862815", "0.60734737", "0.60535145", "0.6028341", "0.60250086", "0.60224646", "0.6011745", "0.6011483", "0.60106593", "0.5998867", "0.5997086", "0.5991233", "0.59844923", "0.59668386", "0.5961315", "0.5954762" ]
0.0
-1
Create a new AdminController instance.
public function __construct() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createAdmin()\r\n\t{\r\n\t\treturn new Admin();\r\n\t}", "public function create()\n {\n //\n return $this->formView( new Admin() );\n }", "protected function createController()\n {\n $this->createClass('controller');\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "public function __construct(AdminController $controller)\n {\n $this->controller = $controller;\n }", "public function create()\n {\n Auth::check();\n return view(\"ControlPanel.admin.create\");\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "function admin(): Admin\n {\n return Admin::app();\n }", "public function admin_create()\n {\n return View::make('admin_create');\n }", "public function createController( ezcMvcRequest $request );", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "public function admin() {\n return new Administration($this->dbTablePrefix, $this->dbSchema);\n }", "public function create()\n {\n //\n // return view('addAdmin');\n }", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public function create()\n {\n // $this->authorize('create');\n // return view('admin.admins.show');\n }", "public function create()\n {\n $roleConfig = config('constants.admin.role');\n\n return view('admin.admins.create', compact('roleConfig'));\n }", "public function create()\n {\n //\n return view ('theme.admin.create_admin');\n }", "public function create(AdminRequest $request)\n {\n return view('admin/role')->withCreate('1');\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "public function create()\n\t{\n\t\t\n return view('pages.createadmin');\n\t}", "public function creating(Admin $admin) {\n\n $this->capitalizeName($admin);\n }", "protected function create(){\n $subadmin = new Admin;\n return view('subadmin.create', compact('subadmin'));\n }", "public function create()\n {\n return view('dashboard.admin.create');\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 create()\n {\n return view('Administrators/create');\n }", "public function create()\n {\n return view('admin/administrator/create');\n }", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "public function create()\n {\n return view('admin.admins.create'); \n }", "public function create()\n {\n return view('create_admins');\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "public function create()\n {\n return view('admin.index');\n }", "public function create()\n {\n return view('admin.admins.create');\n }", "public function create()\n {\n return view('admin.admins.create');\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "public function create()\n {\n return view('thuthuy.pages.admin.create');\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "public function create() {\r\n return View::make('admin.create');\r\n }", "public function setAdminControllers() {\n\t\t$this->aAdminControllers = array(\n\t\t\t'AdminCategorySlide' => array(\n\t\t\t\t'parent' => 'AdminParentNinjaOfWeb',\n\t\t\t\t'name' => $this->l('Manage Category Slide')\n\t\t\t)\n\t\t);\n\t}", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public function create()\n {\n if (Gate::denies('admins.create', Auth::user())) {\n return response()->view('errors.403', [], 403);\n }\n $data = [\n 'languages' => array(\n 'english',\n 'arabic'\n ),\n 'nationalities' => array(\n 'Egyptian',\n 'Saudian'\n ),\n 'formRoute' => route('admins.store'),\n 'submitBtn' => trans('admin.update')\n ];\n return view(AD . '.admins.form')->with($data);\n }", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function create()\n {\n //\n return response()->view('admin.create');\n }", "public function __construct() {\n\t\t$this->middleware('admin');\n\t}", "public function create()\n {\n return view('admin.admin.create');\n }", "public function create()\n {\n return view('admin.admin.create');\n }", "public static function start() {\n\t\t\tif ( ! is_admin() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$wct = wct();\n\n\t\t\tif ( empty( $wct->admin ) ) {\n\t\t\t\t$wct->admin = new self;\n\t\t\t}\n\n\t\t\treturn $wct->admin;\n\t\t}", "public function adminCreate()\n {\n $config = $this->getFormData();\n// dd($config);\n $config['pageTitle'] = trans('app.pages');\n $config['route'] = route('app.pages.create');\n\n return view('admin.form', $config);\n }", "public function createAdmin()\n {\n if(Auth::user()->role()->first()['id'] != 1 ){\n return redirect('/unauthorised')->with('error', 'Error 403');\n }\n return view('users.admins.new');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\n }", "public function __construct()\n {\n $this->middleware('admin');\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 }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public function __construct() {\n\n $this->middleware('admin');\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 }", "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 }", "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 }", "public function create()\n {\n return view('admin.create');\n }", "public function create()\n {\n return view('admin::frontend.admins.create');\n }", "public function create()\n {\n return view ('user.actions.administrator.create');\n }", "public function create()\n {\n return view('admin.admins.admins.create');\n }", "public function init()\n {\n new Admin(); // Admin class\n }", "public function create()\n {\n return view('admins.create');\n }" ]
[ "0.7371295", "0.67020696", "0.66882306", "0.65783566", "0.6496859", "0.64778155", "0.63994706", "0.617518", "0.61198044", "0.6117927", "0.6111249", "0.61013013", "0.60828626", "0.60757244", "0.6071267", "0.605377", "0.60490865", "0.59996194", "0.5973852", "0.5971252", "0.59709036", "0.5966626", "0.5949656", "0.5912608", "0.5906954", "0.5903324", "0.5867205", "0.5841516", "0.58238214", "0.5820551", "0.58063567", "0.58023745", "0.5798212", "0.5793865", "0.5793865", "0.5791876", "0.5791325", "0.5790879", "0.5789955", "0.57868516", "0.5784342", "0.57617086", "0.5756709", "0.5754724", "0.5753468", "0.57448786", "0.57416266", "0.57416266", "0.57230633", "0.5718858", "0.57146597", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.5712871", "0.57123595", "0.5709431", "0.5700653", "0.5695687", "0.5695687", "0.5695687", "0.5695687", "0.5695687", "0.5695687", "0.5695687", "0.5695687", "0.5695687", "0.5695687", "0.5695687", "0.5695687", "0.56872874", "0.5679909", "0.5675311", "0.56739414", "0.5670002" ]
0.0
-1
Show the media panel.
public function filemanager() { $url = config('files.url') . '?langCode=' . config('app.locale'); return view('admin.filemanager', compact('url')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Media $media)\n {\n //\n }", "public function show(Media $media)\n {\n //\n }", "public function displayMedia()\n {\n // section 127-0-1-1--35dee990:156e03a0457:-8000:00000000000008CC begin\n // section 127-0-1-1--35dee990:156e03a0457:-8000:00000000000008CC end\n }", "public function index(){\r\n\t\t$this->title = 'Media';\t\t\r\n\t\treturn $this->renderWith(array('Media','App'));\r\n\t}", "public function index()\n {\n return view('medialibrary::media');\n }", "public function show()\n {\n $id = request('id');\n $items = MediaItems::all();\n return view('mediaId', compact('id' , 'items'));\n }", "public function media() {\n $data['media'] = $this->index_mod->select_data('media', 'media_status', 'active');\n\n $data['title'] = \"sdsad\";\n $data['description'] = \"sadsad\";\n $data['keyword'] = \"sadasdasd\";\n\n $this->load->view('header', $data);\n $this->load->view('media');\n $this->load->view('footer');\n }", "public function show()\n {\n return $this->render('OpenOrchestraMediaAdminBundle:Block/DisplayMedia:showIcon.html.twig');\n }", "public function index()\n {\n $medias = Media::all();\n return view('admin.media.index', compact('medias'));\n }", "protected function manage()\n\t{\n\t\tif ( \\IPS\\Theme::designersModeEnabled() )\n\t\t{\n\t\t\t$link = \\IPS\\Http\\Url::internal( 'app=core&module=customization&controller=themes&do=designersmode' );\n\t\t\t\\IPS\\Output::i()->output .= \\IPS\\Theme::i()->getTemplate( 'global', 'core', 'global' )->message( \\IPS\\Member::loggedIn()->language()->addToStack('cms_media_designer_mode_warning', NULL, array( 'sprintf' => array( $link ) ) ), 'information', NULL, FALSE );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url = \\IPS\\Http\\Url::internal( \"app=cms&module=pages&controller=media\" );\n\t\n\t\t\t/* Display the table */\n\t\t\t\\IPS\\Output::i()->title = \\IPS\\Member::loggedIn()->language()->addToStack('menu__cms_pages_media');\n\t\t\t$output = new \\IPS\\Helpers\\Tree\\Tree( $url, 'menu__cms_pages_media',\n\t\t\t\t/* Get Roots */\n\t\t\t\tfunction () use ( $url )\n\t\t\t\t{\n\t\t\t\t\t$data = \\IPS\\cms\\modules\\admin\\pages\\media::getRowsForTree( 0 );\n\t\t\t\t\t$rows = array();\n\t\n\t\t\t\t\tforeach ( $data as $id => $row )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( ( \\IPS\\Request::i()->isAjax() && $row instanceof \\IPS\\cms\\Media ) || !\\IPS\\Request::i()->isAjax() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$rows[ $id ] = ( $row instanceof \\IPS\\cms\\Media) ? \\IPS\\cms\\modules\\admin\\pages\\media::getItemRow( $row, $url ) : \\IPS\\cms\\modules\\admin\\pages\\media::getFolderRow( $row, $url );\t\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif( \\IPS\\Request::i()->isAjax() ){\n\t\t\t\t\t\t\\IPS\\Output::i()->sendOutput( json_encode( $rows ), 200, 'application/json', \\IPS\\Output::i()->httpHeaders );\n\t\t\t\t\t}\n\t\n\t\t\t\t\treturn $data;\n\t\t\t\t},\n\t\t\t\t/* Get Row */\n\t\t\t\tfunction ( $id, $root ) use ( $url )\n\t\t\t\t{\n\t\t\t\t\tif ( $root )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn \\IPS\\cms\\modules\\admin\\pages\\media::getFolderRow( \\IPS\\cms\\Media\\Folder::load( $id ), $url );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn \\IPS\\cms\\modules\\admin\\pages\\media::getItemRow( \\IPS\\cms\\Media::load( $id ), $url );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t/* Get Row Parent ID*/\n\t\t\t\tfunction ()\n\t\t\t\t{\n\t\t\t\t\treturn NULL;\n\t\t\t\t},\n\t\t\t\t/* Get Children */\n\t\t\t\tfunction ( $id ) use ( $url )\n\t\t\t\t{\n\t\t\t\t\t$rows = array();\n\t\t\t\t\t$data = \\IPS\\cms\\modules\\admin\\pages\\media::getRowsForTree( $id );\n\t\n\t\t\t\t\tif ( ! isset( \\IPS\\Request::i()->subnode ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ( $data as $id => $row )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( \\IPS\\Request::i()->get == 'folders' && !( $row instanceof \\IPS\\cms\\Media ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$rows[ $id ] = \\IPS\\cms\\modules\\admin\\pages\\media::getFolderRow( $row, $url );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif ( \\IPS\\Request::i()->get == 'files' && $row instanceof \\IPS\\cms\\Media )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$rows[ $id ] = \\IPS\\cms\\modules\\admin\\pages\\media::getItemRow( $row, $url );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif( \\IPS\\Request::i()->isAjax() ){\n\t\t\t\t\t\t\\IPS\\Output::i()->sendOutput( json_encode( $rows ), 200, 'application/json', \\IPS\\Output::i()->httpHeaders );\n\t\t\t\t\t}\n\t\n\t\t\t\t\treturn $rows;\n\t\t\t\t},\n\t array( $this, '_getRootButtons' ),\n\t TRUE,\n\t FALSE,\n\t FALSE\n\t\t\t);\n\t\t\t\n\t\t\t\\IPS\\Output::i()->jsFiles = array_merge( \\IPS\\Output::i()->jsFiles, \\IPS\\Output::i()->js( 'admin_media.js', 'cms' ) );\n\t\t\t\\IPS\\Output::i()->cssFiles = array_merge( \\IPS\\Output::i()->cssFiles, \\IPS\\Theme::i()->css( 'media/media.css', 'cms', 'admin' ) );\n\t\t\t\n\t\t\tif( \\IPS\\Request::i()->isAjax() )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->sendOutput( $output, 200, 'text/html', \\IPS\\Output::i()->httpHeaders );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->output = \\IPS\\Theme::i()->getTemplate( 'media', 'cms', 'admin' )->media( $output );\t\n\t\t\t}\n\t\t}\n\t}", "public function media_button()\n\t{\n\t\t$type = 'picasa';\n\t\t$id = 'picasa';\n\t\t$title = \"Add Picasa Media\";\n\t\t$icon = plugins_url('/images/picasa-logo.png', __FILE__);\n\n\t\techo \"<a href='\" . esc_url( get_upload_iframe_src($type) ) . \"' id='{$id}-add_{$type}' class='thickbox add_$type' title='\" . esc_attr( $title ) . \"'><img src='\" . $icon . \"' alt='$title' onclick='return false;' /></a>\";\n\t}", "public function show($id)\n {\n $media = $this->fb_media->getAdMedia($id);\n \n $path = Fb_AdUtilities::thumbview_media_path();\n \n $media_config = Config('facebook.MEDIA_IMAGES');\n \n return view('admanager.admedia.show', compact('media', 'path', 'media_config'));\n }", "public function show($id)\n {\n //\n // // return view('media.show', compact('all'));\n // return redirect ( route ( 'admin.media.index' ) );\n }", "public function show(Media $media)\n {\n return view('media.view',compact('media'));\n }", "function show_panel()\n\t{\n\t\tglobal $template, $errors, $Cl_root_path;\n\t\t\n\t\t$template->assign_files( array(\n\t\t\t'ACP_MoreContent' => 'ACP/MoreContent' . tplEx\n\t\t) );\n\t\t\n\t\t// get the subsubmode\n\t\t$sub = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : 'add';\n\t\t\n\t\t\t\n\t\tswitch( $sub )\n\t\t{\n\t\t\tcase 'manage':\n\t\t\t\t$this->manage();\n\t\t\t\tbreak;\n\t\t\tcase 'manage2':\n\t\t\t\t$this->manage2();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function setMedia()\n {\n parent::setMedia();\n $this->addJqueryPlugin('wpproductcarousels.admin', __PS_BASE_URI__.'modules/wpproductcarousels/views/js/admin/');\n $this->addJqueryPlugin('autocomplete');\n $this->addCSS(__PS_BASE_URI__.'modules/wpproductcarousels/views/css/admin/wpproductcarousels.css');\n }", "public function show($id)\n {\n //\n $media = Media::find($id);\n $categories = $media->categories;\n\n return view('media.show', $this->data)\n ->withMedia($media)\n ->withCategories($categories);\n }", "public function show(Media $media)\n {\n if($media->videoType)\n {\n $mediaCategory = \\Model\\MediaCategory\\ModelName::where('videoType','=',$media->videoType)->first();\n }\n else\n {\n $mediaCategory = '';\n }\n\n if($media->program)\n {\n $project = \\Model\\Project\\ModelName::where('id','=',$media->program)->first();\n }\n else\n {\n $project = '';\n }\n\n return view('Admin::media.show', [\n 'media' => $media,\n 'mediaCategory' => $mediaCategory,\n 'project' => $project,\n ]);\n }", "public function show()\n {\n return view('panel::show');\n }", "public function show()\n {\n return view('panel::show');\n }", "public function getName()\n {\n return 'display_media';\n }", "public function media_upload()\n\t{\n\t\t$this->api->check_authentication();\n\n\t\twp_iframe(array(&$this, 'media_upload_content'));\n\t}", "public function add_media_button(){\n\t\tif ( current_user_can( 'vfb_view_entries' ) ) :\n?>\n\t\t\t<a href=\"<?php echo add_query_arg( array( 'action' => 'visual_form_builder_media_button', 'width' => '450' ), admin_url( 'admin-ajax.php' ) ); ?>\" class=\"button add_media thickbox\" title=\"Add Visual Form Builder form\">\n\t\t\t\t<img width=\"18\" height=\"18\" src=\"<?php echo plugins_url( 'visual-form-builder-pro/images/vfb_icon.png' ); ?>\" alt=\"<?php _e( 'Add Visual Form Builder form', 'visual-form-builder-pro' ); ?>\" style=\"vertical-align: middle; margin-left: -8px; margin-top: -2px;\" /> <?php _e( 'Add Form', 'visual-form-builder-pro' ); ?>\n\t\t\t</a>\n<?php\n\t\tendif;\n\t}", "public function create()\n {\n return view('video::admin.media.create');\n }", "public function actionIndex()\n {\n $searchModel = new MusrenbangSkpdMediaSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function renderMediaAction()\n {\n $this->configuration = $this->objectManager->get(\\Sto\\Mediaoembed\\Content\\Configuration::class);\n\n try {\n $this->getEmbedDataFromProvider();\n $this->view->assign('configuration', $this->configuration);\n $this->view->assign('isSSLRequest', GeneralUtility::getIndpEnv('TYPO3_SSL'));\n $result = $this->view->render();\n } catch (\\Sto\\Mediaoembed\\Exception\\OEmbedException $exception) {\n $result = 'Error: ' . $exception->getMessage();\n }\n\n return $result;\n }", "public function show()\n {\n //\n }", "public function show();", "public function show();", "public function show();", "public function show();", "function showContent()\n {\n if ($this->oprofile) {\n $this->showPreviewForm();\n } else {\n $this->showInputForm();\n }\n }", "public function index()\n {\n //\n $medias = Media::all();\n return view('media.index', $this->data)->withMedias($medias);\n }", "public function show($id)\n {\n $data = Media::find($id);\n $title = self::TITLE;\n $route = self::ROUTE;\n $action = \"Show\";\n return view(self::FOLDER . '.show', compact('title', 'route', 'data', 'action'));\n }", "public function show($id)\n {\n $multimedia = CategoriaMedia::find($id);\n return view('multimedia.show',compact('multimedia'));\n }", "public function show() {\n \n }", "private static function media()\n {\n $files = ['QR'];\n $folder = static::$root.'Media'.'/';\n\n self::call($files, $folder);\n }", "public function index()\n {\n\n $data['mediaPayload'] = Media::join('categories', 'category_id', '=', 'media.fk_category_id')\n ->get(['media.*', 'categories.category_name']);\n \n return view('media.index', $data);\n }", "public function index()\n {\n $perPage = 10;\n\n $medias = Media::orderby('created_at','desc')->paginate($perPage);\n\n return view('Admin::media.index', ['medias' => $medias,'perPage'=>$perPage]);\n }", "public function index(){\n $this->data['rows'] = DB::table('media')\n ->where([\n 'status'=>1\n ])\n ->get();\n\n return view('backend.pages.media.all')->with($this->data);\n }", "public function show(){\n locateAndInclude('bForm_Avatar_vm');\n parent::show();\n }", "function sfg_dashboard_display()\n{\n\tglobal $plugin_url;\n\n\tif( isset( $_POST['sfg_media_form_submitted'])) {\n\n\t\t$hidden_field = esc_html($_POST['sfg_media_form_submitted']);\n\n\t\tif($hidden_field == 'Y' ) {\n\t\t\t$sfg_media = esc_html( $_POST['sfg_media']);\n\t\t}\n\n\t\techo $sfg_media;\n\t}\n\n\tif( !current_user_can('manage_options')) {\n\n\t\twp_die('You are not supposed to be here');\n\n\t}\n\t// add display wrapper for tabs and logo\n\trequire( 'inc/options-page-wrapper.php' );\n}", "public function show_in_panel() {\n\t\treturn false;\n\t}", "public function add_media($mode){ \n Session::put('menu_item_parent', 'media');\n Session::put('menu_item_child', $mode);\n Session::put('menu_item_child_child', '');\n \n $communities = Community::get();\n $data = array('communities','mode');\n \n return view('admin.media_edit', compact($data));\n }", "public function Media()\n {\n // section 127-0-1-1--35dee990:156e03a0457:-8000:00000000000008CA begin\n // section 127-0-1-1--35dee990:156e03a0457:-8000:00000000000008CA end\n }", "public function index()\n {\n $media_all = Media::leftJoin('users', 'media.user_id', '=', 'users.id')\n ->select('media.*', 'users.name')\n ->orderBy('created_at' , 'DESC')\n ->get();\n return view('admin.media.index' , compact('media_all'));\n }", "private function showDisplay() {\n\t\twp_enqueue_style('pokamodule-settings');\n//\t\twp_enqueue_script('pokamodule-settings');\n\t\t\n\t\trequire_once $this->sPath . '/tpl/template/display.php';\n\t}", "function show_panel()\n\t{\n\t\tglobal $errors, $template;\n\t\t\n\t\t// get the mode\n\t\t$s = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : '';\n\t\t\n\t\t// fire the template\n\t\t$template->assign_files( array(\n\t\t\t'ACP_advance' => 'ACP/advance' . tplEx\n\t\t) );\n\t\t\n\t\t// act upon it\n\t\tswitch( $s )\n\t\t{\n\t\t\tcase 'settings':\n\t\t\t\t$this->settings();\n\t\t\t\tbreak;\n\t\t\tcase 'settings_real':\n\t\t\t\t$this->settings_real();\n\t\t\t\tbreak;\n\t\t\tcase 'browser':\n\t\t\t\t$this->browser();\n\t\t\t\tbreak;\n\t\t\tcase 'clearcache':\n\t\t\t\t$this->clearcache();\n\t\t\t\tbreak;\n\t\t\tcase 'console':\n\t\t\t\t$this->console();\n\t\t\t\tbreak;\n\t\t\tcase 'key':\n\t\t\t\t$this->key();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\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()\n\t{\n\t\t//\n\t}", "public function index()\n {\n $images = Media::get();\n return view('backend.ecommerce.media')->with(compact('images'));\n }", "function wp_print_media_templates() {\n\t$class = 'media-modal wp-core-ui';\n\n\t$alt_text_description = sprintf(\n\t\t/* translators: 1: Link to tutorial, 2: Additional link attributes, 3: Accessibility text. */\n\t\t__( '<a href=\"%1$s\" %2$s>Describe the purpose of the image%3$s</a>. Leave empty if the image is purely decorative.' ),\n\t\tesc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ),\n\t\t'target=\"_blank\" rel=\"noopener noreferrer\"',\n\t\tsprintf(\n\t\t\t'<span class=\"screen-reader-text\"> %s</span>',\n\t\t\t/* translators: Accessibility text. */\n\t\t\t__( '(opens in a new tab)' )\n\t\t)\n\t);\n\t?>\n\n\t<?php // Template for the media frame: used both in the media grid and in the media modal. ?>\n\t<script type=\"text/html\" id=\"tmpl-media-frame\">\n\t\t<div class=\"media-frame-title\" id=\"media-frame-title\"></div>\n\t\t<h2 class=\"media-frame-menu-heading\"><?php _ex( 'Actions', 'media modal menu actions' ); ?></h2>\n\t\t<button type=\"button\" class=\"button button-link media-frame-menu-toggle\" aria-expanded=\"false\">\n\t\t\t<?php _ex( 'Menu', 'media modal menu' ); ?>\n\t\t\t<span class=\"dashicons dashicons-arrow-down\" aria-hidden=\"true\"></span>\n\t\t</button>\n\t\t<div class=\"media-frame-menu\"></div>\n\t\t<div class=\"media-frame-tab-panel\">\n\t\t\t<div class=\"media-frame-router\"></div>\n\t\t\t<div class=\"media-frame-content\"></div>\n\t\t</div>\n\t\t<h2 class=\"media-frame-actions-heading screen-reader-text\">\n\t\t<?php\n\t\t\t/* translators: Accessibility text. */\n\t\t\t_e( 'Selected media actions' );\n\t\t?>\n\t\t</h2>\n\t\t<div class=\"media-frame-toolbar\"></div>\n\t\t<div class=\"media-frame-uploader\"></div>\n\t</script>\n\n\t<?php // Template for the media modal. ?>\n\t<script type=\"text/html\" id=\"tmpl-media-modal\">\n\t\t<div tabindex=\"0\" class=\"<?php echo $class; ?>\" role=\"dialog\" aria-labelledby=\"media-frame-title\">\n\t\t\t<# if ( data.hasCloseButton ) { #>\n\t\t\t\t<button type=\"button\" class=\"media-modal-close\"><span class=\"media-modal-icon\"><span class=\"screen-reader-text\"><?php _e( 'Close dialog' ); ?></span></span></button>\n\t\t\t<# } #>\n\t\t\t<div class=\"media-modal-content\" role=\"document\"></div>\n\t\t</div>\n\t\t<div class=\"media-modal-backdrop\"></div>\n\t</script>\n\n\t<?php // Template for the window uploader, used for example in the media grid. ?>\n\t<script type=\"text/html\" id=\"tmpl-uploader-window\">\n\t\t<div class=\"uploader-window-content\">\n\t\t\t<div class=\"uploader-editor-title\"><?php _e( 'Drop files to upload' ); ?></div>\n\t\t</div>\n\t</script>\n\n\t<?php // Template for the editor uploader. ?>\n\t<script type=\"text/html\" id=\"tmpl-uploader-editor\">\n\t\t<div class=\"uploader-editor-content\">\n\t\t\t<div class=\"uploader-editor-title\"><?php _e( 'Drop files to upload' ); ?></div>\n\t\t</div>\n\t</script>\n\n\t<?php // Template for the inline uploader, used for example in the Media Library admin page - Add New. ?>\n\t<script type=\"text/html\" id=\"tmpl-uploader-inline\">\n\t\t<# var messageClass = data.message ? 'has-upload-message' : 'no-upload-message'; #>\n\t\t<# if ( data.canClose ) { #>\n\t\t<button class=\"close dashicons dashicons-no\"><span class=\"screen-reader-text\"><?php _e( 'Close uploader' ); ?></span></button>\n\t\t<# } #>\n\t\t<div class=\"uploader-inline-content {{ messageClass }}\">\n\t\t<# if ( data.message ) { #>\n\t\t\t<h2 class=\"upload-message\">{{ data.message }}</h2>\n\t\t<# } #>\n\t\t<?php if ( ! _device_can_upload() ) : ?>\n\t\t\t<div class=\"upload-ui\">\n\t\t\t\t<h2 class=\"upload-instructions\"><?php _e( 'Your browser cannot upload files' ); ?></h2>\n\t\t\t\t<p>\n\t\t\t\t<?php\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t/* translators: %s: https://apps.wordpress.org/ */\n\t\t\t\t\t\t__( 'The web browser on your device cannot be used to upload files. You may be able to use the <a href=\"%s\">native app for your device</a> instead.' ),\n\t\t\t\t\t\t'https://apps.wordpress.org/'\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t<?php elseif ( is_multisite() && ! is_upload_space_available() ) : ?>\n\t\t\t<div class=\"upload-ui\">\n\t\t\t\t<h2 class=\"upload-instructions\"><?php _e( 'Upload Limit Exceeded' ); ?></h2>\n\t\t\t\t<?php\n\t\t\t\t/** This action is documented in wp-admin/includes/media.php */\n\t\t\t\tdo_action( 'upload_ui_over_quota' );\n\t\t\t\t?>\n\t\t\t</div>\n\t\t<?php else : ?>\n\t\t\t<div class=\"upload-ui\">\n\t\t\t\t<h2 class=\"upload-instructions drop-instructions\"><?php _e( 'Drop files to upload' ); ?></h2>\n\t\t\t\t<p class=\"upload-instructions drop-instructions\"><?php _ex( 'or', 'Uploader: Drop files here - or - Select Files' ); ?></p>\n\t\t\t\t<button type=\"button\" class=\"browser button button-hero\"><?php _e( 'Select Files' ); ?></button>\n\t\t\t</div>\n\n\t\t\t<div class=\"upload-inline-status\"></div>\n\n\t\t\t<div class=\"post-upload-ui\">\n\t\t\t\t<?php\n\t\t\t\t/** This action is documented in wp-admin/includes/media.php */\n\t\t\t\tdo_action( 'pre-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores\n\t\t\t\t/** This action is documented in wp-admin/includes/media.php */\n\t\t\t\tdo_action( 'pre-plupload-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores\n\n\t\t\t\tif ( 10 === remove_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' ) ) {\n\t\t\t\t\t/** This action is documented in wp-admin/includes/media.php */\n\t\t\t\t\tdo_action( 'post-plupload-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores\n\t\t\t\t\tadd_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );\n\t\t\t\t} else {\n\t\t\t\t\t/** This action is documented in wp-admin/includes/media.php */\n\t\t\t\t\tdo_action( 'post-plupload-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores\n\t\t\t\t}\n\n\t\t\t\t$max_upload_size = wp_max_upload_size();\n\t\t\t\tif ( ! $max_upload_size ) {\n\t\t\t\t\t$max_upload_size = 0;\n\t\t\t\t}\n\t\t\t\t?>\n\n\t\t\t\t<p class=\"max-upload-size\">\n\t\t\t\t<?php\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t/* translators: %s: Maximum allowed file size. */\n\t\t\t\t\t\t__( 'Maximum upload file size: %s.' ),\n\t\t\t\t\t\tesc_html( size_format( $max_upload_size ) )\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t\t</p>\n\n\t\t\t\t<# if ( data.suggestedWidth && data.suggestedHeight ) { #>\n\t\t\t\t\t<p class=\"suggested-dimensions\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t/* translators: 1: Suggested width number, 2: Suggested height number. */\n\t\t\t\t\t\t\tprintf( __( 'Suggested image dimensions: %1$s by %2$s pixels.' ), '{{data.suggestedWidth}}', '{{data.suggestedHeight}}' );\n\t\t\t\t\t\t?>\n\t\t\t\t\t</p>\n\t\t\t\t<# } #>\n\n\t\t\t\t<?php\n\t\t\t\t/** This action is documented in wp-admin/includes/media.php */\n\t\t\t\tdo_action( 'post-upload-ui' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores\n\t\t\t\t?>\n\t\t\t</div>\n\t\t<?php endif; ?>\n\t\t</div>\n\t</script>\n\n\t<?php // Template for the view switchers, used for example in the Media Grid. ?>\n\t<script type=\"text/html\" id=\"tmpl-media-library-view-switcher\">\n\t\t<a href=\"<?php echo esc_url( add_query_arg( 'mode', 'list', $_SERVER['REQUEST_URI'] ) ); ?>\" class=\"view-list\">\n\t\t\t<span class=\"screen-reader-text\"><?php _e( 'List view' ); ?></span>\n\t\t</a>\n\t\t<a href=\"<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ); ?>\" class=\"view-grid current\" aria-current=\"page\">\n\t\t\t<span class=\"screen-reader-text\"><?php _e( 'Grid view' ); ?></span>\n\t\t</a>\n\t</script>\n\n\t<?php // Template for the uploading status UI. ?>\n\t<script type=\"text/html\" id=\"tmpl-uploader-status\">\n\t\t<h2><?php _e( 'Uploading' ); ?></h2>\n\t\t<button type=\"button\" class=\"button-link upload-dismiss-errors\"><span class=\"screen-reader-text\"><?php _e( 'Dismiss Errors' ); ?></span></button>\n\n\t\t<div class=\"media-progress-bar\"><div></div></div>\n\t\t<div class=\"upload-details\">\n\t\t\t<span class=\"upload-count\">\n\t\t\t\t<span class=\"upload-index\"></span> / <span class=\"upload-total\"></span>\n\t\t\t</span>\n\t\t\t<span class=\"upload-detail-separator\">&ndash;</span>\n\t\t\t<span class=\"upload-filename\"></span>\n\t\t</div>\n\t\t<div class=\"upload-errors\"></div>\n\t</script>\n\n\t<?php // Template for the uploading status errors. ?>\n\t<script type=\"text/html\" id=\"tmpl-uploader-status-error\">\n\t\t<span class=\"upload-error-filename\">{{{ data.filename }}}</span>\n\t\t<span class=\"upload-error-message\">{{ data.message }}</span>\n\t</script>\n\n\t<?php // Template for the Attachment Details layout in the media browser. ?>\n\t<script type=\"text/html\" id=\"tmpl-edit-attachment-frame\">\n\t\t<div class=\"edit-media-header\">\n\t\t\t<button class=\"left dashicons\"<# if ( ! data.hasPrevious ) { #> disabled<# } #>><span class=\"screen-reader-text\"><?php _e( 'Edit previous media item' ); ?></span></button>\n\t\t\t<button class=\"right dashicons\"<# if ( ! data.hasNext ) { #> disabled<# } #>><span class=\"screen-reader-text\"><?php _e( 'Edit next media item' ); ?></span></button>\n\t\t\t<button type=\"button\" class=\"media-modal-close\"><span class=\"media-modal-icon\"><span class=\"screen-reader-text\"><?php _e( 'Close dialog' ); ?></span></span></button>\n\t\t</div>\n\t\t<div class=\"media-frame-title\"></div>\n\t\t<div class=\"media-frame-content\"></div>\n\t</script>\n\n\t<?php // Template for the Attachment Details two columns layout. ?>\n\t<script type=\"text/html\" id=\"tmpl-attachment-details-two-column\">\n\t\t<div class=\"attachment-media-view {{ data.orientation }}\">\n\t\t\t<h2 class=\"screen-reader-text\"><?php _e( 'Attachment Preview' ); ?></h2>\n\t\t\t<div class=\"thumbnail thumbnail-{{ data.type }}\">\n\t\t\t\t<# if ( data.uploading ) { #>\n\t\t\t\t\t<div class=\"media-progress-bar\"><div></div></div>\n\t\t\t\t<# } else if ( data.sizes && data.sizes.large ) { #>\n\t\t\t\t\t<img class=\"details-image\" src=\"{{ data.sizes.large.url }}\" draggable=\"false\" alt=\"\" />\n\t\t\t\t<# } else if ( data.sizes && data.sizes.full ) { #>\n\t\t\t\t\t<img class=\"details-image\" src=\"{{ data.sizes.full.url }}\" draggable=\"false\" alt=\"\" />\n\t\t\t\t<# } else if ( -1 === jQuery.inArray( data.type, [ 'audio', 'video' ] ) ) { #>\n\t\t\t\t\t<img class=\"details-image icon\" src=\"{{ data.icon }}\" draggable=\"false\" alt=\"\" />\n\t\t\t\t<# } #>\n\n\t\t\t\t<# if ( 'audio' === data.type ) { #>\n\t\t\t\t<div class=\"wp-media-wrapper\">\n\t\t\t\t\t<audio style=\"visibility: hidden\" controls class=\"wp-audio-shortcode\" width=\"100%\" preload=\"none\">\n\t\t\t\t\t\t<source type=\"{{ data.mime }}\" src=\"{{ data.url }}\"/>\n\t\t\t\t\t</audio>\n\t\t\t\t</div>\n\t\t\t\t<# } else if ( 'video' === data.type ) {\n\t\t\t\t\tvar w_rule = '';\n\t\t\t\t\tif ( data.width ) {\n\t\t\t\t\t\tw_rule = 'width: ' + data.width + 'px;';\n\t\t\t\t\t} else if ( wp.media.view.settings.contentWidth ) {\n\t\t\t\t\t\tw_rule = 'width: ' + wp.media.view.settings.contentWidth + 'px;';\n\t\t\t\t\t}\n\t\t\t\t#>\n\t\t\t\t<div style=\"{{ w_rule }}\" class=\"wp-media-wrapper wp-video\">\n\t\t\t\t\t<video controls=\"controls\" class=\"wp-video-shortcode\" preload=\"metadata\"\n\t\t\t\t\t\t<# if ( data.width ) { #>width=\"{{ data.width }}\"<# } #>\n\t\t\t\t\t\t<# if ( data.height ) { #>height=\"{{ data.height }}\"<# } #>\n\t\t\t\t\t\t<# if ( data.image && data.image.src !== data.icon ) { #>poster=\"{{ data.image.src }}\"<# } #>>\n\t\t\t\t\t\t<source type=\"{{ data.mime }}\" src=\"{{ data.url }}\"/>\n\t\t\t\t\t</video>\n\t\t\t\t</div>\n\t\t\t\t<# } #>\n\n\t\t\t\t<div class=\"attachment-actions\">\n\t\t\t\t\t<# if ( 'image' === data.type && ! data.uploading && data.sizes && data.can.save ) { #>\n\t\t\t\t\t<button type=\"button\" class=\"button edit-attachment\"><?php _e( 'Edit Image' ); ?></button>\n\t\t\t\t\t<# } else if ( 'pdf' === data.subtype && data.sizes ) { #>\n\t\t\t\t\t<p><?php _e( 'Document Preview' ); ?></p>\n\t\t\t\t\t<# } #>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"attachment-info\">\n\t\t\t<span class=\"settings-save-status\" role=\"status\">\n\t\t\t\t<span class=\"spinner\"></span>\n\t\t\t\t<span class=\"saved\"><?php esc_html_e( 'Saved.' ); ?></span>\n\t\t\t</span>\n\t\t\t<div class=\"details\">\n\t\t\t\t<h2 class=\"screen-reader-text\"><?php _e( 'Details' ); ?></h2>\n\t\t\t\t<div class=\"filename\"><strong><?php _e( 'File name:' ); ?></strong> {{ data.filename }}</div>\n\t\t\t\t<div class=\"filename\"><strong><?php _e( 'File type:' ); ?></strong> {{ data.mime }}</div>\n\t\t\t\t<div class=\"uploaded\"><strong><?php _e( 'Uploaded on:' ); ?></strong> {{ data.dateFormatted }}</div>\n\n\t\t\t\t<div class=\"file-size\"><strong><?php _e( 'File size:' ); ?></strong> {{ data.filesizeHumanReadable }}</div>\n\t\t\t\t<# if ( 'image' === data.type && ! data.uploading ) { #>\n\t\t\t\t\t<# if ( data.width && data.height ) { #>\n\t\t\t\t\t\t<div class=\"dimensions\"><strong><?php _e( 'Dimensions:' ); ?></strong>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t/* translators: 1: A number of pixels wide, 2: A number of pixels tall. */\n\t\t\t\t\t\t\tprintf( __( '%1$s by %2$s pixels' ), '{{ data.width }}', '{{ data.height }}' );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<# } #>\n\n\t\t\t\t\t<# if ( data.originalImageURL && data.originalImageName ) { #>\n\t\t\t\t\t\t<?php _e( 'Original image:' ); ?>\n\t\t\t\t\t\t<a href=\"{{ data.originalImageURL }}\">{{data.originalImageName}}</a>\n\t\t\t\t\t<# } #>\n\t\t\t\t<# } #>\n\n\t\t\t\t<# if ( data.fileLength && data.fileLengthHumanReadable ) { #>\n\t\t\t\t\t<div class=\"file-length\"><strong><?php _e( 'Length:' ); ?></strong>\n\t\t\t\t\t\t<span aria-hidden=\"true\">{{ data.fileLength }}</span>\n\t\t\t\t\t\t<span class=\"screen-reader-text\">{{ data.fileLengthHumanReadable }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t<# } #>\n\n\t\t\t\t<# if ( 'audio' === data.type && data.meta.bitrate ) { #>\n\t\t\t\t\t<div class=\"bitrate\">\n\t\t\t\t\t\t<strong><?php _e( 'Bitrate:' ); ?></strong> {{ Math.round( data.meta.bitrate / 1000 ) }}kb/s\n\t\t\t\t\t\t<# if ( data.meta.bitrate_mode ) { #>\n\t\t\t\t\t\t{{ ' ' + data.meta.bitrate_mode.toUpperCase() }}\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t</div>\n\t\t\t\t<# } #>\n\n\t\t\t\t<div class=\"compat-meta\">\n\t\t\t\t\t<# if ( data.compat && data.compat.meta ) { #>\n\t\t\t\t\t\t{{{ data.compat.meta }}}\n\t\t\t\t\t<# } #>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"settings\">\n\t\t\t\t<# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>\n\t\t\t\t<# if ( 'image' === data.type ) { #>\n\t\t\t\t\t<span class=\"setting has-description\" data-setting=\"alt\">\n\t\t\t\t\t\t<label for=\"attachment-details-two-column-alt-text\" class=\"name\"><?php _e( 'Alternative Text' ); ?></label>\n\t\t\t\t\t\t<input type=\"text\" id=\"attachment-details-two-column-alt-text\" value=\"{{ data.alt }}\" aria-describedby=\"alt-text-description\" {{ maybeReadOnly }} />\n\t\t\t\t\t</span>\n\t\t\t\t\t<p class=\"description\" id=\"alt-text-description\"><?php echo $alt_text_description; ?></p>\n\t\t\t\t<# } #>\n\t\t\t\t<?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>\n\t\t\t\t<span class=\"setting\" data-setting=\"title\">\n\t\t\t\t\t<label for=\"attachment-details-two-column-title\" class=\"name\"><?php _e( 'Title' ); ?></label>\n\t\t\t\t\t<input type=\"text\" id=\"attachment-details-two-column-title\" value=\"{{ data.title }}\" {{ maybeReadOnly }} />\n\t\t\t\t</span>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<# if ( 'audio' === data.type ) { #>\n\t\t\t\t<?php\n\t\t\t\tforeach ( array(\n\t\t\t\t\t'artist' => __( 'Artist' ),\n\t\t\t\t\t'album' => __( 'Album' ),\n\t\t\t\t) as $key => $label ) :\n\t\t\t\t\t?>\n\t\t\t\t<span class=\"setting\" data-setting=\"<?php echo esc_attr( $key ); ?>\">\n\t\t\t\t\t<label for=\"attachment-details-two-column-<?php echo esc_attr( $key ); ?>\" class=\"name\"><?php echo $label; ?></label>\n\t\t\t\t\t<input type=\"text\" id=\"attachment-details-two-column-<?php echo esc_attr( $key ); ?>\" value=\"{{ data.<?php echo $key; ?> || data.meta.<?php echo $key; ?> || '' }}\" />\n\t\t\t\t</span>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t\t<# } #>\n\t\t\t\t<span class=\"setting\" data-setting=\"caption\">\n\t\t\t\t\t<label for=\"attachment-details-two-column-caption\" class=\"name\"><?php _e( 'Caption' ); ?></label>\n\t\t\t\t\t<textarea id=\"attachment-details-two-column-caption\" {{ maybeReadOnly }}>{{ data.caption }}</textarea>\n\t\t\t\t</span>\n\t\t\t\t<span class=\"setting\" data-setting=\"description\">\n\t\t\t\t\t<label for=\"attachment-details-two-column-description\" class=\"name\"><?php _e( 'Description' ); ?></label>\n\t\t\t\t\t<textarea id=\"attachment-details-two-column-description\" {{ maybeReadOnly }}>{{ data.description }}</textarea>\n\t\t\t\t</span>\n\t\t\t\t<span class=\"setting\">\n\t\t\t\t\t<span class=\"name\"><?php _e( 'Uploaded By' ); ?></span>\n\t\t\t\t\t<span class=\"value\">{{ data.authorName }}</span>\n\t\t\t\t</span>\n\t\t\t\t<# if ( data.uploadedToTitle ) { #>\n\t\t\t\t\t<span class=\"setting\">\n\t\t\t\t\t\t<span class=\"name\"><?php _e( 'Uploaded To' ); ?></span>\n\t\t\t\t\t\t<# if ( data.uploadedToLink ) { #>\n\t\t\t\t\t\t\t<span class=\"value\"><a href=\"{{ data.uploadedToLink }}\">{{ data.uploadedToTitle }}</a></span>\n\t\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\t\t<span class=\"value\">{{ data.uploadedToTitle }}</span>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t</span>\n\t\t\t\t<# } #>\n\t\t\t\t<span class=\"setting\" data-setting=\"url\">\n\t\t\t\t\t<label for=\"attachment-details-two-column-copy-link\" class=\"name\"><?php _e( 'File URL:' ); ?></label>\n\t\t\t\t\t<input type=\"text\" class=\"attachment-details-copy-link\" id=\"attachment-details-two-column-copy-link\" value=\"{{ data.url }}\" readonly />\n\t\t\t\t\t<span class=\"copy-to-clipboard-container\">\n\t\t\t\t\t\t<button type=\"button\" class=\"button button-small copy-attachment-url\" data-clipboard-target=\"#attachment-details-two-column-copy-link\"><?php _e( 'Copy URL' ); ?></button>\n\t\t\t\t\t\t<span class=\"success hidden\" aria-hidden=\"true\"><?php _e( 'Copied!' ); ?></span>\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t\t<div class=\"attachment-compat\"></div>\n\t\t\t</div>\n\n\t\t\t<div class=\"actions\">\n\t\t\t\t<a class=\"view-attachment\" href=\"{{ data.link }}\"><?php _e( 'View attachment page' ); ?></a>\n\t\t\t\t<# if ( data.can.save ) { #> |\n\t\t\t\t\t<a href=\"{{ data.editLink }}\"><?php _e( 'Edit more details' ); ?></a>\n\t\t\t\t<# } #>\n\t\t\t\t<# if ( ! data.uploading && data.can.remove ) { #> |\n\t\t\t\t\t<?php if ( MEDIA_TRASH ) : ?>\n\t\t\t\t\t\t<# if ( 'trash' === data.status ) { #>\n\t\t\t\t\t\t\t<button type=\"button\" class=\"button-link untrash-attachment\"><?php _e( 'Restore from Trash' ); ?></button>\n\t\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\t\t<button type=\"button\" class=\"button-link trash-attachment\"><?php _e( 'Move to Trash' ); ?></button>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t<button type=\"button\" class=\"button-link delete-attachment\"><?php _e( 'Delete permanently' ); ?></button>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t<# } #>\n\t\t\t</div>\n\t\t</div>\n\t</script>\n\n\t<?php // Template for the Attachment \"thumbnails\" in the Media Grid. ?>\n\t<script type=\"text/html\" id=\"tmpl-attachment\">\n\t\t<div class=\"attachment-preview js--select-attachment type-{{ data.type }} subtype-{{ data.subtype }} {{ data.orientation }}\">\n\t\t\t<div class=\"thumbnail\">\n\t\t\t\t<# if ( data.uploading ) { #>\n\t\t\t\t\t<div class=\"media-progress-bar\"><div style=\"width: {{ data.percent }}%\"></div></div>\n\t\t\t\t<# } else if ( 'image' === data.type && data.sizes ) { #>\n\t\t\t\t\t<div class=\"centered\">\n\t\t\t\t\t\t<img src=\"{{ data.size.url }}\" draggable=\"false\" alt=\"\" />\n\t\t\t\t\t</div>\n\t\t\t\t<# } else { #>\n\t\t\t\t\t<div class=\"centered\">\n\t\t\t\t\t\t<# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>\n\t\t\t\t\t\t\t<img src=\"{{ data.image.src }}\" class=\"thumbnail\" draggable=\"false\" alt=\"\" />\n\t\t\t\t\t\t<# } else if ( data.sizes && data.sizes.medium ) { #>\n\t\t\t\t\t\t\t<img src=\"{{ data.sizes.medium.url }}\" class=\"thumbnail\" draggable=\"false\" alt=\"\" />\n\t\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\t\t<img src=\"{{ data.icon }}\" class=\"icon\" draggable=\"false\" alt=\"\" />\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"filename\">\n\t\t\t\t\t\t<div>{{ data.filename }}</div>\n\t\t\t\t\t</div>\n\t\t\t\t<# } #>\n\t\t\t</div>\n\t\t\t<# if ( data.buttons.close ) { #>\n\t\t\t\t<button type=\"button\" class=\"button-link attachment-close media-modal-icon\"><span class=\"screen-reader-text\"><?php _e( 'Remove' ); ?></span></button>\n\t\t\t<# } #>\n\t\t</div>\n\t\t<# if ( data.buttons.check ) { #>\n\t\t\t<button type=\"button\" class=\"check\" tabindex=\"-1\"><span class=\"media-modal-icon\"></span><span class=\"screen-reader-text\"><?php _e( 'Deselect' ); ?></span></button>\n\t\t<# } #>\n\t\t<#\n\t\tvar maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly';\n\t\tif ( data.describe ) {\n\t\t\tif ( 'image' === data.type ) { #>\n\t\t\t\t<input type=\"text\" value=\"{{ data.caption }}\" class=\"describe\" data-setting=\"caption\"\n\t\t\t\t\taria-label=\"<?php esc_attr_e( 'Caption' ); ?>\"\n\t\t\t\t\tplaceholder=\"<?php esc_attr_e( 'Caption&hellip;' ); ?>\" {{ maybeReadOnly }} />\n\t\t\t<# } else { #>\n\t\t\t\t<input type=\"text\" value=\"{{ data.title }}\" class=\"describe\" data-setting=\"title\"\n\t\t\t\t\t<# if ( 'video' === data.type ) { #>\n\t\t\t\t\t\taria-label=\"<?php esc_attr_e( 'Video title' ); ?>\"\n\t\t\t\t\t\tplaceholder=\"<?php esc_attr_e( 'Video title&hellip;' ); ?>\"\n\t\t\t\t\t<# } else if ( 'audio' === data.type ) { #>\n\t\t\t\t\t\taria-label=\"<?php esc_attr_e( 'Audio title' ); ?>\"\n\t\t\t\t\t\tplaceholder=\"<?php esc_attr_e( 'Audio title&hellip;' ); ?>\"\n\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\taria-label=\"<?php esc_attr_e( 'Media title' ); ?>\"\n\t\t\t\t\t\tplaceholder=\"<?php esc_attr_e( 'Media title&hellip;' ); ?>\"\n\t\t\t\t\t<# } #> {{ maybeReadOnly }} />\n\t\t\t<# }\n\t\t} #>\n\t</script>\n\n\t<?php // Template for the Attachment details, used for example in the sidebar. ?>\n\t<script type=\"text/html\" id=\"tmpl-attachment-details\">\n\t\t<h2>\n\t\t\t<?php _e( 'Attachment Details' ); ?>\n\t\t\t<span class=\"settings-save-status\" role=\"status\">\n\t\t\t\t<span class=\"spinner\"></span>\n\t\t\t\t<span class=\"saved\"><?php esc_html_e( 'Saved.' ); ?></span>\n\t\t\t</span>\n\t\t</h2>\n\t\t<div class=\"attachment-info\">\n\t\t\t<div class=\"thumbnail thumbnail-{{ data.type }}\">\n\t\t\t\t<# if ( data.uploading ) { #>\n\t\t\t\t\t<div class=\"media-progress-bar\"><div></div></div>\n\t\t\t\t<# } else if ( 'image' === data.type && data.sizes ) { #>\n\t\t\t\t\t<img src=\"{{ data.size.url }}\" draggable=\"false\" alt=\"\" />\n\t\t\t\t<# } else { #>\n\t\t\t\t\t<img src=\"{{ data.icon }}\" class=\"icon\" draggable=\"false\" alt=\"\" />\n\t\t\t\t<# } #>\n\t\t\t</div>\n\t\t\t<div class=\"details\">\n\t\t\t\t<div class=\"filename\">{{ data.filename }}</div>\n\t\t\t\t<div class=\"uploaded\">{{ data.dateFormatted }}</div>\n\n\t\t\t\t<div class=\"file-size\">{{ data.filesizeHumanReadable }}</div>\n\t\t\t\t<# if ( 'image' === data.type && ! data.uploading ) { #>\n\t\t\t\t\t<# if ( data.width && data.height ) { #>\n\t\t\t\t\t\t<div class=\"dimensions\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t/* translators: 1: A number of pixels wide, 2: A number of pixels tall. */\n\t\t\t\t\t\t\tprintf( __( '%1$s by %2$s pixels' ), '{{ data.width }}', '{{ data.height }}' );\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<# } #>\n\n\t\t\t\t\t<# if ( data.originalImageURL && data.originalImageName ) { #>\n\t\t\t\t\t\t<?php _e( 'Original image:' ); ?>\n\t\t\t\t\t\t<a href=\"{{ data.originalImageURL }}\">{{data.originalImageName}}</a>\n\t\t\t\t\t<# } #>\n\n\t\t\t\t\t<# if ( data.can.save && data.sizes ) { #>\n\t\t\t\t\t\t<a class=\"edit-attachment\" href=\"{{ data.editLink }}&amp;image-editor\" target=\"_blank\"><?php _e( 'Edit Image' ); ?></a>\n\t\t\t\t\t<# } #>\n\t\t\t\t<# } #>\n\n\t\t\t\t<# if ( data.fileLength && data.fileLengthHumanReadable ) { #>\n\t\t\t\t\t<div class=\"file-length\"><?php _e( 'Length:' ); ?>\n\t\t\t\t\t\t<span aria-hidden=\"true\">{{ data.fileLength }}</span>\n\t\t\t\t\t\t<span class=\"screen-reader-text\">{{ data.fileLengthHumanReadable }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t<# } #>\n\n\t\t\t\t<# if ( ! data.uploading && data.can.remove ) { #>\n\t\t\t\t\t<?php if ( MEDIA_TRASH ) : ?>\n\t\t\t\t\t<# if ( 'trash' === data.status ) { #>\n\t\t\t\t\t\t<button type=\"button\" class=\"button-link untrash-attachment\"><?php _e( 'Restore from Trash' ); ?></button>\n\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\t<button type=\"button\" class=\"button-link trash-attachment\"><?php _e( 'Move to Trash' ); ?></button>\n\t\t\t\t\t<# } #>\n\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t<button type=\"button\" class=\"button-link delete-attachment\"><?php _e( 'Delete permanently' ); ?></button>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t<# } #>\n\n\t\t\t\t<div class=\"compat-meta\">\n\t\t\t\t\t<# if ( data.compat && data.compat.meta ) { #>\n\t\t\t\t\t\t{{{ data.compat.meta }}}\n\t\t\t\t\t<# } #>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>\n\t\t<# if ( 'image' === data.type ) { #>\n\t\t\t<span class=\"setting has-description\" data-setting=\"alt\">\n\t\t\t\t<label for=\"attachment-details-alt-text\" class=\"name\"><?php _e( 'Alt Text' ); ?></label>\n\t\t\t\t<input type=\"text\" id=\"attachment-details-alt-text\" value=\"{{ data.alt }}\" aria-describedby=\"alt-text-description\" {{ maybeReadOnly }} />\n\t\t\t</span>\n\t\t\t<p class=\"description\" id=\"alt-text-description\"><?php echo $alt_text_description; ?></p>\n\t\t<# } #>\n\t\t<?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>\n\t\t<span class=\"setting\" data-setting=\"title\">\n\t\t\t<label for=\"attachment-details-title\" class=\"name\"><?php _e( 'Title' ); ?></label>\n\t\t\t<input type=\"text\" id=\"attachment-details-title\" value=\"{{ data.title }}\" {{ maybeReadOnly }} />\n\t\t</span>\n\t\t<?php endif; ?>\n\t\t<# if ( 'audio' === data.type ) { #>\n\t\t<?php\n\t\tforeach ( array(\n\t\t\t'artist' => __( 'Artist' ),\n\t\t\t'album' => __( 'Album' ),\n\t\t) as $key => $label ) :\n\t\t\t?>\n\t\t<span class=\"setting\" data-setting=\"<?php echo esc_attr( $key ); ?>\">\n\t\t\t<label for=\"attachment-details-<?php echo esc_attr( $key ); ?>\" class=\"name\"><?php echo $label; ?></label>\n\t\t\t<input type=\"text\" id=\"attachment-details-<?php echo esc_attr( $key ); ?>\" value=\"{{ data.<?php echo $key; ?> || data.meta.<?php echo $key; ?> || '' }}\" />\n\t\t</span>\n\t\t<?php endforeach; ?>\n\t\t<# } #>\n\t\t<span class=\"setting\" data-setting=\"caption\">\n\t\t\t<label for=\"attachment-details-caption\" class=\"name\"><?php _e( 'Caption' ); ?></label>\n\t\t\t<textarea id=\"attachment-details-caption\" {{ maybeReadOnly }}>{{ data.caption }}</textarea>\n\t\t</span>\n\t\t<span class=\"setting\" data-setting=\"description\">\n\t\t\t<label for=\"attachment-details-description\" class=\"name\"><?php _e( 'Description' ); ?></label>\n\t\t\t<textarea id=\"attachment-details-description\" {{ maybeReadOnly }}>{{ data.description }}</textarea>\n\t\t</span>\n\t\t<span class=\"setting\" data-setting=\"url\">\n\t\t\t<label for=\"attachment-details-copy-link\" class=\"name\"><?php _e( 'File URL:' ); ?></label>\n\t\t\t<input type=\"text\" class=\"attachment-details-copy-link\" id=\"attachment-details-copy-link\" value=\"{{ data.url }}\" readonly />\n\t\t\t<div class=\"copy-to-clipboard-container\">\n\t\t\t\t<button type=\"button\" class=\"button button-small copy-attachment-url\" data-clipboard-target=\"#attachment-details-copy-link\"><?php _e( 'Copy URL' ); ?></button>\n\t\t\t\t<span class=\"success hidden\" aria-hidden=\"true\"><?php _e( 'Copied!' ); ?></span>\n\t\t\t</div>\n\t\t</span>\n\t</script>\n\n\t<?php // Template for the Selection status bar. ?>\n\t<script type=\"text/html\" id=\"tmpl-media-selection\">\n\t\t<div class=\"selection-info\">\n\t\t\t<span class=\"count\"></span>\n\t\t\t<# if ( data.editable ) { #>\n\t\t\t\t<button type=\"button\" class=\"button-link edit-selection\"><?php _e( 'Edit Selection' ); ?></button>\n\t\t\t<# } #>\n\t\t\t<# if ( data.clearable ) { #>\n\t\t\t\t<button type=\"button\" class=\"button-link clear-selection\"><?php _e( 'Clear' ); ?></button>\n\t\t\t<# } #>\n\t\t</div>\n\t\t<div class=\"selection-view\"></div>\n\t</script>\n\n\t<?php // Template for the Attachment display settings, used for example in the sidebar. ?>\n\t<script type=\"text/html\" id=\"tmpl-attachment-display-settings\">\n\t\t<h2><?php _e( 'Attachment Display Settings' ); ?></h2>\n\n\t\t<# if ( 'image' === data.type ) { #>\n\t\t\t<span class=\"setting align\">\n\t\t\t\t<label for=\"attachment-display-settings-alignment\" class=\"name\"><?php _e( 'Alignment' ); ?></label>\n\t\t\t\t<select id=\"attachment-display-settings-alignment\" class=\"alignment\"\n\t\t\t\t\tdata-setting=\"align\"\n\t\t\t\t\t<# if ( data.userSettings ) { #>\n\t\t\t\t\t\tdata-user-setting=\"align\"\n\t\t\t\t\t<# } #>>\n\n\t\t\t\t\t<option value=\"left\">\n\t\t\t\t\t\t<?php esc_html_e( 'Left' ); ?>\n\t\t\t\t\t</option>\n\t\t\t\t\t<option value=\"center\">\n\t\t\t\t\t\t<?php esc_html_e( 'Center' ); ?>\n\t\t\t\t\t</option>\n\t\t\t\t\t<option value=\"right\">\n\t\t\t\t\t\t<?php esc_html_e( 'Right' ); ?>\n\t\t\t\t\t</option>\n\t\t\t\t\t<option value=\"none\" selected>\n\t\t\t\t\t\t<?php esc_html_e( 'None' ); ?>\n\t\t\t\t\t</option>\n\t\t\t\t</select>\n\t\t\t</span>\n\t\t<# } #>\n\n\t\t<span class=\"setting\">\n\t\t\t<label for=\"attachment-display-settings-link-to\" class=\"name\">\n\t\t\t\t<# if ( data.model.canEmbed ) { #>\n\t\t\t\t\t<?php _e( 'Embed or Link' ); ?>\n\t\t\t\t<# } else { #>\n\t\t\t\t\t<?php _e( 'Link To' ); ?>\n\t\t\t\t<# } #>\n\t\t\t</label>\n\t\t\t<select id=\"attachment-display-settings-link-to\" class=\"link-to\"\n\t\t\t\tdata-setting=\"link\"\n\t\t\t\t<# if ( data.userSettings && ! data.model.canEmbed ) { #>\n\t\t\t\t\tdata-user-setting=\"urlbutton\"\n\t\t\t\t<# } #>>\n\n\t\t\t<# if ( data.model.canEmbed ) { #>\n\t\t\t\t<option value=\"embed\" selected>\n\t\t\t\t\t<?php esc_html_e( 'Embed Media Player' ); ?>\n\t\t\t\t</option>\n\t\t\t\t<option value=\"file\">\n\t\t\t<# } else { #>\n\t\t\t\t<option value=\"none\" selected>\n\t\t\t\t\t<?php esc_html_e( 'None' ); ?>\n\t\t\t\t</option>\n\t\t\t\t<option value=\"file\">\n\t\t\t<# } #>\n\t\t\t\t<# if ( data.model.canEmbed ) { #>\n\t\t\t\t\t<?php esc_html_e( 'Link to Media File' ); ?>\n\t\t\t\t<# } else { #>\n\t\t\t\t\t<?php esc_html_e( 'Media File' ); ?>\n\t\t\t\t<# } #>\n\t\t\t\t</option>\n\t\t\t\t<option value=\"post\">\n\t\t\t\t<# if ( data.model.canEmbed ) { #>\n\t\t\t\t\t<?php esc_html_e( 'Link to Attachment Page' ); ?>\n\t\t\t\t<# } else { #>\n\t\t\t\t\t<?php esc_html_e( 'Attachment Page' ); ?>\n\t\t\t\t<# } #>\n\t\t\t\t</option>\n\t\t\t<# if ( 'image' === data.type ) { #>\n\t\t\t\t<option value=\"custom\">\n\t\t\t\t\t<?php esc_html_e( 'Custom URL' ); ?>\n\t\t\t\t</option>\n\t\t\t<# } #>\n\t\t\t</select>\n\t\t</span>\n\t\t<span class=\"setting\">\n\t\t\t<label for=\"attachment-display-settings-link-to-custom\" class=\"name\"><?php _e( 'URL' ); ?></label>\n\t\t\t<input type=\"text\" id=\"attachment-display-settings-link-to-custom\" class=\"link-to-custom\" data-setting=\"linkUrl\" />\n\t\t</span>\n\n\t\t<# if ( 'undefined' !== typeof data.sizes ) { #>\n\t\t\t<span class=\"setting\">\n\t\t\t\t<label for=\"attachment-display-settings-size\" class=\"name\"><?php _e( 'Size' ); ?></label>\n\t\t\t\t<select id=\"attachment-display-settings-size\" class=\"size\" name=\"size\"\n\t\t\t\t\tdata-setting=\"size\"\n\t\t\t\t\t<# if ( data.userSettings ) { #>\n\t\t\t\t\t\tdata-user-setting=\"imgsize\"\n\t\t\t\t\t<# } #>>\n\t\t\t\t\t<?php\n\t\t\t\t\t/** This filter is documented in wp-admin/includes/media.php */\n\t\t\t\t\t$sizes = apply_filters(\n\t\t\t\t\t\t'image_size_names_choose',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'thumbnail' => __( 'Thumbnail' ),\n\t\t\t\t\t\t\t'medium' => __( 'Medium' ),\n\t\t\t\t\t\t\t'large' => __( 'Large' ),\n\t\t\t\t\t\t\t'full' => __( 'Full Size' ),\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\tforeach ( $sizes as $value => $name ) :\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<#\n\t\t\t\t\t\tvar size = data.sizes['<?php echo esc_js( $value ); ?>'];\n\t\t\t\t\t\tif ( size ) { #>\n\t\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $value ); ?>\" <?php selected( $value, 'full' ); ?>>\n\t\t\t\t\t\t\t\t<?php echo esc_html( $name ); ?> &ndash; {{ size.width }} &times; {{ size.height }}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</select>\n\t\t\t</span>\n\t\t<# } #>\n\t</script>\n\n\t<?php // Template for the Gallery settings, used for example in the sidebar. ?>\n\t<script type=\"text/html\" id=\"tmpl-gallery-settings\">\n\t\t<h2><?php _e( 'Gallery Settings' ); ?></h2>\n\n\t\t<span class=\"setting\">\n\t\t\t<label for=\"gallery-settings-link-to\" class=\"name\"><?php _e( 'Link To' ); ?></label>\n\t\t\t<select id=\"gallery-settings-link-to\" class=\"link-to\"\n\t\t\t\tdata-setting=\"link\"\n\t\t\t\t<# if ( data.userSettings ) { #>\n\t\t\t\t\tdata-user-setting=\"urlbutton\"\n\t\t\t\t<# } #>>\n\n\t\t\t\t<option value=\"post\" <# if ( ! wp.media.galleryDefaults.link || 'post' === wp.media.galleryDefaults.link ) {\n\t\t\t\t\t#>selected=\"selected\"<# }\n\t\t\t\t#>>\n\t\t\t\t\t<?php esc_html_e( 'Attachment Page' ); ?>\n\t\t\t\t</option>\n\t\t\t\t<option value=\"file\" <# if ( 'file' === wp.media.galleryDefaults.link ) { #>selected=\"selected\"<# } #>>\n\t\t\t\t\t<?php esc_html_e( 'Media File' ); ?>\n\t\t\t\t</option>\n\t\t\t\t<option value=\"none\" <# if ( 'none' === wp.media.galleryDefaults.link ) { #>selected=\"selected\"<# } #>>\n\t\t\t\t\t<?php esc_html_e( 'None' ); ?>\n\t\t\t\t</option>\n\t\t\t</select>\n\t\t</span>\n\n\t\t<span class=\"setting\">\n\t\t\t<label for=\"gallery-settings-columns\" class=\"name select-label-inline\"><?php _e( 'Columns' ); ?></label>\n\t\t\t<select id=\"gallery-settings-columns\" class=\"columns\" name=\"columns\"\n\t\t\t\tdata-setting=\"columns\">\n\t\t\t\t<?php for ( $i = 1; $i <= 9; $i++ ) : ?>\n\t\t\t\t\t<option value=\"<?php echo esc_attr( $i ); ?>\" <#\n\t\t\t\t\t\tif ( <?php echo $i; ?> == wp.media.galleryDefaults.columns ) { #>selected=\"selected\"<# }\n\t\t\t\t\t#>>\n\t\t\t\t\t\t<?php echo esc_html( $i ); ?>\n\t\t\t\t\t</option>\n\t\t\t\t<?php endfor; ?>\n\t\t\t</select>\n\t\t</span>\n\n\t\t<span class=\"setting\">\n\t\t\t<input type=\"checkbox\" id=\"gallery-settings-random-order\" data-setting=\"_orderbyRandom\" />\n\t\t\t<label for=\"gallery-settings-random-order\" class=\"checkbox-label-inline\"><?php _e( 'Random Order' ); ?></label>\n\t\t</span>\n\n\t\t<span class=\"setting size\">\n\t\t\t<label for=\"gallery-settings-size\" class=\"name\"><?php _e( 'Size' ); ?></label>\n\t\t\t<select id=\"gallery-settings-size\" class=\"size\" name=\"size\"\n\t\t\t\tdata-setting=\"size\"\n\t\t\t\t<# if ( data.userSettings ) { #>\n\t\t\t\t\tdata-user-setting=\"imgsize\"\n\t\t\t\t<# } #>\n\t\t\t\t>\n\t\t\t\t<?php\n\t\t\t\t/** This filter is documented in wp-admin/includes/media.php */\n\t\t\t\t$size_names = apply_filters(\n\t\t\t\t\t'image_size_names_choose',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'thumbnail' => __( 'Thumbnail' ),\n\t\t\t\t\t\t'medium' => __( 'Medium' ),\n\t\t\t\t\t\t'large' => __( 'Large' ),\n\t\t\t\t\t\t'full' => __( 'Full Size' ),\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tforeach ( $size_names as $size => $label ) :\n\t\t\t\t\t?>\n\t\t\t\t\t<option value=\"<?php echo esc_attr( $size ); ?>\">\n\t\t\t\t\t\t<?php echo esc_html( $label ); ?>\n\t\t\t\t\t</option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</select>\n\t\t</span>\n\t</script>\n\n\t<?php // Template for the Playlists settings, used for example in the sidebar. ?>\n\t<script type=\"text/html\" id=\"tmpl-playlist-settings\">\n\t\t<h2><?php _e( 'Playlist Settings' ); ?></h2>\n\n\t\t<# var emptyModel = _.isEmpty( data.model ),\n\t\t\tisVideo = 'video' === data.controller.get('library').props.get('type'); #>\n\n\t\t<span class=\"setting\">\n\t\t\t<input type=\"checkbox\" id=\"playlist-settings-show-list\" data-setting=\"tracklist\" <# if ( emptyModel ) { #>\n\t\t\t\tchecked=\"checked\"\n\t\t\t<# } #> />\n\t\t\t<label for=\"playlist-settings-show-list\" class=\"checkbox-label-inline\">\n\t\t\t\t<# if ( isVideo ) { #>\n\t\t\t\t<?php _e( 'Show Video List' ); ?>\n\t\t\t\t<# } else { #>\n\t\t\t\t<?php _e( 'Show Tracklist' ); ?>\n\t\t\t\t<# } #>\n\t\t\t</label>\n\t\t</span>\n\n\t\t<# if ( ! isVideo ) { #>\n\t\t<span class=\"setting\">\n\t\t\t<input type=\"checkbox\" id=\"playlist-settings-show-artist\" data-setting=\"artists\" <# if ( emptyModel ) { #>\n\t\t\t\tchecked=\"checked\"\n\t\t\t<# } #> />\n\t\t\t<label for=\"playlist-settings-show-artist\" class=\"checkbox-label-inline\">\n\t\t\t\t<?php _e( 'Show Artist Name in Tracklist' ); ?>\n\t\t\t</label>\n\t\t</span>\n\t\t<# } #>\n\n\t\t<span class=\"setting\">\n\t\t\t<input type=\"checkbox\" id=\"playlist-settings-show-images\" data-setting=\"images\" <# if ( emptyModel ) { #>\n\t\t\t\tchecked=\"checked\"\n\t\t\t<# } #> />\n\t\t\t<label for=\"playlist-settings-show-images\" class=\"checkbox-label-inline\">\n\t\t\t\t<?php _e( 'Show Images' ); ?>\n\t\t\t</label>\n\t\t</span>\n\t</script>\n\n\t<?php // Template for the \"Insert from URL\" layout. ?>\n\t<script type=\"text/html\" id=\"tmpl-embed-link-settings\">\n\t\t<span class=\"setting link-text\">\n\t\t\t<label for=\"embed-link-settings-link-text\" class=\"name\"><?php _e( 'Link Text' ); ?></label>\n\t\t\t<input type=\"text\" id=\"embed-link-settings-link-text\" class=\"alignment\" data-setting=\"linkText\" />\n\t\t</span>\n\t\t<div class=\"embed-container\" style=\"display: none;\">\n\t\t\t<div class=\"embed-preview\"></div>\n\t\t</div>\n\t</script>\n\n\t<?php // Template for the \"Insert from URL\" image preview and details. ?>\n\t<script type=\"text/html\" id=\"tmpl-embed-image-settings\">\n\t\t<div class=\"wp-clearfix\">\n\t\t\t<div class=\"thumbnail\">\n\t\t\t\t<img src=\"{{ data.model.url }}\" draggable=\"false\" alt=\"\" />\n\t\t\t</div>\n\t\t</div>\n\n\t\t<span class=\"setting alt-text has-description\">\n\t\t\t<label for=\"embed-image-settings-alt-text\" class=\"name\"><?php _e( 'Alternative Text' ); ?></label>\n\t\t\t<input type=\"text\" id=\"embed-image-settings-alt-text\" data-setting=\"alt\" aria-describedby=\"alt-text-description\" />\n\t\t</span>\n\t\t<p class=\"description\" id=\"alt-text-description\"><?php echo $alt_text_description; ?></p>\n\n\t\t<?php\n\t\t/** This filter is documented in wp-admin/includes/media.php */\n\t\tif ( ! apply_filters( 'disable_captions', '' ) ) :\n\t\t\t?>\n\t\t\t<span class=\"setting caption\">\n\t\t\t\t<label for=\"embed-image-settings-caption\" class=\"name\"><?php _e( 'Caption' ); ?></label>\n\t\t\t\t<textarea id=\"embed-image-settings-caption\" data-setting=\"caption\" />\n\t\t\t</span>\n\t\t<?php endif; ?>\n\n\t\t<fieldset class=\"setting-group\">\n\t\t\t<legend class=\"name\"><?php _e( 'Align' ); ?></legend>\n\t\t\t<span class=\"setting align\">\n\t\t\t\t<span class=\"button-group button-large\" data-setting=\"align\">\n\t\t\t\t\t<button class=\"button\" value=\"left\">\n\t\t\t\t\t\t<?php esc_html_e( 'Left' ); ?>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button class=\"button\" value=\"center\">\n\t\t\t\t\t\t<?php esc_html_e( 'Center' ); ?>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button class=\"button\" value=\"right\">\n\t\t\t\t\t\t<?php esc_html_e( 'Right' ); ?>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button class=\"button active\" value=\"none\">\n\t\t\t\t\t\t<?php esc_html_e( 'None' ); ?>\n\t\t\t\t\t</button>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</fieldset>\n\n\t\t<fieldset class=\"setting-group\">\n\t\t\t<legend class=\"name\"><?php _e( 'Link To' ); ?></legend>\n\t\t\t<span class=\"setting link-to\">\n\t\t\t\t<span class=\"button-group button-large\" data-setting=\"link\">\n\t\t\t\t\t<button class=\"button\" value=\"file\">\n\t\t\t\t\t\t<?php esc_html_e( 'Image URL' ); ?>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button class=\"button\" value=\"custom\">\n\t\t\t\t\t\t<?php esc_html_e( 'Custom URL' ); ?>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button class=\"button active\" value=\"none\">\n\t\t\t\t\t\t<?php esc_html_e( 'None' ); ?>\n\t\t\t\t\t</button>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t\t<span class=\"setting\">\n\t\t\t\t<label for=\"embed-image-settings-link-to-custom\" class=\"name\"><?php _e( 'URL' ); ?></label>\n\t\t\t\t<input type=\"text\" id=\"embed-image-settings-link-to-custom\" class=\"link-to-custom\" data-setting=\"linkUrl\" />\n\t\t\t</span>\n\t\t</fieldset>\n\t</script>\n\n\t<?php // Template for the Image details, used for example in the editor. ?>\n\t<script type=\"text/html\" id=\"tmpl-image-details\">\n\t\t<div class=\"media-embed\">\n\t\t\t<div class=\"embed-media-settings\">\n\t\t\t\t<div class=\"column-settings\">\n\t\t\t\t\t<span class=\"setting alt-text has-description\">\n\t\t\t\t\t\t<label for=\"image-details-alt-text\" class=\"name\"><?php _e( 'Alternative Text' ); ?></label>\n\t\t\t\t\t\t<input type=\"text\" id=\"image-details-alt-text\" data-setting=\"alt\" value=\"{{ data.model.alt }}\" aria-describedby=\"alt-text-description\" />\n\t\t\t\t\t</span>\n\t\t\t\t\t<p class=\"description\" id=\"alt-text-description\"><?php echo $alt_text_description; ?></p>\n\n\t\t\t\t\t<?php\n\t\t\t\t\t/** This filter is documented in wp-admin/includes/media.php */\n\t\t\t\t\tif ( ! apply_filters( 'disable_captions', '' ) ) :\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<span class=\"setting caption\">\n\t\t\t\t\t\t\t<label for=\"image-details-caption\" class=\"name\"><?php _e( 'Caption' ); ?></label>\n\t\t\t\t\t\t\t<textarea id=\"image-details-caption\" data-setting=\"caption\">{{ data.model.caption }}</textarea>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t<h2><?php _e( 'Display Settings' ); ?></h2>\n\t\t\t\t\t<fieldset class=\"setting-group\">\n\t\t\t\t\t\t<legend class=\"legend-inline\"><?php _e( 'Align' ); ?></legend>\n\t\t\t\t\t\t<span class=\"setting align\">\n\t\t\t\t\t\t\t<span class=\"button-group button-large\" data-setting=\"align\">\n\t\t\t\t\t\t\t\t<button class=\"button\" value=\"left\">\n\t\t\t\t\t\t\t\t\t<?php esc_html_e( 'Left' ); ?>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t<button class=\"button\" value=\"center\">\n\t\t\t\t\t\t\t\t\t<?php esc_html_e( 'Center' ); ?>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t<button class=\"button\" value=\"right\">\n\t\t\t\t\t\t\t\t\t<?php esc_html_e( 'Right' ); ?>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t<button class=\"button active\" value=\"none\">\n\t\t\t\t\t\t\t\t\t<?php esc_html_e( 'None' ); ?>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</fieldset>\n\n\t\t\t\t\t<# if ( data.attachment ) { #>\n\t\t\t\t\t\t<# if ( 'undefined' !== typeof data.attachment.sizes ) { #>\n\t\t\t\t\t\t\t<span class=\"setting size\">\n\t\t\t\t\t\t\t\t<label for=\"image-details-size\" class=\"name\"><?php _e( 'Size' ); ?></label>\n\t\t\t\t\t\t\t\t<select id=\"image-details-size\" class=\"size\" name=\"size\"\n\t\t\t\t\t\t\t\t\tdata-setting=\"size\"\n\t\t\t\t\t\t\t\t\t<# if ( data.userSettings ) { #>\n\t\t\t\t\t\t\t\t\t\tdata-user-setting=\"imgsize\"\n\t\t\t\t\t\t\t\t\t<# } #>>\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t/** This filter is documented in wp-admin/includes/media.php */\n\t\t\t\t\t\t\t\t\t$sizes = apply_filters(\n\t\t\t\t\t\t\t\t\t\t'image_size_names_choose',\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t'thumbnail' => __( 'Thumbnail' ),\n\t\t\t\t\t\t\t\t\t\t\t'medium' => __( 'Medium' ),\n\t\t\t\t\t\t\t\t\t\t\t'large' => __( 'Large' ),\n\t\t\t\t\t\t\t\t\t\t\t'full' => __( 'Full Size' ),\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\tforeach ( $sizes as $value => $name ) :\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\tvar size = data.sizes['<?php echo esc_js( $value ); ?>'];\n\t\t\t\t\t\t\t\t\t\tif ( size ) { #>\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $value ); ?>\">\n\t\t\t\t\t\t\t\t\t\t\t\t<?php echo esc_html( $name ); ?> &ndash; {{ size.width }} &times; {{ size.height }}\n\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t\t\t\t<option value=\"<?php echo esc_attr( 'custom' ); ?>\">\n\t\t\t\t\t\t\t\t\t\t<?php _e( 'Custom Size' ); ?>\n\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t<div class=\"custom-size wp-clearfix<# if ( data.model.size !== 'custom' ) { #> hidden<# } #>\">\n\t\t\t\t\t\t\t\t<span class=\"custom-size-setting\">\n\t\t\t\t\t\t\t\t\t<label for=\"image-details-size-width\"><?php _e( 'Width' ); ?></label>\n\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"image-details-size-width\" aria-describedby=\"image-size-desc\" data-setting=\"customWidth\" step=\"1\" value=\"{{ data.model.customWidth }}\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"sep\" aria-hidden=\"true\">&times;</span>\n\t\t\t\t\t\t\t\t<span class=\"custom-size-setting\">\n\t\t\t\t\t\t\t\t\t<label for=\"image-details-size-height\"><?php _e( 'Height' ); ?></label>\n\t\t\t\t\t\t\t\t\t<input type=\"number\" id=\"image-details-size-height\" aria-describedby=\"image-size-desc\" data-setting=\"customHeight\" step=\"1\" value=\"{{ data.model.customHeight }}\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<p id=\"image-size-desc\" class=\"description\"><?php _e( 'Image size in pixels' ); ?></p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t<# } #>\n\n\t\t\t\t\t<span class=\"setting link-to\">\n\t\t\t\t\t\t<label for=\"image-details-link-to\" class=\"name\"><?php _e( 'Link To' ); ?></label>\n\t\t\t\t\t\t<select id=\"image-details-link-to\" data-setting=\"link\">\n\t\t\t\t\t\t<# if ( data.attachment ) { #>\n\t\t\t\t\t\t\t<option value=\"file\">\n\t\t\t\t\t\t\t\t<?php esc_html_e( 'Media File' ); ?>\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t<option value=\"post\">\n\t\t\t\t\t\t\t\t<?php esc_html_e( 'Attachment Page' ); ?>\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\t\t<option value=\"file\">\n\t\t\t\t\t\t\t\t<?php esc_html_e( 'Image URL' ); ?>\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t<option value=\"custom\">\n\t\t\t\t\t\t\t\t<?php esc_html_e( 'Custom URL' ); ?>\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t<option value=\"none\">\n\t\t\t\t\t\t\t\t<?php esc_html_e( 'None' ); ?>\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"setting\">\n\t\t\t\t\t\t<label for=\"image-details-link-to-custom\" class=\"name\"><?php _e( 'URL' ); ?></label>\n\t\t\t\t\t\t<input type=\"text\" id=\"image-details-link-to-custom\" class=\"link-to-custom\" data-setting=\"linkUrl\" />\n\t\t\t\t\t</span>\n\n\t\t\t\t\t<div class=\"advanced-section\">\n\t\t\t\t\t\t<h2><button type=\"button\" class=\"button-link advanced-toggle\"><?php _e( 'Advanced Options' ); ?></button></h2>\n\t\t\t\t\t\t<div class=\"advanced-settings hidden\">\n\t\t\t\t\t\t\t<div class=\"advanced-image\">\n\t\t\t\t\t\t\t\t<span class=\"setting title-text\">\n\t\t\t\t\t\t\t\t\t<label for=\"image-details-title-attribute\" class=\"name\"><?php _e( 'Image Title Attribute' ); ?></label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"image-details-title-attribute\" data-setting=\"title\" value=\"{{ data.model.title }}\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"setting extra-classes\">\n\t\t\t\t\t\t\t\t\t<label for=\"image-details-css-class\" class=\"name\"><?php _e( 'Image CSS Class' ); ?></label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"image-details-css-class\" data-setting=\"extraClasses\" value=\"{{ data.model.extraClasses }}\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"advanced-link\">\n\t\t\t\t\t\t\t\t<span class=\"setting link-target\">\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"image-details-link-target\" data-setting=\"linkTargetBlank\" value=\"_blank\" <# if ( data.model.linkTargetBlank ) { #>checked=\"checked\"<# } #>>\n\t\t\t\t\t\t\t\t\t<label for=\"image-details-link-target\" class=\"checkbox-label\"><?php _e( 'Open link in a new tab' ); ?></label>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"setting link-rel\">\n\t\t\t\t\t\t\t\t\t<label for=\"image-details-link-rel\" class=\"name\"><?php _e( 'Link Rel' ); ?></label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"image-details-link-rel\" data-setting=\"linkRel\" value=\"{{ data.model.linkRel }}\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"setting link-class-name\">\n\t\t\t\t\t\t\t\t\t<label for=\"image-details-link-css-class\" class=\"name\"><?php _e( 'Link CSS Class' ); ?></label>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"image-details-link-css-class\" data-setting=\"linkClassName\" value=\"{{ data.model.linkClassName }}\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"column-image\">\n\t\t\t\t\t<div class=\"image\">\n\t\t\t\t\t\t<img src=\"{{ data.model.url }}\" draggable=\"false\" alt=\"\" />\n\t\t\t\t\t\t<# if ( data.attachment && window.imageEdit ) { #>\n\t\t\t\t\t\t\t<div class=\"actions\">\n\t\t\t\t\t\t\t\t<input type=\"button\" class=\"edit-attachment button\" value=\"<?php esc_attr_e( 'Edit Original' ); ?>\" />\n\t\t\t\t\t\t\t\t<input type=\"button\" class=\"replace-attachment button\" value=\"<?php esc_attr_e( 'Replace' ); ?>\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</script>\n\n\t<?php // Template for the Image Editor layout. ?>\n\t<script type=\"text/html\" id=\"tmpl-image-editor\">\n\t\t<div id=\"media-head-{{ data.id }}\"></div>\n\t\t<div id=\"image-editor-{{ data.id }}\"></div>\n\t</script>\n\n\t<?php // Template for an embedded Audio details. ?>\n\t<script type=\"text/html\" id=\"tmpl-audio-details\">\n\t\t<# var ext, html5types = {\n\t\t\tmp3: wp.media.view.settings.embedMimes.mp3,\n\t\t\togg: wp.media.view.settings.embedMimes.ogg\n\t\t}; #>\n\n\t\t<?php $audio_types = wp_get_audio_extensions(); ?>\n\t\t<div class=\"media-embed media-embed-details\">\n\t\t\t<div class=\"embed-media-settings embed-audio-settings\">\n\t\t\t\t<?php wp_underscore_audio_template(); ?>\n\n\t\t\t\t<# if ( ! _.isEmpty( data.model.src ) ) {\n\t\t\t\t\text = data.model.src.split('.').pop();\n\t\t\t\t\tif ( html5types[ ext ] ) {\n\t\t\t\t\t\tdelete html5types[ ext ];\n\t\t\t\t\t}\n\t\t\t\t#>\n\t\t\t\t<span class=\"setting\">\n\t\t\t\t\t<label for=\"audio-details-source\" class=\"name\"><?php _e( 'URL' ); ?></label>\n\t\t\t\t\t<input type=\"text\" id=\"audio-details-source\" readonly data-setting=\"src\" value=\"{{ data.model.src }}\" />\n\t\t\t\t\t<button type=\"button\" class=\"button-link remove-setting\"><?php _e( 'Remove audio source' ); ?></button>\n\t\t\t\t</span>\n\t\t\t\t<# } #>\n\t\t\t\t<?php\n\n\t\t\t\tforeach ( $audio_types as $type ) :\n\t\t\t\t\t?>\n\t\t\t\t<# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) {\n\t\t\t\t\tif ( ! _.isUndefined( html5types.<?php echo $type; ?> ) ) {\n\t\t\t\t\t\tdelete html5types.<?php echo $type; ?>;\n\t\t\t\t\t}\n\t\t\t\t#>\n\t\t\t\t<span class=\"setting\">\n\t\t\t\t\t<label for=\"audio-details-<?php echo $type . '-source'; ?>\" class=\"name\"><?php echo strtoupper( $type ); ?></label>\n\t\t\t\t\t<input type=\"text\" id=\"audio-details-<?php echo $type . '-source'; ?>\" readonly data-setting=\"<?php echo $type; ?>\" value=\"{{ data.model.<?php echo $type; ?> }}\" />\n\t\t\t\t\t<button type=\"button\" class=\"button-link remove-setting\"><?php _e( 'Remove audio source' ); ?></button>\n\t\t\t\t</span>\n\t\t\t\t<# } #>\n\t\t\t\t<?php endforeach ?>\n\n\t\t\t\t<# if ( ! _.isEmpty( html5types ) ) { #>\n\t\t\t\t<fieldset class=\"setting-group\">\n\t\t\t\t\t<legend class=\"name\"><?php _e( 'Add alternate sources for maximum HTML5 playback' ); ?></legend>\n\t\t\t\t\t<span class=\"setting\">\n\t\t\t\t\t\t<span class=\"button-large\">\n\t\t\t\t\t\t<# _.each( html5types, function (mime, type) { #>\n\t\t\t\t\t\t\t<button class=\"button add-media-source\" data-mime=\"{{ mime }}\">{{ type }}</button>\n\t\t\t\t\t\t<# } ) #>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<# } #>\n\n\t\t\t\t<fieldset class=\"setting-group\">\n\t\t\t\t\t<legend class=\"name\"><?php _e( 'Preload' ); ?></legend>\n\t\t\t\t\t<span class=\"setting preload\">\n\t\t\t\t\t\t<span class=\"button-group button-large\" data-setting=\"preload\">\n\t\t\t\t\t\t\t<button class=\"button\" value=\"auto\"><?php _ex( 'Auto', 'auto preload' ); ?></button>\n\t\t\t\t\t\t\t<button class=\"button\" value=\"metadata\"><?php _e( 'Metadata' ); ?></button>\n\t\t\t\t\t\t\t<button class=\"button active\" value=\"none\"><?php _e( 'None' ); ?></button>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t</fieldset>\n\n\t\t\t\t<span class=\"setting-group\">\n\t\t\t\t\t<span class=\"setting checkbox-setting autoplay\">\n\t\t\t\t\t\t<input type=\"checkbox\" id=\"audio-details-autoplay\" data-setting=\"autoplay\" />\n\t\t\t\t\t\t<label for=\"audio-details-autoplay\" class=\"checkbox-label\"><?php _e( 'Autoplay' ); ?></label>\n\t\t\t\t\t</span>\n\n\t\t\t\t\t<span class=\"setting checkbox-setting\">\n\t\t\t\t\t\t<input type=\"checkbox\" id=\"audio-details-loop\" data-setting=\"loop\" />\n\t\t\t\t\t\t<label for=\"audio-details-loop\" class=\"checkbox-label\"><?php _e( 'Loop' ); ?></label>\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t</script>\n\n\t<?php // Template for an embedded Video details. ?>\n\t<script type=\"text/html\" id=\"tmpl-video-details\">\n\t\t<# var ext, html5types = {\n\t\t\tmp4: wp.media.view.settings.embedMimes.mp4,\n\t\t\togv: wp.media.view.settings.embedMimes.ogv,\n\t\t\twebm: wp.media.view.settings.embedMimes.webm\n\t\t}; #>\n\n\t\t<?php $video_types = wp_get_video_extensions(); ?>\n\t\t<div class=\"media-embed media-embed-details\">\n\t\t\t<div class=\"embed-media-settings embed-video-settings\">\n\t\t\t\t<div class=\"wp-video-holder\">\n\t\t\t\t<#\n\t\t\t\tvar w = ! data.model.width || data.model.width > 640 ? 640 : data.model.width,\n\t\t\t\t\th = ! data.model.height ? 360 : data.model.height;\n\n\t\t\t\tif ( data.model.width && w !== data.model.width ) {\n\t\t\t\t\th = Math.ceil( ( h * w ) / data.model.width );\n\t\t\t\t}\n\t\t\t\t#>\n\n\t\t\t\t<?php wp_underscore_video_template(); ?>\n\n\t\t\t\t<# if ( ! _.isEmpty( data.model.src ) ) {\n\t\t\t\t\text = data.model.src.split('.').pop();\n\t\t\t\t\tif ( html5types[ ext ] ) {\n\t\t\t\t\t\tdelete html5types[ ext ];\n\t\t\t\t\t}\n\t\t\t\t#>\n\t\t\t\t<span class=\"setting\">\n\t\t\t\t\t<label for=\"video-details-source\" class=\"name\"><?php _e( 'URL' ); ?></label>\n\t\t\t\t\t<input type=\"text\" id=\"video-details-source\" readonly data-setting=\"src\" value=\"{{ data.model.src }}\" />\n\t\t\t\t\t<button type=\"button\" class=\"button-link remove-setting\"><?php _e( 'Remove video source' ); ?></button>\n\t\t\t\t</span>\n\t\t\t\t<# } #>\n\t\t\t\t<?php\n\t\t\t\tforeach ( $video_types as $type ) :\n\t\t\t\t\t?>\n\t\t\t\t<# if ( ! _.isEmpty( data.model.<?php echo $type; ?> ) ) {\n\t\t\t\t\tif ( ! _.isUndefined( html5types.<?php echo $type; ?> ) ) {\n\t\t\t\t\t\tdelete html5types.<?php echo $type; ?>;\n\t\t\t\t\t}\n\t\t\t\t#>\n\t\t\t\t<span class=\"setting\">\n\t\t\t\t\t<label for=\"video-details-<?php echo $type . '-source'; ?>\" class=\"name\"><?php echo strtoupper( $type ); ?></label>\n\t\t\t\t\t<input type=\"text\" id=\"video-details-<?php echo $type . '-source'; ?>\" readonly data-setting=\"<?php echo $type; ?>\" value=\"{{ data.model.<?php echo $type; ?> }}\" />\n\t\t\t\t\t<button type=\"button\" class=\"button-link remove-setting\"><?php _e( 'Remove video source' ); ?></button>\n\t\t\t\t</span>\n\t\t\t\t<# } #>\n\t\t\t\t<?php endforeach ?>\n\t\t\t\t</div>\n\n\t\t\t\t<# if ( ! _.isEmpty( html5types ) ) { #>\n\t\t\t\t<fieldset class=\"setting-group\">\n\t\t\t\t\t<legend class=\"name\"><?php _e( 'Add alternate sources for maximum HTML5 playback' ); ?></legend>\n\t\t\t\t\t<span class=\"setting\">\n\t\t\t\t\t\t<span class=\"button-large\">\n\t\t\t\t\t\t<# _.each( html5types, function (mime, type) { #>\n\t\t\t\t\t\t\t<button class=\"button add-media-source\" data-mime=\"{{ mime }}\">{{ type }}</button>\n\t\t\t\t\t\t<# } ) #>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t</fieldset>\n\t\t\t\t<# } #>\n\n\t\t\t\t<# if ( ! _.isEmpty( data.model.poster ) ) { #>\n\t\t\t\t<span class=\"setting\">\n\t\t\t\t\t<label for=\"video-details-poster-image\" class=\"name\"><?php _e( 'Poster Image' ); ?></label>\n\t\t\t\t\t<input type=\"text\" id=\"video-details-poster-image\" readonly data-setting=\"poster\" value=\"{{ data.model.poster }}\" />\n\t\t\t\t\t<button type=\"button\" class=\"button-link remove-setting\"><?php _e( 'Remove poster image' ); ?></button>\n\t\t\t\t</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t<fieldset class=\"setting-group\">\n\t\t\t\t\t<legend class=\"name\"><?php _e( 'Preload' ); ?></legend>\n\t\t\t\t\t<span class=\"setting preload\">\n\t\t\t\t\t\t<span class=\"button-group button-large\" data-setting=\"preload\">\n\t\t\t\t\t\t\t<button class=\"button\" value=\"auto\"><?php _ex( 'Auto', 'auto preload' ); ?></button>\n\t\t\t\t\t\t\t<button class=\"button\" value=\"metadata\"><?php _e( 'Metadata' ); ?></button>\n\t\t\t\t\t\t\t<button class=\"button active\" value=\"none\"><?php _e( 'None' ); ?></button>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t</fieldset>\n\n\t\t\t\t<span class=\"setting-group\">\n\t\t\t\t\t<span class=\"setting checkbox-setting autoplay\">\n\t\t\t\t\t\t<input type=\"checkbox\" id=\"video-details-autoplay\" data-setting=\"autoplay\" />\n\t\t\t\t\t\t<label for=\"video-details-autoplay\" class=\"checkbox-label\"><?php _e( 'Autoplay' ); ?></label>\n\t\t\t\t\t</span>\n\n\t\t\t\t\t<span class=\"setting checkbox-setting\">\n\t\t\t\t\t\t<input type=\"checkbox\" id=\"video-details-loop\" data-setting=\"loop\" />\n\t\t\t\t\t\t<label for=\"video-details-loop\" class=\"checkbox-label\"><?php _e( 'Loop' ); ?></label>\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\n\t\t\t\t<span class=\"setting\" data-setting=\"content\">\n\t\t\t\t\t<#\n\t\t\t\t\tvar content = '';\n\t\t\t\t\tif ( ! _.isEmpty( data.model.content ) ) {\n\t\t\t\t\t\tvar tracks = jQuery( data.model.content ).filter( 'track' );\n\t\t\t\t\t\t_.each( tracks.toArray(), function( track, index ) {\n\t\t\t\t\t\t\tcontent += track.outerHTML; #>\n\t\t\t\t\t\t<label for=\"video-details-track-{{ index }}\" class=\"name\"><?php _e( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ); ?></label>\n\t\t\t\t\t\t<input class=\"content-track\" type=\"text\" id=\"video-details-track-{{ index }}\" aria-describedby=\"video-details-track-desc-{{ index }}\" value=\"{{ track.outerHTML }}\" />\n\t\t\t\t\t\t<span class=\"description\" id=\"video-details-track-desc-{{ index }}\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tprintf(\n\t\t\t\t\t\t\t\t/* translators: 1: \"srclang\" HTML attribute, 2: \"label\" HTML attribute, 3: \"kind\" HTML attribute. */\n\t\t\t\t\t\t\t\t__( 'The %1$s, %2$s, and %3$s values can be edited to set the video track language and kind.' ),\n\t\t\t\t\t\t\t\t'srclang',\n\t\t\t\t\t\t\t\t'label',\n\t\t\t\t\t\t\t\t'kind'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<button type=\"button\" class=\"button-link remove-setting remove-track\"><?php _ex( 'Remove video track', 'media' ); ?></button><br/>\n\t\t\t\t\t\t<# } ); #>\n\t\t\t\t\t<# } else { #>\n\t\t\t\t\t<span class=\"name\"><?php _e( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ); ?></span><br />\n\t\t\t\t\t<em><?php _e( 'There are no associated subtitles.' ); ?></em>\n\t\t\t\t\t<# } #>\n\t\t\t\t\t<textarea class=\"hidden content-setting\">{{ content }}</textarea>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t</script>\n\n\t<?php // Template for a Gallery within the editor. ?>\n\t<script type=\"text/html\" id=\"tmpl-editor-gallery\">\n\t\t<# if ( data.attachments.length ) { #>\n\t\t\t<div class=\"gallery gallery-columns-{{ data.columns }}\">\n\t\t\t\t<# _.each( data.attachments, function( attachment, index ) { #>\n\t\t\t\t\t<dl class=\"gallery-item\">\n\t\t\t\t\t\t<dt class=\"gallery-icon\">\n\t\t\t\t\t\t\t<# if ( attachment.thumbnail ) { #>\n\t\t\t\t\t\t\t\t<img src=\"{{ attachment.thumbnail.url }}\" width=\"{{ attachment.thumbnail.width }}\" height=\"{{ attachment.thumbnail.height }}\" alt=\"{{ attachment.alt }}\" />\n\t\t\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\t\t\t<img src=\"{{ attachment.url }}\" alt=\"{{ attachment.alt }}\" />\n\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t</dt>\n\t\t\t\t\t\t<# if ( attachment.caption ) { #>\n\t\t\t\t\t\t\t<dd class=\"wp-caption-text gallery-caption\">\n\t\t\t\t\t\t\t\t{{{ data.verifyHTML( attachment.caption ) }}}\n\t\t\t\t\t\t\t</dd>\n\t\t\t\t\t\t<# } #>\n\t\t\t\t\t</dl>\n\t\t\t\t\t<# if ( index % data.columns === data.columns - 1 ) { #>\n\t\t\t\t\t\t<br style=\"clear: both;\">\n\t\t\t\t\t<# } #>\n\t\t\t\t<# } ); #>\n\t\t\t</div>\n\t\t<# } else { #>\n\t\t\t<div class=\"wpview-error\">\n\t\t\t\t<div class=\"dashicons dashicons-format-gallery\"></div><p><?php _e( 'No items found.' ); ?></p>\n\t\t\t</div>\n\t\t<# } #>\n\t</script>\n\n\t<?php // Template for the Crop area layout, used for example in the Customizer. ?>\n\t<script type=\"text/html\" id=\"tmpl-crop-content\">\n\t\t<img class=\"crop-image\" src=\"{{ data.url }}\" alt=\"<?php esc_attr_e( 'Image crop area preview. Requires mouse interaction.' ); ?>\">\n\t\t<div class=\"upload-errors\"></div>\n\t</script>\n\n\t<?php // Template for the Site Icon preview, used for example in the Customizer. ?>\n\t<script type=\"text/html\" id=\"tmpl-site-icon-preview\">\n\t\t<h2><?php _e( 'Preview' ); ?></h2>\n\t\t<strong aria-hidden=\"true\"><?php _e( 'As a browser icon' ); ?></strong>\n\t\t<div class=\"favicon-preview\">\n\t\t\t<img src=\"<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>\" class=\"browser-preview\" width=\"182\" height=\"\" alt=\"\" />\n\n\t\t\t<div class=\"favicon\">\n\t\t\t\t<img id=\"preview-favicon\" src=\"{{ data.url }}\" alt=\"<?php esc_attr_e( 'Preview as a browser icon' ); ?>\"/>\n\t\t\t</div>\n\t\t\t<span class=\"browser-title\" aria-hidden=\"true\"><# print( '<?php bloginfo( 'name' ); ?>' ) #></span>\n\t\t</div>\n\n\t\t<strong aria-hidden=\"true\"><?php _e( 'As an app icon' ); ?></strong>\n\t\t<div class=\"app-icon-preview\">\n\t\t\t<img id=\"preview-app-icon\" src=\"{{ data.url }}\" alt=\"<?php esc_attr_e( 'Preview as an app icon' ); ?>\"/>\n\t\t</div>\n\t</script>\n\n\t<?php\n\n\t/**\n\t * Fires when the custom Backbone media templates are printed.\n\t *\n\t * @since 3.5.0\n\t */\n\tdo_action( 'print_media_templates' );\n}", "public function show(AdminPanel $adminPanel)\n {\n //\n }", "public function render_media($instance)\n {\n }", "public function render_media($instance)\n {\n }", "public function render_media($instance)\n {\n }", "public function render_media($instance)\n {\n }", "public function show($id)\n {\n $media = Media::leftJoin('users', 'media.user_id', '=', 'users.id')\n ->select('media.*', 'users.name')\n ->where('media.id' , $id)\n ->first();\n $media->addViewWithExpiryDate(Carbon::now()->addHours(2));\n $views = $media->getUniqueViews();\n return view('admin.media.show' , compact('media' , 'views'));\n }", "public function displayAdminPanel() {}", "public function media();", "function meom_eml_enqueue_media() {\n if ( ! is_admin() ) {\n return;\n }\n wp_enqueue_script(\n 'wpuxss-eml-media-views-script',\n plugin_dir_url( __FILE__ ) . 'js/eml-media-views.js',\n array( 'media-views' ),\n MEOM_EML_VERSION,\n true\n );\n}", "public function Show(){\n\t\techo(\"\n\t\t<div class='$this->claseCSS'>\n\t\t<div class='WidgetTitle'><a id='TitleBlock' href='$this->masURL'><div id='TitleText'>$this->Titulo</div></a></div>\n\t\t\t$this->Contenido\n\t\t\t<div class='footer'><a href='$this->masURL'>Ver m&aacute;s...</a></div>\n\t\t</div>\n\t\t\");\n\t}", "public function index()\n {\n $medias = $this->media->allWithBuilder()->with(['translations','category']);\n if(request()->ajax()) {\n return Datatables::of($medias)\n ->addColumn('category', function ($media) {\n return isset($media->category->title) ? $media->category->title : '';\n })\n ->editColumn('status', function ($media){\n return $media->status ? 'Yayında' : 'Yayında Değil';\n })\n ->addColumn('action', function ($media) {\n $action_buttons = \\Html::decode(link_to(\n route('admin.video.media.edit',\n [$media->id]),\n '<i class=\"fa fa-pencil\"></i>',\n ['class'=>'btn btn-default btn-flat']\n ));\n $action_buttons .= \\Html::decode(\\Form::button(\n '<i class=\"fa fa-trash\"></i>',\n [\"data-toggle\" => \"modal\",\n \"data-action-target\" => route(\"admin.video.media.destroy\", [$media->id]),\n \"data-target\" => \"#modal-delete-confirmation\",\n \"class\"=>\"btn btn-danger btn-flat\"]\n ));\n return $action_buttons;\n })\n ->escapeColumns([])\n ->make(true);\n }\n\n return view('video::admin.media.index', compact('media'));\n }", "public function printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Media list';\t\t\r\n\t\treturn $this->renderWith(array('Media_printresults','Print'));\r\n\t}", "public function show(Medicos $medicos)\n {\n //\n }", "public function show()\n {\n \n }", "public function show()\n {\n \n }", "public function show() {\n\t}", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function show()\n {\n //\n }", "public function custom_media() {\n\n\t \tif( !wp_script_is('psp-media-smushit-js') ) {\n\t \t\twp_enqueue_style( 'psp-media-smushit-js', $this->module_folder . 'app.css', false, '1.0', 'all' );\n\t \t}\n\t \tif( !wp_script_is('psp-media-smushit-css') ) {\n\t\t\t\twp_enqueue_script( 'psp-media-smushit-css', $this->module_folder . 'app.class.js', array('jquery'), '1.0', false );\n\t \t}\n\n\t \t$screens = array('media');\n\t\t foreach ($screens as $screen) {\n\n\t\t\t\t//add_filter( 'manage_edit-' . $screen . '_columns', array( $this, 'media_columns_head' ), 10, 1 );\n\t\t\t\tadd_filter( 'manage_' . $screen . '_columns', array( $this, 'media_columns_head' ), 10, 1 );\n\t\t\t\tadd_action( 'manage_' . $screen . '_custom_column', array( $this, 'media_columns_body' ), 10, 2 );\n\t\t }\n\t }", "public function create()\n {\n return view('admin.media.create');\n }", "public function register_media_buttons() {\n\t\t\t$current_screen = get_current_screen();\n\t\t\tif ( $current_screen->base === 'post' ) {\n\t\t\t\tadd_action( 'media_buttons', [ $this, 'add_media_buttons' ], 20 );\n\t\t\t\tadd_action( 'admin_footer', [ $this, 'add_mce_popup' ] );\n\t\t\t}\n\t\t}", "public function show() {\n echo $this->mountElement();\n }", "public function setMedia()\n {\n }", "public function setMedia()\n {\n }", "public function setMedia()\n {\n }", "private function initializeSocialMedia()\n {\n $this->ch->addSection($this->slug . '_social_media', 'Social Media', 130);\n foreach ($this->social as $media => $label) {\n $this->ch->addControl(\"social_{$media}\", $this->slug . '_social_media', $label);\n }\n }", "function showContent()\n {\n $this->showForm();\n\n $this->elementStart('div', array('id' => 'notices_primary'));\n\n\n $sharing = null;\n $sharing = $this->getSharings();\n $cnt = 0;\n\n if (!empty($sharing)) {\n $profileList = new SharingsList(\n $sharing,\n $this\n );\n\n $cnt = $profileList->show();\n $sharing->free();\n\n if (0 == $cnt) {\n $this->showEmptyListMessage();\n }\n }\n\n $this->elementEnd('div');\n\n }", "public function panel()\n {\n $panel = new \\Shieldon\\Firewall\\Panel();\n $panel->entry();\n }", "public function ajax_media_panel( $handler_vars )\n\t{\n\t\tUtils::check_request_method( array( 'POST' ) );\n\n\t\t$path = $_POST['path'];\n\t\t$panelname = $_POST['panel'];\n\t\t$rpath = $path;\n\t\t$silo = Media::get_silo( $rpath, true ); // get_silo sets $rpath by reference to the path inside the silo\n\n\t\t$panel = '';\n\t\t$panel = Plugins::filter( 'media_panels', $panel, $silo, $rpath, $panelname );\n\n\t\t$controls = array();\n\t\t$controls = Plugins::filter( 'media_controls', $controls, $silo, $rpath, $panelname );\n\t\t$controls_out = '';\n\t\tforeach ( $controls as $k => $v ) {\n\t\t\tif ( is_numeric( $k ) ) {\n\t\t\t\t$controls_out .= \"<li>{$v}</li>\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$controls_out .= \"<li class=\\\"{$k}\\\">{$v}</li>\";\n\t\t\t}\n\t\t}\n\t\t$output = array(\n\t\t\t'controls' => $controls_out,\n\t\t\t'panel' => $panel,\n\t\t);\n\n\t\t$ar = new AjaxResponse();\n\t\t$ar->data = $output;\n\t\t$ar->out();\n\t}", "public abstract function render_media($instance);", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function show()\n {\n }", "public function create()\n {\n $tags = \\Model\\Tag\\Tag::lists('name', 'id');\n $projectList = \\Model\\Project\\ModelName::lists('name', 'id')->toArray();\n \n\n return view('Admin::media.create', [\n 'media' => new Media,\n 'projectList' => $projectList,\n 'tags' => $tags,\n ]);\n }" ]
[ "0.7454797", "0.7454797", "0.6858179", "0.6573152", "0.64935917", "0.644195", "0.6424704", "0.63324153", "0.6250633", "0.6249463", "0.6229072", "0.61882615", "0.61710477", "0.6111655", "0.60908854", "0.60877997", "0.6052616", "0.604618", "0.6044239", "0.6044239", "0.60303026", "0.595344", "0.59110343", "0.5865208", "0.58565164", "0.58521974", "0.58452916", "0.5842469", "0.5842469", "0.5842469", "0.5842469", "0.5825056", "0.5813169", "0.5808943", "0.5776233", "0.5773892", "0.5770993", "0.5757922", "0.57547945", "0.5752493", "0.5744463", "0.5736589", "0.5731152", "0.5723329", "0.5722305", "0.5721432", "0.57203215", "0.57169753", "0.5704068", "0.5704068", "0.5704068", "0.5703182", "0.5701416", "0.56977844", "0.5686836", "0.5686836", "0.5686836", "0.5686836", "0.56803733", "0.5677146", "0.56650305", "0.565131", "0.564727", "0.56456697", "0.5638184", "0.56327426", "0.5626191", "0.5626191", "0.5621863", "0.56087786", "0.56087786", "0.56087786", "0.56087786", "0.56087786", "0.56087786", "0.56087786", "0.56087786", "0.56087786", "0.56087786", "0.56087786", "0.56087786", "0.5608222", "0.56077063", "0.5599038", "0.55876434", "0.55843675", "0.55843675", "0.55843675", "0.55833006", "0.5561413", "0.5557351", "0.5555022", "0.5550544", "0.5547844", "0.5547844", "0.5547844", "0.5547844", "0.5547844", "0.5547844", "0.5547844", "0.5544384" ]
0.0
-1
INDIQUER VOS INFORMATIONS DE CONNEXION
public function __construct() { $this->host = "localhost"; $this->user = "buttaubc_chantal"; $this->pass = "Bfly357T"; $this->db = "buttaubc_SIMPLONG"; ConnectI::connexion($this->host, $this->db, $this->user, $this->pass); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function StatusCon(){\n\t\tif(!$this->con){\n\t\t\techo \"<h3>O sistema no est conectado [$this->banco] em [$this->host].</h3>\";\n\t\texit;\n\t\t}else{\n\t\t\techo \"<h3>O sistema est conectado [$this->banco] em [$this->host].</h3>\";\n\t\t}\n\t}", "function opcion__info()\n\t{\n\t\t$p = $this->get_proyecto();\n\t\t$param = $this->get_parametros();\n\t\t$this->consola->titulo( \"Informacion sobre el PROYECTO '\" . $p->get_id() . \"' en la INSTANCIA '\" . $p->get_instancia()->get_id() . \"'\");\n\t\t$this->consola->mensaje(\"Version de la aplicación: \".$p->get_version_proyecto().\"\\n\");\n\t\tif ( isset( $param['-c'] ) ) {\n\t\t\t// COMPONENTES\n\t\t\t$this->consola->subtitulo('Listado de COMPONENTES');\n\t\t\t$this->consola->tabla( $p->get_resumen_componentes_utilizados() , array( 'Tipo', 'Cantidad') );\n\t\t} elseif ( isset( $param['-g'] ) ) {\n\t\t\t// GRUPOS de ACCESO\n\t\t\t$this->consola->subtitulo('Listado de GRUPOS de ACCESO');\n\t\t\t$this->consola->tabla( $p->get_lista_grupos_acceso() , array( 'ID', 'Nombre') );\n\t\t} else {\n\t\t\t$this->consola->subtitulo('Reportes');\n\t\t\t$subopciones = array( \t'-c' => 'Listado de COMPONENTES',\n\t\t\t\t\t\t\t\t\t'-g' => 'Listado de GRUPOS de ACCESO' ) ;\n\t\t\t$this->consola->coleccion( $subopciones );\n\t\t}\n\t}", "function getComienzaCon(){\n\t\treturn $this->comienza_con;\n\t}", "function ini__operacion (){\n \n //obtenemos el arreglo almacenado en la operacion \"aulas disponibles\". Su formato es :\n //Array ('id_aula'=>x 'hora_inicio'=>x 'hora_fin'=>x)\n $datos_ad=toba::memoria()->get_parametros();\n //esta condicion es fundamental para no quedarnos en la misma pantalla\n if(isset($datos_ad['id_aula'])){\n $this->s__accion=\"Vinculo\";\n $this->s__aula_disponible=$datos_ad;\n \n //eliminamos la informacion guardada en el arreglo $_SESSION\n toba::memoria()->limpiar_memoria();\n $this->set_pantalla('pant_persona');\n }\n }", "public function getContrasenia():string{return $this->contrasenia;}", "function conectar($servidor=\"\",$usuario=\"\",$password=\"\",$bdatos=\"\"){\r\n\t\t/*if($this->modo == \"1\"){\r\n\t\t\t$this->auditoria = false;\r\n\t\t}#end if*/\r\n\r\n\t\tif($this->modo == \"\"){\r\n\t\t\t$this->bdatos = C_BDATOS_2;\r\n\t\t\t$this->usuario = C_USUARIO_2;\r\n\t\t\t$this->password = C_PASSWORD_2;\r\n\t\t}//end if\r\n\r\n\t\tif($this->modo == \"2\"){\r\n\t\t\t$this->bdatos = C_BDATOS_3;\r\n\t\t\t$this->usuario = C_USUARIO_3;\r\n\t\t\t$this->password = C_PASSWORD_3;\r\n\t\t}//end if\r\n\t\t\r\n\t\t\r\n\t\tif ($servidor!=\"\"){\r\n\t\t\t\t$this->servidor = $servidor;\r\n\t\t}// end if\r\n\t\tif ($usuario!=\"\"){ \r\n\t\t\t\t$this->usuario = $usuario;\r\n\t\t}// end if\r\n\t\tif ($password!=\"\"){\r\n\t\t\t\t$this->password = $password;\r\n\t\t}// end if\r\n\t\tif ($bdatos!=\"\"){\r\n\t\t\t\t$this->bdatos = $bdatos;\r\n\t\t}// end if\r\n\r\n\t\tif($this->imprimir_conexion==true and $this->ip_imprimir_conexion!=\"\"){\r\n\t\t\tif(isset($_SERVER['HTTP_X_FORWARDED_FOR'] ) && $_SERVER['HTTP_X_FORWARDED_FOR'] == $this->ip_imprimir_conexion){\r\n\t\t\t\t//echo \" <br>--> (\".$this->servidor.\", \".$this->usuario.\", \".$this->password.\", \".$this->query.\")\";\r\n\t\t\t//\techo \" <br>--> (\".$this->servidor.\", \".$this->usuario.\", \".$this->password.\")<br>\".$this->query.\"<hr>\";\r\n\t\t\t}#end if\r\n\t\t}#end if\r\n\r\n\t\t//echo \"<div style=\\\"z-index:10;width:auto;position:relative;height:auto;background-color:#FFF;border:#F00 solid 2px;margin:5px;display:block;\t\\\"> (\".$this->servidor.\", \".$this->usuario.\", \".$this->password.\")<br>\".$this->query.\"</div>\";\r\n\t\t//echo \" <br><br>\".$this->query.\"<hr>\";\r\n\t\t//die;\r\n\t\t//$this->servidor = \"172.17.2.31\";\r\n\t\t//exit;\r\n\t\t$cn = false;\r\n\t\t$this->conexion = mysqli_connect($this->servidor,$this->usuario,$this->password,$this->bdatos); \r\n\t\tif (mysqli_connect_errno()) {\r\n\t\t printf(\"Error en conexión: %s\\n\", mysqli_connect_error());\r\n\t\t exit();\r\n\t\t}else{\r\n\t\t\t$this->estado = true;\r\n\t\t}\r\n }", "function cls_conexion(){\r\n\r\n\t}", "public function getInstrucoes();", "function transaccion(){\n\t\t\t$this->conexion = new conexion();\n\t\t\t$this->conn = $this->conexion->enlace();\n\t\t}", "function __construct() {\n\n $conection['server']=\"localhost\"; //host\n $conection['user']=\"dario\"; // usuario\n $conection['pass']=\"dario\"; //password\n $conection['base']=\"INNSADB\"; //base de datos\n\n $conect = oci_connect($conection['user'], $conection['pass'], $conection['server'],'AL32UTF8');\n //el parametro 'AL32UTF8' soluciona todo el tema de los acentos\n if (!$conect) {\n $m = oci_error();\n echo $m['message'], \"\\n\";\n exit;\n } else {\n //echo \"Conexión con éxito a Oracle!\";\n $this->con=$conect;\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}", "function comprobarConexion(){\n if ($this->conexion->connect_errno) {\n echo \"Fallo al conectar a MySQL: (\" . $this->conexion->connect_errno . \") \" . $this->conexion->connect_error;\n }\n }", "function habilitarContrato(){\n $this->procedimiento = 'adq.f_cotizacion_ime';\n $this->transaccion = 'ADQ_HABCONT_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "private function objetoAbreConexao()\n\t{\n\t\t\n\t\t$_BANCO = new ConexaoBD();\n\t\t$_BANCO->conexaoBD();\n\t}", "function __construct($CODCENTRO,$CODEDIFICIO,$NOMBRECENTRO,$DIRECCIONCENTRO,$RESPONSABLECENTRO){\n\n \n $this->CODCENTRO = $CODCENTRO;\n $this->CODEDIFICIO = $CODEDIFICIO;\n $this->NOMBRECENTRO = $NOMBRECENTRO;\n $this->DIRECCIONCENTRO = $DIRECCIONCENTRO;\n $this->RESPONSABLECENTRO = $RESPONSABLECENTRO;\n\t$this->erroresdatos = array(); \n\n\t//$this->Comprobar_atributos();\n\n\tinclude_once '../Model/Access_DB.php';\n\t$this->mysqli = ConnectDB();\n}", "private function connect()\r\n {\r\n\r\n /**\r\n * A TENTATIVA DE CRIAR UM OBJETO COM A CONEXAO DO BANCO É FEITA\r\n */\r\n try {\r\n /**\r\n * SALVA NA VARIAVEL ESTATICA O OBJETO REFERENTE A CONEXÃO COM O BANCO.\r\n * AS VARIAVEIS QUE SAO USADAS PARA CONEXAO SÃO DA CLASSE PAI\r\n */\r\n self::$con = new PDO('mysql:host=' . $this->getHost() . ';dbname=' . $this->getDatabase() . '', $this->getUser(), $this->getPassword(), array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\"));\r\n /**\r\n * DEFINE O TIPO DE MANIPULAÇÃO DE ERRO SERÁ USADO PELO PDO\r\n */\r\n self::$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n /**\r\n * CAPTURA O ERRO, SE GERADO\r\n */\r\n } catch (\\PDOException $error) {\r\n /**\r\n * O ERRO É IMPRESSO NA TELA\r\n */\r\n echo $error->getMessage();\r\n }\r\n }", "public function getInformation();", "function getConsiglio() {\n\t\treturn $this->soc->getConsiglio();\n\t}", "function comprobarConexion(){\n if ($this->conexion->connect_errno) \n {\n echo \"Fallo al conectar a MySQL: (\" . $this->conexion->connect_errno . \") \" . $this->conexion->connect_error;\n }\n }", "function Comprobar_atributos()\n{\n\t//si se cumple la condicion\n\tif ($this->Comprobar_codcentro() &\n\t\t$this->Comprobar_codedificio() &\n\t\t$this->Comprobar_nombrecentro() &\n\t\t$this->Comprobar_direccioncentro() &\n\t\t$this->Comprobar_responsablecentro()\n\t\t)\n\t{\n\t\treturn true;\n\t}\n\t//si no\n\telse\n\t\t{\t//devuelve error\n\t\t\treturn $this->erroresdatos;\n\t\t}\n}", "function consultarProyectosCoordinador($cod_proyecto=\"\") {\n $datos['identificacion']= $this->identificacion;\n $datos['cod_proyecto']=$cod_proyecto;\n $cadena_sql = $this->sql->cadena_sql(\"consultaProyectosCoordinador\",$datos);\n //echo \"<br>sql proy curr \".$cadena_sql ;\n return $resultadoProyectos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "function informaImpressao(){\r\n $sql \t= \"update interpretacao set int_data_impressao = now(), int_status = 'impresso' where int_id = \".$this->get(\"int_id\");\r\n\t\t$rs\t\t= Db::sql($sql, \"Interpretacao::informaImpressao()\");\r\n\t}", "public static function invoque(){\n\t\t/*vars*/\n\t\t$host='';\n\t\t$login='';\n\t\t$pwd='';\n\t\t$db='';\n\t\t\n\t\t/*var à changer avant le portage ailleurs*/\n\t\t$portage=\"localhost\";\n\t\t\n\t\t/*hydratation*/\n\t\tswitch($portage){\n\t\t\tcase 'localhost':\n\t\t\t\t$host='localhost';\n\t\t\t\t$login='root';\n\t\t\t\t$db='BLOG';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t/*retour*/\n\t\treturn self::construit($host, $login, $pwd, $db);\n\t}", "function SolicitarContrato(){\n $this->procedimiento = 'adq.f_cotizacion_ime';\n $this->transaccion = 'ADQ_SOLCON_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function datos_internacionalizacion() {\n\t\t$query = \"SELECT * FROM internacionalizacion\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t\n\t\t$result = mysql_query($query);\n\t\t$numrows = mysql_num_rows($result);\n\n\t\tif ($numrows == 0) {\n\t\t\tmysql_close($connection);\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\tmysql_close($connection);\n\t\t\treturn $result;\n\t\t}\n\t}", "function consuCsit(){\r\n \t$conexao = getConexao();\r\n\t\t$query = \"SELECT * FROM TBCSIT ORDER BY TIPO\";\r\n \t$resultado = mysql_query($query) or die(mysql_error());\r\n \tmysql_close($conexao);\r\n\t\treturn($resultado);\r\n }", "private function conectar(){\n try{\n\t\t\t$this->conexion = Conexion::abrirConexion(); /*inicializa la variable conexion, llamando el metodo abrirConexion(); de la clase Conexion por medio de una instancia*/\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage()); /*Si la conexion no se establece se cortara el flujo enviando un mensaje con el error*/\n\t\t}\n }", "abstract public function information();", "function __construct($conexion,$activos=true,$formato=FMT_TEXTO){\n\t\t$this->conexion = &$conexion;\n\t\t$this->activos = $activos;\n\t\t$this->formato = $formato;\n\t\tparent::__construct(); \n }", "function Comprobar_atributos()\n{\n\t//si se cumple la condicion\n\tif ($this->Comprobar_DNI() &\n $this->Comprobar_codespacio() \n\t\t)\n\t{\n\t\treturn true;\n\t}\n\t//si no\n\telse\n\t\t{\n\t\t\treturn $this->erroresdatos;\n\t\t}\n}", "public function __construct(){\n $this->HOSTNAME = \"127.0.0.1\";\n $this->BASEDATOS = \"teatro_pruebas\";\n $this->USUARIO = \"root\";\n $this->CLAVE=\"\";\n $this->RESULT=0;\n $this->QUERY=\"\";\n $this->ERROR=\"\";\n }", "function siguienteEstadoCotizacion(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_SIGECOT_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n $this->setParametro('operacion','operacion','varchar');\n \n $this->setParametro('id_tipo_estado','id_tipo_estado','integer');\n $this->setParametro('id_funcionario','id_funcionario','integer');\n $this->setParametro('obs','obs','varchar');\n $this->setParametro('fecha_oc','fecha_oc','date');\n \n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "protected function info()\n\t\t{\n\t\t}", "function Comprobar_atributos()\n{\n\t//si se cumple la condicion\n\tif ($this->Comprobar_codedificio() &\n\t\t$this->Comprobar_nombreedificio() &\n\t\t$this->Comprobar_direccionedificio() &\n\t\t$this->Comprobar_campusedificio()\n\t\t)\n\t{\n\t\treturn true;\n\t}\n\t//si no\n\telse\n\t\t{\n\t\t\treturn $this->erroresdatos;\n\t\t}\n}", "function Conecta(){\n\t\t$this->conexao = @mysql_connect($this->servidor,$this->usuario,$this->senha); //varaivel link desntro desta classa recebera a conex�o\n\t\tif(!$this->conexao){\n\t\t\techo 'Falha na conex�o com o banco de dados<br>';\n\t\t\texit();\n\t\t}elseif(!mysql_select_db($this->banco,$this->conexao)){\n\t\t\techo 'Falha ao selecionar o banco de dados<br>';\n\t\t\texit();\n\t\t}\n\t}", "function __construct() {\n $this->conx = Connexion::getconnexion();\n }", "function conexion($srv,$usr,$cve,$bd)\n\t\t{\n\t\t\t$this->res_proced = array();\n\t\t\t$this->servidorbd = $srv;\n\t\t\t$this->usuario = $usr;\n\t\t\t$this->contrasena = $cve;\n\t\t\t$this->based = $bd;\n\t\t\t$this->numreg = -1; //no se a afectado nada\n\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif( !( $this->conn = @mysqli_connect($this->servidorbd,$this->usuario,$this->contrasena,$this->based) ) )\n\t\t\t\t\tthrow new Exception('Error al conectarse al servidor '.$srv.'.<br>');\n\t\t\t\t/*else\n\t\t\t\t\techo \"Conexion correcta...<br>\";*/\n\t\t\t}\n\t\t\tcatch(Exception $e)\n\t\t\t{\n\t\t\t\tdie ($e->getMessage().\" \".mysqli_connect_error() );\n\t\t\t}\n\t\t}", "function conf()\n {\n $dato_anio = toba::memoria()->get_parametro('filtro_anio');\n $dato_ua = toba::memoria()->get_parametro('filtro_ua');\n if(isset($dato_anio)){//el anio es filtro obligatorio asi que siempre vuelve con este dato\n $auxiliar['valor']=$dato_anio;\n $auxiliar['condicion']='es_igual_a';\n $auxiliar2['anio']=$auxiliar;\n\n if(isset($dato_ua)){//viene desde informe de estado actual\n $auxiliar['valor']=$dato_ua;\n $auxiliar['condicion']='es_igual_a';\n $auxiliar2['uni_acad']=$auxiliar;\n }\n $this->s__datos_filtro=$auxiliar2;\n }\n }", "public function exposConEntrada(){\n\t\t$query = sprintf(\"SELECT * FROM Eventos EV, Entradas EN WHERE EV.id=EN.id_evento AND EN.id_usuario=%d\", $this->id);\n\t\t$obras = self:: consulta($query);\n\t\treturn $obras;\n\t}", "public function conectar() \n \t{\n return $this->conex; \n \t}", "public static function getConexao() {\n\t\n\t\tself::getInstancia();\n\t\n\t\treturn self::$conexao;\n\t}", "public function getConexion() {\n return $this->con;\n echo 'getConexion()';\n }", "function ResumenEstadoCC(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_RESESTCC_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setCount(false);\n\n\n $this->setParametro('id_agencia','id_agencia','int4');\n\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_agencia','int4');\n $this->captura('tipo','varchar');\n $this->captura('moneda','varchar');\n $this->captura('monto','numeric');\n $this->captura('monto_mb','numeric');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\n\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function __construct() {\n $this->miConexion = Conexion::singleton();\n $this->retorno = new stdClass();\n }", "static function getConnect()\r\n {\r\n /**\r\n * VERIFICA SE A VARIAVEL ESTATICA QUE SEGURA A CONEXAO ESTA NULA, CASO\r\n * NAO SEJA NULA, ISSO EQUIVALE À UMA VARIAVEL QUE JA POSSUI UM OBJETO COM\r\n * CONEXAO COM O BANCO\r\n */\r\n if (self::$con == null) {\r\n /**\r\n * FAZ INSTANCIA DA CLASSE DATABASE\r\n */\r\n $data = new Database();\r\n /**\r\n * CHAMA O METODO QUE ATRIBUI À VARIAVEL ESTATICA UM OBJETO DE\r\n * CONEXAO COM O BANCO\r\n */\r\n $data->connect();\r\n }\r\n\r\n /**\r\n * RETORNA O OBJETO DE CONEXAO COM O BANCO\r\n */\r\n return self::$con;\r\n }", "function get_connect_info()\n {\n $this->server = $this->service->server($this->lastsvr);\n printf(\"Build completion percentage: \");\n while ($this->server->accessIPv4 == '' || $this->server->accessIPv6 == '') {\n printf(\".%d.\", $this->server->progress);\n sleep(10);\n $this->server = $this->service->server($this->lastsvr);\n }\n printf(\"\\n\");\n printf(\"Connect info for server %s:\\n\", $this->server->id);\n printf(\"IP: %s (IPv4) or %s (IPv6)\\n\", $this->server->accessIPv4, $this->server->accessIPv6);\n printf(\"Admin password: %s\\n\", $this->serverpw[$this->lastsvr]);\n }", "function mdatosEjercicioInformacion() {\n\t\t$conexion = conexionbasedatos();\n\t\t\n\t\t$idejercicio = $_GET[\"idejercicio\"];\n\n\t\t$consulta = \"select FE.IDEJERCICIO, FE.NOMBRE_EJERCICIO, FG.NOMBRE_MUSCULO , FE.NIVEL_EJERCICIO, FE.DESCRIPCION, FE.IDFOTO\n\t\t\t\t\tfrom final_ejercicio FE, final_grupo FG\n\t\t\t\t\twhere FE.MUSCULO = FG.IDGRUPO AND FE.IDEJERCICIO = $idejercicio;\";\n\n\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\treturn $resultado;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "public function connetti()\n{\n if(!$this -> attiva) // '!' � la negazione\n {\n if($connessione = mysql_connect ($this->nomehost, $this->nomeuser, $this->password) or die (mysql_error()))\n//funzione per connettersi a mysql\n {\n //sezione del database\n $selezione = mysql_select_db($this->nomedb,$connessione) or die (mysql_error()); // ci da un ID, e selezioniamo il database a cui vogliamo operare\n }\n else {\n return true;\n }\n }\t\t\t\t\n}", "protected function con() {\n // must have space after it\n return 'CON ';\n }", "abstract public function getClientInformation();", "function info()\n{\nglobal $client; ←\u0004\nLa programmation objet\nCHAPITRE 9 249\n//Utilisation de variables globales et d'un tableau superglobal\necho \"<h2> Bonjour $client, vous êtes sur le serveur: \",\n➥$_SERVER[\"HTTP_HOST\"],\"</h2>\"; ←\u0007\necho \"<h3>Informations en date du \",date(\"d/m/Y H:i:s\"),\"</h3>\";\necho \"<h3>Bourse de {$this–>bourse[0]} Cotations de {$this–>bourse[1]}\n➥à {$this–>bourse[2]} </h3>\"; ←\u0005\n//Informations sur les horaires d'ouverture\n$now=getdate();\n$heure= $now[\"hours\"];\n$jour= $now[\"wday\"];\necho \"<hr />\";\necho \"<h3>Heures des cotations</h3>\";\nif(($heure>=9 && $heure <=17)&& ($jour!=0 && $jour!=6))\n{ echo \"La Bourse de Paris ( \", self:: PARIS,\" ) est ouverte\n➥<br>\"; } ←\u0006\nelse\n{ echo \"La Bourse de Paris ( \", self:: PARIS,\" ) est fermée <br>\"; }", "private function __construct() {\n\t\tself::$conexao = new PDO(\"mysql:dbname=\" . BD . \";host=\" . HOST, USUARIO, SENHA, array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n\t\tself::$conexao->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\tself::$conexao->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t}", "public function contarInventario(){\n\t}", "public function examen(){\r\n\t\tparent::conectaBDMy();\t \r\n\t\t$this->idExamen=\"\";\t\t\r\n\t\t$this->tipoExamen=\"\";\t\r\n\t\t$this->descripcion=\"\";\r\n\t}", "function post_conectar()\n\t{\n\t\t//En este metodo antiguamente se incluia codigo para asegurarse que el esquema de auditoria\n\t\t//guardara el usuario conectado.\n\t}", "function __construct() { //se sobreescribe ...funciona ok\n //$c= new ConexionOracle();\n $this->coneccion=new ConexionOracle();\n //echo 'se ejecuto el constructor de la clase sQueryOracle';\n }", "public function opcionesDesplegable();", "public function abrirConexion(){\n if($this->conexion == null){\n $cls_conexion = new cls_conexion();\n $this->conexion = $cls_conexion->conectar();\n }\n }", "function contarServicios()\n\t{\n\t\treturn \"select count(*) as number\nfrom trabajadores, servicios,sucursales where servicios.trabajador_id = trabajadores.trabajador_id \nand servicios.estado_servicio = 1 \nand servicios.sucursal_id = sucursales.sucursal_id\";\n\t}", "function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupl\n $sql = \"SELECT *\n\t\t\tFROM CENTRO\n\t\t\tWHERE (\n\t\t\t\t(CODCENTRO = '$this->CODCENTRO') \n\t\t\t)\";\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t//si se cumple la condicion\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}//si no\n\telse//si se ejecuta con éxito\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "public function omTraerCursos(){\n $llOk = $this->mxValTraerCursos();\n if (!$llOk) {\n return false;\n }\n $loSql = new CSql();\n $llOk = $loSql->omConnect();\n if (!$llOk) {\n $this->pcError = $loSql->pcError;\n return false;\n }\n $llOk = $this->mxTraerDatos($loSql);\n $loSql->omDisconnect();\n return $llOk;\n }", "public function __construct() \r\n {\r\n \t$this->id = 0;\r\n\t\t$this->nombre = \"\";\r\n\t\t$this->clave = \"\";\r\n\t\t$this->privilegio = \"\";\r\n \t$this->con = new cConexion();\r\n\t\t$this->tabla = \"usuario\";\r\n\t\t//$this->con->Conectar();\r\n }", "function __construct(){\n // se definen los datos del servidor de base de datos\n $conection['server']=\"localhost\"; //host\n $conection['user']=\"root\"; // usuario\n $conection['pass']=\"admin\"; //password\n $conection['base']=\"INNSADB\"; //base de datos\n\n // crea la conexion pasandole el servidor , usuario y clave\n $conect= mysql_connect($conection['server'],$conection['user'],$conection['pass']);\n mysql_set_charset('utf8',$conect);\n\n if ($conect) {// si la conexion fue exitosa , selecciona la base\n mysql_select_db($conection['base']);\n $this->con=$conect;\n }\n\n }", "private function processarParametros() {\n\n /**\n * Busca os usuarios definidos para notificar quando acordo ira vencer, ordenando pelo dia\n */\n $oDaoMensageriaUsuario = db_utils::getDao('mensagerialicenca_db_usuarios');\n $sSqlUsuarios = $oDaoMensageriaUsuario->sql_query_usuariosNotificar('am16_sequencial', 'am16_dias');\n $rsUsuarios = db_query($sSqlUsuarios);\n $iTotalUsuarios = pg_num_rows($rsUsuarios);\n\n if ($iTotalUsuarios == 0) {\n throw new Exception(\"Nenhum usuário para notificar.\");\n }\n\n /**\n * Percorre os usuarios e define propriedades necessarias para buscar acordos\n */\n for ($iIndiceUsuario = 0; $iIndiceUsuario < $iTotalUsuarios; $iIndiceUsuario++) {\n\n /**\n * Codigo do usuario para notificar: mensageriaacordodb_usuario.ac52_sequencial\n */\n $iCodigoMensageriaLicencaUsuario = db_utils::fieldsMemory($rsUsuarios, $iIndiceUsuario)->am16_sequencial;\n\n /**\n * Codigo dos usuarios que serao notificados\n * - usado para verificar os usuarios que ja foram notificados\n * - mensageriaacordodb_usuario.ac52_sequencial\n */\n $this->aCodigoMensageriaLicencaUsuario[] = $iCodigoMensageriaLicencaUsuario;\n\n /**\n * Usuario para notificar\n * - mensageriaacordodb_usuario\n */\n $oMensageriaLicencaUsuario = MensageriaLicencaUsuarioRepository::getPorCodigo($iCodigoMensageriaLicencaUsuario);\n\n /**\n * Codigo do usuario do sistema\n * - db_usuarios.id_usuario\n */\n $iCodigoUsuario = $oMensageriaLicencaUsuario->getUsuario()->getCodigo();\n\n /**\n * Data de vencimento:\n * - Soma data atual com dias definidos na rotina de parametros de mensageria\n */\n $iDias = $oMensageriaLicencaUsuario->getDias();\n $this->aDataVencimento[] = date('Y-m-d', strtotime('+ ' . $iDias . ' days'));\n }\n\n return true;\n }", "public function pasaje_abonado();", "function Inserir() {\n if($this->GetClienteCPF($this->getCli_cpf())>0):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este CPF já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n \n //se for maior que zero significa que exite algum email igual----------------------\n if($this->GetClienteEmail($this->getCli_email())>0):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este Email já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n //Caso passou na verificação os dados serão gravados no banco-------------------------\n $query = \"INSERT INTO \".$this->prefix.\"clientes (cli_nome,\n cli_sobrenome,\n cli_data_nasc,\n cli_rg,\n cli_cpf,\n cli_ddd,\n cli_fone,\n cli_celular,\n cli_endereco,\n cli_numero,\n cli_bairro,\n cli_cidade,\n cli_uf,\n cli_cep,\n cli_email,\n cli_data_cad,\n cli_hora_cad,\n cli_pass) VALUES (:cli_nome,\n :cli_sobrenome,\n :cli_data_nasc,\n :cli_rg,\n :cli_cpf,\n :cli_ddd,\n :cli_fone,\n :cli_celular,\n :cli_endereco,\n :cli_numero,\n :cli_bairro,\n :cli_cidade,\n :cli_uf,\n :cli_cep,\n :cli_email,\n :cli_data_cad,\n :cli_hora_cad,\n :cli_senha)\";\n \n $params = array(\n ':cli_nome'=> $this->getCli_nome(),\n ':cli_sobrenome'=> $this->getCli_sobrenome(),\n ':cli_data_nasc'=> $this->getCli_data_nasc(),\n ':cli_rg'=> $this->getCli_rg(),\n ':cli_cpf'=> $this->getCli_cpf(),\n ':cli_ddd'=> $this->getCli_ddd(),\n ':cli_fone'=> $this->getCli_fone(),\n ':cli_celular'=> $this->getCli_celular(),\n ':cli_endereco'=> $this->getCli_endereco(),\n ':cli_numero'=> $this->getCli_numero(),\n ':cli_bairro'=> $this->getCli_bairro(),\n ':cli_cidade'=> $this->getCli_cidade(),\n ':cli_uf'=> $this->getCli_uf(),\n ':cli_cep'=> $this->getCli_cep(),\n ':cli_email'=> $this->getCli_email(),\n ':cli_data_cad'=> $this->getCli_data_cad(),\n ':cli_hora_cad'=> $this->getCli_hora_cad(),\n ':cli_senha'=> $this->getCli_senha(),\n \n \n );\n //echo $query;\n $this->ExecuteSQL($query, $params);\n \n \n }", "function describir_campos($tabla_x,$bd_x=\"\"){\r\n\t\tif($bd_x!=\"\"){\r\n\t\t\t$bd = $bd_x.\".\";\r\n\t\t}#end if\r\n\t\t$query_x = \"SHOW FIELDS FROM \".$bd.$tabla_x;\r\n\t\t$result = mysqli_query($this->conexion,$query_x);\r\n\t\tif($result){\r\n\t\t\t$n_filas = mysqli_num_rows($result);\r\n\t\t\t$this->serial[$tabla_x] = \"\";\r\n\t\t\tfor ($i=0;$i<$n_filas;$i++){\r\n\t\t\t\t$row_x = mysqli_fetch_array($result);\r\n\t\t\t\tif($i==0){\r\n\t\t\t\t\t$this->campo_clave = $row_x[0];\r\n\t\t\t\t}#end if\r\n\t\t\t\t$this->nombre[$i] = $row_x[0];\r\n\t\t\t\t$this->tipo[$i] = $row_x[1];\r\n\t\t\t\tif($row_x[\"Key\"] == \"PRI\"){\r\n\t\t\t\t\t$this->campo_clave = $row_x[0];\r\n\t\t\t\t}#end if\r\n\t\t\t}#end next i\r\n\t\t}#end if result\r\n\t}", "function fProcesaBanco(){\n global $db, $cla, $agPar, $igNumChq, $igSecue, $ogDet;\n $alDet = fIniDetalle();\n $alDet[\"det_codcuenta\"]\t= $cla->cla_ctaorigen; \n $alDet[\"det_glosa\"] \t= substr($agPar[\"com_Concepto\"],0, 50) . ' ' . substr($agPar[\"slBenef\"],0,20);\n $alDet['det_idauxiliar']= $agPar[\"com_Emisor\"];\n $alDet[\"det_numcheque\"]\t= $igNumChq;\t\t\t// es el numero de cheque\n $alDet[\"det_feccheque\"]\t= $agPar[\"com_FechCheq\"];\n $alDet['det_valdebito']\t= $agPar[\"flValor\"] * $cla->cla_indicador; // segun el signo del indicador, se aplica como DB/CR al grabar;\n $alDet['det_valcredito']\t= 0;\n $alDet['det_secuencia']\t= $igSecue;\n\tif(fGetParam(\"pAppDbg\",0)){\n\t\tprint_r($alDet);\n\t}\n\tfInsdetalleCont($db, $alDet);\n}", "public function getCONEXION()\n {\n return $this->CONEXION;\n }", "private function setExercicio(){\n\t\t$this->Enunciado = $this->Data['enunciado'];\n\t\t$this->A = $this->Data['opA'];\n\t\t$this->B = $this->Data['opB'];\n\t\t$this->C = $this->Data['opC'];\n\t\t$this->D = $this->Data['opD'];\n\t\t$this->E = $this->Data['opE'];\n\t\t$this->Correta = $this->Data['correta'];\n\n\t\t$this->Query = ['c_enumexer' => $this->Enunciado,\n\t\t\t\t\t\t'c_altaexer' => $this->A,\n\t\t\t\t\t\t'c_altbexer' => $this->B,\n\t\t\t\t\t\t'c_altcexer' => $this->C,\n\t\t\t\t\t\t'c_altdexer' => $this->D,\n\t\t\t\t\t\t'c_alteexer' => $this->E,\n\t\t\t\t\t\t'c_correxer' => $this->Correta];\n\n\t}", "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}", "public function getContrasena()\n {\n return $this->contrasena;\n }", "public function ispisiOsobu(){\n // echo \"$this->ime $this->prezime $this->godRdoj\";\n echo \"<br>Ime: \" . $this->getIme() . \"<br>Prezime: \" . $this->getPrezime() . \"<br>Godina rodjenja: \" . $this->getGodRodj() . \"<br>\";\n }", "function ins_datos($DBcon)\n\t{\n\t\t$now = date(\"Y-m-d H:i:s\");\n\n //create guid for user confirm\n require_once(C_P_CLASES.'utils/string.functions.php');\n $STR = new STRFN();\n\n $guid = $STR->gen_uuid();\n\n $query = \"INSERT INTO \".$this->tableName.\"(\".$this->arrDataNames['data1'].\",\".$this->arrDataNames['data2'].\",\".$this->arrDataNames['data3'].\",\".$this->arrDataNames['data4'].\"\n\t\t\t\t\t,\".$this->arrDataNames['data5'].\",\".$this->arrDataNames['data6'].\",\".$this->arrDataNames['data7'].\") \n\t\t\t\t\tVALUES\n\t\t\t\t\t(\n\t\t\t\t\t'\" . $this->data['data1'] .\"','\". $this->data['data2'] . \"'\n ,'\" . $this->data['data3'] .\"','2','\". $now . \"'\n ,'\" . $this->data['data6'].\"','\" . $guid .\"'\n\t\t\t\t\t)\";\n\n $stmt = $DBcon->prepare($query);\n\n // check for successfull registration\n if ( $stmt->execute() ) {\n\n //establecer permisos\n $userId = $DBcon->lastInsertId();\n $respuesta = $this->ins_permisos($DBcon,$userId,$this->data['data3']);\n\n $response['status'] = 'success';\n $response['message'] = $STR->setMsgStyle('&nbsp; Registro exitoso, Gracias!');\n $response['guid'] = $guid;\n\n\n //if($ambiente == 'PRO')\n //{\n $this->send_regMail('[email protected]',$this->data['data1'],$guid);\n //}\n } else {\n $response['status'] = 'error'; // could not register\n $response['message'] = $STR->setMsgStyle('&nbsp; No se pudo registrar, intente nuevamente más tarde', 3);\n $response['guid'] = '-';\n }\n\n\t\treturn $response;\t\t\n\t}", "function Conexion($servidor, $baseDato, $usuario, $password)\n {\n # se guardan los datos de los parametros en las propiedades de la clase\n $this->servidor = $servidor;\n $this->baseDato = $baseDato;\n $this->usuario = $usuario;\n $this->password = $password;\n # se llama al metodo privado configurar()\n $this->configurar();\n }", "function __construct($CODESPACIO,$CODEDIFICIO,$CODCENTRO,$TIPO,$SUPERFICIEESPACIO,$NUMINVENTARIOESPACIO){\n\t$this->CODESPACIO= $CODESPACIO;\n\t$this->CODEDIFICIO= $CODEDIFICIO;\n\t$this->CODCENTRO= $CODCENTRO;\n\t$this->TIPO = $TIPO;\n\t$this->SUPERFICIEESPACIO = $SUPERFICIEESPACIO;\n\t$this->NUMINVENTARIOESPACIO = $NUMINVENTARIOESPACIO;\n\t$this->erroresdatos = array(); \n\n\tinclude_once '../Model/Access_DB.php';\n\t$this->mysqli = ConnectDB();\n}", "public function description(){ return \"Connection \" . $this->ulA->ID . \" / \" . $this->ulB->ID . \" / \" . $this->connection; }", "function siguienteEstadoBoleta(){\r\n $this->procedimiento='leg.ft_boleta_garantia_dev_ime';\r\n $this->transaccion='LG_POBODEV_IME';\r\n $this->tipo_procedimiento='IME';\r\n \r\n //Define los parametros para la funcion\r\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4'); \r\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\r\n\t\t$this->setParametro('id_anexo','id_anexo','int4');\r\n\t\t\r\n\t\t\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "function getControl(){\ninclude('conf.php');\n$conn=mysql_connect($host,$cuser,$cpass) or die ('Unable to connect');\nmysql_select_db($db) or die ('Unable to connect to database');\n$query2=\"SELECT * FROM control\";\n$result2 = mysql_query($query2) or die (\"Error in query: $query2. \" . mysql_error());\n if (mysql_num_rows($result2)==1){\n\t$row2=mysql_fetch_object($result2);\n\t$con[0]=$row2->scSchName;\t\n\t$con[1]=$row2->scSchAddr;\t\n\t$con[2]=$row2->scHead;\t\n\t$con[3]=$row2->scHeadTitle;\t\n\t$con[4]=$row2->scTestOff;\t\n\t$con[5]=$row2->scTOTitle;\t\n\t$con[6]=$row2->scSem;\t\n\t$con[7]=$row2->scSYFr;\t\n\t$con[8]=$row2->scSYTo;\t\n\t$con[9]=$row2->scLUser;\t\n\t$con[10]=$row2->scLDate;\t\n }\t\t\t\t\n return $con;\n}", "function afficherclientfideless(){\n\t\t$sql=\"SElECT * From clientfideles\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "private function appConsolaOpciones() {\r\n\t\t\tdefine('ENV_ENTORNO', $this->entorno);\r\n\t\t\tdefine('ENV_TIPO', 'MVC');\r\n\t\t\tdate_default_timezone_set(ConfigAcceso::leer($this->aplicacion, 'sistema', 'tiempo', 'zona'));\r\n\t\t\t\r\n\t\t\trequire implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Configuracion', 'Parametros.php'));\r\n\t\t\t\r\n\t\t\t$consola = new \\AutoCargador('Consola', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t\t$consola->registrar();\r\n\t\t\t\r\n\t\t\t$entidades = new \\AutoCargador('Entidades', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos', 'ORM')));\r\n\t\t \t$entidades->registrar();\r\n\t\t \t\r\n\t\t \t$formulario = new \\AutoCargador('Formularios', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t \t$formulario->registrar();\r\n\t\t \t\r\n\t\t \t\r\n\t\t\t$interface = new \\AutoCargador('Interfaces', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t \t$interface->registrar();\r\n\t\t \t\r\n\t\t \tAutoloader::register(implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos', 'ORM', 'Proxy')), 'Proxy');\r\n\t\t \t\r\n\t\t\t$utilidades = new \\AutoCargador('Utilidades', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Complementos')));\r\n\t\t \t$utilidades->registrar();\r\n\t\t \t\r\n\t\t \t$modeloMVC = new \\AutoCargador('Modelo', implode(DIRECTORY_SEPARATOR, array($this->appRuta, $this->entorno, 'Fuente', 'Sistema')));\r\n\t\t \t$modeloMVC->registrarModelo();\r\n\t\t \t\r\n\t\t \t$this->consolaObjeto();\r\n\t\t}", "function insertarCliente(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_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('genero','genero','varchar');\n\t\t$this->setParametro('ci','ci','varchar');\n\t\t$this->setParametro('email','email','varchar');\n\t\t$this->setParametro('email2','email2','varchar');\n\t\t$this->setParametro('direccion','direccion','varchar');\n\t\t$this->setParametro('celular','celular','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('lugar_expedicion','lugar_expedicion','varchar');\n\t\t$this->setParametro('apellido_paterno','apellido_paterno','varchar');\n\t\t$this->setParametro('telefono','telefono','varchar');\n\t\t$this->setParametro('ciudad_residencia','ciudad_residencia','varchar');\n\t\t$this->setParametro('id_pais_residencia','id_pais_residencia','int4');\n\t\t$this->setParametro('nacionalidad','nacionalidad','varchar');\n\t\t$this->setParametro('barrio_zona','barrio_zona','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('apellido_materno','apellido_materno','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function __construct(){\n $this->conectado = $this->conectar();\n }", "function afficherU(){\n $sql=\"SElECT * From client\";\n $db = config::getConnexion();\n try{\n $liste=$db->query($sql);\n return $liste;\n }\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n } \n }", "function abreConexao()\r\n {\r\n \t//Senha do MySQL\r\n \t//Nome de usuário do MySQL\r\n \t//Nome do banco de dados MySQL\r\n \treturn @ mysqli_connect(\"sql111.epizy.com\",\"epiz_22699421\",\"GlH4gylH7AX\", \"epiz_22699421_confeccao\");\r\n }", "public function connetti() {\n if (!$this->attiva) {\n if ($connessione = mysql_connect($this->nomehost, $this->nomeuser, $this->password) or die(mysql_error())) {\n $selezione = mysql_select_db($this->nomedb, $connessione) or die(mysql_error());\n mysql_set_charset('utf8');\n }\n } else {\n return true;\n }\n }", "function memberCondosHandler() {\n global $inputs;\n\n $res = getAll('SELECT a.*,b.name FROM member_condo a INNER JOIN condo b ON a.condo_id = b.id WHERE a.member_id = ?', [$inputs['id']]);\n \n formatOutput(true, 'success', $res);\n}", "public function execute() {\r\n // $this->connecxao = parent::getConnect();\r\n $stmt = $this->connecxao->prepare($this->getQuery());\r\n $this->transition = $stmt->execute($this->getBinds());\r\n $this->error = $stmt->errorInfo();\r\n\r\n if ($this->error[0] == \"00000\") {\r\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\r\n $this->data = $stmt;\r\n } else {\r\n $this->setMsgError(\"Code Aplic Error: \" . $this->error[0] . \"<br />Code BD Error: \" . $this->error[1] . \"<br />Msg BD Error: \" . $this->error[2]);\r\n }\r\n }", "function calculaPotenciaSimples($idSim, $paramTensao, $paramCorren, $sentido, $param){\n /*\n * $sentido = ENTRADA OU SAIDA, $param = R,S,T\n */\n\n // CRIA UM OBJETO DE DA CLASSE DE CONEXAO\n $connBase = new EficazDB;\n\n\n // Fecha a conexao\n $connBase->close();\n\n return $retorno;\n}", "function cl_conhistdoc() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conhistdoc\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function getCarteCommisssion()\n {\n $query_rq_service = \"SELECT numero_carte FROM carte_parametrable WHERE idcarte=1\";\n $service = $this->getConnexion()->prepare($query_rq_service);\n $service->execute();\n $row_rq_service= $service->fetchObject();\n return $row_rq_service->numero_carte;\n }", "function getMemberCondoInfo() {\n return getAll(\"SELECT b.name,\n b.area,\n b.cost \n FROM member_condo a \n INNER JOIN condo b \n ON a.condo_id = b.id\n WHERE a.member_id = ?\",\n [getLogin()['mid']]);\n}", "public function info();", "public function info();", "function __construct($codedificio,$nombreedificio,$direccionedificio,$campusedificio){ //Constructor de la clase\n\t\t\t\n $this->codedificio = $codedificio;\n $this->nombreedificio = $nombreedificio;\n $this->direccionedificio = $direccionedificio;\n $this->campusedificio = $campusedificio;\n\t\t\t$this->erroresdatos = array(); \n\n\t//$this->Comprobar_atributos();\n\n\tinclude_once '../Model/Access_DB.php';\n\t$this->mysqli = ConnectDB(); //Realizamos la conexion con la base de datos\n}", "public function info() {\n\t\t\n\t\t$data = array(\n\t\t\t'Driver'\t\t\t=> 'DRIVER_NAME',\n\t\t\t'Client version'\t=> 'CLIENT_VERSION',\n\t\t\t'Server version'\t=> 'SERVER_VERSION',\n\t\t\t'Connection'\t\t=> 'CONNECTION_STATUS'\n\t\t);\n\n\t\tforeach ($data as $key => $value) {\n\t\t\t\n\t\t\t$info[$key] = $this->pdo->getAttribute(constant('PDO::ATTR_' . $value));\n\t\t\t\n\t\t}\n\n\t\treturn $info;\n\t\t\n\t}", "function RellenaDatos()\n{//buscamos todos los atributos de la tupla\n $sql = \"SELECT *\n\t\t\tFROM PROF_ESPACIO\n\t\t\tWHERE (\n\t\t\t\t(DNI = '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"') \n\t\t\t)\";\n\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t\t\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n\t} //si no se ejecuta con éxito \n\telse\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}", "public static function obtenerCondiciones()\n {\n $consulta = \"SELECT * FROM condiciones ORDER BY contador DESC\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n return false;\n }\n }", "function abrir_conexion()\n {\n $this->db = Conectar::conexion();\n }", "public function getInfo();", "function __construct($conexion,$formato=FMT_TEXTO){\n\t\t$this->conexion = &$conexion;\n\t\t$this->formato = $formato;\n\t\tparent::__construct(); \n }" ]
[ "0.6456604", "0.6293675", "0.607579", "0.5965034", "0.5802295", "0.57919776", "0.57633007", "0.5741905", "0.5740138", "0.5712817", "0.5651087", "0.56367695", "0.5623093", "0.5614401", "0.5608944", "0.5589768", "0.55863655", "0.55857563", "0.55829525", "0.5574904", "0.5573252", "0.5565781", "0.55565816", "0.555161", "0.55362725", "0.55331045", "0.55305165", "0.5519223", "0.55156374", "0.5507816", "0.55059725", "0.5504198", "0.5493099", "0.5486714", "0.5483406", "0.5473786", "0.5466238", "0.54446375", "0.54387075", "0.5434767", "0.54181176", "0.5416508", "0.54140663", "0.5409535", "0.54048926", "0.5399359", "0.53989846", "0.5398674", "0.53939444", "0.5384298", "0.53810745", "0.5371925", "0.53569734", "0.535094", "0.5337375", "0.5335646", "0.5328064", "0.5328026", "0.5321877", "0.53208804", "0.5318137", "0.5317119", "0.5313158", "0.5311631", "0.531124", "0.53091174", "0.5306583", "0.5302671", "0.53014237", "0.52998024", "0.52967817", "0.52956206", "0.5294101", "0.5293472", "0.5292111", "0.52890414", "0.52859116", "0.52848923", "0.52831495", "0.52808505", "0.52739793", "0.5269148", "0.52676105", "0.52658325", "0.52654487", "0.5264736", "0.5263905", "0.5261188", "0.52548015", "0.5253315", "0.525045", "0.52431065", "0.52398944", "0.52398944", "0.5239768", "0.52343297", "0.5233407", "0.5232926", "0.52329224", "0.5230411", "0.52303344" ]
0.0
-1
Returns the operator that is represented by this condition class, e.g. `AND`, `OR`.
public function getOperator(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOperator()\n {\n $logic = $this->getLogic();\n if (!$logic)\n return null;\n return array_key_exists('operator', $logic) ? $logic['operator'] : null;\n }", "public function getOperator()\n {\n return $this->operator;\n }", "public function getOperator()\n {\n return $this->operator;\n }", "public function getOperator()\n {\n return $this->operator;\n }", "public function getOperator()\n {\n return $this->operator;\n }", "public function getOperator()\n {\n return $this->operator;\n }", "public function getOperator()\n {\n return $this->operator;\n }", "public function getOperator()\n\t{\n\t\treturn $this->operator;\n\t}", "public function getOperator()\n {//-------------------->> getOperator()\n return $this->_operator;\n }", "public function getOperator(): string\n {\n return $this->operator;\n }", "public function getOperator();", "public function getOperator();", "public function getConditionOperator();", "public function getOperatorType()\n {\n return $this->operator_type;\n }", "protected abstract function getOperator();", "abstract public function get_operator();", "public function get_cellOperator(): string\n {\n return $this->_oper;\n }", "public function get_cellOperator(): string\n {\n return $this->_oper;\n }", "abstract function getOperator() : string ;", "public function getSearchOperator()\n {\n return $this->searchOperator;\n }", "public function getOperatorValue();", "protected function getOperator($string)\n {\n static $operator;\n\n if (empty($operator)) {\n\n $likeEscapeString = ($this->conn->getConfig('likeEscapeString') !== '')\n ? '\\s+' . preg_quote(\n trim(\n sprintf(\n $this->conn->getConfig('likeEscapeString'),\n $this->conn->getConfig('likeEscapeCharacter')\n )\n ),\n '/'\n )\n : '';\n\n $operator = [\n '\\s*(?:<|>|!)?=\\s*', // =, <=, >=, !=\n '\\s*<>?\\s*', // <, <>\n '\\s*>\\s*', // >\n '\\s+IS NULL', // IS NULL\n '\\s+IS NOT NULL', // IS NOT NULL\n '\\s+EXISTS\\s*\\(.*\\)', // EXISTS(Sql)\n '\\s+NOT EXISTS\\s*\\(.*\\)', // NOT EXISTS(Sql)\n '\\s+BETWEEN\\s+', // BETWEEN value AND value\n '\\s+IN\\s*\\(.*\\)', // IN(list)\n '\\s+NOT IN\\s*\\(.*\\)', // NOT IN (list)\n '\\s+LIKE\\s+\\S.*(' . $likeEscapeString . ')?', // LIKE 'expr'[ ESCAPE '%s']\n '\\s+NOT LIKE\\s+\\S.*(' . $likeEscapeString . ')?' // NOT LIKE 'expr'[ ESCAPE '%s']\n ];\n }\n\n return preg_match('/' . implode('|', $operator) . '/i', $string, $match)\n ? $match[ 0 ]\n : false;\n }", "public function getOperatorForSQL()\n {\n if ($this->arrConfig['operator'] == '') {\n throw new \\BadMethodCallException('Filter operator is not yet configured');\n }\n\n switch ($this->arrConfig['operator']) {\n case 'like':\n return 'LIKE';\n\n case 'gt':\n return '>';\n\n case 'lt':\n return '<';\n\n case 'gte':\n return '>=';\n\n case 'lte':\n return '<=';\n\n case 'neq':\n return '!=';\n\n case 'eq':\n return '=';\n\n default:\n throw new \\UnexpectedValueException('Unknown filter operator \"' . $this->arrConfig['operator'] . '\"');\n }\n }", "public function getOperator(): string {\n\t\tswitch($this->rndOperator) {\n\t\t\tcase self::PLUS:\n\t\t\t\treturn Config::ANTI_SPAM_USE_MATH_SYMBOLS ? '+' : Language::out()->getPlusName();\n\t\t\tcase self::MINUS:\n\t\t\t\treturn Config::ANTI_SPAM_USE_MATH_SYMBOLS ? '-' : Language::out()->getMinusName();\n\t\t\tcase self::MULTIPLE:\n\t\t\tdefault:\n\t\t\t\treturn Config::ANTI_SPAM_USE_MATH_SYMBOLS ? '*' : Language::out()->getMultiplyWithName();\n\t\t}\n\t}", "protected function _get_operator($str) {\n\t\tstatic $_operators;\n\n\t\tif (empty($_operators)) {\n\t\t\t$_operators = array(\n\t\t\t\t'\\s*(?:<|>|!)?=\\s*', // =, <=, >=, !=\n\t\t\t\t'\\s*<>?\\s*', // <, <>\n\t\t\t\t'\\s*>\\s*', // >\n\t\t\t\t'\\s+IS NULL', // IS NULL\n\t\t\t\t'\\s+IS NOT NULL', // IS NOT NULL\n\t\t\t\t'\\s+EXISTS\\s*\\(.*\\)', // EXISTS(sql)\n\t\t\t\t'\\s+NOT EXISTS\\s*\\(.*\\)', // NOT EXISTS(sql)\n\t\t\t\t'\\s+BETWEEN\\s+', // BETWEEN value AND value\n\t\t\t\t'\\s+IN\\s*\\(.*\\)', // IN(list)\n\t\t\t\t'\\s+NOT IN\\s*\\(.*\\)', // NOT IN (list)\n\t\t\t);\n\n\t\t}\n\n\t\treturn preg_match('/'.implode('|', $_operators).'/i', $str, $match) ? $match[0] : FALSE;\n\t}", "public function getOp()\n {\n return $this->Op;\n }", "public function getOp()\n {\n return $this->Op;\n }", "function getOperator(): string\n {\n return \"w\";\n }", "public static function getOperators()\n {\n return self::$OPERATORS;\n }", "public function getSqlOperator($operator)\n {\n switch ($operator) {\n case '==':\n return '=';\n case '!=':\n return '<>';\n case '{}':\n return 'LIKE';\n case '!{}':\n return 'NOT LIKE';\n case 'between':\n return 'BETWEEN %s AND %s';\n case '>':\n case '<':\n case '>=':\n case '<=':\n return $operator;\n default:\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('Unknown operator specified.'));\n break;\n }\n }", "function corrConditionOperatorToString($operator) {\n\t$operators = [\n\t\tCONDITION_OPERATOR_EQUAL => '=',\n\t\tCONDITION_OPERATOR_NOT_EQUAL => '<>',\n\t\tCONDITION_OPERATOR_LIKE => _('like'),\n\t\tCONDITION_OPERATOR_NOT_LIKE => _('not like')\n\t];\n\n\treturn $operators[$operator];\n}", "public function getOperator($operator)\n {\n if ($operator === 'LIKE' || $operator === 'ILIKE') {\n return 'LIKE';\n }\n\n return '';\n }", "protected function getOperator(array &$query)\n {\n if(in_array(head($query), $this->operators)) {\n return array_shift($query);\n } else if(count($query) == 2) {\n return '=';\n } else {\n return 'IN';\n }\n }", "public function getXsiTypeName() {\n return \"Predicate.Operator\";\n }", "public function getAlertOperator() {\n\t\treturn ($this->alertOperator);\n\t}", "protected function getOperator($type)\n {\n $choices = array(\n self::TYPE_EQUAL => '=',\n self::TYPE_GREATER_EQUAL => '>=',\n self::TYPE_GREATER_THAN => '>',\n self::TYPE_LESS_EQUAL => '<=',\n self::TYPE_LESS_THAN => '<',\n self::TYPE_NULL => 'NULL',\n self::TYPE_NOT_NULL => 'NOT NULL',\n );\n\n return isset($choices[$type]) ? $choices[$type] : '=';\n }", "public function getOperatorKey();", "private function getOperator($token)\n\t{\n\t\tif ($token->isUnary())\n\t\t{\n\t\t\treturn $this->unary_operators[$token->value()];\n\t\t}\n\n\t\tif ( ! isset($this->binary_operators[$token->value()]))\n\t\t{\n\t\t\tthrow new BooleanExpressionException('Invalid Binary Operator: '. $token);\n\t\t}\n\n\t\treturn $this->binary_operators[$token->value()];\n\t}", "public function getOperatorValue()\n {\n return $this->comparator->getCurrentOperator()->getValue();\n }", "function operators() {\n $operators = array(\n '<' => array(\n 'title' => t('Is less than'),\n 'method' => 'op_simple',\n 'short' => t('<'),\n 'values' => 1,\n ),\n '<=' => array(\n 'title' => t('Is less than or equal to'),\n 'method' => 'op_simple',\n 'short' => t('<='),\n 'values' => 1,\n ),\n '=' => array(\n 'title' => t('Is equal to'),\n 'method' => 'op_simple',\n 'short' => t('='),\n 'values' => 1,\n ),\n '!=' => array(\n 'title' => t('Is not equal to'),\n 'method' => 'op_simple',\n 'short' => t('!='),\n 'values' => 1,\n ),\n '>=' => array(\n 'title' => t('Is greater than or equal to'),\n 'method' => 'op_simple',\n 'short' => t('>='),\n 'values' => 1,\n ),\n '>' => array(\n 'title' => t('Is greater than'),\n 'method' => 'op_simple',\n 'short' => t('>'),\n 'values' => 1,\n ),\n 'between' => array(\n 'title' => t('Is between'),\n 'method' => 'op_between',\n 'short' => t('between'),\n 'values' => 2,\n ),\n 'contains' => array(\n 'title' => t('Contains'),\n 'short' => t('contains'),\n 'method' => 'op_contains',\n 'values' => 1,\n ),\n 'starts' => array(\n 'title' => t('Starts with'),\n 'short' => t('begins'),\n 'method' => 'op_starts',\n 'values' => 1,\n ),\n );\n\n return $operators;\n }", "function getOperator(): string\n {\n return \"Tw\";\n }", "public function operators() {\n $operators = [\n 'in' => [\n 'title' => $this->t('Is one of'),\n 'short' => $this->t('in'),\n 'short_single' => $this->t('='),\n 'method' => 'opSimple',\n 'values' => 1,\n ],\n 'not in' => [\n 'title' => $this->t('Is not one of'),\n 'short' => $this->t('not in'),\n 'short_single' => $this->t('<>'),\n 'method' => 'opSimple',\n 'values' => 1,\n ],\n ];\n // if the definition allows for the empty operator, add it.\n if (!empty($this->definition['allow empty'])) {\n $operators += [\n 'empty' => [\n 'title' => $this->t('Is empty (NULL)'),\n 'method' => 'opEmpty',\n 'short' => $this->t('empty'),\n 'values' => 0,\n ],\n 'not empty' => [\n 'title' => $this->t('Is not empty (NOT NULL)'),\n 'method' => 'opEmpty',\n 'short' => $this->t('not empty'),\n 'values' => 0,\n ],\n ];\n }\n\n return $operators;\n }", "private function _get_operator($arg) {\n\t\tif (isset($this->operators[$arg])) {\n\t\t\treturn $this->operators[$arg];\n\t\t}\n\t\t// Override due to conceede to WP habit\n\t\tif ('post_mime_type' == $arg) {\n\t\t\treturn 'starts_with';\n\t\t}\n\t\telse {\n\t\t\treturn '=';\n\t\t}\n\t}", "protected function getOperatorSymbol(): string\n {\n return 'IN';\n }", "public function isOperator()\n {\n return\n $this->type === 'plus' ||\n $this->type === 'minus' ||\n $this->type === 'slash' ||\n $this->type === 'star';\n }", "public function getOperation($operator) {\n switch($operator) {\n case '+' :\n $operation = 'add';\n break;\n case '-' :\n $operation = 'subtract';\n break;\n case '*' :\n $operation = 'multiply';\n break;\n case '/' :\n $operation = 'divide';\n break;\n case '%' :\n $operation = 'modulus';\n break;\n case '^' :\n $operation = 'exponentiation';\n break;\n default :\n throw new Exception(\"Calculator does not support this operator\");\n }\n\n return $operation;\n }", "private function getBinaryOperators()\n\t{\n\t\t// http://php.net/manual/en/language.operators.precedence.php\n\n\t\t// operator => array(precedence, associativity, [cast])\n\t\treturn array(\n\t\t\t'^' => array(60, self::RIGHT_ASSOC),\n\t\t\t'**' => array(60, self::RIGHT_ASSOC),\n\n\t\t\t'*' => array(40, self::LEFT_ASSOC),\n\t\t\t'/' => array(40, self::LEFT_ASSOC),\n\t\t\t'%' => array(40, self::LEFT_ASSOC),\n\n\t\t\t'+' => array(30, self::LEFT_ASSOC),\n\t\t\t'-' => array(30, self::LEFT_ASSOC),\n\t\t\t'.' => array(30, self::LEFT_ASSOC),\n\n\t\t\t'<' => array(20, self::NON_ASSOC),\n\t\t\t'<=' => array(20, self::NON_ASSOC),\n\t\t\t'>' => array(20, self::NON_ASSOC),\n\t\t\t'>=' => array(20, self::NON_ASSOC),\n\n\t\t\t'^=' => array(20, self::NON_ASSOC),\n\t\t\t'*=' => array(20, self::NON_ASSOC),\n\t\t\t'$=' => array(20, self::NON_ASSOC),\n\t\t\t'~' => array(20, self::NON_ASSOC),\n\n\t\t\t'<>' => array(10, self::NON_ASSOC),\n\t\t\t'==' => array(10, self::NON_ASSOC),\n\t\t\t'!=' => array(10, self::NON_ASSOC),\n\n\t\t\t'&&' => array(6, self::NON_ASSOC),\n\t\t\t'||' => array(5, self::NON_ASSOC),\n\t\t\t'AND' => array(4, self::NON_ASSOC),\n\t\t\t'XOR' => array(3, self::NON_ASSOC),\n\t\t\t'OR' => array(2, self::NON_ASSOC),\n\t\t);\n\t}", "public function operatorList() {\n return $this->Operators;\n }", "public static function getOperator($type)\n\t{\n\t\tif (preg_match('#^(eq|neq|gt|gte|lt|lte)$#', $type))\n\t\t{\n\t\t\t$class = 'PNElementOperator' . ucfirst($type);\n\t\t\treturn new $class;\n\t\t}\n\n\t\tthrow new InvalidArgumentException('Unknown Operator Type : ' . $type);\n\t}", "public function get()\n {\n return $this->operator->get();\n }", "protected function parseQueryOperator()\n {\n $token = $this->tokenQueue->peek();\n $data = $token->getData();\n\n $nextToken = $this->tokenQueue->peek(1);\n $nextData = $nextToken->getData();\n $op = false;\n\n switch ($data) {\n case '<':\n $op = ($nextData === '>' ? '>=' : ($nextData === '=' ? '<=' : '<'));\n break;\n case '>':\n $op = ($nextData === '=' ? '>=' : '>');\n break;\n case '=':\n $op = '=';\n break;\n case 'LIKE':\n $op = 'LIKE';\n break;\n }\n\n // Consume the correct number of tokens\n if ($op === 'LIKE' || strlen($op) === 1) {\n $this->tokenQueue->next();\n } elseif (strlen($op) === 2) {\n $this->tokenQueue->next();\n $this->tokenQueue->next();\n }\n\n return $op;\n }", "public function getOperators()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t// precedence settings are copied from similar operators in Twig core extension\n\t\t\t\t'||' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'&&' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'eq' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'ne' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'neq' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'<>' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'===' => array('precedence' => 20, 'class' => '\\phpbb\\template\\twig\\node\\expression\\binary\\equalequal', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'!==' => array('precedence' => 20, 'class' => '\\phpbb\\template\\twig\\node\\expression\\binary\\notequalequal', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'gt' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'gte' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'ge' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'lt' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'lte' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'le' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t),\n\t\t);\n\t}", "function operatorList()\r\n {\r\n return $this->Operators;\r\n }", "public function getOperators()\n {\n return array_keys( $this->getOperatorData() );\n }", "public function getCalculateOperation($operator) {\n switch ($operator) {\n case \"*\":\n $operation = new Multiplication();\n break;\n case \"/\":\n $operation = new Division();\n break;\n case \"+\":\n $operation = new Addition();\n break;\n case \"-\":\n $operation = new Subtraction();\n break;\n }\n return $operation;\n }", "public function getOperators()\n {\n return array(\n array(\n 'not' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),\n '-' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Neg'),\n '+' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Pos'),\n ),\n array(\n 'or' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'and' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'b-or' => array('precedence' => 16, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'b-xor' => array('precedence' => 17, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'b-and' => array('precedence' => 18, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '==' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '!=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '<' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '>' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '>=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '<=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'not in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotIn', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_In', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '..' => array('precedence' => 25, 'class' => 'Twig_Node_Expression_Binary_Range', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '+' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Add', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '-' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Sub', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '~' => array('precedence' => 40, 'class' => 'Twig_Node_Expression_Binary_Concat', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '*' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mul', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '/' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Div', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '//' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_FloorDiv', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '%' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'is' => array('precedence' => 100, 'callable' => array($this, 'parseTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'is not' => array('precedence' => 100, 'callable' => array($this, 'parseNotTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '**' => array('precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT),\n ),\n );\n }", "public function logicalOperator($operator = null);", "public function getTourOperator()\r\n {\r\n return $this->_tourOperator;\r\n }", "public function get_cellOperator(): string\n {\n // $res is a string;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::CELLOPERATOR_INVALID;\n }\n }\n $res = $this->_cellOperator;\n return $res;\n }", "public function getBinaryOperators()\n {\n if (!$this->extensionInitialized) {\n $this->initExtensions();\n }\n return $this->binaryOperators;\n }", "public static function operators()\n {\n if (! empty(self::$operators)) {\n return self::$operators;\n }\n\n foreach (self::$operatorTypes as $opType) {\n self::$operators += $opType::operators();\n }\n\n return self::$operators;\n }", "public function getOperator(): ?Win32LobAppRuleOperator {\n $val = $this->getBackingStore()->get('operator');\n if (is_null($val) || $val instanceof Win32LobAppRuleOperator) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'operator'\");\n }", "public function getOperatorCondition($field, $operator, $value)\n {\n return Mage::getResourceModel('rule/rule_condition_sqlBuilder')\n ->getOperatorCondition($field, $operator, $value);\n }", "public function __toString()\n {\n return 'operator('\n . (null === $this->p_catalog ? '' : (string)$this->p_catalog . '.')\n . (null === $this->p_schema ? '' : (string)$this->p_schema . '.')\n . (string)$this->p_operator . ')';\n }", "protected function parseOperator(string $operator)\n {\n $dict_operators = [\n '!~' => ' NOT LIKE ',\n '>=' => ' >= ',\n '<=' => ' <= ',\n '=' => ' = ',\n '!=' => ' != ',\n '>' => ' > ',\n '<' => ' < ',\n '~' => ' LIKE ',\n '!' => ' IS NOT '\n ];\n\n return (isset($dict_operators[$operator]) ? $dict_operators[$operator] : false);\n }", "public function getLikeOperator()\n {\n $grammar = $this->query->getGrammar();\n\n if ($grammar instanceof PostgresGrammar) {\n return 'ilike';\n }\n\n return 'like';\n }", "public function getOperators()\n {\n return array();\n }", "public function getOperators()\n {\n return array();\n }", "public function getOperators();", "public function setOperator(string $operator): static;", "public function getDiffOperator(): Operator\\Diff\n {\n return $this->getOperator('Diff');\n }", "public function setLogical(string $operator = self::AND): static;", "public static function get_operators($rule)\n {\n }", "public static function getSupportedOperators()\n {\n return \\array_keys(self::$transOpStr);\n }", "public function operatorK()\n\t{\n\t\t$condition = ['or'];\n\t\tforeach ($this->getRelatedTableName() as $formattedName) {\n\t\t\t$condition[] = ['not like', $formattedName, $this->getValue()];\n\t\t}\n\t\treturn $condition;\n\t}", "public function getDefaultOperatorInputByType()\n {\n if (null === $this->_defaultOperatorInputByType) {\n parent::getDefaultOperatorInputByType();\n /*\n * '{}' and '!{}' are left for back-compatibility and equal to '==' and '!='\n */\n $this->_defaultOperatorInputByType['string'] = ['==', '!=', '{}', '!{}', '()', '!()'];\n $this->_defaultOperatorInputByType['multiselect'] = ['()', '!()'];\n $this->_defaultOperatorInputByType['category'] = ['()', '!()'];\n $this->_defaultOperatorInputByType['numeric'] = ['==', '!=', '>=', '>', '<=', '<'];\n $this->_arrayInputTypes[] = 'category';\n }\n return $this->_defaultOperatorInputByType;\n }", "public function setOperator($var)\n {\n GPBUtil::checkInt64($var);\n $this->operator = $var;\n\n return $this;\n }", "protected function compileAnd()\n {\n if ($this->firstClause) {\n return '';\n }\n\n $operator = $this->and ? ' & ' : ' | ';\n\n return $operator;\n }", "public function operator($value) {\n return $this->setProperty('operator', $value);\n }", "public function containsOperators()\n {\n return $this->containsOperators;\n }", "public function getOperation(): string\n {\n return $this->operation;\n }", "public function getOperation(): string\n {\n return $this->operation;\n }", "public function getOperator(): ?Win32LobAppDetectionOperator {\n $val = $this->getBackingStore()->get('operator');\n if (is_null($val) || $val instanceof Win32LobAppDetectionOperator) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'operator'\");\n }", "public function setOperator($operator);", "public function getOperand()\n {\n return $this->operand;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function operator($name) {\n $this->add(new RuleElement\\Operator($name));\n\n return $this;\n }", "public function getOperation() {\n\t\treturn $this->operation;\n\t}", "function getOperators($strName,$arrRule) {\n\t\tglobal $LANG;\n $arrOptions = array(\n 'eq' => 'equal',\n 'ne' => 'notEqual',\n 'ss' => 'contains',\n 'ns' => 'notContains',\n 'gt' => 'greater',\n 'ge' => 'greaterEqual',\n 'lt' => 'less',\n 'le' => 'lessEqual',\n 'set' => 'set',\n 'notset' => 'notSet'\n );\n $arrCurQuestion = $this->arrPrevQuestions[stripslashes($arrRule['field'])];\n if (in_array($arrCurQuestion['question_type'],array(1,3,10,14,23))) {\n $arrOperators = $arrCurQuestion['options_required']?array('eq','ne','ss','ns'):array('eq','ne','ss','ns','set','notset');\n } elseif (in_array($arrCurQuestion['question_type'],array(2,4,5))) {\n $arrOperators = $arrCurQuestion['options_required']?array('eq','ne'):array('eq','ne','set','notset');\n } elseif (in_array($arrCurQuestion['question_type'],array(7,15))) {\n $arrOperators = $arrCurQuestion['options_required']?array('ss','ns'):array('ss','ns','set','notset');\n } elseif (in_array($arrCurQuestion['question_type'],array(11,12,13))) {\n $arrOperators = $arrCurQuestion['options_required']?array('eq','ne','gt','ge','lt','le'):array('eq','ne','gt','ge','lt','le','set','notset');\n }\n if (!$this->blnLocalization) {\n \t$arrOutput[] = '<select name =\"'.$strName.'[operator]\" onChange=\"submit();\")>';\n\t\t\tforeach($arrOperators as $strKey) {\n\t\t\t\t$arrOutput[] = '<option value=\"'.$strKey.'\" '.($arrRule['operator']==$strKey?'selected=\"selected\"':'').'>'.$LANG->getLL('conditions_'.$arrOptions[$strKey]).'</option>';\n\t\t\t}\n\t $arrOutput[] = '</select>';\n\t\t} else {\n\t\t\tforeach($arrOperators as $strKey) {\n\t\t\t\tif ($arrRule['operator']==$strKey) {\n\t\t\t\t\t$arrOutput[] = '<input type=\"hidden\" name=\"'.$strName.'[operator]\" value=\"'.$strKey.'\" />';\n\t\t\t\t\t$arrOutput[] = $LANG->getLL('conditions_'.$arrOptions[$strKey]).'<br />';\n\t\t\t\t}\n\t\t\t}\n }\n $arrOutput[] = ($arrRule['operator']=='set'||$arrRule['operator']=='notset')?'':implode(chr(10),$this->getAnswers($strName,$arrRule));\n\t\treturn $arrOutput;\n\t}", "public function condition(): string\r\n {\r\n return (string) $this->condition;\r\n }", "public function &getSearchOperatorsControl()\n {\n return $this->operatorsControl;\n }", "protected function allowedLogicalOperators(): array\n {\n return [\n FieldCriteria::AND,\n FieldCriteria::OR,\n ];\n }", "function get_condition()\r\n {\r\n $owner = $this->owner;\r\n\r\n $conds = array();\r\n $parent = $this->parent;\r\n $category = $parent->get_parameter(WeblcmsManager :: PARAM_CATEGORY);\r\n $category = $category ? $category : 0;\r\n $conds[] = new EqualityCondition(ContentObjectPublication :: PROPERTY_CATEGORY_ID, $category, ContentObjectPublication :: get_table_name());\r\n\r\n $type_cond = array();\r\n $types = array(Assessment :: get_type_name(), Survey :: get_type_name(), Hotpotatoes :: get_type_name());\r\n foreach ($types as $type)\r\n {\r\n $type_cond[] = new EqualityCondition(ContentObject :: PROPERTY_TYPE, $type);\r\n }\r\n $conds[] = new OrCondition($type_cond);\r\n $c = Utilities :: query_to_condition($this->query);\r\n if (! is_null($c))\r\n {\r\n $conds[] = $c;\r\n }\r\n return new AndCondition($conds);\r\n }", "public function operator_options() {\n return array('=' => t('contains'), '<>' => t(\"doesn't contain\"));\n }", "public static function getNullOperators()\n {\n return self::$NULL_OPERATORS;\n }" ]
[ "0.85027647", "0.8261838", "0.8261838", "0.8261838", "0.8261838", "0.8261838", "0.8261838", "0.8250018", "0.81792927", "0.81712097", "0.80754733", "0.80754733", "0.78580904", "0.77199984", "0.77140206", "0.75429535", "0.7338198", "0.7338198", "0.7323066", "0.7266357", "0.7252747", "0.7242369", "0.7168256", "0.71570754", "0.71230143", "0.7106496", "0.7106496", "0.6993951", "0.69798774", "0.69245416", "0.69050443", "0.688795", "0.68829536", "0.68700767", "0.68693197", "0.6865984", "0.6853346", "0.67443", "0.6731316", "0.6708716", "0.67049813", "0.66976637", "0.6630167", "0.6626049", "0.6615572", "0.66011935", "0.65906334", "0.6556609", "0.6548173", "0.6532195", "0.6486204", "0.6473721", "0.6463352", "0.6441609", "0.6395046", "0.6385011", "0.6374273", "0.63700914", "0.6363321", "0.63488615", "0.63176924", "0.63088113", "0.6281792", "0.62768507", "0.6240494", "0.6228796", "0.62286854", "0.62286854", "0.62271875", "0.62054384", "0.61941683", "0.6095591", "0.6081091", "0.6077702", "0.6068478", "0.605737", "0.60461843", "0.6042082", "0.6041244", "0.6022092", "0.5980457", "0.5980457", "0.5956173", "0.5954409", "0.59310156", "0.5909671", "0.5909671", "0.5909671", "0.5909671", "0.5909671", "0.5903589", "0.5883026", "0.58655936", "0.5859349", "0.5835672", "0.58348006", "0.58113533", "0.58052033", "0.5800142" ]
0.7635341
16
Returns the expressions that are connected by this condition.
public function getExpressions(): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function expressions()\n {\n return $this->expressions;\n }", "public function getExpressions()\n {\n return $this->expressions;\n }", "public function getExpressions()\n {\n return $this->expressions;\n }", "public function getExpressions();", "public function &getExpressions();", "public function getCondition(): array\n {\n return $this->nodeConditions;\n }", "public function expression() {\n\t\t$ret = '';\n\t\t$first = true;\n\t\tforeach($this->children as $child) {\n\t\t\tif(!$first) {\n\t\t\t\t$ret .= '+';\n\t\t\t} else {\n\t\t\t\t$first = false;\n\t\t\t}\n\n\t\t\tif($this->precedence() > $child->precedence()) {\n\t\t\t\t$ret .= \"(\" . $child->expression() . \")\";\n\t\t\t} else {\n\t\t\t\t$ret .= $child->expression();\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "public function getExpressionCollection()\n {\n $expressions = array();\n\n /**\n * @var AbstractRuleInterface $rule\n */\n foreach ($this->getRules() as $rule) {\n\n $expressions = array_merge(\n $expressions,\n $rule->getExpressionCollection()->toArray()\n );\n }\n\n return new ArrayCollection($expressions);\n }", "public function getExpression();", "public function get_conditions()\n {\n return $this->conditions;\n }", "public function getConditions()\n {\n return $this->conditions;\n }", "public function getConditions()\n {\n return $this->conditions;\n }", "public function getConditions()\n {\n return $this->conditions;\n }", "public function getConditions()\n {\n return $this->conditions;\n }", "public function getExpression()\n {\n return $this->expression;\n }", "public function getExpression()\n {\n return $this->expression;\n }", "public function getConditions()\n\t{\n\t\treturn $this->conditions;\n\t}", "public function getConditions()\n\t{\n\t\treturn $this->conditions;\n\t}", "public function getExpression() {\n return $this->expression;\n }", "public function getConditions(): array\n\t{\n\t\treturn $this->conditions;\n\t}", "public function getExpressionBag()\n {\n return $this->expressionBagNode;\n }", "public function &getConditions() {\n return $this->conditions;\n }", "private function getDueClauses()\n {\n $ex = new Expr();\n\n return $ex->orX(\n $ex->andX(\n $ex->eq('t.trigger', ':trigger_invoiced'),\n $ex->in('o.invoiceState', ':state_invoiced')\n ),\n $ex->andX(\n $ex->eq('t.trigger', ':trigger_fully_invoiced'),\n $ex->eq('o.invoiceState', ':state_fully_invoiced')\n ),\n $ex->andX(\n $ex->eq('t.trigger', ':trigger_shipped'),\n $ex->in('o.shipmentState', ':state_shipped')\n ),\n $ex->andX(\n $ex->eq('t.trigger', ':trigger_fully_shipped'),\n $ex->eq('o.shipmentState', ':state_fully_shipped')\n )\n );\n }", "public function allEvaluations()\n {\n $qb = $this->em->createQueryBuilder();\n $qb->select('e, bfg')\n ->from(Evaluation::class, 'e')\n ->join('e.branchForGroup', 'bfg');\n $result = $qb->getQuery()->getResult();\n return $result;\n }", "protected function getInnerExpressionsString()\n {\n $query = '';\n foreach ($this->inner as $expressions) {\n foreach ($expressions as $type => $expression) {\n $query .= self::TAB_SEPARATOR . $expression->get();\n }\n }\n return $query;\n }", "public function getConditions()\n {\n if (empty($this->_conditions)) {\n $this->_resetConditions();\n }\n\n // Load rule conditions if it is applicable\n if ($this->hasConditionsSerialized()) {\n $conditions = $this->getConditionsSerialized();\n if (!empty($conditions)) {\n $conditions = Mage::helper('core/unserializeArray')->unserialize($conditions);\n if (is_array($conditions) && !empty($conditions)) {\n $this->_conditions->loadArray($conditions);\n }\n }\n $this->unsConditionsSerialized();\n }\n\n return $this->_conditions;\n }", "public static function getNamedExpressions()\n {\n return static::$_namedExpressions;\n }", "public function getOperators()\n {\n return array(\n array(\n 'not' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),\n '-' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Neg'),\n '+' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Pos'),\n ),\n array(\n 'or' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'and' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'b-or' => array('precedence' => 16, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'b-xor' => array('precedence' => 17, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'b-and' => array('precedence' => 18, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '==' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '!=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '<' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '>' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '>=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '<=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'not in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotIn', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_In', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '..' => array('precedence' => 25, 'class' => 'Twig_Node_Expression_Binary_Range', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '+' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Add', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '-' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Sub', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '~' => array('precedence' => 40, 'class' => 'Twig_Node_Expression_Binary_Concat', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '*' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mul', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '/' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Div', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '//' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_FloorDiv', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '%' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'is' => array('precedence' => 100, 'callable' => array($this, 'parseTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n 'is not' => array('precedence' => 100, 'callable' => array($this, 'parseNotTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),\n '**' => array('precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT),\n ),\n );\n }", "public function getPropertyConditionChain()\n {\n return $this->conditionChain;\n }", "public function getConditionalLogic(): array\n {\n $conditionals = [];\n\n foreach ($this->config->get('conditional_logic') as $rules) {\n $conditional = new Conditional($rules, $this->parentKey);\n\n $conditionals[] = $conditional->toArray();\n }\n\n return $conditionals;\n }", "public function getOperators()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t// precedence settings are copied from similar operators in Twig core extension\n\t\t\t\t'||' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'&&' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'eq' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'ne' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'neq' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'<>' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'===' => array('precedence' => 20, 'class' => '\\phpbb\\template\\twig\\node\\expression\\binary\\equalequal', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'!==' => array('precedence' => 20, 'class' => '\\phpbb\\template\\twig\\node\\expression\\binary\\notequalequal', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'gt' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'gte' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'ge' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'lt' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'lte' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t\t'le' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\n\t\t\t\t'mod' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => \\Twig_ExpressionParser::OPERATOR_LEFT),\n\t\t\t),\n\t\t);\n\t}", "public function getExpression(): string\n {\n return $this->expression;\n }", "public function getExpression(): string\n {\n return $this->expression;\n }", "public function getExpression(): string\n {\n return $this->expression;\n }", "public function expression(){\n try {\n // Sparql11query.g:375:3: ( conditionalOrExpression ) \n // Sparql11query.g:376:3: conditionalOrExpression \n {\n $this->pushFollow(self::$FOLLOW_conditionalOrExpression_in_expression1283);\n $this->conditionalOrExpression();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public function getConjuncts()\n {\n return $this->conjuncts;\n }", "public function getComprehensionExpr()\n {\n return $this->readOneof(9);\n }", "public function condition()\n {\n if (!$this->condition) {\n $this->condition = array();\n foreach (monsterToCondition::select('ctype', 'condition')->where('mid', '=', $this->id)->get() as $r) {\n $this->condition[] = $r->condition;\n };\n }\n return $this->condition;\n }", "public function getExpression()\n {\n if (array_key_exists(\"expression\", $this->_propDict)) {\n return $this->_propDict[\"expression\"];\n } else {\n return null;\n }\n }", "public function inequalityWithCustomOperatorsPrecedenceProvider(): array\n {\n // https://www.postgresql.org/message-id/12603.1424360914%40sss.pgh.pa.us\n return [\n [\n \"j->>'space' <= j->>'node'\",\n new OperatorExpression(\n '<=',\n new OperatorExpression(\n '->>',\n new ColumnReference(new Identifier('j')),\n new StringConstant('space')\n ),\n new OperatorExpression(\n '->>',\n new ColumnReference(new Identifier('j')),\n new StringConstant('node')\n )\n )\n ]\n ];\n }", "public function condition()\n {\n return $this->queries->map(function ($query) {\n return [$query['method'] => $query['arguments']];\n })->toArray();\n }", "public function getActiveConditions() {\n $conditions = self::where('active', true)->get()->toArray();\n return $conditions;\n\n }", "public function getRootConditions(): iterable\n {\n return $this->model->getRootConditions();\n }", "public function getConditions();", "public function getConditions();", "public function getConditions();", "public function getConditions()\n {\n if (empty($this->_conditions)) {\n $this->_resetConditions();\n }\n // Load rule conditions if it is applicable\n if ($this->hasConditionsSerialized()) {\n $conditions = $this->getConditionsSerialized();\n if (!empty($conditions)) {\n $conditions = unserialize($conditions);\n if (is_array($conditions) && !empty($conditions)) {\n $this->_conditions->loadArray($conditions);\n }\n }\n $this->unsConditionsSerialized();\n }\n\n return $this->_conditions;\n }", "public function getOperators()\n {\n return array();\n }", "public function getOperators()\n {\n return array();\n }", "public function getDisjuncts()\n {\n return $this->disjuncts;\n }", "protected function getExpressionCreated() {\n return implode( \", \", \n array_map( \n function ( $var ) {\n if ( is_object( $var ) && is_a( $var, SqlbuilderDbCore::class_() ) ) {\n return SB::par( SqlbuilderDbCore::get_( $var )->build() );\n }\n return $var;\n }, array_filter( $this->getExpression() ) ) );\n }", "public function __toString() {\n // Special case for a single, nested condition group:\n if (count($this->conditions) == 1) {\n return (string) reset($this->conditions);\n }\n $lines = [];\n foreach ($this->conditions as $condition) {\n $lines[] = str_replace(\"\\n\", \"\\n \", (string) $condition);\n }\n return $lines ? \"(\\n \" . implode(\"\\n {$this->conjunction}\\n \", $lines) . \"\\n)\" : '';\n }", "public function getOperators();", "protected function parseExpression()\n {\n $entities = array();\n while ($e = $this->matchFuncs(array('parseAddition', 'parseEntity'))) {\n $entities[] = $e;\n // operations do not allow keyword \"/\" dimension (e.g. small/20px) so we support that here\n if (!$this->peekReg('/\\\\G\\/[\\/*]/') && ($delim = $this->matchChar('/'))) {\n $entities[] = new ILess_Node_Anonymous($delim);\n }\n }\n if (count($entities) > 0) {\n return new ILess_Node_Expression($entities);\n }\n }", "public function getExpressionContext()\n {\n return $this->expressionContext;\n }", "public function getConditionDataProvider()\n {\n return [\n [\n [\n 'type' => 'type',\n 'attribute' => 'attribute',\n 'operator' => 'operator',\n 'value' => 'value',\n 'value_type' => 'value_type',\n 'aggregator' => 'aggregator',\n 'conditions' => [\n [\n 'type' => 'child_type',\n 'attribute' => 'child_attribute',\n 'operator' => 'child_operator',\n 'value' => 'child_value',\n 'value_type' => null,\n 'aggregator' => 'aggregator'\n ]\n ]\n ]\n ]\n ];\n }", "public function operatorList() {\n return $this->Operators;\n }", "public function getCelExpression()\n {\n return $this->cel_expression;\n }", "public function containsOperators()\n {\n return $this->containsOperators;\n }", "function operatorList()\r\n {\r\n return $this->Operators;\r\n }", "public function getReportsConditions()\n {\n return $this->hasMany(ReportsConditions::className(), ['report_id' => 'id'])\n ->with('report')\n// ->orderBy(['operation' => SORT_ASC,'attribute_name' => SORT_ASC,'function' => SORT_ASC])\n ->orderBy(['order' => SORT_ASC])\n ->inverseOf('report');\n }", "public function getSourceAccessConditions()\n {\n return $this->sourceAccessConditions;\n }", "public function getConditions()\n {\n return new CartConditionCollection($this->session->get($this->sessionKeyCartConditions));\n }", "public function operators() {\n $operators = [\n 'in' => [\n 'title' => $this->t('Is one of'),\n 'short' => $this->t('in'),\n 'short_single' => $this->t('='),\n 'method' => 'opSimple',\n 'values' => 1,\n ],\n 'not in' => [\n 'title' => $this->t('Is not one of'),\n 'short' => $this->t('not in'),\n 'short_single' => $this->t('<>'),\n 'method' => 'opSimple',\n 'values' => 1,\n ],\n ];\n // if the definition allows for the empty operator, add it.\n if (!empty($this->definition['allow empty'])) {\n $operators += [\n 'empty' => [\n 'title' => $this->t('Is empty (NULL)'),\n 'method' => 'opEmpty',\n 'short' => $this->t('empty'),\n 'values' => 0,\n ],\n 'not empty' => [\n 'title' => $this->t('Is not empty (NOT NULL)'),\n 'method' => 'opEmpty',\n 'short' => $this->t('not empty'),\n 'values' => 0,\n ],\n ];\n }\n\n return $operators;\n }", "function condition_values() {\n return array();\n }", "public function toArray()\n {\n return $this->parse($this->expression());\n }", "public function evaluations()\n {\n return $this->hasMany(Evaluation::class);\n }", "public function getExpressionNode()\n {\n return $this->expressionNode;\n }", "public function getQueries(){\n \treturn $this->_execedQueries;\n }", "public function getConditions()\n {\n if (array_key_exists(\"conditions\", $this->_propDict)) {\n if (is_a($this->_propDict[\"conditions\"], \"\\Beta\\Microsoft\\Graph\\Model\\MessageRulePredicates\") || is_null($this->_propDict[\"conditions\"])) {\n return $this->_propDict[\"conditions\"];\n } else {\n $this->_propDict[\"conditions\"] = new MessageRulePredicates($this->_propDict[\"conditions\"]);\n return $this->_propDict[\"conditions\"];\n }\n }\n return null;\n }", "public function getLhs();", "public function getConditionsDescription()\n {\n return $this->conditionsDescription;\n }", "public function getWhereExpression()\n {\n if (!count($this->filters)) {\n return null;\n }\n\n $expr = $this->qb->expr()->andX();\n foreach ($this->filters as $filter) {\n $expr = $expr->add($filter->getExpression());\n }\n\n return $expr;\n }", "public function getExpression(): string\n {\n if ($this->wrapMode > 0) {\n return ($this->wrapMode === static::WRAP_IN_TAGS ? '<?php ' : '<?= ') . $this->expression . ' ?>';\n }\n\n return $this->expression;\n }", "public function whereComplex()\n {\n return $this->addComplexCondition('and', $this->conditions);\n }", "public function selectorElements()\n {\n if ($this->isReference() && $this->getProject() !== null) {\n return $this->getRef($this->getProject())->selectorElements();\n }\n\n return $this->selectorsList;\n }", "function &operatorList()\n {\n return $this->Operators;\n }", "function &operatorList()\n {\n return $this->Operators;\n }", "public function getConditionedTransitions()\n {\n return $this->conditionedTransitions;\n }", "public function toString() {\n $s= $this->getClassName().\"@{\\n\";\n foreach ($this->conditions as $condition) {\n $s.= ' '.xp::stringOf($condition).\"\\n\";\n }\n return $s.'}';\n }", "public function relationalExpression(){\n try {\n // Sparql11query.g:403:3: ( numericExpression ( EQUAL numericExpression | NOT_EQUAL numericExpression | LESS numericExpression | GREATER numericExpression | LESS_EQUAL numericExpression | GREATER_EQUAL numericExpression )? ) \n // Sparql11query.g:404:3: numericExpression ( EQUAL numericExpression | NOT_EQUAL numericExpression | LESS numericExpression | GREATER numericExpression | LESS_EQUAL numericExpression | GREATER_EQUAL numericExpression )? \n {\n $this->pushFollow(self::$FOLLOW_numericExpression_in_relationalExpression1369);\n $this->numericExpression();\n\n $this->state->_fsp--;\n\n // Sparql11query.g:405:3: ( EQUAL numericExpression | NOT_EQUAL numericExpression | LESS numericExpression | GREATER numericExpression | LESS_EQUAL numericExpression | GREATER_EQUAL numericExpression )? \n $alt50=7;\n $LA50 = $this->input->LA(1);\n if($this->getToken('EQUAL')== $LA50)\n {\n $alt50=1;\n }\n else if($this->getToken('NOT_EQUAL')== $LA50)\n {\n $alt50=2;\n }\n else if($this->getToken('LESS')== $LA50)\n {\n $alt50=3;\n }\n else if($this->getToken('GREATER')== $LA50)\n {\n $alt50=4;\n }\n else if($this->getToken('LESS_EQUAL')== $LA50)\n {\n $alt50=5;\n }\n else if($this->getToken('GREATER_EQUAL')== $LA50)\n {\n $alt50=6;\n }\n\n switch ($alt50) {\n case 1 :\n // Sparql11query.g:406:5: EQUAL numericExpression \n {\n $this->match($this->input,$this->getToken('EQUAL'),self::$FOLLOW_EQUAL_in_relationalExpression1379); \n $this->pushFollow(self::$FOLLOW_numericExpression_in_relationalExpression1381);\n $this->numericExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 2 :\n // Sparql11query.g:407:7: NOT_EQUAL numericExpression \n {\n $this->match($this->input,$this->getToken('NOT_EQUAL'),self::$FOLLOW_NOT_EQUAL_in_relationalExpression1389); \n $this->pushFollow(self::$FOLLOW_numericExpression_in_relationalExpression1391);\n $this->numericExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 3 :\n // Sparql11query.g:408:7: LESS numericExpression \n {\n $this->match($this->input,$this->getToken('LESS'),self::$FOLLOW_LESS_in_relationalExpression1399); \n $this->pushFollow(self::$FOLLOW_numericExpression_in_relationalExpression1401);\n $this->numericExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 4 :\n // Sparql11query.g:409:7: GREATER numericExpression \n {\n $this->match($this->input,$this->getToken('GREATER'),self::$FOLLOW_GREATER_in_relationalExpression1409); \n $this->pushFollow(self::$FOLLOW_numericExpression_in_relationalExpression1411);\n $this->numericExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 5 :\n // Sparql11query.g:410:7: LESS_EQUAL numericExpression \n {\n $this->match($this->input,$this->getToken('LESS_EQUAL'),self::$FOLLOW_LESS_EQUAL_in_relationalExpression1419); \n $this->pushFollow(self::$FOLLOW_numericExpression_in_relationalExpression1421);\n $this->numericExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 6 :\n // Sparql11query.g:411:7: GREATER_EQUAL numericExpression \n {\n $this->match($this->input,$this->getToken('GREATER_EQUAL'),self::$FOLLOW_GREATER_EQUAL_in_relationalExpression1429); \n $this->pushFollow(self::$FOLLOW_numericExpression_in_relationalExpression1431);\n $this->numericExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "public function valueLogical(){\n try {\n // Sparql11query.g:396:3: ( relationalExpression ) \n // Sparql11query.g:397:3: relationalExpression \n {\n $this->pushFollow(self::$FOLLOW_relationalExpression_in_valueLogical1351);\n $this->relationalExpression();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "private function getRegEspressions()\r\n {\r\n \t//Si no se han cargado las expresesiones regulares se cargan\r\n \t\tstatic $expressions;\r\n \t\tif (!$expressions)\r\n \t\t\t$expressions = ZendExt_FastResponse::getXML('expresiones');\r\n \t\t\t//$expressions = simplexml_load_file('Aspect/xml/expressions.xml');\r\n \t\treturn $expressions;\r\n }", "public function getPredicates() {\n return $this->predicates;\n }", "public function getStatements()\n {\n return $this->map(function ($item) {\n return $item->getStatement();\n });\n }", "public function __toString()\n\t{\n\t\t$string = '';\n\n\t\tforeach ($this->_conditions as $i => $condition)\n\t\t{\n\t\t\tif ($i > 0) {\n\t\t\t\t$string .= ' '.$condition['g'].' ';\n\t\t\t}\n\n\t\t\tif (is_string($condition['c'])) {\n\t\t\t\t$string .= $condition['c'];\n\t\t\t}\n\t\t\telseif (is_array($condition['c'])) {\n\t\t\t\t$string .= '('.implode(' '.$condition['g'].' ', $condition['c']).')';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$string .= '('.$condition['c'].')';\n\t\t\t}\n\t\t}\n\n\t\treturn $string;\n\t}", "public static function operators()\n {\n if (! empty(self::$operators)) {\n return self::$operators;\n }\n\n foreach (self::$operatorTypes as $opType) {\n self::$operators += $opType::operators();\n }\n\n return self::$operators;\n }", "public function getListExpr()\n {\n return $this->readOneof(7);\n }", "public function getOperators()\n {\n return array_keys( $this->getOperatorData() );\n }", "public function get_clauses()\n {\n }", "public function getConditions()\n {\n if (array_key_exists(\"conditions\", $this->_propDict)) {\n if (is_a($this->_propDict[\"conditions\"], \"\\Microsoft\\Graph\\Model\\ConditionalAccessConditionSet\") || is_null($this->_propDict[\"conditions\"])) {\n return $this->_propDict[\"conditions\"];\n } else {\n $this->_propDict[\"conditions\"] = new ConditionalAccessConditionSet($this->_propDict[\"conditions\"]);\n return $this->_propDict[\"conditions\"];\n }\n }\n return null;\n }", "public function evaluations()\n\t{\n\t\treturn $this->hasMany('App\\Models\\Evaluation', 'application_id');\n\t}", "public function getEvaluations();", "public function getConstraintNodes(): array\n {\n return $this->organize()->constraints;\n }", "public function getEdgesIn()\n {\n $that = $this;\n $prev = null;\n\n return $this->getEdges()->getEdgesMatch(function (Edge $edge) use ($that, &$prev) {\n $ret = $edge->hasVertexTarget($that);\n\n // skip duplicate directed loop edges\n if ($edge === $prev && $edge instanceof EdgeDirected) {\n $ret = false;\n }\n $prev = $edge;\n\n return $ret;\n });\n }", "public function getConditions(): ConditionList\n {\n return new ConditionList($this->conditions->toArray());\n }", "public function getExpr1()\n {\n return $this->expr1;\n }", "public function get(): array\n {\n return $this->criterions;\n }", "public function getJoinExpression();", "public function getExpr3()\n {\n return $this->expr3;\n }" ]
[ "0.7472653", "0.7042794", "0.7042794", "0.6910647", "0.6910012", "0.63189846", "0.6117272", "0.6101507", "0.6020573", "0.59140235", "0.58898085", "0.58898085", "0.58898085", "0.58898085", "0.58136386", "0.58136386", "0.57759076", "0.57759076", "0.57553285", "0.5744576", "0.57364404", "0.5686869", "0.5679541", "0.5671961", "0.5671739", "0.5669721", "0.56174463", "0.5610776", "0.55991334", "0.5583318", "0.5559276", "0.5510718", "0.5510718", "0.5510718", "0.55004704", "0.54926187", "0.549225", "0.54519755", "0.5408175", "0.5373817", "0.5359978", "0.5354242", "0.5353574", "0.5346996", "0.5346996", "0.5346996", "0.53310615", "0.5324688", "0.5324688", "0.53135085", "0.5309526", "0.53089845", "0.5306499", "0.5306293", "0.5282351", "0.5276541", "0.52631485", "0.52507836", "0.5249763", "0.5244223", "0.5209393", "0.5202518", "0.51682955", "0.51533306", "0.51503456", "0.51450115", "0.51439637", "0.513362", "0.5129019", "0.51273894", "0.5105501", "0.51045966", "0.5100256", "0.5097135", "0.50670815", "0.50654817", "0.505964", "0.505964", "0.50533414", "0.50453115", "0.5035389", "0.5020207", "0.50113916", "0.5002312", "0.49845323", "0.49770653", "0.49749744", "0.49597728", "0.4959138", "0.49548954", "0.4954738", "0.4952837", "0.49485275", "0.49462086", "0.4936959", "0.49261346", "0.49069795", "0.49012157", "0.4897683", "0.4896033" ]
0.6329754
5
Get categories of posts
public function getCategories() { return $this->categories; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPostsCategories()\n {\n return $this->postsCategories;\n }", "public function categories()\n {\n $new = $this->postterms->filter(function($term)\n {\n return $term->termtaxonomy->taxonomy == 'category';\n });\n\n return $new->map(function($term)\n {\n return $term->termtaxonomy->term; \n });\n }", "public function getCategories()\n {\n return $this->hasMany(Category::className(), ['id' => 'category_id'])->viaTable(self::tablePrefix().'cms_post_category', ['post_id' => 'id']);\n }", "public function getCategories()\n\t{\n\t\treturn BlogCategory::all();\t\n\t}", "public function get_post_categories() {\n\t\tglobal $posts;\n\t\t$categories_as_string = '';\n\n\t\t$categories = get_the_category( $posts[0]->ID );\n\t\tif ( is_array( $categories ) && ! empty( $categories ) ) {\n\t\t\t$category_names = wp_list_pluck( $categories, 'cat_name' );\n\t\t\t$categories_as_string = implode( ', ', $category_names );\n\t\t}\n\n\t\t/**\n\t\t * Filter the categories as derived by this function.\n\t\t *\n\t\t * @param string $categories_as_string The derived category list. Comma-separated list.\n\t\t * @param array $categories The array of post category objects.\n\t\t */\n\t\treturn apply_filters( 'amt_get_the_categories', $categories_as_string, $categories );\n\t}", "function get_post_categories($post_id)\n{\n $res = array();\n $categories = get_the_category($post_id);\n foreach ($categories as $category) {\n array_push($res, $category->name);\n }\n return $res;\n}", "private function getCategories()\n\t{\n\t\t$blogCategories = BlogCategory::where('status', '=', 1)->whereHas('blogPosts', function($query)\n\t\t{\n\t\t\t$query->active();\n\t\t})->get();\n\n\t\treturn $blogCategories;\n\t}", "public function categories() {\n\t\treturn $this->terms('category');\n\t}", "public function getCategories();", "public function getCategories();", "public function get_categories() {\n\t\treturn $this->terms('category');\n\t}", "public function index()\n {\n $categories = Postcategory::all();\n\n return $categories;\n }", "function getCategories() {\n $this->db->select(\"*\");\n $query = $this->db->get('post_category');\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return array();\n }", "public function categories()\n {\n // the passed URL path segments in the request.\n $categories = $this->request->getParam('pass');\n\n $posts = $this->Posts->find('categorized', [\n 'categories' => $categories\n ]);\n\n $this->set(['posts' => $posts, 'categories' => $categories]);\n\n }", "public function categories()\n {\n $query = \"SELECT DISTINCT category from blog_post \n WHERE deleted = 0\";\n\n $stmt = static::$dbh->query($query);\n\n $images = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\n return $images;\n\n }", "private function getCategoriesByPost($posts) {\n foreach ($posts as $post) {\n $post_categories = $post->post_categorie;\n foreach ($post_categories as $post_categorie) {\n $categories = $post_categorie->categories;\n foreach ($categories as $categorie) {\n $ctg[$post->post_id].= empty($ctg[$post->post_id]) ? $categorie->categorie_name : \", \" . $categorie->categorie_name;\n }\n }\n }\n return $ctg;\n }", "public function categories() {\n return $this->belongsToMany('App\\Models\\Category', 'category_post', 'post_id', 'category_id');\n }", "public function getPosts()\n {\n $this->_postCollection->addFilter('is_active', 1);\n $this->_categoryCollection->addFilter('is_active', 1);\n\n $posts = $this->_postCollection->getData();\n $categories = $this->_categoryCollection->getData();\n\n foreach ($posts as &$post) {\n $post['category'] = $this->_getCategoryById($categories, $post['category_id']);\n }\n return $posts;\n }", "public function get_categories () {\n\t\treturn Category::all();\n\t}", "function get_post_categories(){\n $args = array(\n 'type' => 'post',\n 'child_of' => 0,\n 'parent' => '',\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'hide_empty' => 1,\n 'hierarchical' => 1,\n 'exclude' => '',\n 'include' => '',\n 'number' => '',\n 'taxonomy' => 'category',\n 'pad_counts' => false\n\n );\n\n $categories = json_encode(get_categories($args));\n echo $categories;\n die();\n\n}", "public function getPostCategories($post_id=null)\n\t{\n\t\tif(is_null($post_id)){\n\t\t\t$this->logger->logError('No Post ID provided.','Input Error');\n\t\t\treturn false;\n\t\t}\n\t\t$q = \"SELECT in_categories.category_name FROM in_categories INNER JOIN in_posts_categories \";\n\t\t$q.= \"ON in_categories.id=in_posts_categories.category_id \"; \n\t\t$q.=\"WHERE in_posts_categories.post_id=:post_id\";\n\t\t$vars = array(\n\t\t\t\":post_id\"=>$post_id\n\t\t);\n\t\t$ps = $this->execute($q,$vars);\n\t\t$result = $this->getDataRowsAsArray($ps);\n\t\treturn $result;\n\t}", "public function get_categories()\n {\n return ['hsblog'];\n }", "public function getCategories()\n {\n return Category::all();\n }", "public function getAllCategories();", "public function categories()\n {\n return $this->belongsToMany(Category::class, 'posts_categories');\n }", "private function actionGetCategories() {\n\t\tglobal $publishthis;\n\n\t\t$categories = array();\n\t\t$obj = new stdClass();\n\n\t\t//get taxonomies categories\n\t\t$all_taxonomies = get_taxonomies( array( 'public' => true ), $output = 'objects', $operator = 'and' );\n\t\t$taxonomies_keys = array_keys( $all_taxonomies );\n\t\t$all_terms = get_terms( $taxonomies_keys, array( 'orderby' => 'id', 'hide_empty' => 0, 'exclude' => array(1) ) );\n\n\t\t$tax_maps = $publishthis->get_option( 'tax_mapping' );\n\t\t$tax_maps = array_values($tax_maps);\n\n\t\tforeach ( $all_terms as $term ) {\n\t\t\tif ( !in_array( $term->taxonomy, array( 'post_format', 'post_tag' ) ) ) {\n\t\t\tif ( !in_array( $term->taxonomy, $tax_maps ) && !in_array( 'pt_tax_all', $tax_maps ) ) continue;\n\n\t\t\t$category = array(\n\t\t\t\t'id' => intval( $term->term_id ),\n\t\t\t\t'name' => $term->name,\n\t\t\t\t'taxonomyId' => intval( $term->term_taxonomy_id ),\n\t\t\t\t'taxonomyName' => $term->taxonomy,\n\t\t\t\t'subcategories' => array() );\n\t\t\tif( intval( $term->parent ) > 0 ) {\n\t\t\t\t\t$categories[ $term->parent ]['subcategories'][ $term->term_id ] = $category;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\t$categories[ $term->term_id ] = $category;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$obj->success = true;\n\t\t$obj->errorMessage = null;\n\t\t$obj->categories = $this->array_values_recursive( $categories );\n\n\t\t$this->sendJSON( $obj );\n\t}", "public static function getCategories()\n\t{\n\t\treturn Category::getAll();\n\t}", "function get_all_category(){\n $cat_args = array(\n 'type' => 'post',\n 'child_of' => 0,\n 'parent' => '',\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'hide_empty' => 1,\n 'hierarchical' => 1,\n 'exclude' => '',\n 'include' => '',\n 'number' => '',\n 'taxonomy' => 'category',\n 'pad_counts' => false\n\n );\n $all_category = get_categories( $cat_args );\n\n return $all_category;\n }", "public function get_categories() {\n return [ 'custom-category' ];\n }", "public function categories()\n {\n \treturn $this->belongsToMany('App\\Category', 'category_post', 'post_id', 'category_id');\n }", "protected function _get_categories($posts)\n {\n $categories = array();\n foreach ($posts as $post) {\n if (false === isset($post['categories'])) {\n continue;\n }\n foreach ($post['categories'] as $category) {\n $categories[$category][] = $post;\n }\n }\n return $categories;\n }", "function wp_get_post_cats($blogid = '1', $post_id = 0)\n {\n }", "public function allCategories()\n {\n return Category::all();\n }", "public function fetch_postcategory()\n\t\t{\n\t\t\t$query = $this->db->query('SELECT * FROM table_postcategory');\n\n foreach ($query->result() as $row)\n {\n $data[] = $row;\n }\n return $data;\n\t\t}", "public function skyword_get_categories( $args = '' ) {\n\t\tglobal $wp_xmlrpc_server;\n\t\t$wp_xmlrpc_server->escape( $args );\n\t\t$categories = $wp_xmlrpc_server->mw_getCategories ($args);\n\t\treturn $categories;\n\t}", "function getAllCategories()\n {\n return $this->data->getAllCategories();\n }", "public function get_post_joined_with_category(){\n $db = \\Config\\Database::connect();\n $builder = $db->table('posts');\n $builder->select('posts.id, posts.category_id, posts.title, posts.slug, posts.body, posts.created_at, categories.name');\n $builder->orderBy('posts.id', 'DESC');\n $builder->join('categories', 'posts.category_id = categories.id');\n $query = $builder->get();\n $results = $query->getResult();\n \n return $results;\n }", "function getPostCategory($post_categories){\n\n\t$newpost_cat_arr = [];\n\n\tforeach ($post_categories as $categorys){\n\n\t\tforeach ($categorys as $category){\n\n\t\t\t$cat_id = get_cat_ID($category);\n\n\t\t\tif ($cat_id != 0 ){\n\t\t\t\t$newpost_cat_arr[] = $cat_id;\n\t\t\t} else{\n\n\t\t\t\t$insertCategory = wp_insert_term($category, 'category', array());\n\n\t\t\t\t$newpost_cat_arr[] = $insertCategory['term_id'];\n\n\t\t\t}\n\n\t\t}\n\t}\n\n\treturn $newpost_cat_arr;\n}", "public static function getCategories(){\n $categories = Category::all()->toArray();\n\n return $categories;\n }", "function tc_category_list() {\r\n $post_terms = apply_filters( 'tc_cat_meta_list', $this -> _get_terms_of_tax_type( $hierarchical = true ) );\r\n $html = false;\r\n if ( false != $post_terms) {\r\n foreach( $post_terms as $term_id => $term ) {\r\n $html .= sprintf('<a class=\"%1$s\" href=\"%2$s\" title=\"%3$s\"> %4$s </a>',\r\n apply_filters( 'tc_category_list_class', 'btn btn-mini' ),\r\n get_term_link( $term_id , $term -> taxonomy ),\r\n esc_attr( sprintf( __( \"View all posts in %s\", 'customizr' ), $term -> name ) ),\r\n $term -> name\r\n );\r\n }//end foreach\r\n }//end if $postcats\r\n return apply_filters( 'tc_category_list', $html );\r\n }", "public function getCategories()\n {\n $categories = new ArrayList;\n foreach(BlogCategory::get() as $category) {\n $data = array(\n 'Title' => $category->Title,\n 'Link' => $category->Parent()->Link('category/'.$category->URLSegment),\n 'ShowCount' => $this->ShowCount,\n 'Count' => $this->totalEntries($category->ID)\n );\n $categories->push(new ArrayData($data));\n }\n return $categories;\n }", "public function getCategories() {\n return $this->categories;\n }", "static function categories()\n {\n $category = \\SOE\\DB\\Category::where('parent_id', '0')\n ->orderBy('category_order')\n ->get();\n $return = array();\n foreach($categories as $cat)\n {\n $return[$cat->id] = $cat->slug;\n }\n return $return;\n }", "public function getAllCategories()\n {\n return $this->AllChildren()->filter('ClassName', PortfolioCategory::class);\n }", "public function getCategories()\n\t{\n\t\treturn $this->categories;\n\t}", "public static function getCategories()\n {\n //get cached categories\n $catCached = Yii::$app->cache->get('catCached');\n if ($catCached) {\n return $catCached;\n } else {\n return self::find()->indexBy('category_id')->asArray()->all();\n }\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 static function getCategories()\n {\n \t$query = \"SELECT * FROM categories\";\n \t$result = DB::select($query);\n\n \treturn $result;\n }", "function getCategories() {\n\t\t$answers = $this->getAnswers();\n\t\t$categories = array();\n\t\t\n\t\tforeach((array) $answers as $answer) {\n\t\t\t$question = $answer->getQuestion();\n\t\t\t$category = $question->getCategory();\n\t\t\t$categories[$category->getUID()] = $category;\n\t\t}\n\t\t\n\t\treturn $categories;\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 }", "function bvt_sfa_feed_admin_get_categories() {\n\n $categories = get_categories(\n array(\n \"child_of\" => get_option(\"BVT_SFA_TOPICS_CATEGORY_ID\"),\n \"hide_empty\" => false\n )\n );\n\n return $categories;\n}", "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 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 getCategories(){\n return Category::get();\n }", "function GetCategories()\n\t{\n\t\t$result = $this->sendRequest(\"GetCategories\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getPosts()\n {\n return $this->hasMany(Post::className(), ['category_id' => 'id']);\n }", "public function findCategories();", "function Categories() {\n\t\treturn DataObject::get('categoryobject', '', 'Title');\n\t}", "public function get_categories()\n {\n $param = array(\n 'delete_flg' => $this->config->item('not_deleted','common_config')\n );\n $groups = $this->get_tag_group();\n\n if (empty($groups)) return array();\n\n $group_id = array_column($groups, 'tag_group_id');\n $param = array_merge($param, array('group_id' => $group_id));\n\n $tags = $this->Logic_tag->get_list($param);\n\n return $this->_generate_categories_param($groups, $tags);\n }", "public function getAllUsers_posts()\n {\n\n // retourne le resultat de la requete SELECT * FROM categories\n return DB::table('users_posts')->get();\n\n\n }", "function mpcth_get_filter_categories($categories, $type = 'blog') {\r\n\tif($type != 'blog')\r\n\t\t$all_categories = get_categories(array('taxonomy' => 'mpcth_portfolio_category', 'hide_empty' => 1));\r\n\telse\r\n\t\t$all_categories = get_categories(array('hide_empty' => 1));\r\n\r\n\tif(isset($categories[0])) {\r\n\t\t$categories = unserialize($categories[0]);\r\n\r\n\t\t$filter_categories = '';\r\n\t\t$filter_categories .= '<div class=\"mpcth-'.$type.'-categories mpcth-filterable-categories\"><span>'.__('Categories: ', 'mpcth').'</span><ul>'; \r\n\t\t$filter_categories .= '<li class=\"active\" data-link=\"post\"><a href=\"\">'.__('All', 'mpcth').'</a></li>';\r\n\r\n\t\tforeach($all_categories as $key) {\r\n\t\t\tif((isset($categories[$key->slug]) && $categories[$key->slug] == 'on') || !isset($categories[$key->slug])) {\r\n\t\t\t\t$filter_categories .= '<li data-link=\"'.$key->slug.'\">';\r\n\t\t\t\tif($type == 'blog')\r\n\t\t\t\t\t$filter_categories .= '<a href=\"\" title=\"'.$key->slug.'\">'.$key->name.'</a></li>';\r\n\t\t\t\telse\r\n\t\t\t\t\t$filter_categories .= '<a href=\"\" title=\"'.$key->slug.'\">'.$key->name.'</a></li>';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$filter_categories .= '</ul></div>';\r\n\r\n\t\treturn $filter_categories;\r\n\t}\r\n}", "public function getCategories(): Collection\n {\n return $this->model->categories()->get();\n }", "public static function getAllCategories()\n\t{\n\t\t$categories= Category::all();\n\t\treturn $categories;\n\t}", "public function all()\n {\n return Category::withCount('posts');\n }", "public function getCategories() : array;", "protected function findAllCategories()\n {\n return resolve([]);\n }", "public function getCategories() {\n $sql = sprintf(\"SELECT * FROM category c WHERE EXISTS (SELECT * FROM project_category pc WHERE pc.project_id = %d AND pc.category_id = c.id)\", $this->id);\n $categories = array();\n $results = self::$connection->execute($sql);\n foreach ($results as $category_arr) {\n array_push($categories, new Category($category_arr));\n }\n return $categories;\n }", "public function getCategories(){\n\t\t$query = \"SELECT * FROM final_categoria\";\n\t\treturn $this->con->action($query);\n\t}", "public function category_posts_query() {\n\t\treturn new WP_Query( array(\n\t\t\t'posts_per_page' => $this->settings->post_count,\n\t\t\t'tax_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'category',\n\t\t\t\t\t'field' => 'id',\n\t\t\t\t\t'terms' => $this->settings->post_categories,\n\t\t\t\t),\n\t\t\t),\n\t\t) );\n\t}", "public function indexContentCategories()\n {\n return $this->contentCategoryRepo->all();\n }", "public function posts()\n {\n return $this->hasMany(Post::class, 'category_id');\n }", "protected function getCategories()\n {\n if (! is_null($this->categories)) {\n return $this->categories;\n }\n\n $categories = $this->app['sanatorium.categories.category']->findAll();\n\n foreach ($categories as $category) {\n $category->uri = $category->url === '/' ? null : $category->url;\n }\n\n return $this->categories = $categories;\n }", "function mpcth_get_query_categories($categories, $type = 'blog') {\r\n\tif($type != 'blog')\r\n\t\t$all_categories = get_categories(array('taxonomy' => 'mpcth_portfolio_category', 'hide_empty' => 1));\r\n\telse\r\n\t\t$all_categories = get_categories(array('hide_empty' => 1));\r\n\t\r\n\t// make a list of categories that should be displayed (for WP query)\r\n\t$display_categories = '';\r\n\r\n\tif(isset($categories[0])) {\r\n\t\t$categories = unserialize($categories[0]);\r\n\r\n\t\tforeach($all_categories as $key) {\r\n\t\t\tif((isset($categories[$key->slug]) && $categories[$key->slug] == 'on') || !isset($categories[$key->slug]))\r\n\t\t\t\t$display_categories .= $key->slug.', ';\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $display_categories;\r\n}", "public function listCategories()\n {\n $categories = Category::all();\n\n return $categories;\n }", "function get_categories_from_post(){\n\t\t\n\t\t$categorias_bbdd=$this->get_categories(0,true);\n\t\t\n\t\t//Se inicia $this->num a 0 por que va a servir de indice para \n\t\t//la lista $this->categorias\n\t\t$this->num=0;\t\t\n\t\t$this->serv_cat_list=\"\";\n\t\t//con esta lista cogemos los checkbox que esten señalados en el formulario\n\t\t\n\t\t$this->get_checkbox_categories($categorias_bbdd,'services');\n\t\t\n\t\treturn 0;\n\t}", "public function posts()\n {\n return $this->belongsToMany('App\\Post', 'category_post');\n }", "public function get_categories()\n\t{\n\t\treturn $this->_categories;\n\t}", "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}", "function get_category_array() {\n $args = array(\n 'type' => 'post',\n 'child_of' => 0,\n 'parent' => '',\n 'orderby' => 'name',\n 'order' => 'ASC',\n 'hide_empty' => 1,\n 'hierarchical' => 1,\n 'exclude' => '',\n 'include' => '',\n 'number' => '',\n 'taxonomy' => 'category',\n 'pad_counts' => false\n );\n return get_categories($args);\n}", "function circle_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'circle_categories' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'hide_empty' => 1,\n\t\t\t// We only need to know if there is more than one category.\n\t\t\t'number' => 2,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'circle_categories', $all_the_cool_cats );\n\t}\n\n\tif ( $all_the_cool_cats > 1 ) {\n\t\t// This blog has more than 1 category so circle_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so circle_categorized_blog should return false.\n\t\treturn false;\n\t}\n}", "public function getPublishedArticlesCategorized()\n {\n $categories = array();\n foreach ($this->categoryRepository->findAll() as $category) {\n $categories[$category->getSlug()] = array(\n 'category' => $category,\n 'articles' => $this->articleRepository->findPublishedByCategory($category)\n );\n }\n\n return $categories;\n }", "public function getCategories()\n {\n $request = \"SELECT * FROM category\";\n $request = $this->connexion->query($request);\n $categories = $request->fetchAll(PDO::FETCH_ASSOC);\n return $categories;\n }", "public function getCategories(){\n\t\n\t\tglobal $wpdb;\n\t\t\n\t\t$allcategories = array();\n\t\t \n\t\t// geta all categories\t\t\n\t\t$categories = $wpdb->get_results('SELECT * FROM '.$this->categories_table.'');\n\t\t\n\t foreach($categories as $cat)\n\t\t{ \n\t\t $allcategories[$cat->term_id][] = $cat->name;\n\t\t\t$allcategories[$cat->term_id][] = $cat->name_de;\n\t\t\t$allcategories[$cat->term_id][] = $cat->name_it;\t\n\t\t}\n\t\t\n\t\treturn $allcategories;\n\t\t\t\n\t}", "public function getCategories()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('categories');\n }", "public function getCategories()\n {\n return $this->request(\"core_course_get_categories\");\n }", "public function getAllCategories()\n\t{\n\t\treturn $this->_db->loadAssoc(\"SELECT * FROM @_#_categories ORDER BY title\", 'parent_id', true);\n\t}", "public static function kategori( $request ) {\n $innlegg = [];\n $posts = query_posts('posts_per_page=100&cat='. (int)$request->get_param('id') );\n global $post;\n\t while( have_posts() ) {\n\t the_post();\n\t $innlegg[] = self::_getPostDataFromWPOOPost( new WPOO_Post( $post ) );\n }\n \n return $innlegg;\n }", "public function get_categories() {\n\t\treturn array( 'listeo' );\n\t}", "function getAllCategories() {\n\t\t$url = $this->apiURL . \"categories/\" . $this->yourID . \"/\" . $this->yourAPIKey;\n\t\treturn $this->_curl_get($url);\n\t}", "public function getCategories()\n {\n return [ 'categories' => self::CATEGORIES ];\n }", "private function get_posts_list()\n\t{\n\t\t$category = $this->filter;\n\n\t\t# filter posts by?\n\t\t$where = array();\n\t\tif('all' != $category)\n\t\t\t$where['forum_cats.url'] = $category;\n\t\t\t\n\t\t# order posts by?\n\t\t$order_by = ('newest' == $this->sort)\n\t\t\t? 'forum_cat_post_comment:created'\n\t\t\t: (('votes' == $this->sort)\n\t\t\t\t? 'forum_cat_post_comment:vote_count'\n\t\t\t\t: 'forum_cat_posts.last_active');\n\n\t\t$posts = ORM::factory('forum_cat_post')\n\t\t\t->select('forum_cat_posts.*, forum_cats.name, forum_cats.url')\n\t\t\t->with('forum_cat_post_comment')\n\t\t\t->join('forum_cats', 'forum_cats.id', 'forum_cat_posts.forum_cat_id')\n\t\t\t->where($where)\n\t\t\t->orderby(\"$order_by\", 'desc')\n\t\t\t->find_all();\n\t\tif(0 == $posts->count())\n\t\t\treturn 'No posts in this category';\n\t\t\n\t\t$view = new View('public_forum/posts_list');\t\t\n\t\t$view->posts = $posts;\n\t\treturn $view;\n\t}" ]
[ "0.7844933", "0.7754465", "0.76500666", "0.7567982", "0.7567234", "0.7562893", "0.7342549", "0.7255908", "0.72245616", "0.72245616", "0.72243494", "0.716191", "0.7151758", "0.7108187", "0.7027705", "0.7025032", "0.70158094", "0.7001667", "0.6969352", "0.69535685", "0.6948777", "0.6942612", "0.6924171", "0.68999654", "0.68930393", "0.6882012", "0.6865009", "0.6861324", "0.68520343", "0.684456", "0.67874223", "0.6762208", "0.6744216", "0.67436945", "0.67386293", "0.6729325", "0.6700852", "0.6697758", "0.6689125", "0.66819495", "0.66805226", "0.6663488", "0.66525483", "0.66486514", "0.66478187", "0.66460323", "0.6639001", "0.6629906", "0.66257554", "0.6608889", "0.65826744", "0.6566008", "0.6564781", "0.65592456", "0.6558072", "0.6553742", "0.65533334", "0.6546891", "0.65451086", "0.65445507", "0.65362734", "0.65333027", "0.6529434", "0.6528793", "0.65228885", "0.6521949", "0.65219456", "0.6520909", "0.6517854", "0.651503", "0.6506697", "0.65017575", "0.64973354", "0.64957523", "0.6493003", "0.64661586", "0.64551926", "0.6453589", "0.6452263", "0.64377725", "0.6437238", "0.6429175", "0.6428498", "0.6420741", "0.64070547", "0.63953024", "0.6395041", "0.63895756", "0.6386124", "0.6384466", "0.63820195" ]
0.67789483
40
Get tags of posts
public function getTags() { return $this->tags; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tags()\n {\n $new = $this->postterms->filter(function($term)\n {\n return $term->termtaxonomy->taxonomy == 'post_tag';\n });\n\n return $new->map(function($term)\n {\n return $term->termtaxonomy->term; \n });\n }", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags() {}", "public function get_post_tags() {\n\t\tglobal $posts;\n\t\t$tags_as_string = '';\n\n\t\t$tags = get_the_tags( $posts[0]->ID );\n\t\tif ( is_array( $tags ) && ! empty( $tags ) ) {\n\t\t\t$tag_names = wp_list_pluck( $tags, 'name' );\n\t\t\t$tags_as_string = implode( ', ', $tag_names );\n\t\t}\n\t\t// MD: This is done to tags but not categories, Should not be done here IMHO.\n\t\t// $tag_list = strtolower( rtrim( $tag_list, ' ,' ) );\n\n\t\t/**\n\t\t * Filter the categories as derived by this function.\n\t\t *\n\t\t * @param string $tags_as_string The derived tag list. Comma-separated list.\n\t\t * @param array $tags The array of post tag objects.\n\t\t */\n\t\treturn apply_filters( 'amt_get_the_tags', $tags_as_string, $tags );\n\t}", "public function tags()\n {\n return $this->hasMany('App\\Models\\Tag', 'post_id');\n }", "function tc_get_the_tags() {\r\n return the_tags();\r\n}", "public function tags()\n {\n return $this->hasMany('App\\Posts\\PostTag', 'post', 'id');\n }", "function L_GetPostTags() {\n\t\t\n\t\t//global $post;\n\t\t\n\t\t$tags = get_the_tags();\n\t\t$result = null;\n\t\t\t\t\n\t\t\t\tif ($tags != false) {\n\t\t\t\t\n\t\t\t\t\tforeach( $tags as $tag ) {\n\t\t\t\t\t\n\t\t\t\t\t\t//if ( $category->cat_ID != 1 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$result .= '<a href=\"' . get_tag_link( $tag->term_id ) . '\" title=\"' . sprintf( __( \"View posts by tag: %s\" ), $tag->name ) . '\" ' . '>' . $tag->name.'</a>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t//}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn $result;\n\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t}", "public function tags()\n {\n return $this->hasMany('arts\\Tag', 'post_id', 'post_id');\n }", "public static function get_tags() {\n global $wpdb;\n $query = \"SELECT * FROM XTB_TAGS\";\n return $wpdb->get_results($query);\n }", "protected function getPostTags(Crawler $postPage) {\n $tags = array();\n $tagsLinks = $postPage->filter('.post__tags .tags a');\n foreach ($tagsLinks as $tagLink){\n $tags[]=$tagLink->textContent;\n }\n return $tags;\n }", "public function getTags()\n {\n return $this->tags = get_the_tags($this->id);\n }", "function tags() {\n\n\t\t$preloader = pb_query_preloader::getInstance();\n\t\t$preloadRow = $preloader->getPreloadArticleTag($this->id);\n\n\t\tif ($preloadRow) {\n\t\t\t$rows = $preloadRow;\n\t\t} else {\n\t\t\tglobal $polarbear_db;\n\t\t\t$sql = \"SELECT tagID FROM \" . POLARBEAR_DB_PREFIX . \"_article_tag_relation WHERE articleID = '$this->id'\";\n\t\t\t$rows = $polarbear_db->get_results($sql);\n\t\t}\n\n\t\t$arrTags = array();\n\t\tif ($rows) {\n\t\t\tforeach ($rows as $row) {\n\t\t\t\t$arrTags[] = polarbear_tag::getInstance($row->tagID);\n\t\t\t}\n\t\t}\n\n\t\tpb_pqp_log_speed(\"article tags()\");\n\n\t\treturn $arrTags;\n\t}", "public function tags()\n {\n return $this->belongsToMany('Model\\PostTag', 'post_tag_relation', 'post_id', 'tag_id');\n }", "function get_post_list($conn_ptr, $table_prefix) {\n // Get a list of post_titles and post_names and store them in an array\n $sql=\"SELECT p.ID, p.post_title, p.post_name, p.post_date, p.post_modified FROM \".$table_prefix.\"posts p \n INNER JOIN \".$table_prefix.\"term_relationships r ON r.object_id=p.ID \n INNER JOIN \".$table_prefix.\"term_taxonomy t ON t.term_taxonomy_id = r.term_taxonomy_id \n INNER JOIN \".$table_prefix.\"terms wt on wt.term_id = t.term_id \n WHERE t.taxonomy='category' AND wt.slug='\" . $GLOBALS['site_persona'] . \"' AND p.post_type='page' AND p.post_status='publish' \";\n\n $result = $conn_ptr->query($sql);\n $rows = [];\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) \n array_push($rows, $row);\n }\n\n // Enrich the array with tags\n $erows = [];\n foreach ($rows as $row) {\n $sql=\"SELECT wt.name, t.taxonomy FROM \".$table_prefix.\"posts p \n INNER JOIN \".$table_prefix.\"term_relationships r ON r.object_id=p.ID \n INNER JOIN \".$table_prefix.\"term_taxonomy t ON t.term_taxonomy_id = r.term_taxonomy_id \n INNER JOIN \".$table_prefix.\"terms wt on wt.term_id = t.term_id \n WHERE t.taxonomy='post_tag' AND p.ID='\".$row[\"ID\"].\"'\";\n \n $tags = [];\n $result = $conn_ptr->query($sql);\n if ($result->num_rows > 0) while ($wtrow = $result->fetch_assoc()) array_push($tags, $wtrow[\"name\"]);\n $row[\"post_tags\"]=$tags;\n array_push($erows, $row);\n }\n return $erows;\n}", "public function getTags(): Collection;", "public function tags();", "protected function tags($name){\n\n\n\t $postsWithTag= WinkTag::with('posts')\n\t\t\t\t\t\t->where('name',$name)\n\t\t\t\t\t\t->orderBy('created_at', 'DESC')\n\t\t\t\t\t\t->simplePaginate(10);\n\n\t $posts =[];\n\n\t foreach ( $postsWithTag as $post ) {\n\n\t $posts = $post->posts;\n\n\t }\n\n\t return $posts;\n\n\t}", "public function getTagsByPostId($post_id)\n {\n try {\n $statement = $this->database->prepare(\n 'SELECT tags.name, tags.id FROM tags \n JOIN posts_tags ON tags.id = posts_tags.tags_id \n WHERE posts_tags.posts_id = :post_id');\n $statement->bindParam('post_id', $post_id);\n $statement->execute();\n \n $tags = $statement->fetchAll();\n } catch (Exception $e) {\n $e->getMessage();\n }\n\n return $tags;\n }", "public function get_tags()\r\n\t{\r\n\t\t$xml = $this->call(PicasaAPI::$QUERY_URLS['picasa'] . \"?kind=tag\");\r\n\t\treturn $xml;\r\n\t}", "public function getTagList();", "public function skyword_get_tags( $args = '' ) {\n\t\tglobal $wp_xmlrpc_server;\n\t\t$wp_xmlrpc_server->escape( $args );\n\t\t$tags = $wp_xmlrpc_server->wp_getTags ($args);\n\t\treturn $tags;\n\t\t\n\t}", "public function posts()\n {\n return $this->morphedByMany(Post::class, 'taggable', 'taxonomy_relationships')->withTimestamps();\n }", "public function tags()\n {\n return $this->belongsToMany('App\\Model\\Content\\Tag','post_tags','post_id','tag_id');\n }", "public function tags() {\n\t\treturn $this->get_tags();\n\t}", "function get_post_tags() {\n\n\tif ( is_singular() ) {\n\t\t$post_tags = get_the_tags( get_the_ID() );\n\t\tif ( ! empty( $post_tags ) ) {\n\t\t\t$tag_names = array_column( $post_tags, 'name' );\n\t\t\t$tag_string = implode( ', ', $tag_names );\n\t\t} else {\n\t\t\t$tag_string = 'no_keywords';\n\t\t}\n\t} else {\n\t\t$tag_string = 'no_keywords';\n\t}\n\t$value = format_data( $tag_string );\n\treturn ( $value );\n}", "public function getPostsByTags(Request $request) {\n $tags_id = $request->get('tags_id');\n $posts = Post::getPostsByTags($tags_id);\n return $this->responseJson('success', $posts);\n }", "public function getTags()\n {\n $resultArray = [];\n $tagConnects = TagConnect::photo($this->id);\n if($tagConnects->isEmpty()) {return [];}\n foreach($tagConnects as $tagConnect) {\n $idsArray[] = $tagConnect->id;\n }\n $tags = Tag::whereIn('id', $idsArray)->get();\n foreach($tags as $tag) {\n $resultArray[] = $tag->word;\n }\n return $resultArray;\n }", "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "public function tags(){\n return $this->tags;\n }", "public function getPosts();", "public function getPosts();", "function get_book_tags( $id, $args = array() ) {\r\n\treturn wp_get_post_tags($id, $args);\r\n}", "function get_post_meta_tags() {\n global $post;\n $list = array();\n $num = 0;\n $termsObjects = get_the_terms('', 'meta_info', '');\n if (!empty($termsObjects)){\n foreach ($termsObjects as $v) {\n $list[$num] = $v->slug;\n $num++;\n }\n }\n return($list);\n}", "function get_tags() {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->data['fields']['tags'];\n }", "public function getTags() {\n\t\t$tags = array();\n\n\t\ttry {\n\t\t\t/** @var Thrive_Dash_Api_KlickTipp $api */\n\t\t\t$api = $this->get_api();\n\t\t\t$tags = $api->getTags();\n\t\t} catch ( Exception $e ) {\n\n\t\t}\n\n\t\treturn $tags;\n\t}", "public function tags()\n {\n //Any tag may be applied to many posts\n\n return $this->belongsToMany(Tag::class);\n\n }", "public function get_tags(){\n\t \n\t return $this->tags;\n\t}", "public function getTags($params = array()) {\n\n\t\t$defaultParams = array(\n\t\t\t'postID' => '',\n\t\t\t'tagSeparator' => $this->tagSeparator\n\t\t);\n\n\t\t$params = array_merge($defaultParams, $params);\n\n\t\t$this->db->query(\"SELECT post_tags FROM \" . $this->postsTable . \" WHERE id = '\" . intval($params['postID']) . \"'\");\n\t\t$r = $this->db->get();\n\n\t\treturn $this->trimTags(explode($params['tagSeparator'], $r['post_tags']));\n\t}", "function get_tags(){\n global $DB;\n\n $collection = $DB->get_record('tag_coll',['name' => PLUGINNAME]);\n if (!$collection->id) {\n throw new moodle_exception('pluginname', 'local_tematica');\n }\n $tags = $DB->get_records('tag', ['tagcollid' => $collection->id]);\n return $tags;\n}", "public function getTags()\n {\n return $this->_tags;\n }", "public function getTags():array;", "function gettags($mask=\"\")\r\n\t{\r\n\t\t$where = ($mask!=\"\")?\" name like '%$mask%' AND\":\"\";\r\n\t\t$query = 'SELECT * FROM #__flexicontent_tags WHERE '.$where.' published = 1 ORDER BY name';\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$tags = $this->_db->loadObjectlist();\r\n\t\treturn $tags;\r\n\t}", "public function getTags()\n\t{\n\t\treturn $this->tags;\n\t}", "public function posts()\n {\n return $this->belongsToMany('App\\Post', 'tags_posts', 'tag_id', 'post_id');\n }", "public function getTags()\n {\n return $this->Tags;\n }", "public function getTags() {\n return $this->tags;\n }", "public function getTags() {\n\t\t$tags = array();\n\t\tforeach ($this->photo->tags->tag as $tag) {\n\t\t\t$tags[] = (string) $tag;\n\t\t}\n\t\t\n\t\treturn $tags;\n\t}", "public static function get_tags() {\n return Tag::distinct()->orderBy('name', 'asc')->get();\n }", "public function getTags()\n {\n return $this->_tags;\n }", "public function getTag(){\n return $this->hasMany(Tags::className(), ['idTag' => 'id_Tag']) -> viaTable('{{%tags_p}}', ['id_Post' => 'idPost']);\n }", "public function tags()\n {\n return $this->belongsToMany('App\\models\\tagModel', 'blog_post_tag', 'post_id', 'tag_id')->withPivot('type');\n }", "public function getList()\r\n {\r\n\t\tif (defined(\"WITH_SPHINX_TAGS\") && WITH_SPHINX_TAGS)\r\n\t\t{\r\n\t\t\t$tags = parent::getList();\r\n\t\t} else {\r\n\t\t\t$tags = $this->getGroupTagsList() +\r\n\t\t\t\t$this->getMembersTagsList() +\r\n\t\t\t\t$this->getDocumentsTagsList() +\r\n\t\t\t\t$this->getEventsTagsList() +\r\n\t\t\t\t$this->getPhotosTagsList() +\r\n\t\t\t\t$this->getListsTagsList();\r\n\t\t}\r\n return $tags;\r\n }", "public function tag()\n {\n return $this->belongsToMany('App\\Tag', 'post_tags');\n }", "public function getPosts() {}", "public function taggedIn(){\n return $this->belongsToMany('App\\Post', 'post_tags', 'dog_id', 'post_id');\n }", "public function getTagsValues() {}", "public function getTagsValues() {}", "public function getTagsValues() {}", "public function getTagsValues() {}", "protected function getTags(){\n $tags = Tag::all();\n foreach ($tags as $tag){\n $this->tags[$tag->id] = $tag->tag;\n }\n }", "public function getTags($object);", "public function GetTags() {\n\t\treturn $this->_tags;\n\t}", "function getTags() {\n\t\t$db = Database::getInstance();\n\t\t$mysqli = $db->getConnection();\n\t\t\n\t\t$tagsArray = array();\n\t\t\t$sql_query = \"select tagnaam,tagid from tag where status=6\";\n\t\t\t$result = $mysqli->query($sql_query);\n\t\t\t\n\t\t\twhile ( $row = $result->fetch_object () ) {\n\t\t\t\t$Tag = new Tag();\n\t\t\t\t$Tag->tagId = $row->tagid;\n\t\t\t\t$Tag->tagName = $row->tagnaam;\n\t\t\t\tarray_push($tagsArray, $Tag);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$result->close();\n\t\t\treturn $tagsArray;\n\t}", "public function getTagsPublished()\n {\n /** @var $tags TagQuery */\n $tags = $this->getTags();\n $query = $tags->published();\n $dependency = new TagDependency(['tags' => [Tag::CACHE_TAG_TAGS]]);\n return self::getDb()->cache(static function () use ($query) {\n return $query->all();\n }, Tag::CACHE_DURATION, $dependency);\n }", "public function getTags() {\r\n\t\tif (!isset($this->tags)) {\r\n\t\t\t$this->tags = $this->tagRepository->getAllTags();\r\n\t\t}\r\n\t\treturn $this->tags;\r\n\t}", "private function get_all_tags_for_this_post($this_post_id)\n {\n return wp_get_post_tags(\n $this_post_id\n ,array(\n 'fields' => 'all'\n ,'orderby' => 'name'\n ,'order' => 'desc'\n )\n );\n }", "public function getTags(): array\n {\n return $this->tags;\n }", "public function getTags(): array\n {\n return $this->tags;\n }", "public function getSelectedTagsForPost()\n {\n $selectedIds = $this->getTags()->select(['id', 'name'])->all();\n return ArrayHelper::getColumn($selectedIds, 'name');\n }", "function getTags($tag) {\n \n \t$tags_request_url = sprintf($this->api_urls['tags'], $tag, $this->access_token);\n \t\n \treturn $this->__apiCall($tags_request_url);\n \n }", "private function getTags()\n {\n if ($this->entity === null) {\n return request()->old('tags', []);\n }\n\n return request()->old('tags', $this->entity->tags->pluck('slug')->toArray());\n }", "function listOfTags($postID) {\n\t//connecting to the database\n\t$conn = new mysqli('localhost','boubou','boubou','edel') or die('Error connecting to MySQL server.');\n\n\t// making the querry\n\t$dbQuery = \"SELECT * FROM TagPosts INNER JOIN Tags ON TagPosts.tag_id = Tags.tag_id WHERE post_id='\".mysqli_real_escape_string($conn,$postID). \"' ORDER BY Tags.tag_name\";\n\t$result = $conn->query($dbQuery);\n\n\tif(!$result) {\n\t\t\tdie(\"error listing tagpost of \" . $value . \" with this error \" . $conn->error);\n\t\t}\n\t//checking the result array for results\n\t$row = $result->fetch_array();\n\n\t//tag names array\n\t$tagNames = array();\n\t$i = 0;\n\twhile($row) {\n\t\t$tagNames[$i] = array(\"#\".$row['tag_name'], $row['tag_id']);\n\t\t$i++;\n\t\t$row = $result->fetch_array();\n\t}\n\n\t//closing the connection\n\t$conn->close();\n\n\t//return stuff\n\treturn $tagNames;\n}", "public function tags()\n {\n return $this->_refs('tags');\n }", "public function posts(){\n return $this->belongsToMany('Post', 'post_tag', 'tag_id', 'post_id');\n }", "public function getPost()\n {\n return $this->hasMany(Post::class, ['id' => 'post_id'])\n ->viaTable('posts_tags', ['tag_id' => 'id']);\n }", "public function getTags() {\n\t\t$sql = \"SELECT tags FROM question\";\n\t\t$this->db->execute($sql);\n\t\treturn $this->db->fetchAll();\n\t}", "public function listTags() {\n\t\t$request = $this->send(\"GET\", \"contacts/\" . $this->contactId . '/tags', [\n\t\t\t'headers' => [\n\t\t\t\t'Accept' => 'application/json, */*',\n\t\t\t],\n\t\t]);\n\t\treturn $request;\n\t}", "function getTags ( $params=array() )\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/tags.json\",$params);\n return $this->createResponse($result,'get Tags');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function tags(): array\n {\n return $this->tags;\n }" ]
[ "0.766788", "0.74350613", "0.74350613", "0.74350613", "0.74350613", "0.74350613", "0.7367061", "0.73287976", "0.71928084", "0.71735626", "0.7160877", "0.7155538", "0.70380497", "0.7022763", "0.7003903", "0.69753313", "0.6974589", "0.6875726", "0.6859764", "0.68528676", "0.6849855", "0.6794283", "0.67687595", "0.6761202", "0.6757137", "0.6756655", "0.67511755", "0.67470866", "0.6732327", "0.6732166", "0.67074347", "0.6707371", "0.6677151", "0.6677151", "0.66448647", "0.66301864", "0.66301864", "0.6626974", "0.66263694", "0.6621715", "0.66164327", "0.6614618", "0.66050464", "0.6595037", "0.6594382", "0.657431", "0.65494615", "0.6530532", "0.6529924", "0.6514082", "0.65127075", "0.6507361", "0.6506413", "0.65059054", "0.64986765", "0.6490222", "0.64888483", "0.6481661", "0.64765054", "0.64652693", "0.6424101", "0.6408607", "0.6377326", "0.6377326", "0.6377326", "0.6377326", "0.63612354", "0.63424397", "0.63400704", "0.63375354", "0.63263243", "0.6305366", "0.6298693", "0.6292601", "0.6292601", "0.62918895", "0.6271028", "0.62621516", "0.6259912", "0.62588245", "0.62568516", "0.62562335", "0.62485296", "0.6245161", "0.6230861", "0.62228227" ]
0.65992194
55
By default, functions are abstract, you dont need to specify it
public function sit();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function test();", "abstract public function test();", "abstract protected function interface();", "abstract public function otherfoo();", "public function __construct()\r\n\t{\r\n\t\techo \"Implements Function overloading\";\r\n\t}", "abstract protected function getFunctionName(): string;", "public function publicFunction();", "protected abstract function test();", "protected abstract function test();", "abstract protected function external();", "public function custom()\n\t{\n\t}", "public function someStuff()\n {\n \n }", "public function method();", "public function method();", "public function method();", "public function method();", "abstract function __construct();", "abstract public function __construct();", "abstract public function __construct();", "abstract public function __construct();", "private function aFunc()\n {\n }", "function chouXiang()\n {\n echo '必须继承重写的抽象类的抽象方法'.'</br>';\n }", "abstract public function getFunctions();", "abstract public function __call($fnc, $args);", "public function xxxxx(){\n\n }", "abstract protected function exportFunctions();", "abstract public function object();", "abstract public function service();", "public function aaa() {\n\t}", "abstract function command();", "public abstract function Ataca();", "abstract protected function __construct();", "abstract protected function registerFunctions();", "abstract public function __invoke(): void;", "public function method() {\n\t}", "public function example();", "public function aa()\n {\n }", "abstract protected function requiredOperations1(): void;", "public function some()\n {\n }", "abstract public function run(): void;", "public function method()\n {\n\n }", "abstract public function name(): string;", "abstract public function name(): string;", "abstract public function handler() : void;", "public function test() : void;", "function functions() {\n \n }", "public abstract function Main();", "public function helper()\n\t{\n\t\n\t}", "public function methods();", "public function driver();", "public function testSpecial(): void {\n\t}", "public function f()\n {\n }", "public function test5(){\n echo \"test5 method overidden<br>\";\n }", "public function test1(){\n echo \"test1 method overridden</br>\";\n }", "protected function baseOperation1(): void\n {\n echo \"AbstractClass says: I am doing the bulk of the work\\n\";\n }", "function metodo() {\n // Funcion normal\n }", "public function f() {}", "protected function func_default() {}", "protected abstract function performImpl();", "abstract protected function getName() : string;", "public function test3(){\n echo \"test3 method overridden<br>\";\n }", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "public function demo();", "public function demo();", "abstract function getAction() : string;", "abstract protected function mini(): string;", "public function a2(){\n }", "public function __invoke()\n {\n }", "public function doSomething(): void;", "abstract public function onRegister(): void;", "public function test();", "public function __invoke()\n {\n\n }", "abstract public function getName(): string;", "abstract public function getName(): string;", "abstract public function getName(): string;", "abstract public function Execute();", "function __call($name, $arguments)\n {\n echo \"方法不存在\";\n }", "public function core();", "abstract function getName(): string;", "abstract function model();", "abstract function model();", "abstract function model();", "abstract function model();", "public function method() : string;", "public function teste()\n {\n\n }", "public function strategy();", "public function forgetInstance( $abstract );", "public function overload(): void;", "abstract public function run() ;", "public function __invoke();", "public function __invoke();", "public function __invoke();", "public function __invoke();", "abstract public function description(): string;", "abstract protected function handle(): void;", "function __construct() {}", "protected abstract function __construct();", "function __construct() ;", "function asd()\n{\n\n}" ]
[ "0.744021", "0.744021", "0.7400476", "0.727305", "0.68795335", "0.68511313", "0.68482256", "0.67983055", "0.67983055", "0.6780038", "0.67013216", "0.66818726", "0.665205", "0.665205", "0.665205", "0.665205", "0.6647689", "0.66418993", "0.66418993", "0.66418993", "0.6613632", "0.6612048", "0.657504", "0.65528506", "0.6544432", "0.6534144", "0.64800346", "0.6476622", "0.6471395", "0.64579844", "0.6451367", "0.6438122", "0.64313775", "0.6396776", "0.6387863", "0.63855106", "0.63782156", "0.6365858", "0.6359296", "0.6341685", "0.6316995", "0.63016534", "0.63016534", "0.62975913", "0.6260335", "0.6245455", "0.6243518", "0.6216122", "0.6203166", "0.61749685", "0.6168681", "0.6160124", "0.6153531", "0.61440593", "0.61356235", "0.6132555", "0.6129238", "0.61091477", "0.61074436", "0.6079016", "0.60706806", "0.60682493", "0.60682493", "0.60682493", "0.60500395", "0.60500395", "0.60432315", "0.6041962", "0.60174453", "0.6011353", "0.6011117", "0.6004814", "0.59958035", "0.5991099", "0.5987433", "0.5987433", "0.5987433", "0.5971373", "0.5969777", "0.5963135", "0.595962", "0.59588706", "0.59588706", "0.59588706", "0.59588706", "0.5952791", "0.59476984", "0.5946669", "0.59439003", "0.5931804", "0.5918448", "0.59059656", "0.59059656", "0.59059656", "0.59059656", "0.59035903", "0.59023714", "0.58962375", "0.58912635", "0.5891132", "0.58881587" ]
0.0
-1
I HAVE TO IMPLEMENT THE SIT METHOD
public function sit() { echo 'Dog sit.'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sit();", "abstract public function scrape();", "public function locate();", "protected abstract function perform_next();", "public function FindNext()\n {\n }", "public function FindNext()\n {\n }", "public function FindNext()\n {\n }", "public function execute()\n {\n $this->slectPrioritis();\n\n Bots::getInstance()->clearNext();\n $ants = Bots::getInstance()->getList();\n foreach ($ants as $ant){\n\n $log = !empty($ant->gol) ? implode(Tools::createCoordinate($ant->gol), ':') : 'НЕТУ';\n// Tools::logger(\"Ant:[\" . implode(Tools::createCoordinate($ant->currentCoord ), ':'). \"] = EDA:$log\");\n $coordinats = Tools::createCoordinate($ant->currentCoord);\n if (empty($ant->gol)){\n// Tools::logger(\"У этого нет цели \" . $ant->currentCoord . \" Ставим ему дефолт\");\n// $ant->gol = $ant->currentCoord;\n// $ant->gol = Tools::createNum(28, 19);\n// $ant->gol = Tools::createNum(10, 67);\n// $ant->gol = Tools::createNum(14, 19);\n }\n// $golCoord = Tools::createCoordinate($ant->gol);\n// $dir = $this->createDirection($coordinats, $golCoord);\n// $dir = Tools::createDirection($coordinats, $golCoord);\n $dirArray = Tools::createDirection($ant);\n// Tools::logger(\"GO TO ВЫБОР ИЗ : \" . implode(':',$dirArray));\n $dir = Bots::getInstance()->selectMove($ant, $dirArray);\n// Bots::getInstance()->addNext($ant, $dir);\n// Tools::logger(\"GO TO ВЫБРАЛ $dir\");\n// Tools::logger(\"GO TO Этот выбрал - > \" . print_r($coordinats,true));\n\n $nextCoordinat = Tools::nextStep($ant->coordinatColRow['col'], $ant->coordinatColRow['row'], $dir);\n $nextNum = Tools::createNum($nextCoordinat['row'], $nextCoordinat['col']);\n \n Steamer::issueOrder($coordinats['row'], $coordinats['col'], $dir);\n// break;\n }\n\n }", "function it($desc,$it) {\n $it();\n }", "public function ItemParams2( $observer )\n {\n $items=$observer->getItems();\n foreach($items as $item){\n ////Mage::log($item->getId());\n $quoteItems = $item->getQuote()->getAllVisibleItems();\n foreach ($quoteItems as $quoteItem) {\n ////Mage::log($quoteItem->getItemId());\n //Mage::log($quoteItem->getItemId());\n}\n}\n\n }", "abstract public function scrape(): Result;", "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "public function do_head_items()\n {\n }", "public function serch()\n {\n }", "function do_one($row,$base){\n \n requests::set_referer($base);\n $page = 1;\n while ($page<=50){\n \n $url = $base.'p'.$page.'/';\n $list = requests::get($url);\n \n $lis = selector::select($list, \".hy_companylist li\", \"css\");\n // if ($page==2){var_dump($lis);exit;}\n \n \n if (empty($lis)){\n continue;\n }\n foreach($lis as $li){\n \n //$str = strip_tags($li);\n \n $name = selector::select($li, \"a\", \"css\");\n $tel = selector::select($li, \"span.tel\", \"css\");\n $dds = selector::select($li, \"dd\",'css');////dl/dd[1]/text()\n \n \n if (is_array($dds)){\n $address = strip_tags($dds[0]);\n $pro = strip_tags($dds[1]);\n }else{\n $address = '';\n $pro = strip_tags($dds);\n }\n \n echo implode(\"\\t\", $row).\"\\t\";\n echo $name.\"\\t\".$tel.\"\\t\".trim($address).\"\\t\".trim($pro).\"\\n\";\n// return ['name'=>$name,'$tel'=>$tel,'']\n \n }\n sleep(1);\n \n $page++;\n }\n }", "public function hit();", "public function PullTesst()\n {\n $this->assertTrue(true);\n }", "public function fetching($strSearch,$nb,$country = ['CM'],$video = false,$strict = false)\n {\n\n $client = new Client();\n // $client->setClient(new GuzzleClient($config));\n $client->setClient(new GuzzleClient(['cookies' => true]));\n $client->setHeader('User-Agent','Mozilla/5.0 (Windows NT 10.0; Win64; x64)');\n //AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063');\n $client->setHeader('Accept', '*/*');\n $client->setHeader('Accept-Encoding', 'gzip, deflate, br');\n $client->setHeader('Connection:', 'Keep-Alive');\n\n // echo $strSearch .\"<br/>\";\n foreach ($country as $pays) {\n\n if($strict)\n {\n $url = $this->queryToUrl('\"'.$strSearch.'\"', 0, $nb, $pays,$video);\n }\n else\n {\n $url = $this->queryToUrl($strSearch, 0, $nb, $pays,$video);\n }\n // $url = $this->queryToUrl($strSearch, 0, $nb, $country[0],$video);\n\n //echo $strSearch;\n //$url = \"http://www.google.com/search?q=\".$strSearch.\"&hl=en&start=0&sa=N\";\n\n //check if the connection to remote site have succeed\n\n $crawler = null;\n // Go to the symfony.com website\n try {\n\n $crawler = $client->request('GET', $url);\n $this->continue = true;\n } catch (ConnectException $e) {\n //Catch the guzzle connection errors over here.These errors are something\n // like the connection failed or some other network error\n $number = -1;\n if($this->eager)\n {\n $number = count($this->searchResultsDB);\n }\n else\n {\n $number = count($this->searchResults);\n }\n\n if(!($number > 0))\n {\n //throwException($e);\n $client->request('GET', $url);\n }\n\n }\n\n if($this->continue)\n {\n //echo $crawler->html();\n $this->resultHeader[$this->count] = [];\n $this->resultLink[$this->count] = [];\n $this->resultLink_text[$this->count] = [];\n $this->resultBody[$this->count] = [];\n if($video)\n {\n $this->resultHeaderV[$this->countV] = [];\n $this->resultLinkV[$this->countV] = [];\n $this->resultLink_textV[$this->countV] = [];\n $this->resultVideo[$this->countV] = [];\n $this->resultBodyV[$this->countV] = [];\n }\n //on récupère les entêtes des résultats\n $crawler->filter('td div#center_col div.g')->each(function (Crawler $node, $i) {\n\n $header = $node->filter('h3 a');\n \n if ($header->count() > 0) {\n $header = $header->html();\n // echo $header.'<br/>';\n //print(\"<br/>\".$header);\n if (strpos($header, 'mages for') == false) {\n //echo'<br/> '.$this->count.'<br/>';\n //print_r($this->resultHeader);\n array_push($this->resultHeader[$this->count], $header);\n \n $link = $node->filter('div cite')->html();\n // echo 'link '.$link.'<br/>';\n array_push($this->resultLink[$this->count], $link);\n $link = $node->filter('div cite')->text();\n array_push($this->resultLink_text[$this->count], $link);\n\n if (strpos($link, 'books.google') == false) {\n\n array_push($this->resultBody[$this->count], $node->filter('div span.st')->html());\n } else {\n // echo 'link '. $node->filter('div.s')->html().'<br/>';\n array_push($this->resultBody[$this->count], $node->filter('div.s')->html());\n }\n }\n }\n\n });\n if($video)\n {\n $crawler->filter('td div#center_col div.g.videobox')->each(function (Crawler $node, $i) {\n $video = $node->filter('td img')->attr('src');\n array_push($this->resultVideo[$this->countV], $video);\n $header = $node->filter('td h3 a');\n if ($header->count() > 0) {\n $link = $header->attr('href');\n $link = substr($link,strpos($link,'='));\n $link = substr($link,1,strpos($link,'&')-1);\n array_push($this->resultLink_textV[$this->countV], $link);\n\n $header = $header->html();\n //print(\"<br/>\".$header);\n if (strpos($header, 'mages for') == false) {\n array_push($this->resultHeaderV[$this->countV], $header);\n $link = $node->filter('div cite')->html();\n\n array_push($this->resultLinkV[$this->countV], $link);\n\n\n if (strpos($link, 'books.google') == false) {\n array_push($this->resultBodyV[$this->countV], $node->filter('div span.st')->html());\n } else {\n array_push($this->resultBodyV[$this->countV], $node->filter('div.s')->html());\n }\n }\n }\n\n });\n\n }\n $this->count++;\n if($video)\n {\n $this->countV++;\n }\n $min =[5,8,9,10,12,7];\n sleep(rand(0,1)*count($min));\n }\n //print count($searchResults);\n }\n //$url = 'http://freeproxylists.net/fr/?c=&pt=&pr=HTTPS&a%5B%5D=0&a%5B%5D=1&a%5B%5D=2&u=90';\n //$crawler = $client->request('GET', $url);\n // echo $crawler->html();\n\n }", "abstract protected function current();", "function extract()\n {\n }", "function select($itinerary,$tble,$index){\n\t\t$cart=$this->contents();\n\t\t//print_r($this->CI->session->userdata('tour_cart_contents'));exit;\n\t\tif(isset($cart[$itinerary][$tble][$index])){\n\t\t\treturn $cart[$itinerary][$tble][$index];\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "public function search()\n\t{\n\t\t\n\t}", "public function testGetSite()\n {\n }", "function testFindSearchcontentSco() {\n\t}", "function travelL(){\n $swim = $this->_last;\n if($swim->next == null){\n echo __CLASS__,'->',__FUNCTION__ ,':No Object exist!<br>';\n return;\n }\n while($swim){\n echo $swim->data.'&nbsp;';\n $swim = $swim->next;\n }\n }", "function getItem() ;", "function experience_requesting_with_data($data_Sent)\n{\n\n //liste des critères de selection des données.\n $list_parameter = array(\n 'ville'\n // exemple on veut crée un sous tableau comportant les résultats des recherches pour les villes égales au mots clés\n // 'organisme', 'budget', ...\n );\n $res_experience = array();\n $res_experience['experience'] = array();\n\n foreach ($list_parameter as $parameter) {\n $Experience = new Experience();\n $results = $Experience->requesting($data_Sent, $parameter);\n array_push($res_experience['experience'] , ( $Experience->analyse($results, $parameter)));\n\n }\n return $res_experience['experience'];\n}", "function testgetHyperLinks() {\n //Setup \n $pageTest = new INM5001A13_WebTools(\"http://localhost/EquipeRene/Snippets/pagePourTestUnitaireWebTool.html\");\n\n $resultat = $pageTest->getHyperLinks();\n\n\n $this->assertEquals($resultat[\"http://google.ca\"], 'Search GGxxGLE');\n }", "public function scrape(){\n if($this->localCategoryId == 0){\n return;\n }\n \t// ID vozila, kako bi se izbjegli duplikati\n \t$ids = Vehicle::where('category_id', $this->localCategoryId)->pluck('source_id')->toArray();\n\n // Pojedinacni linkovi\n $links = [];\n // Paginacijski linkovi\n $pages = [];\n\n // Start crawling \n $crawler = Goutte::request('GET', $this->urlVehicles);\n\n // Dobavi paginacijske linkove\n $crawler->filter('#search-results .js-hide-on-filter .uk-pagination a.js-pagination-numeric')->eq(0)->each(function ($node) use (&$pages){\n $pages[] = $this->urlDomain . $node->extract(['href'])[0];\n });\n\n // Dobavi pojedinacne linkove za vozila na pocetnoj\n\t $crawler->filter('#search-results .js-hide-on-filter .single-classified h3 a')->each(function ($node) use (&$links, &$ids){\n $link = $node->extract(['href'])[0];\n $id = explode(\"/\", $link)[2];\n\n // Ako ne postoji taj link, dodaj ga\n if(!in_array($id, $ids)){\n $ids[] = $id;\n $links[$id] = $this->urlDomain . $link;\n }\n\t });\n\n // Za svaki paginacijski link, otvoti stranu i povuci pojedinacne linkove\n foreach($pages as $page){\n $paginatedPage = Goutte::request('GET', $page);\n $paginatedPage->filter('#search-results .js-hide-on-filter .single-classified h3 a')->each(function ($node) use (&$links, &$ids){\n $link = $node->extract(['href'])[0];\n $id = explode(\"/\", $link)[2];\n // Ako ne postoji taj link, dodaj ga\n if(!in_array($id, $ids)){\n $ids[] = $id;\n $links[$id] = $this->urlDomain . $link;\n }\n });\n }\n \n // Posjeti sve linkove i izvuci informacije\n foreach($links as $id => $link){\n $this->scrapeSingle($id,$link);\n }\n }", "public function testListSites()\n {\n }", "public function Find()\n {\n //TODO Suche mit den werten machen\n }", "public function Find()\n {\n //TODO Suche mit den werten machen\n }", "public function Find()\n {\n //TODO Suche mit den werten machen\n }", "function sfgov_utilities_deploy_12_dept_go_to_url() {\n try {\n $deptNodes = Utility::getNodes('department');\n foreach($deptNodes as $dept) {\n $currentSite = $dept->field_url->uri;\n $goToSite = $dept->field_go_to_current_url->value;\n echo $dept->getTitle() . \" (\" . $dept->id() . \") \\n\" . \n \"\\tcurrent site url: $currentSite\\n\" .\n \"\\tgo to site: $goToSite\" .\n \"\\n\";\n \n if ($goToSite == true) {\n $dept->set('field_direct_external_url', [\n 'uri' => $currentSite\n ]);\n $dept->save();\n echo \"saved \" . $dept->getTitle() . \" <---\\n\";\n }\n }\n } catch(\\Exception $e) {\n error_log($e->getMessage(), \"\\n\");\n }\n}", "public function findOnline() {}", "public function haz_eff_hea(){\n $this->search_list();\n\t}", "public function current()\n {\n\n $element = parent::current();\n $this->originalElement = $element;\n $mapped_element = array();\n $tldMapping = tc_cleverreach_tldmapping::getInstance();\n\n if ($element->newsid != null) {\n $mapped_element = $this->mapElementsIfNewsId($element);\n } else {\n $mapped_element['active'] = \"0\";\n $mapped_element['email'] = $element->oxuser__oxusername;\n $mapped_element['activated'] = time();\n $mapped_element['salutation'] = $element->oxuser__oxsal;\n $mapped_element['firstname'] = $element->oxuser__oxfname;\n $mapped_element['lastname'] = $element->oxuser__oxlname;\n }\n $mapped_element['registered'] = strtotime($element->oxuser__oxcreate);\n $mapped_element['company'] = $element->oxuser__oxcompany;\n $mapped_element['street'] = $element->oxuser__oxstreet . ' ' . $element->oxuser__oxstreetnr;\n $mapped_element['city'] = $element->oxuser__oxcity;\n $mapped_element['zip'] = $element->oxuser__oxzip;\n\n if ($element->oxuser__oxbirthdate != '0000-00-00') {\n $mapped_element['birthday'] = $element->oxuser__oxbirthdate;\n } else {\n $mapped_element['birthday'] = null;\n }\n\n $mapped_element['shop'] = $element->oxuser__oxshopid;\n\n if (\n $element->oxuser__oxcountryid !== '' &&\n $element->oxuser__oxcountryid !== null &&\n $element->oxuser__oxcountryid !== 'NULL'\n ) {\n $mapped_element['country'] = $element->oxcountry__oxtitle;\n $mapped_element['language'] = $tldMapping->getLanguageByISO2($element->oxcountry__oxisoalpha2);\n }\n\n if ($element->oxcountry__oxtitle == '') {\n // Staat und Sprache\n $mapped_element['country'] = $tldMapping->getCountryByEMail($mapped_element['email']);\n $mapped_element['language'] = $tldMapping->getLanguageByEMail($mapped_element['email']);\n }\n\n $productName =\n trim($element->oxorderarticles__oxtitle . \" \" . $element->oxorderarticles__oxselvariant);\n\n $mapped_element['order_id'] = $element->oxorder__oxordernr;\n $mapped_element['purchase_date'] = $this->createTimestamp($element->oxorder__oxorderdate);\n $mapped_element['source'] = $element->oxshops__oxname;\n $mapped_element['amount'] = $element->oxorderarticles__oxamount;\n $mapped_element['product_id'] = $element->oxorderarticles__oxartnum;\n $mapped_element['product'] = $productName;\n $mapped_element['price'] = $element->oxorderarticles__oxprice;\n\n return $mapped_element;\n }", "public function obtenerViajesplus();", "function select($tble,$index){\n\t\t$cart=$this->contents();\n\t\t//echo '<pre>';print_r($cart);echo '</pre>';exit;\n\t\tif(isset($cart[$tble][$index])){\n\t\t\treturn $cart[$tble][$index];\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "abstract protected function faireDuSport();", "function hb_set_vorpit_entire_front_then_go($vorpit_entire_front_then_go)\r\n\t{\t\r\n\t\t$_SESSION['vorpit_entire_front_then_go'] = $vorpit_entire_front_then_go; \r\n\t}", "function getInfomationOnThisPage($crawler,$db,$batchId) {\n\t\t$title=\"\";\n\t\t$link=\"\";\n\t\t$cid=\"\";\n\t\t$price=\"\";\n\t\t$odo=\"\";\n\n\t\t// Get title\n\t\t$info = $crawler->filter('.result-item')->each(function ($node) {\n\t\t\t$info=array();\n\n\t\t\t/* Title & Link */\n\t\t\t$tmp=$node->filter(\"h2 a\")->each(function($node_1){\n\t\t\t\t$tmp=array();\n\t\t\t $tmp['title'] = trim(preg_replace(\"/<span.*span>/s\",\"\",$node_1->html()));\n\t\t\t $tmp['link'] = \"http://www.carsales.com.au\".$node_1->attr(\"href\");\n\t\t\t $tmp['cid'] = $node_1->attr('recordid');\n\t\t\t return $tmp;\n\t\t\t});\n\t\t\tif (count($tmp)>0){\n\t\t\t\t$info = array_merge($info,$tmp[0]);\n\t\t\t}\n\t\t\t/* Price */\n\t\t\t$tmp=$node->filter(\".additional-information .price a\")->each(function($node_2){\n\t\t\t\t$tmp=array();\n\t\t\t $tmp['price'] = $node_2->attr('data-price');\n\t\t\t return $tmp;\n\t\t\t});\n\t\t\tif (count($tmp)>0){\n\t\t\t\t$info = array_merge($info,$tmp[0]);\n\t\t\t}\n\t\t\t/* Odometer */\n\t\t\t$tmp = $node->filter(\".vehicle-features .item-odometer\")->each(function($node_2){\n\t\t\t\t$tmp=array();\n\t\t\t $tmp['odo'] = preg_replace(array(\"/<i.*i>/\",\"/,/\",\"/ km$/\"),array(\"\",\"\",\"\"),$node_2->html());\n\t\t\t return $tmp;\n\t\t\t});\n\t\t\tif (count($tmp)>0){\n\t\t\t\t$info = array_merge($info,$tmp[0]);\n\t\t\t}\n\n\t\t\treturn $info;\n\n\t\t});\n\n\t\t$sqls=array();\n\t\tforeach ($info AS $i) {\n\t\t\t$title=isset($i['title'])?$db->real_escape_string($i['title']):\"\";\n\t\t\t$link=isset($i['link'])?$db->real_escape_string($i['link']):\"\";\n\t\t\t$cid=isset($i['cid'])?$db->real_escape_string($i['cid']):\"\";\n\t\t\t$price=isset($i['price'])?$db->real_escape_string($i['price']):\"\";\n\t\t\t$odo=isset($i['odo'])?$db->real_escape_string($i['odo']):\"\";\n\n\t\t\t$sqls[]=\"('$cid','$title','$price','$odo','$batchId','$link')\";\n\t\t}\n\t\t$db->query(\"INSERT INTO subaru_outback (record_id,title,price,odometer,batch_id,link) VALUES \".implode(\",\",$sqls));\n\n\t}", "public function retrieve(){\n\t\tswitch ($this->host) {\n\t\t\tcase 'www.subito.it':\n\t\t\t\t$this->retrieveAllSubito();\n\t\t\t\tbreak;\n\t\t\tcase 'www.portaportese.it':\n\t\t\t\t// call the appropriate method when it is written\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function extract()\n {\n }", "public function emitirSom()\n {\n }", "function add_popularite($id, $i){\n $infos = new infos([]);\n $pop_base = $infos->find_pop($id);\n $pop_base += $i;\n $infos->modif_pop($pop_base, $id);\n}", "function search() {}", "function printItemNavbar( $text, $link, $actual, $index ) {\n\n // seta a classe\n $cl = $index == $actual ? 'active' : '';\n\n // imprime o item\n echo \"<a href='\".site_url( $link ).\"' class='nav-link $cl'>$text</a>\"; \n}", "public function boleta()\n\t{\n\t\t//\n\t}", "public function eachSense(): Generator;", "public function placeAndSettleBet();", "function trebi_getUrlLoc($idloc)\n{\n$trebi_url_locs = array (1 => \"/meteo/Abano+terme\",2 => \"/meteo/Abbadia+cerreto\",3 => \"/meteo/Abbadia+lariana\",4 => \"/meteo/Abbadia+San+Salvatore\",5 => \"/meteo/Abbasanta\",6 => \"/meteo/Abbateggio\",7 => \"/meteo/Abbiategrasso\",8 => \"/meteo/Abetone\",8399 => \"/meteo/Abriola\",10 => \"/meteo/Acate\",11 => \"/meteo/Accadia\",12 => \"/meteo/Acceglio\",8369 => \"/meteo/Accettura\",14 => \"/meteo/Acciano\",15 => \"/meteo/Accumoli\",16 => \"/meteo/Acerenza\",17 => \"/meteo/Acerno\",18 => \"/meteo/Acerra\",19 => \"/meteo/Aci+bonaccorsi\",20 => \"/meteo/Aci+castello\",21 => \"/meteo/Aci+Catena\",22 => \"/meteo/Aci+Sant'Antonio\",23 => \"/meteo/Acireale\",24 => \"/meteo/Acquacanina\",25 => \"/meteo/Acquafondata\",26 => \"/meteo/Acquaformosa\",27 => \"/meteo/Acquafredda\",8750 => \"/meteo/Acquafredda\",28 => \"/meteo/Acqualagna\",29 => \"/meteo/Acquanegra+cremonese\",30 => \"/meteo/Acquanegra+sul+chiese\",31 => \"/meteo/Acquapendente\",32 => \"/meteo/Acquappesa\",33 => \"/meteo/Acquarica+del+capo\",34 => \"/meteo/Acquaro\",35 => \"/meteo/Acquasanta+terme\",36 => \"/meteo/Acquasparta\",37 => \"/meteo/Acquaviva+collecroce\",38 => \"/meteo/Acquaviva+d'Isernia\",39 => \"/meteo/Acquaviva+delle+fonti\",40 => \"/meteo/Acquaviva+picena\",41 => \"/meteo/Acquaviva+platani\",42 => \"/meteo/Acquedolci\",43 => \"/meteo/Acqui+terme\",44 => \"/meteo/Acri\",45 => \"/meteo/Acuto\",46 => \"/meteo/Adelfia\",47 => \"/meteo/Adrano\",48 => \"/meteo/Adrara+San+Martino\",49 => \"/meteo/Adrara+San+Rocco\",50 => \"/meteo/Adria\",51 => \"/meteo/Adro\",52 => \"/meteo/Affi\",53 => \"/meteo/Affile\",54 => \"/meteo/Afragola\",55 => \"/meteo/Africo\",56 => \"/meteo/Agazzano\",57 => \"/meteo/Agerola\",58 => \"/meteo/Aggius\",59 => \"/meteo/Agira\",60 => \"/meteo/Agliana\",61 => \"/meteo/Agliano\",62 => \"/meteo/Aglie'\",63 => \"/meteo/Aglientu\",64 => \"/meteo/Agna\",65 => \"/meteo/Agnadello\",66 => \"/meteo/Agnana+calabra\",8598 => \"/meteo/Agnano\",67 => \"/meteo/Agnone\",68 => \"/meteo/Agnosine\",69 => \"/meteo/Agordo\",70 => \"/meteo/Agosta\",71 => \"/meteo/Agra\",72 => \"/meteo/Agrate+brianza\",73 => \"/meteo/Agrate+conturbia\",74 => \"/meteo/Agrigento\",75 => \"/meteo/Agropoli\",76 => \"/meteo/Agugliano\",77 => \"/meteo/Agugliaro\",78 => \"/meteo/Aicurzio\",79 => \"/meteo/Aidomaggiore\",80 => \"/meteo/Aidone\",81 => \"/meteo/Aielli\",82 => \"/meteo/Aiello+calabro\",83 => \"/meteo/Aiello+del+Friuli\",84 => \"/meteo/Aiello+del+Sabato\",85 => \"/meteo/Aieta\",86 => \"/meteo/Ailano\",87 => \"/meteo/Ailoche\",88 => \"/meteo/Airasca\",89 => \"/meteo/Airola\",90 => \"/meteo/Airole\",91 => \"/meteo/Airuno\",92 => \"/meteo/Aisone\",93 => \"/meteo/Ala\",94 => \"/meteo/Ala+di+Stura\",95 => \"/meteo/Ala'+dei+Sardi\",96 => \"/meteo/Alagna\",97 => \"/meteo/Alagna+Valsesia\",98 => \"/meteo/Alanno\",99 => \"/meteo/Alano+di+Piave\",100 => \"/meteo/Alassio\",101 => \"/meteo/Alatri\",102 => \"/meteo/Alba\",103 => \"/meteo/Alba+adriatica\",104 => \"/meteo/Albagiara\",105 => \"/meteo/Albairate\",106 => \"/meteo/Albanella\",8386 => \"/meteo/Albano+di+lucania\",108 => \"/meteo/Albano+laziale\",109 => \"/meteo/Albano+Sant'Alessandro\",110 => \"/meteo/Albano+vercellese\",111 => \"/meteo/Albaredo+arnaboldi\",112 => \"/meteo/Albaredo+d'Adige\",113 => \"/meteo/Albaredo+per+San+Marco\",114 => \"/meteo/Albareto\",115 => \"/meteo/Albaretto+della+torre\",116 => \"/meteo/Albavilla\",117 => \"/meteo/Albenga\",118 => \"/meteo/Albera+ligure\",119 => \"/meteo/Alberobello\",120 => \"/meteo/Alberona\",121 => \"/meteo/Albese+con+Cassano\",122 => \"/meteo/Albettone\",123 => \"/meteo/Albi\",124 => \"/meteo/Albiano\",125 => \"/meteo/Albiano+d'ivrea\",126 => \"/meteo/Albiate\",127 => \"/meteo/Albidona\",128 => \"/meteo/Albignasego\",129 => \"/meteo/Albinea\",130 => \"/meteo/Albino\",131 => \"/meteo/Albiolo\",132 => \"/meteo/Albisola+marina\",133 => \"/meteo/Albisola+superiore\",134 => \"/meteo/Albizzate\",135 => \"/meteo/Albonese\",136 => \"/meteo/Albosaggia\",137 => \"/meteo/Albugnano\",138 => \"/meteo/Albuzzano\",139 => \"/meteo/Alcamo\",140 => \"/meteo/Alcara+li+Fusi\",141 => \"/meteo/Aldeno\",142 => \"/meteo/Aldino\",143 => \"/meteo/Ales\",144 => \"/meteo/Alessandria\",145 => \"/meteo/Alessandria+del+Carretto\",146 => \"/meteo/Alessandria+della+Rocca\",147 => \"/meteo/Alessano\",148 => \"/meteo/Alezio\",149 => \"/meteo/Alfano\",150 => \"/meteo/Alfedena\",151 => \"/meteo/Alfianello\",152 => \"/meteo/Alfiano+natta\",153 => \"/meteo/Alfonsine\",154 => \"/meteo/Alghero\",8532 => \"/meteo/Alghero+Fertilia\",155 => \"/meteo/Algua\",156 => \"/meteo/Ali'\",157 => \"/meteo/Ali'+terme\",158 => \"/meteo/Alia\",159 => \"/meteo/Aliano\",160 => \"/meteo/Alice+bel+colle\",161 => \"/meteo/Alice+castello\",162 => \"/meteo/Alice+superiore\",163 => \"/meteo/Alife\",164 => \"/meteo/Alimena\",165 => \"/meteo/Aliminusa\",166 => \"/meteo/Allai\",167 => \"/meteo/Alleghe\",168 => \"/meteo/Allein\",169 => \"/meteo/Allerona\",170 => \"/meteo/Alliste\",171 => \"/meteo/Allumiere\",172 => \"/meteo/Alluvioni+cambio'\",173 => \"/meteo/Alme'\",174 => \"/meteo/Almenno+San+Bartolomeo\",175 => \"/meteo/Almenno+San+Salvatore\",176 => \"/meteo/Almese\",177 => \"/meteo/Alonte\",8259 => \"/meteo/Alpe+Cermis\",8557 => \"/meteo/Alpe+Devero\",8162 => \"/meteo/Alpe+di+Mera\",8565 => \"/meteo/Alpe+di+Siusi\",8755 => \"/meteo/Alpe+Giumello\",8264 => \"/meteo/Alpe+Lusia\",8559 => \"/meteo/Alpe+Nevegal\",8239 => \"/meteo/Alpe+Tre+Potenze\",8558 => \"/meteo/Alpe+Veglia\",8482 => \"/meteo/Alpet\",178 => \"/meteo/Alpette\",179 => \"/meteo/Alpignano\",180 => \"/meteo/Alseno\",181 => \"/meteo/Alserio\",182 => \"/meteo/Altamura\",8474 => \"/meteo/Altare\",184 => \"/meteo/Altavilla+irpina\",185 => \"/meteo/Altavilla+milicia\",186 => \"/meteo/Altavilla+monferrato\",187 => \"/meteo/Altavilla+silentina\",188 => \"/meteo/Altavilla+vicentina\",189 => \"/meteo/Altidona\",190 => \"/meteo/Altilia\",191 => \"/meteo/Altino\",192 => \"/meteo/Altissimo\",193 => \"/meteo/Altivole\",194 => \"/meteo/Alto\",195 => \"/meteo/Altofonte\",196 => \"/meteo/Altomonte\",197 => \"/meteo/Altopascio\",8536 => \"/meteo/Altopiano+dei+Fiorentini\",8662 => \"/meteo/Altopiano+della+Sila\",8640 => \"/meteo/Altopiano+di+Renon\",198 => \"/meteo/Alviano\",199 => \"/meteo/Alvignano\",200 => \"/meteo/Alvito\",201 => \"/meteo/Alzano+lombardo\",202 => \"/meteo/Alzano+scrivia\",203 => \"/meteo/Alzate+brianza\",204 => \"/meteo/Amalfi\",205 => \"/meteo/Amandola\",206 => \"/meteo/Amantea\",207 => \"/meteo/Amaro\",208 => \"/meteo/Amaroni\",209 => \"/meteo/Amaseno\",210 => \"/meteo/Amato\",211 => \"/meteo/Amatrice\",212 => \"/meteo/Ambivere\",213 => \"/meteo/Amblar\",214 => \"/meteo/Ameglia\",215 => \"/meteo/Amelia\",216 => \"/meteo/Amendolara\",217 => \"/meteo/Ameno\",218 => \"/meteo/Amorosi\",219 => \"/meteo/Ampezzo\",220 => \"/meteo/Anacapri\",221 => \"/meteo/Anagni\",8463 => \"/meteo/Anagni+casello\",222 => \"/meteo/Ancarano\",223 => \"/meteo/Ancona\",8267 => \"/meteo/Ancona+Falconara\",224 => \"/meteo/Andali\",225 => \"/meteo/Andalo\",226 => \"/meteo/Andalo+valtellino\",227 => \"/meteo/Andezeno\",228 => \"/meteo/Andora\",229 => \"/meteo/Andorno+micca\",230 => \"/meteo/Andrano\",231 => \"/meteo/Andrate\",232 => \"/meteo/Andreis\",233 => \"/meteo/Andretta\",234 => \"/meteo/Andria\",235 => \"/meteo/Andriano\",236 => \"/meteo/Anela\",237 => \"/meteo/Anfo\",238 => \"/meteo/Angera\",239 => \"/meteo/Anghiari\",240 => \"/meteo/Angiari\",241 => \"/meteo/Angolo+terme\",242 => \"/meteo/Angri\",243 => \"/meteo/Angrogna\",244 => \"/meteo/Anguillara+sabazia\",245 => \"/meteo/Anguillara+veneta\",246 => \"/meteo/Annicco\",247 => \"/meteo/Annone+di+brianza\",248 => \"/meteo/Annone+veneto\",249 => \"/meteo/Anoia\",8302 => \"/meteo/Antagnod\",250 => \"/meteo/Antegnate\",251 => \"/meteo/Anterivo\",8211 => \"/meteo/Anterselva+di+Sopra\",252 => \"/meteo/Antey+saint+andre'\",253 => \"/meteo/Anticoli+Corrado\",254 => \"/meteo/Antignano\",255 => \"/meteo/Antillo\",256 => \"/meteo/Antonimina\",257 => \"/meteo/Antrodoco\",258 => \"/meteo/Antrona+Schieranco\",259 => \"/meteo/Anversa+degli+Abruzzi\",260 => \"/meteo/Anzano+del+Parco\",261 => \"/meteo/Anzano+di+Puglia\",8400 => \"/meteo/Anzi\",263 => \"/meteo/Anzio\",264 => \"/meteo/Anzola+d'Ossola\",265 => \"/meteo/Anzola+dell'Emilia\",266 => \"/meteo/Aosta\",8548 => \"/meteo/Aosta+Saint+Christophe\",267 => \"/meteo/Apecchio\",268 => \"/meteo/Apice\",269 => \"/meteo/Apiro\",270 => \"/meteo/Apollosa\",271 => \"/meteo/Appiano+Gentile\",272 => \"/meteo/Appiano+sulla+strada+del+vino\",273 => \"/meteo/Appignano\",274 => \"/meteo/Appignano+del+Tronto\",275 => \"/meteo/Aprica\",276 => \"/meteo/Apricale\",277 => \"/meteo/Apricena\",278 => \"/meteo/Aprigliano\",279 => \"/meteo/Aprilia\",280 => \"/meteo/Aquara\",281 => \"/meteo/Aquila+di+Arroscia\",282 => \"/meteo/Aquileia\",283 => \"/meteo/Aquilonia\",284 => \"/meteo/Aquino\",8228 => \"/meteo/Arabba\",285 => \"/meteo/Aradeo\",286 => \"/meteo/Aragona\",287 => \"/meteo/Aramengo\",288 => \"/meteo/Arba\",8487 => \"/meteo/Arbatax\",289 => \"/meteo/Arborea\",290 => \"/meteo/Arborio\",291 => \"/meteo/Arbus\",292 => \"/meteo/Arcade\",293 => \"/meteo/Arce\",294 => \"/meteo/Arcene\",295 => \"/meteo/Arcevia\",296 => \"/meteo/Archi\",297 => \"/meteo/Arcidosso\",298 => \"/meteo/Arcinazzo+romano\",299 => \"/meteo/Arcisate\",300 => \"/meteo/Arco\",301 => \"/meteo/Arcola\",302 => \"/meteo/Arcole\",303 => \"/meteo/Arconate\",304 => \"/meteo/Arcore\",305 => \"/meteo/Arcugnano\",306 => \"/meteo/Ardara\",307 => \"/meteo/Ardauli\",308 => \"/meteo/Ardea\",309 => \"/meteo/Ardenno\",310 => \"/meteo/Ardesio\",311 => \"/meteo/Ardore\",8675 => \"/meteo/Ardore+Marina\",8321 => \"/meteo/Aremogna\",312 => \"/meteo/Arena\",313 => \"/meteo/Arena+po\",314 => \"/meteo/Arenzano\",315 => \"/meteo/Arese\",316 => \"/meteo/Arezzo\",317 => \"/meteo/Argegno\",318 => \"/meteo/Argelato\",319 => \"/meteo/Argenta\",320 => \"/meteo/Argentera\",321 => \"/meteo/Arguello\",322 => \"/meteo/Argusto\",323 => \"/meteo/Ari\",324 => \"/meteo/Ariano+irpino\",325 => \"/meteo/Ariano+nel+polesine\",326 => \"/meteo/Ariccia\",327 => \"/meteo/Arielli\",328 => \"/meteo/Arienzo\",329 => \"/meteo/Arignano\",330 => \"/meteo/Aritzo\",331 => \"/meteo/Arizzano\",332 => \"/meteo/Arlena+di+castro\",333 => \"/meteo/Arluno\",8677 => \"/meteo/Arma+di+Taggia\",334 => \"/meteo/Armeno\",8405 => \"/meteo/Armento\",336 => \"/meteo/Armo\",337 => \"/meteo/Armungia\",338 => \"/meteo/Arnad\",339 => \"/meteo/Arnara\",340 => \"/meteo/Arnasco\",341 => \"/meteo/Arnesano\",342 => \"/meteo/Arola\",343 => \"/meteo/Arona\",344 => \"/meteo/Arosio\",345 => \"/meteo/Arpaia\",346 => \"/meteo/Arpaise\",347 => \"/meteo/Arpino\",348 => \"/meteo/Arqua'+Petrarca\",349 => \"/meteo/Arqua'+polesine\",350 => \"/meteo/Arquata+del+tronto\",351 => \"/meteo/Arquata+scrivia\",352 => \"/meteo/Arre\",353 => \"/meteo/Arrone\",354 => \"/meteo/Arsago+Seprio\",355 => \"/meteo/Arsie'\",356 => \"/meteo/Arsiero\",357 => \"/meteo/Arsita\",358 => \"/meteo/Arsoli\",359 => \"/meteo/Arta+terme\",360 => \"/meteo/Artegna\",361 => \"/meteo/Artena\",8338 => \"/meteo/Artesina\",362 => \"/meteo/Artogne\",363 => \"/meteo/Arvier\",364 => \"/meteo/Arzachena\",365 => \"/meteo/Arzago+d'Adda\",366 => \"/meteo/Arzana\",367 => \"/meteo/Arzano\",368 => \"/meteo/Arzene\",369 => \"/meteo/Arzergrande\",370 => \"/meteo/Arzignano\",371 => \"/meteo/Ascea\",8513 => \"/meteo/Asciano\",8198 => \"/meteo/Asciano+Pisano\",373 => \"/meteo/Ascoli+piceno\",374 => \"/meteo/Ascoli+satriano\",375 => \"/meteo/Ascrea\",376 => \"/meteo/Asiago\",377 => \"/meteo/Asigliano+Veneto\",378 => \"/meteo/Asigliano+vercellese\",379 => \"/meteo/Asola\",380 => \"/meteo/Asolo\",8438 => \"/meteo/Aspio+terme\",381 => \"/meteo/Assago\",382 => \"/meteo/Assemini\",8488 => \"/meteo/Assergi\",8448 => \"/meteo/Assergi+casello\",383 => \"/meteo/Assisi\",384 => \"/meteo/Asso\",385 => \"/meteo/Assolo\",386 => \"/meteo/Assoro\",387 => \"/meteo/Asti\",388 => \"/meteo/Asuni\",389 => \"/meteo/Ateleta\",8383 => \"/meteo/Atella\",391 => \"/meteo/Atena+lucana\",392 => \"/meteo/Atessa\",393 => \"/meteo/Atina\",394 => \"/meteo/Atrani\",395 => \"/meteo/Atri\",396 => \"/meteo/Atripalda\",397 => \"/meteo/Attigliano\",398 => \"/meteo/Attimis\",399 => \"/meteo/Atzara\",400 => \"/meteo/Auditore\",401 => \"/meteo/Augusta\",402 => \"/meteo/Auletta\",403 => \"/meteo/Aulla\",404 => \"/meteo/Aurano\",405 => \"/meteo/Aurigo\",406 => \"/meteo/Auronzo+di+cadore\",407 => \"/meteo/Ausonia\",408 => \"/meteo/Austis\",409 => \"/meteo/Avegno\",410 => \"/meteo/Avelengo\",411 => \"/meteo/Avella\",412 => \"/meteo/Avellino\",413 => \"/meteo/Averara\",414 => \"/meteo/Aversa\",415 => \"/meteo/Avetrana\",416 => \"/meteo/Avezzano\",417 => \"/meteo/Aviano\",418 => \"/meteo/Aviatico\",419 => \"/meteo/Avigliana\",420 => \"/meteo/Avigliano\",421 => \"/meteo/Avigliano+umbro\",422 => \"/meteo/Avio\",423 => \"/meteo/Avise\",424 => \"/meteo/Avola\",425 => \"/meteo/Avolasca\",426 => \"/meteo/Ayas\",427 => \"/meteo/Aymavilles\",428 => \"/meteo/Azeglio\",429 => \"/meteo/Azzanello\",430 => \"/meteo/Azzano+d'Asti\",431 => \"/meteo/Azzano+decimo\",432 => \"/meteo/Azzano+mella\",433 => \"/meteo/Azzano+San+Paolo\",434 => \"/meteo/Azzate\",435 => \"/meteo/Azzio\",436 => \"/meteo/Azzone\",437 => \"/meteo/Baceno\",438 => \"/meteo/Bacoli\",439 => \"/meteo/Badalucco\",440 => \"/meteo/Badesi\",441 => \"/meteo/Badia\",442 => \"/meteo/Badia+calavena\",443 => \"/meteo/Badia+pavese\",444 => \"/meteo/Badia+polesine\",445 => \"/meteo/Badia+tedalda\",446 => \"/meteo/Badolato\",447 => \"/meteo/Bagaladi\",448 => \"/meteo/Bagheria\",449 => \"/meteo/Bagnacavallo\",450 => \"/meteo/Bagnara+calabra\",451 => \"/meteo/Bagnara+di+romagna\",452 => \"/meteo/Bagnaria\",453 => \"/meteo/Bagnaria+arsa\",454 => \"/meteo/Bagnasco\",455 => \"/meteo/Bagnatica\",456 => \"/meteo/Bagni+di+Lucca\",8699 => \"/meteo/Bagni+di+Vinadio\",457 => \"/meteo/Bagno+a+Ripoli\",458 => \"/meteo/Bagno+di+Romagna\",459 => \"/meteo/Bagnoli+del+Trigno\",460 => \"/meteo/Bagnoli+di+sopra\",461 => \"/meteo/Bagnoli+irpino\",462 => \"/meteo/Bagnolo+cremasco\",463 => \"/meteo/Bagnolo+del+salento\",464 => \"/meteo/Bagnolo+di+po\",465 => \"/meteo/Bagnolo+in+piano\",466 => \"/meteo/Bagnolo+Mella\",467 => \"/meteo/Bagnolo+Piemonte\",468 => \"/meteo/Bagnolo+San+Vito\",469 => \"/meteo/Bagnone\",470 => \"/meteo/Bagnoregio\",471 => \"/meteo/Bagolino\",8123 => \"/meteo/Baia+Domizia\",472 => \"/meteo/Baia+e+Latina\",473 => \"/meteo/Baiano\",474 => \"/meteo/Baiardo\",475 => \"/meteo/Bairo\",476 => \"/meteo/Baiso\",477 => \"/meteo/Balangero\",478 => \"/meteo/Baldichieri+d'Asti\",479 => \"/meteo/Baldissero+canavese\",480 => \"/meteo/Baldissero+d'Alba\",481 => \"/meteo/Baldissero+torinese\",482 => \"/meteo/Balestrate\",483 => \"/meteo/Balestrino\",484 => \"/meteo/Ballabio\",485 => \"/meteo/Ballao\",486 => \"/meteo/Balme\",487 => \"/meteo/Balmuccia\",488 => \"/meteo/Balocco\",489 => \"/meteo/Balsorano\",490 => \"/meteo/Balvano\",491 => \"/meteo/Balzola\",492 => \"/meteo/Banari\",493 => \"/meteo/Banchette\",494 => \"/meteo/Bannio+anzino\",8368 => \"/meteo/Banzi\",496 => \"/meteo/Baone\",497 => \"/meteo/Baradili\",8415 => \"/meteo/Baragiano\",499 => \"/meteo/Baranello\",500 => \"/meteo/Barano+d'Ischia\",501 => \"/meteo/Barasso\",502 => \"/meteo/Baratili+San+Pietro\",503 => \"/meteo/Barbania\",504 => \"/meteo/Barbara\",505 => \"/meteo/Barbarano+romano\",506 => \"/meteo/Barbarano+vicentino\",507 => \"/meteo/Barbaresco\",508 => \"/meteo/Barbariga\",509 => \"/meteo/Barbata\",510 => \"/meteo/Barberino+di+mugello\",511 => \"/meteo/Barberino+val+d'elsa\",512 => \"/meteo/Barbianello\",513 => \"/meteo/Barbiano\",514 => \"/meteo/Barbona\",515 => \"/meteo/Barcellona+pozzo+di+Gotto\",516 => \"/meteo/Barchi\",517 => \"/meteo/Barcis\",518 => \"/meteo/Bard\",519 => \"/meteo/Bardello\",520 => \"/meteo/Bardi\",521 => \"/meteo/Bardineto\",522 => \"/meteo/Bardolino\",523 => \"/meteo/Bardonecchia\",524 => \"/meteo/Bareggio\",525 => \"/meteo/Barengo\",526 => \"/meteo/Baressa\",527 => \"/meteo/Barete\",528 => \"/meteo/Barga\",529 => \"/meteo/Bargagli\",530 => \"/meteo/Barge\",531 => \"/meteo/Barghe\",532 => \"/meteo/Bari\",8274 => \"/meteo/Bari+Palese\",533 => \"/meteo/Bari+sardo\",534 => \"/meteo/Bariano\",535 => \"/meteo/Baricella\",8402 => \"/meteo/Barile\",537 => \"/meteo/Barisciano\",538 => \"/meteo/Barlassina\",539 => \"/meteo/Barletta\",540 => \"/meteo/Barni\",541 => \"/meteo/Barolo\",542 => \"/meteo/Barone+canavese\",543 => \"/meteo/Baronissi\",544 => \"/meteo/Barrafranca\",545 => \"/meteo/Barrali\",546 => \"/meteo/Barrea\",8745 => \"/meteo/Barricata\",547 => \"/meteo/Barumini\",548 => \"/meteo/Barzago\",549 => \"/meteo/Barzana\",550 => \"/meteo/Barzano'\",551 => \"/meteo/Barzio\",552 => \"/meteo/Basaluzzo\",553 => \"/meteo/Bascape'\",554 => \"/meteo/Baschi\",555 => \"/meteo/Basciano\",556 => \"/meteo/Baselga+di+Pine'\",557 => \"/meteo/Baselice\",558 => \"/meteo/Basiano\",559 => \"/meteo/Basico'\",560 => \"/meteo/Basiglio\",561 => \"/meteo/Basiliano\",562 => \"/meteo/Bassano+bresciano\",563 => \"/meteo/Bassano+del+grappa\",564 => \"/meteo/Bassano+in+teverina\",565 => \"/meteo/Bassano+romano\",566 => \"/meteo/Bassiano\",567 => \"/meteo/Bassignana\",568 => \"/meteo/Bastia\",569 => \"/meteo/Bastia+mondovi'\",570 => \"/meteo/Bastida+de'+Dossi\",571 => \"/meteo/Bastida+pancarana\",572 => \"/meteo/Bastiglia\",573 => \"/meteo/Battaglia+terme\",574 => \"/meteo/Battifollo\",575 => \"/meteo/Battipaglia\",576 => \"/meteo/Battuda\",577 => \"/meteo/Baucina\",578 => \"/meteo/Bauladu\",579 => \"/meteo/Baunei\",580 => \"/meteo/Baveno\",581 => \"/meteo/Bazzano\",582 => \"/meteo/Bedero+valcuvia\",583 => \"/meteo/Bedizzole\",584 => \"/meteo/Bedollo\",585 => \"/meteo/Bedonia\",586 => \"/meteo/Bedulita\",587 => \"/meteo/Bee\",588 => \"/meteo/Beinasco\",589 => \"/meteo/Beinette\",590 => \"/meteo/Belcastro\",591 => \"/meteo/Belfiore\",592 => \"/meteo/Belforte+all'Isauro\",593 => \"/meteo/Belforte+del+chienti\",594 => \"/meteo/Belforte+monferrato\",595 => \"/meteo/Belgioioso\",596 => \"/meteo/Belgirate\",597 => \"/meteo/Bella\",598 => \"/meteo/Bellagio\",8263 => \"/meteo/Bellamonte\",599 => \"/meteo/Bellano\",600 => \"/meteo/Bellante\",601 => \"/meteo/Bellaria+Igea+marina\",602 => \"/meteo/Bellegra\",603 => \"/meteo/Bellino\",604 => \"/meteo/Bellinzago+lombardo\",605 => \"/meteo/Bellinzago+novarese\",606 => \"/meteo/Bellizzi\",607 => \"/meteo/Bellona\",608 => \"/meteo/Bellosguardo\",609 => \"/meteo/Belluno\",610 => \"/meteo/Bellusco\",611 => \"/meteo/Belmonte+calabro\",612 => \"/meteo/Belmonte+castello\",613 => \"/meteo/Belmonte+del+sannio\",614 => \"/meteo/Belmonte+in+sabina\",615 => \"/meteo/Belmonte+mezzagno\",616 => \"/meteo/Belmonte+piceno\",617 => \"/meteo/Belpasso\",8573 => \"/meteo/Belpiano+Schoeneben\",618 => \"/meteo/Belsito\",8265 => \"/meteo/Belvedere\",619 => \"/meteo/Belvedere+di+Spinello\",620 => \"/meteo/Belvedere+langhe\",621 => \"/meteo/Belvedere+marittimo\",622 => \"/meteo/Belvedere+ostrense\",623 => \"/meteo/Belveglio\",624 => \"/meteo/Belvi\",625 => \"/meteo/Bema\",626 => \"/meteo/Bene+lario\",627 => \"/meteo/Bene+vagienna\",628 => \"/meteo/Benestare\",629 => \"/meteo/Benetutti\",630 => \"/meteo/Benevello\",631 => \"/meteo/Benevento\",632 => \"/meteo/Benna\",633 => \"/meteo/Bentivoglio\",634 => \"/meteo/Berbenno\",635 => \"/meteo/Berbenno+di+valtellina\",636 => \"/meteo/Berceto\",637 => \"/meteo/Berchidda\",638 => \"/meteo/Beregazzo+con+Figliaro\",639 => \"/meteo/Bereguardo\",640 => \"/meteo/Bergamasco\",641 => \"/meteo/Bergamo\",8519 => \"/meteo/Bergamo+città+alta\",8497 => \"/meteo/Bergamo+Orio+al+Serio\",642 => \"/meteo/Bergantino\",643 => \"/meteo/Bergeggi\",644 => \"/meteo/Bergolo\",645 => \"/meteo/Berlingo\",646 => \"/meteo/Bernalda\",647 => \"/meteo/Bernareggio\",648 => \"/meteo/Bernate+ticino\",649 => \"/meteo/Bernezzo\",650 => \"/meteo/Berra\",651 => \"/meteo/Bersone\",652 => \"/meteo/Bertinoro\",653 => \"/meteo/Bertiolo\",654 => \"/meteo/Bertonico\",655 => \"/meteo/Berzano+di+San+Pietro\",656 => \"/meteo/Berzano+di+Tortona\",657 => \"/meteo/Berzo+Demo\",658 => \"/meteo/Berzo+inferiore\",659 => \"/meteo/Berzo+San+Fermo\",660 => \"/meteo/Besana+in+brianza\",661 => \"/meteo/Besano\",662 => \"/meteo/Besate\",663 => \"/meteo/Besenello\",664 => \"/meteo/Besenzone\",665 => \"/meteo/Besnate\",666 => \"/meteo/Besozzo\",667 => \"/meteo/Bessude\",668 => \"/meteo/Bettola\",669 => \"/meteo/Bettona\",670 => \"/meteo/Beura+Cardezza\",671 => \"/meteo/Bevagna\",672 => \"/meteo/Beverino\",673 => \"/meteo/Bevilacqua\",674 => \"/meteo/Bezzecca\",675 => \"/meteo/Biancavilla\",676 => \"/meteo/Bianchi\",677 => \"/meteo/Bianco\",678 => \"/meteo/Biandrate\",679 => \"/meteo/Biandronno\",680 => \"/meteo/Bianzano\",681 => \"/meteo/Bianze'\",682 => \"/meteo/Bianzone\",683 => \"/meteo/Biassono\",684 => \"/meteo/Bibbiano\",685 => \"/meteo/Bibbiena\",686 => \"/meteo/Bibbona\",687 => \"/meteo/Bibiana\",8230 => \"/meteo/Bibione\",688 => \"/meteo/Biccari\",689 => \"/meteo/Bicinicco\",690 => \"/meteo/Bidoni'\",691 => \"/meteo/Biella\",8163 => \"/meteo/Bielmonte\",692 => \"/meteo/Bienno\",693 => \"/meteo/Bieno\",694 => \"/meteo/Bientina\",695 => \"/meteo/Bigarello\",696 => \"/meteo/Binago\",697 => \"/meteo/Binasco\",698 => \"/meteo/Binetto\",699 => \"/meteo/Bioglio\",700 => \"/meteo/Bionaz\",701 => \"/meteo/Bione\",702 => \"/meteo/Birori\",703 => \"/meteo/Bisaccia\",704 => \"/meteo/Bisacquino\",705 => \"/meteo/Bisceglie\",706 => \"/meteo/Bisegna\",707 => \"/meteo/Bisenti\",708 => \"/meteo/Bisignano\",709 => \"/meteo/Bistagno\",710 => \"/meteo/Bisuschio\",711 => \"/meteo/Bitetto\",712 => \"/meteo/Bitonto\",713 => \"/meteo/Bitritto\",714 => \"/meteo/Bitti\",715 => \"/meteo/Bivona\",716 => \"/meteo/Bivongi\",717 => \"/meteo/Bizzarone\",718 => \"/meteo/Bleggio+inferiore\",719 => \"/meteo/Bleggio+superiore\",720 => \"/meteo/Blello\",721 => \"/meteo/Blera\",722 => \"/meteo/Blessagno\",723 => \"/meteo/Blevio\",724 => \"/meteo/Blufi\",725 => \"/meteo/Boara+Pisani\",726 => \"/meteo/Bobbio\",727 => \"/meteo/Bobbio+Pellice\",728 => \"/meteo/Boca\",8501 => \"/meteo/Bocca+di+Magra\",729 => \"/meteo/Bocchigliero\",730 => \"/meteo/Boccioleto\",731 => \"/meteo/Bocenago\",732 => \"/meteo/Bodio+Lomnago\",733 => \"/meteo/Boffalora+d'Adda\",734 => \"/meteo/Boffalora+sopra+Ticino\",735 => \"/meteo/Bogliasco\",736 => \"/meteo/Bognanco\",8287 => \"/meteo/Bognanco+fonti\",737 => \"/meteo/Bogogno\",738 => \"/meteo/Boissano\",739 => \"/meteo/Bojano\",740 => \"/meteo/Bolano\",741 => \"/meteo/Bolbeno\",742 => \"/meteo/Bolgare\",743 => \"/meteo/Bollate\",744 => \"/meteo/Bollengo\",745 => \"/meteo/Bologna\",8476 => \"/meteo/Bologna+Borgo+Panigale\",746 => \"/meteo/Bolognano\",747 => \"/meteo/Bolognetta\",748 => \"/meteo/Bolognola\",749 => \"/meteo/Bolotana\",750 => \"/meteo/Bolsena\",751 => \"/meteo/Boltiere\",8505 => \"/meteo/Bolzaneto\",752 => \"/meteo/Bolzano\",753 => \"/meteo/Bolzano+novarese\",754 => \"/meteo/Bolzano+vicentino\",755 => \"/meteo/Bomarzo\",756 => \"/meteo/Bomba\",757 => \"/meteo/Bompensiere\",758 => \"/meteo/Bompietro\",759 => \"/meteo/Bomporto\",760 => \"/meteo/Bonarcado\",761 => \"/meteo/Bonassola\",762 => \"/meteo/Bonate+sopra\",763 => \"/meteo/Bonate+sotto\",764 => \"/meteo/Bonavigo\",765 => \"/meteo/Bondeno\",766 => \"/meteo/Bondo\",767 => \"/meteo/Bondone\",768 => \"/meteo/Bonea\",769 => \"/meteo/Bonefro\",770 => \"/meteo/Bonemerse\",771 => \"/meteo/Bonifati\",772 => \"/meteo/Bonito\",773 => \"/meteo/Bonnanaro\",774 => \"/meteo/Bono\",775 => \"/meteo/Bonorva\",776 => \"/meteo/Bonvicino\",777 => \"/meteo/Borbona\",778 => \"/meteo/Borca+di+cadore\",779 => \"/meteo/Bordano\",780 => \"/meteo/Bordighera\",781 => \"/meteo/Bordolano\",782 => \"/meteo/Bore\",783 => \"/meteo/Boretto\",784 => \"/meteo/Borgarello\",785 => \"/meteo/Borgaro+torinese\",786 => \"/meteo/Borgetto\",787 => \"/meteo/Borghetto+d'arroscia\",788 => \"/meteo/Borghetto+di+borbera\",789 => \"/meteo/Borghetto+di+vara\",790 => \"/meteo/Borghetto+lodigiano\",791 => \"/meteo/Borghetto+Santo+Spirito\",792 => \"/meteo/Borghi\",793 => \"/meteo/Borgia\",794 => \"/meteo/Borgiallo\",795 => \"/meteo/Borgio+Verezzi\",796 => \"/meteo/Borgo+a+Mozzano\",797 => \"/meteo/Borgo+d'Ale\",798 => \"/meteo/Borgo+di+Terzo\",8159 => \"/meteo/Borgo+d`Ale\",799 => \"/meteo/Borgo+Pace\",800 => \"/meteo/Borgo+Priolo\",801 => \"/meteo/Borgo+San+Dalmazzo\",802 => \"/meteo/Borgo+San+Giacomo\",803 => \"/meteo/Borgo+San+Giovanni\",804 => \"/meteo/Borgo+San+Lorenzo\",805 => \"/meteo/Borgo+San+Martino\",806 => \"/meteo/Borgo+San+Siro\",807 => \"/meteo/Borgo+Ticino\",808 => \"/meteo/Borgo+Tossignano\",809 => \"/meteo/Borgo+Val+di+Taro\",810 => \"/meteo/Borgo+Valsugana\",811 => \"/meteo/Borgo+Velino\",812 => \"/meteo/Borgo+Vercelli\",813 => \"/meteo/Borgoforte\",814 => \"/meteo/Borgofranco+d'Ivrea\",815 => \"/meteo/Borgofranco+sul+Po\",816 => \"/meteo/Borgolavezzaro\",817 => \"/meteo/Borgomale\",818 => \"/meteo/Borgomanero\",819 => \"/meteo/Borgomaro\",820 => \"/meteo/Borgomasino\",821 => \"/meteo/Borgone+susa\",822 => \"/meteo/Borgonovo+val+tidone\",823 => \"/meteo/Borgoratto+alessandrino\",824 => \"/meteo/Borgoratto+mormorolo\",825 => \"/meteo/Borgoricco\",826 => \"/meteo/Borgorose\",827 => \"/meteo/Borgosatollo\",828 => \"/meteo/Borgosesia\",829 => \"/meteo/Bormida\",830 => \"/meteo/Bormio\",8334 => \"/meteo/Bormio+2000\",8335 => \"/meteo/Bormio+3000\",831 => \"/meteo/Bornasco\",832 => \"/meteo/Borno\",833 => \"/meteo/Boroneddu\",834 => \"/meteo/Borore\",835 => \"/meteo/Borrello\",836 => \"/meteo/Borriana\",837 => \"/meteo/Borso+del+Grappa\",838 => \"/meteo/Bortigali\",839 => \"/meteo/Bortigiadas\",840 => \"/meteo/Borutta\",841 => \"/meteo/Borzonasca\",842 => \"/meteo/Bosa\",843 => \"/meteo/Bosaro\",844 => \"/meteo/Boschi+Sant'Anna\",845 => \"/meteo/Bosco+Chiesanuova\",846 => \"/meteo/Bosco+Marengo\",847 => \"/meteo/Bosconero\",848 => \"/meteo/Boscoreale\",849 => \"/meteo/Boscotrecase\",850 => \"/meteo/Bosentino\",851 => \"/meteo/Bosia\",852 => \"/meteo/Bosio\",853 => \"/meteo/Bosisio+Parini\",854 => \"/meteo/Bosnasco\",855 => \"/meteo/Bossico\",856 => \"/meteo/Bossolasco\",857 => \"/meteo/Botricello\",858 => \"/meteo/Botrugno\",859 => \"/meteo/Bottanuco\",860 => \"/meteo/Botticino\",861 => \"/meteo/Bottidda\",8655 => \"/meteo/Bourg+San+Bernard\",862 => \"/meteo/Bova\",863 => \"/meteo/Bova+marina\",864 => \"/meteo/Bovalino\",865 => \"/meteo/Bovegno\",866 => \"/meteo/Boves\",867 => \"/meteo/Bovezzo\",868 => \"/meteo/Boville+Ernica\",869 => \"/meteo/Bovino\",870 => \"/meteo/Bovisio+Masciago\",871 => \"/meteo/Bovolenta\",872 => \"/meteo/Bovolone\",873 => \"/meteo/Bozzole\",874 => \"/meteo/Bozzolo\",875 => \"/meteo/Bra\",876 => \"/meteo/Bracca\",877 => \"/meteo/Bracciano\",878 => \"/meteo/Bracigliano\",879 => \"/meteo/Braies\",880 => \"/meteo/Brallo+di+Pregola\",881 => \"/meteo/Brancaleone\",882 => \"/meteo/Brandico\",883 => \"/meteo/Brandizzo\",884 => \"/meteo/Branzi\",885 => \"/meteo/Braone\",8740 => \"/meteo/Bratto\",886 => \"/meteo/Brebbia\",887 => \"/meteo/Breda+di+Piave\",888 => \"/meteo/Bregano\",889 => \"/meteo/Breganze\",890 => \"/meteo/Bregnano\",891 => \"/meteo/Breguzzo\",892 => \"/meteo/Breia\",8724 => \"/meteo/Breithorn\",893 => \"/meteo/Brembate\",894 => \"/meteo/Brembate+di+sopra\",895 => \"/meteo/Brembilla\",896 => \"/meteo/Brembio\",897 => \"/meteo/Breme\",898 => \"/meteo/Brendola\",899 => \"/meteo/Brenna\",900 => \"/meteo/Brennero\",901 => \"/meteo/Breno\",902 => \"/meteo/Brenta\",903 => \"/meteo/Brentino+Belluno\",904 => \"/meteo/Brentonico\",905 => \"/meteo/Brenzone\",906 => \"/meteo/Brescello\",907 => \"/meteo/Brescia\",8547 => \"/meteo/Brescia+Montichiari\",908 => \"/meteo/Bresimo\",909 => \"/meteo/Bressana+Bottarone\",910 => \"/meteo/Bressanone\",911 => \"/meteo/Bressanvido\",912 => \"/meteo/Bresso\",8226 => \"/meteo/Breuil-Cervinia\",913 => \"/meteo/Brez\",914 => \"/meteo/Brezzo+di+Bedero\",915 => \"/meteo/Briaglia\",916 => \"/meteo/Briatico\",917 => \"/meteo/Bricherasio\",918 => \"/meteo/Brienno\",919 => \"/meteo/Brienza\",920 => \"/meteo/Briga+alta\",921 => \"/meteo/Briga+novarese\",923 => \"/meteo/Brignano+Frascata\",922 => \"/meteo/Brignano+Gera+d'Adda\",924 => \"/meteo/Brindisi\",8358 => \"/meteo/Brindisi+montagna\",8549 => \"/meteo/Brindisi+Papola+Casale\",926 => \"/meteo/Brinzio\",927 => \"/meteo/Briona\",928 => \"/meteo/Brione\",929 => \"/meteo/Brione\",930 => \"/meteo/Briosco\",931 => \"/meteo/Brisighella\",932 => \"/meteo/Brissago+valtravaglia\",933 => \"/meteo/Brissogne\",934 => \"/meteo/Brittoli\",935 => \"/meteo/Brivio\",936 => \"/meteo/Broccostella\",937 => \"/meteo/Brogliano\",938 => \"/meteo/Brognaturo\",939 => \"/meteo/Brolo\",940 => \"/meteo/Brondello\",941 => \"/meteo/Broni\",942 => \"/meteo/Bronte\",943 => \"/meteo/Bronzolo\",944 => \"/meteo/Brossasco\",945 => \"/meteo/Brosso\",946 => \"/meteo/Brovello+Carpugnino\",947 => \"/meteo/Brozolo\",948 => \"/meteo/Brugherio\",949 => \"/meteo/Brugine\",950 => \"/meteo/Brugnato\",951 => \"/meteo/Brugnera\",952 => \"/meteo/Bruino\",953 => \"/meteo/Brumano\",954 => \"/meteo/Brunate\",955 => \"/meteo/Brunello\",956 => \"/meteo/Brunico\",957 => \"/meteo/Bruno\",958 => \"/meteo/Brusaporto\",959 => \"/meteo/Brusasco\",960 => \"/meteo/Brusciano\",961 => \"/meteo/Brusimpiano\",962 => \"/meteo/Brusnengo\",963 => \"/meteo/Brusson\",8645 => \"/meteo/Brusson+2000+Estoul\",964 => \"/meteo/Bruzolo\",965 => \"/meteo/Bruzzano+Zeffirio\",966 => \"/meteo/Bubbiano\",967 => \"/meteo/Bubbio\",968 => \"/meteo/Buccheri\",969 => \"/meteo/Bucchianico\",970 => \"/meteo/Bucciano\",971 => \"/meteo/Buccinasco\",972 => \"/meteo/Buccino\",973 => \"/meteo/Bucine\",974 => \"/meteo/Budduso'\",975 => \"/meteo/Budoia\",976 => \"/meteo/Budoni\",977 => \"/meteo/Budrio\",978 => \"/meteo/Buggerru\",979 => \"/meteo/Buggiano\",980 => \"/meteo/Buglio+in+Monte\",981 => \"/meteo/Bugnara\",982 => \"/meteo/Buguggiate\",983 => \"/meteo/Buia\",984 => \"/meteo/Bulciago\",985 => \"/meteo/Bulgarograsso\",986 => \"/meteo/Bultei\",987 => \"/meteo/Bulzi\",988 => \"/meteo/Buonabitacolo\",989 => \"/meteo/Buonalbergo\",990 => \"/meteo/Buonconvento\",991 => \"/meteo/Buonvicino\",992 => \"/meteo/Burago+di+Molgora\",993 => \"/meteo/Burcei\",994 => \"/meteo/Burgio\",995 => \"/meteo/Burgos\",996 => \"/meteo/Buriasco\",997 => \"/meteo/Burolo\",998 => \"/meteo/Buronzo\",8483 => \"/meteo/Burrino\",999 => \"/meteo/Busachi\",1000 => \"/meteo/Busalla\",1001 => \"/meteo/Busana\",1002 => \"/meteo/Busano\",1003 => \"/meteo/Busca\",1004 => \"/meteo/Buscate\",1005 => \"/meteo/Buscemi\",1006 => \"/meteo/Buseto+Palizzolo\",1007 => \"/meteo/Busnago\",1008 => \"/meteo/Bussero\",1009 => \"/meteo/Busseto\",1010 => \"/meteo/Bussi+sul+Tirino\",1011 => \"/meteo/Busso\",1012 => \"/meteo/Bussolengo\",1013 => \"/meteo/Bussoleno\",1014 => \"/meteo/Busto+Arsizio\",1015 => \"/meteo/Busto+Garolfo\",1016 => \"/meteo/Butera\",1017 => \"/meteo/Buti\",1018 => \"/meteo/Buttapietra\",1019 => \"/meteo/Buttigliera+alta\",1020 => \"/meteo/Buttigliera+d'Asti\",1021 => \"/meteo/Buttrio\",1022 => \"/meteo/Ca'+d'Andrea\",1023 => \"/meteo/Cabella+ligure\",1024 => \"/meteo/Cabiate\",1025 => \"/meteo/Cabras\",1026 => \"/meteo/Caccamo\",1027 => \"/meteo/Caccuri\",1028 => \"/meteo/Cadegliano+Viconago\",1029 => \"/meteo/Cadelbosco+di+sopra\",1030 => \"/meteo/Cadeo\",1031 => \"/meteo/Caderzone\",8566 => \"/meteo/Cadipietra\",1032 => \"/meteo/Cadoneghe\",1033 => \"/meteo/Cadorago\",1034 => \"/meteo/Cadrezzate\",1035 => \"/meteo/Caerano+di+San+Marco\",1036 => \"/meteo/Cafasse\",1037 => \"/meteo/Caggiano\",1038 => \"/meteo/Cagli\",1039 => \"/meteo/Cagliari\",8500 => \"/meteo/Cagliari+Elmas\",1040 => \"/meteo/Caglio\",1041 => \"/meteo/Cagnano+Amiterno\",1042 => \"/meteo/Cagnano+Varano\",1043 => \"/meteo/Cagno\",1044 => \"/meteo/Cagno'\",1045 => \"/meteo/Caianello\",1046 => \"/meteo/Caiazzo\",1047 => \"/meteo/Caines\",1048 => \"/meteo/Caino\",1049 => \"/meteo/Caiolo\",1050 => \"/meteo/Cairano\",1051 => \"/meteo/Cairate\",1052 => \"/meteo/Cairo+Montenotte\",1053 => \"/meteo/Caivano\",8168 => \"/meteo/Cala+Gonone\",1054 => \"/meteo/Calabritto\",1055 => \"/meteo/Calalzo+di+cadore\",1056 => \"/meteo/Calamandrana\",1057 => \"/meteo/Calamonaci\",1058 => \"/meteo/Calangianus\",1059 => \"/meteo/Calanna\",1060 => \"/meteo/Calasca+Castiglione\",1061 => \"/meteo/Calascibetta\",1062 => \"/meteo/Calascio\",1063 => \"/meteo/Calasetta\",1064 => \"/meteo/Calatabiano\",1065 => \"/meteo/Calatafimi\",1066 => \"/meteo/Calavino\",1067 => \"/meteo/Calcata\",1068 => \"/meteo/Calceranica+al+lago\",1069 => \"/meteo/Calci\",8424 => \"/meteo/Calciano\",1071 => \"/meteo/Calcinaia\",1072 => \"/meteo/Calcinate\",1073 => \"/meteo/Calcinato\",1074 => \"/meteo/Calcio\",1075 => \"/meteo/Calco\",1076 => \"/meteo/Caldaro+sulla+strada+del+vino\",1077 => \"/meteo/Caldarola\",1078 => \"/meteo/Calderara+di+Reno\",1079 => \"/meteo/Caldes\",1080 => \"/meteo/Caldiero\",1081 => \"/meteo/Caldogno\",1082 => \"/meteo/Caldonazzo\",1083 => \"/meteo/Calendasco\",8614 => \"/meteo/Calenella\",1084 => \"/meteo/Calenzano\",1085 => \"/meteo/Calestano\",1086 => \"/meteo/Calice+al+Cornoviglio\",1087 => \"/meteo/Calice+ligure\",8692 => \"/meteo/California+di+Lesmo\",1088 => \"/meteo/Calimera\",1089 => \"/meteo/Calitri\",1090 => \"/meteo/Calizzano\",1091 => \"/meteo/Callabiana\",1092 => \"/meteo/Calliano\",1093 => \"/meteo/Calliano\",1094 => \"/meteo/Calolziocorte\",1095 => \"/meteo/Calopezzati\",1096 => \"/meteo/Calosso\",1097 => \"/meteo/Caloveto\",1098 => \"/meteo/Caltabellotta\",1099 => \"/meteo/Caltagirone\",1100 => \"/meteo/Caltanissetta\",1101 => \"/meteo/Caltavuturo\",1102 => \"/meteo/Caltignaga\",1103 => \"/meteo/Calto\",1104 => \"/meteo/Caltrano\",1105 => \"/meteo/Calusco+d'Adda\",1106 => \"/meteo/Caluso\",1107 => \"/meteo/Calvagese+della+Riviera\",1108 => \"/meteo/Calvanico\",1109 => \"/meteo/Calvatone\",8406 => \"/meteo/Calvello\",1111 => \"/meteo/Calvene\",1112 => \"/meteo/Calvenzano\",8373 => \"/meteo/Calvera\",1114 => \"/meteo/Calvi\",1115 => \"/meteo/Calvi+dell'Umbria\",1116 => \"/meteo/Calvi+risorta\",1117 => \"/meteo/Calvignano\",1118 => \"/meteo/Calvignasco\",1119 => \"/meteo/Calvisano\",1120 => \"/meteo/Calvizzano\",1121 => \"/meteo/Camagna+monferrato\",1122 => \"/meteo/Camaiore\",1123 => \"/meteo/Camairago\",1124 => \"/meteo/Camandona\",1125 => \"/meteo/Camastra\",1126 => \"/meteo/Cambiago\",1127 => \"/meteo/Cambiano\",1128 => \"/meteo/Cambiasca\",1129 => \"/meteo/Camburzano\",1130 => \"/meteo/Camerana\",1131 => \"/meteo/Camerano\",1132 => \"/meteo/Camerano+Casasco\",1133 => \"/meteo/Camerata+Cornello\",1134 => \"/meteo/Camerata+Nuova\",1135 => \"/meteo/Camerata+picena\",1136 => \"/meteo/Cameri\",1137 => \"/meteo/Camerino\",1138 => \"/meteo/Camerota\",1139 => \"/meteo/Camigliano\",8119 => \"/meteo/Camigliatello+silano\",1140 => \"/meteo/Caminata\",1141 => \"/meteo/Camini\",1142 => \"/meteo/Camino\",1143 => \"/meteo/Camino+al+Tagliamento\",1144 => \"/meteo/Camisano\",1145 => \"/meteo/Camisano+vicentino\",1146 => \"/meteo/Cammarata\",1147 => \"/meteo/Camo\",1148 => \"/meteo/Camogli\",1149 => \"/meteo/Campagna\",1150 => \"/meteo/Campagna+Lupia\",1151 => \"/meteo/Campagnano+di+Roma\",1152 => \"/meteo/Campagnatico\",1153 => \"/meteo/Campagnola+cremasca\",1154 => \"/meteo/Campagnola+emilia\",1155 => \"/meteo/Campana\",1156 => \"/meteo/Camparada\",1157 => \"/meteo/Campegine\",1158 => \"/meteo/Campello+sul+Clitunno\",1159 => \"/meteo/Campertogno\",1160 => \"/meteo/Campi+Bisenzio\",1161 => \"/meteo/Campi+salentina\",1162 => \"/meteo/Campiglia+cervo\",1163 => \"/meteo/Campiglia+dei+Berici\",1164 => \"/meteo/Campiglia+marittima\",1165 => \"/meteo/Campiglione+Fenile\",8127 => \"/meteo/Campigna\",1166 => \"/meteo/Campione+d'Italia\",1167 => \"/meteo/Campitello+di+Fassa\",8155 => \"/meteo/Campitello+matese\",1168 => \"/meteo/Campli\",1169 => \"/meteo/Campo+calabro\",8754 => \"/meteo/Campo+Carlo+Magno\",8134 => \"/meteo/Campo+Catino\",8610 => \"/meteo/Campo+Cecina\",1170 => \"/meteo/Campo+di+Giove\",1171 => \"/meteo/Campo+di+Trens\",8345 => \"/meteo/Campo+Felice\",8101 => \"/meteo/Campo+imperatore\",1172 => \"/meteo/Campo+ligure\",1173 => \"/meteo/Campo+nell'Elba\",1174 => \"/meteo/Campo+San+Martino\",8135 => \"/meteo/Campo+Staffi\",8644 => \"/meteo/Campo+Tenese\",1175 => \"/meteo/Campo+Tures\",1176 => \"/meteo/Campobasso\",1177 => \"/meteo/Campobello+di+Licata\",1178 => \"/meteo/Campobello+di+Mazara\",1179 => \"/meteo/Campochiaro\",1180 => \"/meteo/Campodarsego\",1181 => \"/meteo/Campodenno\",8357 => \"/meteo/Campodimele\",1183 => \"/meteo/Campodipietra\",1184 => \"/meteo/Campodolcino\",1185 => \"/meteo/Campodoro\",1186 => \"/meteo/Campofelice+di+Fitalia\",1187 => \"/meteo/Campofelice+di+Roccella\",1188 => \"/meteo/Campofilone\",1189 => \"/meteo/Campofiorito\",1190 => \"/meteo/Campoformido\",1191 => \"/meteo/Campofranco\",1192 => \"/meteo/Campogalliano\",1193 => \"/meteo/Campolattaro\",1194 => \"/meteo/Campoli+Appennino\",1195 => \"/meteo/Campoli+del+Monte+Taburno\",1196 => \"/meteo/Campolieto\",1197 => \"/meteo/Campolongo+al+Torre\",1198 => \"/meteo/Campolongo+Maggiore\",1199 => \"/meteo/Campolongo+sul+Brenta\",8391 => \"/meteo/Campomaggiore\",1201 => \"/meteo/Campomarino\",1202 => \"/meteo/Campomorone\",1203 => \"/meteo/Camponogara\",1204 => \"/meteo/Campora\",1205 => \"/meteo/Camporeale\",1206 => \"/meteo/Camporgiano\",1207 => \"/meteo/Camporosso\",1208 => \"/meteo/Camporotondo+di+Fiastrone\",1209 => \"/meteo/Camporotondo+etneo\",1210 => \"/meteo/Camposampiero\",1211 => \"/meteo/Camposano\",1212 => \"/meteo/Camposanto\",1213 => \"/meteo/Campospinoso\",1214 => \"/meteo/Campotosto\",1215 => \"/meteo/Camugnano\",1216 => \"/meteo/Canal+San+Bovo\",1217 => \"/meteo/Canale\",1218 => \"/meteo/Canale+d'Agordo\",1219 => \"/meteo/Canale+Monterano\",1220 => \"/meteo/Canaro\",1221 => \"/meteo/Canazei\",8407 => \"/meteo/Cancellara\",1223 => \"/meteo/Cancello+ed+Arnone\",1224 => \"/meteo/Canda\",1225 => \"/meteo/Candela\",8468 => \"/meteo/Candela+casello\",1226 => \"/meteo/Candelo\",1227 => \"/meteo/Candia+canavese\",1228 => \"/meteo/Candia+lomellina\",1229 => \"/meteo/Candiana\",1230 => \"/meteo/Candida\",1231 => \"/meteo/Candidoni\",1232 => \"/meteo/Candiolo\",1233 => \"/meteo/Canegrate\",1234 => \"/meteo/Canelli\",1235 => \"/meteo/Canepina\",1236 => \"/meteo/Caneva\",8562 => \"/meteo/Canevare+di+Fanano\",1237 => \"/meteo/Canevino\",1238 => \"/meteo/Canicatti'\",1239 => \"/meteo/Canicattini+Bagni\",1240 => \"/meteo/Canino\",1241 => \"/meteo/Canischio\",1242 => \"/meteo/Canistro\",1243 => \"/meteo/Canna\",1244 => \"/meteo/Cannalonga\",1245 => \"/meteo/Cannara\",1246 => \"/meteo/Cannero+riviera\",1247 => \"/meteo/Canneto+pavese\",1248 => \"/meteo/Canneto+sull'Oglio\",8588 => \"/meteo/Cannigione\",1249 => \"/meteo/Cannobio\",1250 => \"/meteo/Cannole\",1251 => \"/meteo/Canolo\",1252 => \"/meteo/Canonica+d'Adda\",1253 => \"/meteo/Canosa+di+Puglia\",1254 => \"/meteo/Canosa+sannita\",1255 => \"/meteo/Canosio\",1256 => \"/meteo/Canossa\",1257 => \"/meteo/Cansano\",1258 => \"/meteo/Cantagallo\",1259 => \"/meteo/Cantalice\",1260 => \"/meteo/Cantalupa\",1261 => \"/meteo/Cantalupo+in+Sabina\",1262 => \"/meteo/Cantalupo+ligure\",1263 => \"/meteo/Cantalupo+nel+Sannio\",1264 => \"/meteo/Cantarana\",1265 => \"/meteo/Cantello\",1266 => \"/meteo/Canterano\",1267 => \"/meteo/Cantiano\",1268 => \"/meteo/Cantoira\",1269 => \"/meteo/Cantu'\",1270 => \"/meteo/Canzano\",1271 => \"/meteo/Canzo\",1272 => \"/meteo/Caorle\",1273 => \"/meteo/Caorso\",1274 => \"/meteo/Capaccio\",1275 => \"/meteo/Capaci\",1276 => \"/meteo/Capalbio\",8242 => \"/meteo/Capanna+Margherita\",8297 => \"/meteo/Capanne+di+Sillano\",1277 => \"/meteo/Capannoli\",1278 => \"/meteo/Capannori\",1279 => \"/meteo/Capena\",1280 => \"/meteo/Capergnanica\",1281 => \"/meteo/Capestrano\",1282 => \"/meteo/Capiago+Intimiano\",1283 => \"/meteo/Capistrano\",1284 => \"/meteo/Capistrello\",1285 => \"/meteo/Capitignano\",1286 => \"/meteo/Capizzi\",1287 => \"/meteo/Capizzone\",8609 => \"/meteo/Capo+Bellavista\",8113 => \"/meteo/Capo+Colonna\",1288 => \"/meteo/Capo+d'Orlando\",1289 => \"/meteo/Capo+di+Ponte\",8676 => \"/meteo/Capo+Mele\",8607 => \"/meteo/Capo+Palinuro\",8112 => \"/meteo/Capo+Rizzuto\",1290 => \"/meteo/Capodimonte\",1291 => \"/meteo/Capodrise\",1292 => \"/meteo/Capoliveri\",1293 => \"/meteo/Capolona\",1294 => \"/meteo/Caponago\",1295 => \"/meteo/Caporciano\",1296 => \"/meteo/Caposele\",1297 => \"/meteo/Capoterra\",1298 => \"/meteo/Capovalle\",1299 => \"/meteo/Cappadocia\",1300 => \"/meteo/Cappella+Cantone\",1301 => \"/meteo/Cappella+de'+Picenardi\",1302 => \"/meteo/Cappella+Maggiore\",1303 => \"/meteo/Cappelle+sul+Tavo\",1304 => \"/meteo/Capracotta\",1305 => \"/meteo/Capraia+e+Limite\",1306 => \"/meteo/Capraia+isola\",1307 => \"/meteo/Capralba\",1308 => \"/meteo/Capranica\",1309 => \"/meteo/Capranica+Prenestina\",1310 => \"/meteo/Caprarica+di+Lecce\",1311 => \"/meteo/Caprarola\",1312 => \"/meteo/Caprauna\",1313 => \"/meteo/Caprese+Michelangelo\",1314 => \"/meteo/Caprezzo\",1315 => \"/meteo/Capri\",1316 => \"/meteo/Capri+Leone\",1317 => \"/meteo/Capriana\",1318 => \"/meteo/Capriano+del+Colle\",1319 => \"/meteo/Capriata+d'Orba\",1320 => \"/meteo/Capriate+San+Gervasio\",1321 => \"/meteo/Capriati+a+Volturno\",1322 => \"/meteo/Caprie\",1323 => \"/meteo/Capriglia+irpina\",1324 => \"/meteo/Capriglio\",1325 => \"/meteo/Caprile\",1326 => \"/meteo/Caprino+bergamasco\",1327 => \"/meteo/Caprino+veronese\",1328 => \"/meteo/Capriolo\",1329 => \"/meteo/Capriva+del+Friuli\",1330 => \"/meteo/Capua\",1331 => \"/meteo/Capurso\",1332 => \"/meteo/Caraffa+del+Bianco\",1333 => \"/meteo/Caraffa+di+Catanzaro\",1334 => \"/meteo/Caraglio\",1335 => \"/meteo/Caramagna+Piemonte\",1336 => \"/meteo/Caramanico+terme\",1337 => \"/meteo/Carano\",1338 => \"/meteo/Carapelle\",1339 => \"/meteo/Carapelle+Calvisio\",1340 => \"/meteo/Carasco\",1341 => \"/meteo/Carassai\",1342 => \"/meteo/Carate+brianza\",1343 => \"/meteo/Carate+Urio\",1344 => \"/meteo/Caravaggio\",1345 => \"/meteo/Caravate\",1346 => \"/meteo/Caravino\",1347 => \"/meteo/Caravonica\",1348 => \"/meteo/Carbognano\",1349 => \"/meteo/Carbonara+al+Ticino\",1350 => \"/meteo/Carbonara+di+Nola\",1351 => \"/meteo/Carbonara+di+Po\",1352 => \"/meteo/Carbonara+Scrivia\",1353 => \"/meteo/Carbonate\",8374 => \"/meteo/Carbone\",1355 => \"/meteo/Carbonera\",1356 => \"/meteo/Carbonia\",1357 => \"/meteo/Carcare\",1358 => \"/meteo/Carceri\",1359 => \"/meteo/Carcoforo\",1360 => \"/meteo/Cardano+al+Campo\",1361 => \"/meteo/Carde'\",1362 => \"/meteo/Cardedu\",1363 => \"/meteo/Cardeto\",1364 => \"/meteo/Cardinale\",1365 => \"/meteo/Cardito\",1366 => \"/meteo/Careggine\",1367 => \"/meteo/Carema\",1368 => \"/meteo/Carenno\",1369 => \"/meteo/Carentino\",1370 => \"/meteo/Careri\",1371 => \"/meteo/Caresana\",1372 => \"/meteo/Caresanablot\",8625 => \"/meteo/Carezza+al+lago\",1373 => \"/meteo/Carezzano\",1374 => \"/meteo/Carfizzi\",1375 => \"/meteo/Cargeghe\",1376 => \"/meteo/Cariati\",1377 => \"/meteo/Carife\",1378 => \"/meteo/Carignano\",1379 => \"/meteo/Carimate\",1380 => \"/meteo/Carinaro\",1381 => \"/meteo/Carini\",1382 => \"/meteo/Carinola\",1383 => \"/meteo/Carisio\",1384 => \"/meteo/Carisolo\",1385 => \"/meteo/Carlantino\",1386 => \"/meteo/Carlazzo\",1387 => \"/meteo/Carlentini\",1388 => \"/meteo/Carlino\",1389 => \"/meteo/Carloforte\",1390 => \"/meteo/Carlopoli\",1391 => \"/meteo/Carmagnola\",1392 => \"/meteo/Carmiano\",1393 => \"/meteo/Carmignano\",1394 => \"/meteo/Carmignano+di+Brenta\",1395 => \"/meteo/Carnago\",1396 => \"/meteo/Carnate\",1397 => \"/meteo/Carobbio+degli+Angeli\",1398 => \"/meteo/Carolei\",1399 => \"/meteo/Carona\",8541 => \"/meteo/Carona+Carisole\",1400 => \"/meteo/Caronia\",1401 => \"/meteo/Caronno+Pertusella\",1402 => \"/meteo/Caronno+varesino\",8253 => \"/meteo/Carosello+3000\",1403 => \"/meteo/Carosino\",1404 => \"/meteo/Carovigno\",1405 => \"/meteo/Carovilli\",1406 => \"/meteo/Carpaneto+piacentino\",1407 => \"/meteo/Carpanzano\",1408 => \"/meteo/Carpasio\",1409 => \"/meteo/Carpegna\",1410 => \"/meteo/Carpenedolo\",1411 => \"/meteo/Carpeneto\",1412 => \"/meteo/Carpi\",1413 => \"/meteo/Carpiano\",1414 => \"/meteo/Carpignano+salentino\",1415 => \"/meteo/Carpignano+Sesia\",1416 => \"/meteo/Carpineti\",1417 => \"/meteo/Carpineto+della+Nora\",1418 => \"/meteo/Carpineto+romano\",1419 => \"/meteo/Carpineto+Sinello\",1420 => \"/meteo/Carpino\",1421 => \"/meteo/Carpinone\",1422 => \"/meteo/Carrara\",1423 => \"/meteo/Carre'\",1424 => \"/meteo/Carrega+ligure\",1425 => \"/meteo/Carro\",1426 => \"/meteo/Carrodano\",1427 => \"/meteo/Carrosio\",1428 => \"/meteo/Carru'\",1429 => \"/meteo/Carsoli\",1430 => \"/meteo/Cartigliano\",1431 => \"/meteo/Cartignano\",1432 => \"/meteo/Cartoceto\",1433 => \"/meteo/Cartosio\",1434 => \"/meteo/Cartura\",1435 => \"/meteo/Carugate\",1436 => \"/meteo/Carugo\",1437 => \"/meteo/Carunchio\",1438 => \"/meteo/Carvico\",1439 => \"/meteo/Carzano\",1440 => \"/meteo/Casabona\",1441 => \"/meteo/Casacalenda\",1442 => \"/meteo/Casacanditella\",1443 => \"/meteo/Casagiove\",1444 => \"/meteo/Casal+Cermelli\",1445 => \"/meteo/Casal+di+Principe\",1446 => \"/meteo/Casal+Velino\",1447 => \"/meteo/Casalanguida\",1448 => \"/meteo/Casalattico\",8648 => \"/meteo/Casalavera\",1449 => \"/meteo/Casalbeltrame\",1450 => \"/meteo/Casalbordino\",1451 => \"/meteo/Casalbore\",1452 => \"/meteo/Casalborgone\",1453 => \"/meteo/Casalbuono\",1454 => \"/meteo/Casalbuttano+ed+Uniti\",1455 => \"/meteo/Casalciprano\",1456 => \"/meteo/Casalduni\",1457 => \"/meteo/Casale+Corte+Cerro\",1458 => \"/meteo/Casale+cremasco+Vidolasco\",1459 => \"/meteo/Casale+di+Scodosia\",1460 => \"/meteo/Casale+Litta\",1461 => \"/meteo/Casale+marittimo\",1462 => \"/meteo/Casale+monferrato\",1463 => \"/meteo/Casale+sul+Sile\",1464 => \"/meteo/Casalecchio+di+Reno\",1465 => \"/meteo/Casaleggio+Boiro\",1466 => \"/meteo/Casaleggio+Novara\",1467 => \"/meteo/Casaleone\",1468 => \"/meteo/Casaletto+Ceredano\",1469 => \"/meteo/Casaletto+di+sopra\",1470 => \"/meteo/Casaletto+lodigiano\",1471 => \"/meteo/Casaletto+Spartano\",1472 => \"/meteo/Casaletto+Vaprio\",1473 => \"/meteo/Casalfiumanese\",1474 => \"/meteo/Casalgrande\",1475 => \"/meteo/Casalgrasso\",1476 => \"/meteo/Casalincontrada\",1477 => \"/meteo/Casalino\",1478 => \"/meteo/Casalmaggiore\",1479 => \"/meteo/Casalmaiocco\",1480 => \"/meteo/Casalmorano\",1481 => \"/meteo/Casalmoro\",1482 => \"/meteo/Casalnoceto\",1483 => \"/meteo/Casalnuovo+di+Napoli\",1484 => \"/meteo/Casalnuovo+Monterotaro\",1485 => \"/meteo/Casaloldo\",1486 => \"/meteo/Casalpusterlengo\",1487 => \"/meteo/Casalromano\",1488 => \"/meteo/Casalserugo\",1489 => \"/meteo/Casaluce\",1490 => \"/meteo/Casalvecchio+di+Puglia\",1491 => \"/meteo/Casalvecchio+siculo\",1492 => \"/meteo/Casalvieri\",1493 => \"/meteo/Casalvolone\",1494 => \"/meteo/Casalzuigno\",1495 => \"/meteo/Casamarciano\",1496 => \"/meteo/Casamassima\",1497 => \"/meteo/Casamicciola+terme\",1498 => \"/meteo/Casandrino\",1499 => \"/meteo/Casanova+Elvo\",1500 => \"/meteo/Casanova+Lerrone\",1501 => \"/meteo/Casanova+Lonati\",1502 => \"/meteo/Casape\",1503 => \"/meteo/Casapesenna\",1504 => \"/meteo/Casapinta\",1505 => \"/meteo/Casaprota\",1506 => \"/meteo/Casapulla\",1507 => \"/meteo/Casarano\",1508 => \"/meteo/Casargo\",1509 => \"/meteo/Casarile\",1510 => \"/meteo/Casarsa+della+Delizia\",1511 => \"/meteo/Casarza+ligure\",1512 => \"/meteo/Casasco\",1513 => \"/meteo/Casasco+d'Intelvi\",1514 => \"/meteo/Casatenovo\",1515 => \"/meteo/Casatisma\",1516 => \"/meteo/Casavatore\",1517 => \"/meteo/Casazza\",8160 => \"/meteo/Cascate+del+Toce\",1518 => \"/meteo/Cascia\",1519 => \"/meteo/Casciago\",1520 => \"/meteo/Casciana+terme\",1521 => \"/meteo/Cascina\",1522 => \"/meteo/Cascinette+d'Ivrea\",1523 => \"/meteo/Casei+Gerola\",1524 => \"/meteo/Caselette\",1525 => \"/meteo/Casella\",1526 => \"/meteo/Caselle+in+Pittari\",1527 => \"/meteo/Caselle+Landi\",1528 => \"/meteo/Caselle+Lurani\",1529 => \"/meteo/Caselle+torinese\",1530 => \"/meteo/Caserta\",1531 => \"/meteo/Casier\",1532 => \"/meteo/Casignana\",1533 => \"/meteo/Casina\",1534 => \"/meteo/Casirate+d'Adda\",1535 => \"/meteo/Caslino+d'Erba\",1536 => \"/meteo/Casnate+con+Bernate\",1537 => \"/meteo/Casnigo\",1538 => \"/meteo/Casola+di+Napoli\",1539 => \"/meteo/Casola+in+lunigiana\",1540 => \"/meteo/Casola+valsenio\",1541 => \"/meteo/Casole+Bruzio\",1542 => \"/meteo/Casole+d'Elsa\",1543 => \"/meteo/Casoli\",1544 => \"/meteo/Casorate+Primo\",1545 => \"/meteo/Casorate+Sempione\",1546 => \"/meteo/Casorezzo\",1547 => \"/meteo/Casoria\",1548 => \"/meteo/Casorzo\",1549 => \"/meteo/Casperia\",1550 => \"/meteo/Caspoggio\",1551 => \"/meteo/Cassacco\",1552 => \"/meteo/Cassago+brianza\",1553 => \"/meteo/Cassano+allo+Ionio\",1554 => \"/meteo/Cassano+d'Adda\",1555 => \"/meteo/Cassano+delle+murge\",1556 => \"/meteo/Cassano+irpino\",1557 => \"/meteo/Cassano+Magnago\",1558 => \"/meteo/Cassano+Spinola\",1559 => \"/meteo/Cassano+valcuvia\",1560 => \"/meteo/Cassaro\",1561 => \"/meteo/Cassiglio\",1562 => \"/meteo/Cassina+de'+Pecchi\",1563 => \"/meteo/Cassina+Rizzardi\",1564 => \"/meteo/Cassina+valsassina\",1565 => \"/meteo/Cassinasco\",1566 => \"/meteo/Cassine\",1567 => \"/meteo/Cassinelle\",1568 => \"/meteo/Cassinetta+di+Lugagnano\",1569 => \"/meteo/Cassino\",1570 => \"/meteo/Cassola\",1571 => \"/meteo/Cassolnovo\",1572 => \"/meteo/Castagnaro\",1573 => \"/meteo/Castagneto+Carducci\",1574 => \"/meteo/Castagneto+po\",1575 => \"/meteo/Castagnito\",1576 => \"/meteo/Castagnole+delle+Lanze\",1577 => \"/meteo/Castagnole+monferrato\",1578 => \"/meteo/Castagnole+Piemonte\",1579 => \"/meteo/Castana\",1580 => \"/meteo/Castano+Primo\",1581 => \"/meteo/Casteggio\",1582 => \"/meteo/Castegnato\",1583 => \"/meteo/Castegnero\",1584 => \"/meteo/Castel+Baronia\",1585 => \"/meteo/Castel+Boglione\",1586 => \"/meteo/Castel+bolognese\",1587 => \"/meteo/Castel+Campagnano\",1588 => \"/meteo/Castel+Castagna\",1589 => \"/meteo/Castel+Colonna\",1590 => \"/meteo/Castel+Condino\",1591 => \"/meteo/Castel+d'Aiano\",1592 => \"/meteo/Castel+d'Ario\",1593 => \"/meteo/Castel+d'Azzano\",1594 => \"/meteo/Castel+del+Giudice\",1595 => \"/meteo/Castel+del+monte\",1596 => \"/meteo/Castel+del+piano\",1597 => \"/meteo/Castel+del+rio\",1598 => \"/meteo/Castel+di+Casio\",1599 => \"/meteo/Castel+di+Ieri\",1600 => \"/meteo/Castel+di+Iudica\",1601 => \"/meteo/Castel+di+Lama\",1602 => \"/meteo/Castel+di+Lucio\",1603 => \"/meteo/Castel+di+Sangro\",1604 => \"/meteo/Castel+di+Sasso\",1605 => \"/meteo/Castel+di+Tora\",1606 => \"/meteo/Castel+Focognano\",1607 => \"/meteo/Castel+frentano\",1608 => \"/meteo/Castel+Gabbiano\",1609 => \"/meteo/Castel+Gandolfo\",1610 => \"/meteo/Castel+Giorgio\",1611 => \"/meteo/Castel+Goffredo\",1612 => \"/meteo/Castel+Guelfo+di+Bologna\",1613 => \"/meteo/Castel+Madama\",1614 => \"/meteo/Castel+Maggiore\",1615 => \"/meteo/Castel+Mella\",1616 => \"/meteo/Castel+Morrone\",1617 => \"/meteo/Castel+Ritaldi\",1618 => \"/meteo/Castel+Rocchero\",1619 => \"/meteo/Castel+Rozzone\",1620 => \"/meteo/Castel+San+Giorgio\",1621 => \"/meteo/Castel+San+Giovanni\",1622 => \"/meteo/Castel+San+Lorenzo\",1623 => \"/meteo/Castel+San+Niccolo'\",1624 => \"/meteo/Castel+San+Pietro+romano\",1625 => \"/meteo/Castel+San+Pietro+terme\",1626 => \"/meteo/Castel+San+Vincenzo\",1627 => \"/meteo/Castel+Sant'Angelo\",1628 => \"/meteo/Castel+Sant'Elia\",1629 => \"/meteo/Castel+Viscardo\",1630 => \"/meteo/Castel+Vittorio\",1631 => \"/meteo/Castel+volturno\",1632 => \"/meteo/Castelbaldo\",1633 => \"/meteo/Castelbelforte\",1634 => \"/meteo/Castelbellino\",1635 => \"/meteo/Castelbello+Ciardes\",1636 => \"/meteo/Castelbianco\",1637 => \"/meteo/Castelbottaccio\",1638 => \"/meteo/Castelbuono\",1639 => \"/meteo/Castelcivita\",1640 => \"/meteo/Castelcovati\",1641 => \"/meteo/Castelcucco\",1642 => \"/meteo/Casteldaccia\",1643 => \"/meteo/Casteldelci\",1644 => \"/meteo/Casteldelfino\",1645 => \"/meteo/Casteldidone\",1646 => \"/meteo/Castelfidardo\",1647 => \"/meteo/Castelfiorentino\",1648 => \"/meteo/Castelfondo\",1649 => \"/meteo/Castelforte\",1650 => \"/meteo/Castelfranci\",1651 => \"/meteo/Castelfranco+di+sopra\",1652 => \"/meteo/Castelfranco+di+sotto\",1653 => \"/meteo/Castelfranco+Emilia\",1654 => \"/meteo/Castelfranco+in+Miscano\",1655 => \"/meteo/Castelfranco+Veneto\",1656 => \"/meteo/Castelgomberto\",8385 => \"/meteo/Castelgrande\",1658 => \"/meteo/Castelguglielmo\",1659 => \"/meteo/Castelguidone\",1660 => \"/meteo/Castell'alfero\",1661 => \"/meteo/Castell'arquato\",1662 => \"/meteo/Castell'azzara\",1663 => \"/meteo/Castell'umberto\",1664 => \"/meteo/Castellabate\",1665 => \"/meteo/Castellafiume\",1666 => \"/meteo/Castellalto\",1667 => \"/meteo/Castellammare+del+Golfo\",1668 => \"/meteo/Castellammare+di+Stabia\",1669 => \"/meteo/Castellamonte\",1670 => \"/meteo/Castellana+Grotte\",1671 => \"/meteo/Castellana+sicula\",1672 => \"/meteo/Castellaneta\",1673 => \"/meteo/Castellania\",1674 => \"/meteo/Castellanza\",1675 => \"/meteo/Castellar\",1676 => \"/meteo/Castellar+Guidobono\",1677 => \"/meteo/Castellarano\",1678 => \"/meteo/Castellaro\",1679 => \"/meteo/Castellazzo+Bormida\",1680 => \"/meteo/Castellazzo+novarese\",1681 => \"/meteo/Castelleone\",1682 => \"/meteo/Castelleone+di+Suasa\",1683 => \"/meteo/Castellero\",1684 => \"/meteo/Castelletto+Cervo\",1685 => \"/meteo/Castelletto+d'Erro\",1686 => \"/meteo/Castelletto+d'Orba\",1687 => \"/meteo/Castelletto+di+Branduzzo\",1688 => \"/meteo/Castelletto+Merli\",1689 => \"/meteo/Castelletto+Molina\",1690 => \"/meteo/Castelletto+monferrato\",1691 => \"/meteo/Castelletto+sopra+Ticino\",1692 => \"/meteo/Castelletto+Stura\",1693 => \"/meteo/Castelletto+Uzzone\",1694 => \"/meteo/Castelli\",1695 => \"/meteo/Castelli+Calepio\",1696 => \"/meteo/Castellina+in+chianti\",1697 => \"/meteo/Castellina+marittima\",1698 => \"/meteo/Castellinaldo\",1699 => \"/meteo/Castellino+del+Biferno\",1700 => \"/meteo/Castellino+Tanaro\",1701 => \"/meteo/Castelliri\",1702 => \"/meteo/Castello+Cabiaglio\",1703 => \"/meteo/Castello+d'Agogna\",1704 => \"/meteo/Castello+d'Argile\",1705 => \"/meteo/Castello+del+matese\",1706 => \"/meteo/Castello+dell'Acqua\",1707 => \"/meteo/Castello+di+Annone\",1708 => \"/meteo/Castello+di+brianza\",1709 => \"/meteo/Castello+di+Cisterna\",1710 => \"/meteo/Castello+di+Godego\",1711 => \"/meteo/Castello+di+Serravalle\",1712 => \"/meteo/Castello+Lavazzo\",1714 => \"/meteo/Castello+Molina+di+Fiemme\",1713 => \"/meteo/Castello+tesino\",1715 => \"/meteo/Castellucchio\",8219 => \"/meteo/Castelluccio\",1716 => \"/meteo/Castelluccio+dei+Sauri\",8395 => \"/meteo/Castelluccio+inferiore\",8359 => \"/meteo/Castelluccio+superiore\",1719 => \"/meteo/Castelluccio+valmaggiore\",8452 => \"/meteo/Castelmadama+casello\",1720 => \"/meteo/Castelmagno\",1721 => \"/meteo/Castelmarte\",1722 => \"/meteo/Castelmassa\",1723 => \"/meteo/Castelmauro\",8363 => \"/meteo/Castelmezzano\",1725 => \"/meteo/Castelmola\",1726 => \"/meteo/Castelnovetto\",1727 => \"/meteo/Castelnovo+Bariano\",1728 => \"/meteo/Castelnovo+del+Friuli\",1729 => \"/meteo/Castelnovo+di+sotto\",8124 => \"/meteo/Castelnovo+ne'+Monti\",1731 => \"/meteo/Castelnuovo\",1732 => \"/meteo/Castelnuovo+Belbo\",1733 => \"/meteo/Castelnuovo+Berardenga\",1734 => \"/meteo/Castelnuovo+bocca+d'Adda\",1735 => \"/meteo/Castelnuovo+Bormida\",1736 => \"/meteo/Castelnuovo+Bozzente\",1737 => \"/meteo/Castelnuovo+Calcea\",1738 => \"/meteo/Castelnuovo+cilento\",1739 => \"/meteo/Castelnuovo+del+Garda\",1740 => \"/meteo/Castelnuovo+della+daunia\",1741 => \"/meteo/Castelnuovo+di+Ceva\",1742 => \"/meteo/Castelnuovo+di+Conza\",1743 => \"/meteo/Castelnuovo+di+Farfa\",1744 => \"/meteo/Castelnuovo+di+Garfagnana\",1745 => \"/meteo/Castelnuovo+di+Porto\",1746 => \"/meteo/Castelnuovo+di+val+di+Cecina\",1747 => \"/meteo/Castelnuovo+Don+Bosco\",1748 => \"/meteo/Castelnuovo+Magra\",1749 => \"/meteo/Castelnuovo+Nigra\",1750 => \"/meteo/Castelnuovo+Parano\",1751 => \"/meteo/Castelnuovo+Rangone\",1752 => \"/meteo/Castelnuovo+Scrivia\",1753 => \"/meteo/Castelpagano\",1754 => \"/meteo/Castelpetroso\",1755 => \"/meteo/Castelpizzuto\",1756 => \"/meteo/Castelplanio\",1757 => \"/meteo/Castelpoto\",1758 => \"/meteo/Castelraimondo\",1759 => \"/meteo/Castelrotto\",1760 => \"/meteo/Castelsantangelo+sul+Nera\",8378 => \"/meteo/Castelsaraceno\",1762 => \"/meteo/Castelsardo\",1763 => \"/meteo/Castelseprio\",1764 => \"/meteo/Castelsilano\",1765 => \"/meteo/Castelspina\",1766 => \"/meteo/Casteltermini\",1767 => \"/meteo/Castelveccana\",1768 => \"/meteo/Castelvecchio+Calvisio\",1769 => \"/meteo/Castelvecchio+di+Rocca+Barbena\",1770 => \"/meteo/Castelvecchio+Subequo\",1771 => \"/meteo/Castelvenere\",1772 => \"/meteo/Castelverde\",1773 => \"/meteo/Castelverrino\",1774 => \"/meteo/Castelvetere+in+val+fortore\",1775 => \"/meteo/Castelvetere+sul+Calore\",1776 => \"/meteo/Castelvetrano\",1777 => \"/meteo/Castelvetro+di+Modena\",1778 => \"/meteo/Castelvetro+piacentino\",1779 => \"/meteo/Castelvisconti\",1780 => \"/meteo/Castenaso\",1781 => \"/meteo/Castenedolo\",1782 => \"/meteo/Castiadas\",1783 => \"/meteo/Castiglion+Fibocchi\",1784 => \"/meteo/Castiglion+fiorentino\",8193 => \"/meteo/Castiglioncello\",1785 => \"/meteo/Castiglione+a+Casauria\",1786 => \"/meteo/Castiglione+chiavarese\",1787 => \"/meteo/Castiglione+cosentino\",1788 => \"/meteo/Castiglione+d'Adda\",1789 => \"/meteo/Castiglione+d'Intelvi\",1790 => \"/meteo/Castiglione+d'Orcia\",1791 => \"/meteo/Castiglione+dei+Pepoli\",1792 => \"/meteo/Castiglione+del+Genovesi\",1793 => \"/meteo/Castiglione+del+Lago\",1794 => \"/meteo/Castiglione+della+Pescaia\",1795 => \"/meteo/Castiglione+delle+Stiviere\",1796 => \"/meteo/Castiglione+di+garfagnana\",1797 => \"/meteo/Castiglione+di+Sicilia\",1798 => \"/meteo/Castiglione+Falletto\",1799 => \"/meteo/Castiglione+in+teverina\",1800 => \"/meteo/Castiglione+Messer+Marino\",1801 => \"/meteo/Castiglione+Messer+Raimondo\",1802 => \"/meteo/Castiglione+Olona\",1803 => \"/meteo/Castiglione+Tinella\",1804 => \"/meteo/Castiglione+torinese\",1805 => \"/meteo/Castignano\",1806 => \"/meteo/Castilenti\",1807 => \"/meteo/Castino\",1808 => \"/meteo/Castione+Andevenno\",1809 => \"/meteo/Castione+della+Presolana\",1810 => \"/meteo/Castions+di+Strada\",1811 => \"/meteo/Castiraga+Vidardo\",1812 => \"/meteo/Casto\",1813 => \"/meteo/Castorano\",8723 => \"/meteo/Castore\",1814 => \"/meteo/Castrezzato\",1815 => \"/meteo/Castri+di+Lecce\",1816 => \"/meteo/Castrignano+de'+Greci\",1817 => \"/meteo/Castrignano+del+Capo\",1818 => \"/meteo/Castro\",1819 => \"/meteo/Castro\",1820 => \"/meteo/Castro+dei+Volsci\",8167 => \"/meteo/Castro+Marina\",1821 => \"/meteo/Castrocaro+terme+e+terra+del+Sole\",1822 => \"/meteo/Castrocielo\",1823 => \"/meteo/Castrofilippo\",1824 => \"/meteo/Castrolibero\",1825 => \"/meteo/Castronno\",1826 => \"/meteo/Castronuovo+di+Sant'Andrea\",1827 => \"/meteo/Castronuovo+di+Sicilia\",1828 => \"/meteo/Castropignano\",1829 => \"/meteo/Castroreale\",1830 => \"/meteo/Castroregio\",1831 => \"/meteo/Castrovillari\",1832 => \"/meteo/Catania\",8273 => \"/meteo/Catania+Fontanarossa\",1833 => \"/meteo/Catanzaro\",1834 => \"/meteo/Catenanuova\",1835 => \"/meteo/Catignano\",8281 => \"/meteo/Catinaccio\",1836 => \"/meteo/Cattolica\",1837 => \"/meteo/Cattolica+Eraclea\",1838 => \"/meteo/Caulonia\",8673 => \"/meteo/Caulonia+Marina\",1839 => \"/meteo/Cautano\",1840 => \"/meteo/Cava+de'+Tirreni\",1841 => \"/meteo/Cava+manara\",1842 => \"/meteo/Cavacurta\",1843 => \"/meteo/Cavaglia'\",1844 => \"/meteo/Cavaglietto\",1845 => \"/meteo/Cavaglio+d'Agogna\",1846 => \"/meteo/Cavaglio+Spoccia\",1847 => \"/meteo/Cavagnolo\",1848 => \"/meteo/Cavaion+veronese\",1849 => \"/meteo/Cavalese\",1850 => \"/meteo/Cavallasca\",1851 => \"/meteo/Cavallerleone\",1852 => \"/meteo/Cavallermaggiore\",1853 => \"/meteo/Cavallino\",8657 => \"/meteo/Cavallino\",1854 => \"/meteo/Cavallino+treporti\",1855 => \"/meteo/Cavallirio\",1856 => \"/meteo/Cavareno\",1857 => \"/meteo/Cavargna\",1858 => \"/meteo/Cavaria+con+Premezzo\",1859 => \"/meteo/Cavarzere\",1860 => \"/meteo/Cavaso+del+Tomba\",1861 => \"/meteo/Cavasso+nuovo\",1862 => \"/meteo/Cavatore\",1863 => \"/meteo/Cavazzo+carnico\",1864 => \"/meteo/Cave\",1865 => \"/meteo/Cavedago\",1866 => \"/meteo/Cavedine\",1867 => \"/meteo/Cavenago+d'Adda\",1868 => \"/meteo/Cavenago+di+brianza\",1869 => \"/meteo/Cavernago\",1870 => \"/meteo/Cavezzo\",1871 => \"/meteo/Cavizzana\",1872 => \"/meteo/Cavour\",1873 => \"/meteo/Cavriago\",1874 => \"/meteo/Cavriana\",1875 => \"/meteo/Cavriglia\",1876 => \"/meteo/Cazzago+Brabbia\",1877 => \"/meteo/Cazzago+San+Martino\",1878 => \"/meteo/Cazzano+di+Tramigna\",1879 => \"/meteo/Cazzano+Sant'Andrea\",1880 => \"/meteo/Ceccano\",1881 => \"/meteo/Cecima\",1882 => \"/meteo/Cecina\",1883 => \"/meteo/Cedegolo\",1884 => \"/meteo/Cedrasco\",1885 => \"/meteo/Cefala'+Diana\",1886 => \"/meteo/Cefalu'\",1887 => \"/meteo/Ceggia\",1888 => \"/meteo/Ceglie+Messapica\",1889 => \"/meteo/Celano\",1890 => \"/meteo/Celenza+sul+Trigno\",1891 => \"/meteo/Celenza+valfortore\",1892 => \"/meteo/Celico\",1893 => \"/meteo/Cella+dati\",1894 => \"/meteo/Cella+monte\",1895 => \"/meteo/Cellamare\",1896 => \"/meteo/Cellara\",1897 => \"/meteo/Cellarengo\",1898 => \"/meteo/Cellatica\",1899 => \"/meteo/Celle+di+Bulgheria\",1900 => \"/meteo/Celle+di+Macra\",1901 => \"/meteo/Celle+di+San+Vito\",1902 => \"/meteo/Celle+Enomondo\",1903 => \"/meteo/Celle+ligure\",1904 => \"/meteo/Celleno\",1905 => \"/meteo/Cellere\",1906 => \"/meteo/Cellino+Attanasio\",1907 => \"/meteo/Cellino+San+Marco\",1908 => \"/meteo/Cellio\",1909 => \"/meteo/Cellole\",1910 => \"/meteo/Cembra\",1911 => \"/meteo/Cenadi\",1912 => \"/meteo/Cenate+sopra\",1913 => \"/meteo/Cenate+sotto\",1914 => \"/meteo/Cencenighe+Agordino\",1915 => \"/meteo/Cene\",1916 => \"/meteo/Ceneselli\",1917 => \"/meteo/Cengio\",1918 => \"/meteo/Centa+San+Nicolo'\",1919 => \"/meteo/Centallo\",1920 => \"/meteo/Cento\",1921 => \"/meteo/Centola\",1922 => \"/meteo/Centrache\",1923 => \"/meteo/Centuripe\",1924 => \"/meteo/Cepagatti\",1925 => \"/meteo/Ceppaloni\",1926 => \"/meteo/Ceppo+Morelli\",1927 => \"/meteo/Ceprano\",1928 => \"/meteo/Cerami\",1929 => \"/meteo/Ceranesi\",1930 => \"/meteo/Cerano\",1931 => \"/meteo/Cerano+d'intelvi\",1932 => \"/meteo/Ceranova\",1933 => \"/meteo/Ceraso\",1934 => \"/meteo/Cercemaggiore\",1935 => \"/meteo/Cercenasco\",1936 => \"/meteo/Cercepiccola\",1937 => \"/meteo/Cerchiara+di+Calabria\",1938 => \"/meteo/Cerchio\",1939 => \"/meteo/Cercino\",1940 => \"/meteo/Cercivento\",1941 => \"/meteo/Cercola\",1942 => \"/meteo/Cerda\",1943 => \"/meteo/Cerea\",1944 => \"/meteo/Ceregnano\",1945 => \"/meteo/Cerenzia\",1946 => \"/meteo/Ceres\",1947 => \"/meteo/Ceresara\",1948 => \"/meteo/Cereseto\",1949 => \"/meteo/Ceresole+Alba\",1950 => \"/meteo/Ceresole+reale\",1951 => \"/meteo/Cerete\",1952 => \"/meteo/Ceretto+lomellina\",1953 => \"/meteo/Cergnago\",1954 => \"/meteo/Ceriale\",1955 => \"/meteo/Ceriana\",1956 => \"/meteo/Ceriano+Laghetto\",1957 => \"/meteo/Cerignale\",1958 => \"/meteo/Cerignola\",1959 => \"/meteo/Cerisano\",1960 => \"/meteo/Cermenate\",1961 => \"/meteo/Cermes\",1962 => \"/meteo/Cermignano\",1963 => \"/meteo/Cernobbio\",1964 => \"/meteo/Cernusco+lombardone\",1965 => \"/meteo/Cernusco+sul+Naviglio\",1966 => \"/meteo/Cerreto+Castello\",1967 => \"/meteo/Cerreto+d'Asti\",1968 => \"/meteo/Cerreto+d'Esi\",1969 => \"/meteo/Cerreto+di+Spoleto\",1970 => \"/meteo/Cerreto+Grue\",1971 => \"/meteo/Cerreto+Guidi\",1972 => \"/meteo/Cerreto+langhe\",1973 => \"/meteo/Cerreto+laziale\",1974 => \"/meteo/Cerreto+sannita\",1975 => \"/meteo/Cerrina+monferrato\",1976 => \"/meteo/Cerrione\",1977 => \"/meteo/Cerro+al+Lambro\",1978 => \"/meteo/Cerro+al+Volturno\",1979 => \"/meteo/Cerro+maggiore\",1980 => \"/meteo/Cerro+Tanaro\",1981 => \"/meteo/Cerro+veronese\",8396 => \"/meteo/Cersosimo\",1983 => \"/meteo/Certaldo\",1984 => \"/meteo/Certosa+di+Pavia\",1985 => \"/meteo/Cerva\",1986 => \"/meteo/Cervara+di+Roma\",1987 => \"/meteo/Cervarese+Santa+Croce\",1988 => \"/meteo/Cervaro\",1989 => \"/meteo/Cervasca\",1990 => \"/meteo/Cervatto\",1991 => \"/meteo/Cerveno\",1992 => \"/meteo/Cervere\",1993 => \"/meteo/Cervesina\",1994 => \"/meteo/Cerveteri\",1995 => \"/meteo/Cervia\",1996 => \"/meteo/Cervicati\",1997 => \"/meteo/Cervignano+d'Adda\",1998 => \"/meteo/Cervignano+del+Friuli\",1999 => \"/meteo/Cervinara\",2000 => \"/meteo/Cervino\",2001 => \"/meteo/Cervo\",2002 => \"/meteo/Cerzeto\",2003 => \"/meteo/Cesa\",2004 => \"/meteo/Cesana+brianza\",2005 => \"/meteo/Cesana+torinese\",2006 => \"/meteo/Cesano+Boscone\",2007 => \"/meteo/Cesano+Maderno\",2008 => \"/meteo/Cesara\",2009 => \"/meteo/Cesaro'\",2010 => \"/meteo/Cesate\",2011 => \"/meteo/Cesena\",2012 => \"/meteo/Cesenatico\",2013 => \"/meteo/Cesinali\",2014 => \"/meteo/Cesio\",2015 => \"/meteo/Cesiomaggiore\",2016 => \"/meteo/Cessalto\",2017 => \"/meteo/Cessaniti\",2018 => \"/meteo/Cessapalombo\",2019 => \"/meteo/Cessole\",2020 => \"/meteo/Cetara\",2021 => \"/meteo/Ceto\",2022 => \"/meteo/Cetona\",2023 => \"/meteo/Cetraro\",2024 => \"/meteo/Ceva\",8721 => \"/meteo/Cevedale\",2025 => \"/meteo/Cevo\",2026 => \"/meteo/Challand+Saint+Anselme\",2027 => \"/meteo/Challand+Saint+Victor\",2028 => \"/meteo/Chambave\",2029 => \"/meteo/Chamois\",8255 => \"/meteo/Chamole`\",2030 => \"/meteo/Champdepraz\",8225 => \"/meteo/Champoluc\",2031 => \"/meteo/Champorcher\",8331 => \"/meteo/Champorcher+Cimetta+Rossa\",8330 => \"/meteo/Champorcher+Laris\",2032 => \"/meteo/Charvensod\",2033 => \"/meteo/Chatillon\",2034 => \"/meteo/Cherasco\",2035 => \"/meteo/Cheremule\",8668 => \"/meteo/Chesal\",2036 => \"/meteo/Chialamberto\",2037 => \"/meteo/Chiampo\",2038 => \"/meteo/Chianche\",2039 => \"/meteo/Chianciano+terme\",2040 => \"/meteo/Chianni\",2041 => \"/meteo/Chianocco\",2042 => \"/meteo/Chiaramonte+Gulfi\",2043 => \"/meteo/Chiaramonti\",2044 => \"/meteo/Chiarano\",2045 => \"/meteo/Chiaravalle\",2046 => \"/meteo/Chiaravalle+centrale\",8151 => \"/meteo/Chiareggio\",2047 => \"/meteo/Chiari\",2048 => \"/meteo/Chiaromonte\",8432 => \"/meteo/Chiasso\",2049 => \"/meteo/Chiauci\",2050 => \"/meteo/Chiavari\",2051 => \"/meteo/Chiavenna\",2052 => \"/meteo/Chiaverano\",2053 => \"/meteo/Chienes\",2054 => \"/meteo/Chieri\",2055 => \"/meteo/Chies+d'Alpago\",2056 => \"/meteo/Chiesa+in+valmalenco\",2057 => \"/meteo/Chiesanuova\",2058 => \"/meteo/Chiesina+uzzanese\",2059 => \"/meteo/Chieti\",8319 => \"/meteo/Chieti+Scalo\",2060 => \"/meteo/Chieuti\",2061 => \"/meteo/Chieve\",2062 => \"/meteo/Chignolo+d'Isola\",2063 => \"/meteo/Chignolo+Po\",2064 => \"/meteo/Chioggia\",2065 => \"/meteo/Chiomonte\",2066 => \"/meteo/Chions\",2067 => \"/meteo/Chiopris+Viscone\",2068 => \"/meteo/Chitignano\",2069 => \"/meteo/Chiuduno\",2070 => \"/meteo/Chiuppano\",2071 => \"/meteo/Chiuro\",2072 => \"/meteo/Chiusa\",2073 => \"/meteo/Chiusa+di+Pesio\",2074 => \"/meteo/Chiusa+di+San+Michele\",2075 => \"/meteo/Chiusa+Sclafani\",2076 => \"/meteo/Chiusaforte\",2077 => \"/meteo/Chiusanico\",2078 => \"/meteo/Chiusano+d'Asti\",2079 => \"/meteo/Chiusano+di+San+Domenico\",2080 => \"/meteo/Chiusavecchia\",2081 => \"/meteo/Chiusdino\",2082 => \"/meteo/Chiusi\",2083 => \"/meteo/Chiusi+della+Verna\",2084 => \"/meteo/Chivasso\",8515 => \"/meteo/Ciampac+Alba\",2085 => \"/meteo/Ciampino\",2086 => \"/meteo/Cianciana\",2087 => \"/meteo/Cibiana+di+cadore\",2088 => \"/meteo/Cicagna\",2089 => \"/meteo/Cicala\",2090 => \"/meteo/Cicciano\",2091 => \"/meteo/Cicerale\",2092 => \"/meteo/Ciciliano\",2093 => \"/meteo/Cicognolo\",2094 => \"/meteo/Ciconio\",2095 => \"/meteo/Cigliano\",2096 => \"/meteo/Ciglie'\",2097 => \"/meteo/Cigognola\",2098 => \"/meteo/Cigole\",2099 => \"/meteo/Cilavegna\",8340 => \"/meteo/Cima+Durand\",8590 => \"/meteo/Cima+Pisciadu'\",8764 => \"/meteo/Cima+Plose\",8703 => \"/meteo/Cima+Portavescovo\",8282 => \"/meteo/Cima+Sole\",2100 => \"/meteo/Cimadolmo\",2101 => \"/meteo/Cimbergo\",8332 => \"/meteo/Cime+Bianche\",2102 => \"/meteo/Cimego\",2103 => \"/meteo/Cimina'\",2104 => \"/meteo/Ciminna\",2105 => \"/meteo/Cimitile\",2106 => \"/meteo/Cimolais\",8433 => \"/meteo/Cimoncino\",2107 => \"/meteo/Cimone\",2108 => \"/meteo/Cinaglio\",2109 => \"/meteo/Cineto+romano\",2110 => \"/meteo/Cingia+de'+Botti\",2111 => \"/meteo/Cingoli\",2112 => \"/meteo/Cinigiano\",2113 => \"/meteo/Cinisello+Balsamo\",2114 => \"/meteo/Cinisi\",2115 => \"/meteo/Cino\",2116 => \"/meteo/Cinquefrondi\",2117 => \"/meteo/Cintano\",2118 => \"/meteo/Cinte+tesino\",2119 => \"/meteo/Cinto+Caomaggiore\",2120 => \"/meteo/Cinto+Euganeo\",2121 => \"/meteo/Cinzano\",2122 => \"/meteo/Ciorlano\",2123 => \"/meteo/Cipressa\",2124 => \"/meteo/Circello\",2125 => \"/meteo/Cirie'\",2126 => \"/meteo/Cirigliano\",2127 => \"/meteo/Cirimido\",2128 => \"/meteo/Ciro'\",2129 => \"/meteo/Ciro'+marina\",2130 => \"/meteo/Cis\",2131 => \"/meteo/Cisano+bergamasco\",2132 => \"/meteo/Cisano+sul+Neva\",2133 => \"/meteo/Ciserano\",2134 => \"/meteo/Cislago\",2135 => \"/meteo/Cisliano\",2136 => \"/meteo/Cismon+del+Grappa\",2137 => \"/meteo/Cison+di+valmarino\",2138 => \"/meteo/Cissone\",2139 => \"/meteo/Cisterna+d'Asti\",2140 => \"/meteo/Cisterna+di+Latina\",2141 => \"/meteo/Cisternino\",2142 => \"/meteo/Citerna\",8142 => \"/meteo/Città+del+Vaticano\",2143 => \"/meteo/Citta'+della+Pieve\",2144 => \"/meteo/Citta'+di+Castello\",2145 => \"/meteo/Citta'+Sant'Angelo\",2146 => \"/meteo/Cittadella\",2147 => \"/meteo/Cittaducale\",2148 => \"/meteo/Cittanova\",2149 => \"/meteo/Cittareale\",2150 => \"/meteo/Cittiglio\",2151 => \"/meteo/Civate\",2152 => \"/meteo/Civenna\",2153 => \"/meteo/Civezza\",2154 => \"/meteo/Civezzano\",2155 => \"/meteo/Civiasco\",2156 => \"/meteo/Cividale+del+Friuli\",2157 => \"/meteo/Cividate+al+piano\",2158 => \"/meteo/Cividate+camuno\",2159 => \"/meteo/Civita\",2160 => \"/meteo/Civita+Castellana\",2161 => \"/meteo/Civita+d'Antino\",2162 => \"/meteo/Civitacampomarano\",2163 => \"/meteo/Civitaluparella\",2164 => \"/meteo/Civitanova+del+sannio\",2165 => \"/meteo/Civitanova+Marche\",8356 => \"/meteo/Civitaquana\",2167 => \"/meteo/Civitavecchia\",2168 => \"/meteo/Civitella+Alfedena\",2169 => \"/meteo/Civitella+Casanova\",2170 => \"/meteo/Civitella+d'Agliano\",2171 => \"/meteo/Civitella+del+Tronto\",2172 => \"/meteo/Civitella+di+Romagna\",2173 => \"/meteo/Civitella+in+val+di+Chiana\",2174 => \"/meteo/Civitella+Messer+Raimondo\",2175 => \"/meteo/Civitella+Paganico\",2176 => \"/meteo/Civitella+Roveto\",2177 => \"/meteo/Civitella+San+Paolo\",2178 => \"/meteo/Civo\",2179 => \"/meteo/Claino+con+osteno\",2180 => \"/meteo/Claut\",2181 => \"/meteo/Clauzetto\",2182 => \"/meteo/Clavesana\",2183 => \"/meteo/Claviere\",2184 => \"/meteo/Cles\",2185 => \"/meteo/Cleto\",2186 => \"/meteo/Clivio\",2187 => \"/meteo/Cloz\",2188 => \"/meteo/Clusone\",2189 => \"/meteo/Coassolo+torinese\",2190 => \"/meteo/Coazze\",2191 => \"/meteo/Coazzolo\",2192 => \"/meteo/Coccaglio\",2193 => \"/meteo/Cocconato\",2194 => \"/meteo/Cocquio+Trevisago\",2195 => \"/meteo/Cocullo\",2196 => \"/meteo/Codevigo\",2197 => \"/meteo/Codevilla\",2198 => \"/meteo/Codigoro\",2199 => \"/meteo/Codogne'\",2200 => \"/meteo/Codogno\",2201 => \"/meteo/Codroipo\",2202 => \"/meteo/Codrongianos\",2203 => \"/meteo/Coggiola\",2204 => \"/meteo/Cogliate\",2205 => \"/meteo/Cogne\",8654 => \"/meteo/Cogne+Lillaz\",2206 => \"/meteo/Cogoleto\",2207 => \"/meteo/Cogollo+del+Cengio\",5049 => \"/meteo/Cogolo\",2208 => \"/meteo/Cogorno\",8354 => \"/meteo/Col+de+Joux\",8604 => \"/meteo/Col+Indes\",2209 => \"/meteo/Colazza\",2210 => \"/meteo/Colbordolo\",2211 => \"/meteo/Colere\",2212 => \"/meteo/Colfelice\",8217 => \"/meteo/Colfiorito\",8761 => \"/meteo/Colfosco\",2213 => \"/meteo/Coli\",2214 => \"/meteo/Colico\",2215 => \"/meteo/Collagna\",2216 => \"/meteo/Collalto+sabino\",2217 => \"/meteo/Collarmele\",2218 => \"/meteo/Collazzone\",8249 => \"/meteo/Colle+Bettaforca\",2219 => \"/meteo/Colle+Brianza\",2220 => \"/meteo/Colle+d'Anchise\",8687 => \"/meteo/Colle+del+Gran+San+Bernardo\",8688 => \"/meteo/Colle+del+Moncenisio\",8686 => \"/meteo/Colle+del+Piccolo+San+Bernardo\",8481 => \"/meteo/Colle+del+Prel\",2221 => \"/meteo/Colle+di+Tora\",2222 => \"/meteo/Colle+di+val+d'Elsa\",2223 => \"/meteo/Colle+San+Magno\",2224 => \"/meteo/Colle+sannita\",2225 => \"/meteo/Colle+Santa+Lucia\",8246 => \"/meteo/Colle+Sarezza\",2226 => \"/meteo/Colle+Umberto\",2227 => \"/meteo/Collebeato\",2228 => \"/meteo/Collecchio\",2229 => \"/meteo/Collecorvino\",2230 => \"/meteo/Colledara\",8453 => \"/meteo/Colledara+casello\",2231 => \"/meteo/Colledimacine\",2232 => \"/meteo/Colledimezzo\",2233 => \"/meteo/Colleferro\",2234 => \"/meteo/Collegiove\",2235 => \"/meteo/Collegno\",2236 => \"/meteo/Collelongo\",2237 => \"/meteo/Collepardo\",2238 => \"/meteo/Collepasso\",2239 => \"/meteo/Collepietro\",2240 => \"/meteo/Colleretto+castelnuovo\",2241 => \"/meteo/Colleretto+Giacosa\",2242 => \"/meteo/Collesalvetti\",2243 => \"/meteo/Collesano\",2244 => \"/meteo/Colletorto\",2245 => \"/meteo/Collevecchio\",2246 => \"/meteo/Colli+a+volturno\",2247 => \"/meteo/Colli+del+Tronto\",2248 => \"/meteo/Colli+sul+Velino\",2249 => \"/meteo/Colliano\",2250 => \"/meteo/Collinas\",2251 => \"/meteo/Collio\",2252 => \"/meteo/Collobiano\",2253 => \"/meteo/Colloredo+di+monte+Albano\",2254 => \"/meteo/Colmurano\",2255 => \"/meteo/Colobraro\",2256 => \"/meteo/Cologna+veneta\",2257 => \"/meteo/Cologne\",2258 => \"/meteo/Cologno+al+Serio\",2259 => \"/meteo/Cologno+monzese\",2260 => \"/meteo/Colognola+ai+Colli\",2261 => \"/meteo/Colonna\",2262 => \"/meteo/Colonnella\",2263 => \"/meteo/Colonno\",2264 => \"/meteo/Colorina\",2265 => \"/meteo/Colorno\",2266 => \"/meteo/Colosimi\",2267 => \"/meteo/Colturano\",2268 => \"/meteo/Colzate\",2269 => \"/meteo/Comabbio\",2270 => \"/meteo/Comacchio\",2271 => \"/meteo/Comano\",2272 => \"/meteo/Comazzo\",2273 => \"/meteo/Comeglians\",2274 => \"/meteo/Comelico+superiore\",2275 => \"/meteo/Comerio\",2276 => \"/meteo/Comezzano+Cizzago\",2277 => \"/meteo/Comignago\",2278 => \"/meteo/Comiso\",2279 => \"/meteo/Comitini\",2280 => \"/meteo/Comiziano\",2281 => \"/meteo/Commessaggio\",2282 => \"/meteo/Commezzadura\",2283 => \"/meteo/Como\",2284 => \"/meteo/Compiano\",8711 => \"/meteo/Comprensorio+Cimone\",2285 => \"/meteo/Comun+nuovo\",2286 => \"/meteo/Comunanza\",2287 => \"/meteo/Cona\",2288 => \"/meteo/Conca+Casale\",2289 => \"/meteo/Conca+dei+Marini\",2290 => \"/meteo/Conca+della+Campania\",2291 => \"/meteo/Concamarise\",2292 => \"/meteo/Concei\",2293 => \"/meteo/Concerviano\",2294 => \"/meteo/Concesio\",2295 => \"/meteo/Conco\",2296 => \"/meteo/Concordia+Sagittaria\",2297 => \"/meteo/Concordia+sulla+Secchia\",2298 => \"/meteo/Concorezzo\",2299 => \"/meteo/Condino\",2300 => \"/meteo/Condofuri\",8689 => \"/meteo/Condofuri+Marina\",2301 => \"/meteo/Condove\",2302 => \"/meteo/Condro'\",2303 => \"/meteo/Conegliano\",2304 => \"/meteo/Confienza\",2305 => \"/meteo/Configni\",2306 => \"/meteo/Conflenti\",2307 => \"/meteo/Coniolo\",2308 => \"/meteo/Conselice\",2309 => \"/meteo/Conselve\",2310 => \"/meteo/Consiglio+di+Rumo\",2311 => \"/meteo/Contessa+Entellina\",2312 => \"/meteo/Contigliano\",2313 => \"/meteo/Contrada\",2314 => \"/meteo/Controguerra\",2315 => \"/meteo/Controne\",2316 => \"/meteo/Contursi+terme\",2317 => \"/meteo/Conversano\",2318 => \"/meteo/Conza+della+Campania\",2319 => \"/meteo/Conzano\",2320 => \"/meteo/Copertino\",2321 => \"/meteo/Copiano\",2322 => \"/meteo/Copparo\",2323 => \"/meteo/Corana\",2324 => \"/meteo/Corato\",2325 => \"/meteo/Corbara\",2326 => \"/meteo/Corbetta\",2327 => \"/meteo/Corbola\",2328 => \"/meteo/Corchiano\",2329 => \"/meteo/Corciano\",2330 => \"/meteo/Cordenons\",2331 => \"/meteo/Cordignano\",2332 => \"/meteo/Cordovado\",2333 => \"/meteo/Coredo\",2334 => \"/meteo/Coreglia+Antelminelli\",2335 => \"/meteo/Coreglia+ligure\",2336 => \"/meteo/Coreno+Ausonio\",2337 => \"/meteo/Corfinio\",2338 => \"/meteo/Cori\",2339 => \"/meteo/Coriano\",2340 => \"/meteo/Corigliano+calabro\",8110 => \"/meteo/Corigliano+Calabro+Marina\",2341 => \"/meteo/Corigliano+d'Otranto\",2342 => \"/meteo/Corinaldo\",2343 => \"/meteo/Corio\",2344 => \"/meteo/Corleone\",2345 => \"/meteo/Corleto+monforte\",2346 => \"/meteo/Corleto+Perticara\",2347 => \"/meteo/Cormano\",2348 => \"/meteo/Cormons\",2349 => \"/meteo/Corna+imagna\",2350 => \"/meteo/Cornalba\",2351 => \"/meteo/Cornale\",2352 => \"/meteo/Cornaredo\",2353 => \"/meteo/Cornate+d'Adda\",2354 => \"/meteo/Cornedo+all'Isarco\",2355 => \"/meteo/Cornedo+vicentino\",2356 => \"/meteo/Cornegliano+laudense\",2357 => \"/meteo/Corneliano+d'Alba\",2358 => \"/meteo/Corniglio\",8537 => \"/meteo/Corno+alle+Scale\",8353 => \"/meteo/Corno+del+Renon\",2359 => \"/meteo/Corno+di+Rosazzo\",2360 => \"/meteo/Corno+Giovine\",2361 => \"/meteo/Cornovecchio\",2362 => \"/meteo/Cornuda\",2363 => \"/meteo/Correggio\",2364 => \"/meteo/Correzzana\",2365 => \"/meteo/Correzzola\",2366 => \"/meteo/Corrido\",2367 => \"/meteo/Corridonia\",2368 => \"/meteo/Corropoli\",2369 => \"/meteo/Corsano\",2370 => \"/meteo/Corsico\",2371 => \"/meteo/Corsione\",2372 => \"/meteo/Cortaccia+sulla+strada+del+vino\",2373 => \"/meteo/Cortale\",2374 => \"/meteo/Cortandone\",2375 => \"/meteo/Cortanze\",2376 => \"/meteo/Cortazzone\",2377 => \"/meteo/Corte+brugnatella\",2378 => \"/meteo/Corte+de'+Cortesi+con+Cignone\",2379 => \"/meteo/Corte+de'+Frati\",2380 => \"/meteo/Corte+Franca\",2381 => \"/meteo/Corte+Palasio\",2382 => \"/meteo/Cortemaggiore\",2383 => \"/meteo/Cortemilia\",2384 => \"/meteo/Corteno+Golgi\",2385 => \"/meteo/Cortenova\",2386 => \"/meteo/Cortenuova\",2387 => \"/meteo/Corteolona\",2388 => \"/meteo/Cortiglione\",2389 => \"/meteo/Cortina+d'Ampezzo\",2390 => \"/meteo/Cortina+sulla+strada+del+vino\",2391 => \"/meteo/Cortino\",2392 => \"/meteo/Cortona\",2393 => \"/meteo/Corvara\",2394 => \"/meteo/Corvara+in+Badia\",2395 => \"/meteo/Corvino+san+Quirico\",2396 => \"/meteo/Corzano\",2397 => \"/meteo/Coseano\",2398 => \"/meteo/Cosenza\",2399 => \"/meteo/Cosio+di+Arroscia\",2400 => \"/meteo/Cosio+valtellino\",2401 => \"/meteo/Cosoleto\",2402 => \"/meteo/Cossano+belbo\",2403 => \"/meteo/Cossano+canavese\",2404 => \"/meteo/Cossato\",2405 => \"/meteo/Cosseria\",2406 => \"/meteo/Cossignano\",2407 => \"/meteo/Cossogno\",2408 => \"/meteo/Cossoine\",2409 => \"/meteo/Cossombrato\",2410 => \"/meteo/Costa+de'+Nobili\",2411 => \"/meteo/Costa+di+Mezzate\",2412 => \"/meteo/Costa+di+Rovigo\",2413 => \"/meteo/Costa+di+serina\",2414 => \"/meteo/Costa+masnaga\",8177 => \"/meteo/Costa+Rei\",2415 => \"/meteo/Costa+valle+imagna\",2416 => \"/meteo/Costa+Vescovato\",2417 => \"/meteo/Costa+Volpino\",2418 => \"/meteo/Costabissara\",2419 => \"/meteo/Costacciaro\",2420 => \"/meteo/Costanzana\",2421 => \"/meteo/Costarainera\",2422 => \"/meteo/Costermano\",2423 => \"/meteo/Costigliole+d'Asti\",2424 => \"/meteo/Costigliole+Saluzzo\",2425 => \"/meteo/Cotignola\",2426 => \"/meteo/Cotronei\",2427 => \"/meteo/Cottanello\",8256 => \"/meteo/Couis+2\",2428 => \"/meteo/Courmayeur\",2429 => \"/meteo/Covo\",2430 => \"/meteo/Cozzo\",8382 => \"/meteo/Craco\",2432 => \"/meteo/Crandola+valsassina\",2433 => \"/meteo/Cravagliana\",2434 => \"/meteo/Cravanzana\",2435 => \"/meteo/Craveggia\",2436 => \"/meteo/Creazzo\",2437 => \"/meteo/Crecchio\",2438 => \"/meteo/Credaro\",2439 => \"/meteo/Credera+Rubbiano\",2440 => \"/meteo/Crema\",2441 => \"/meteo/Cremella\",2442 => \"/meteo/Cremenaga\",2443 => \"/meteo/Cremeno\",2444 => \"/meteo/Cremia\",2445 => \"/meteo/Cremolino\",2446 => \"/meteo/Cremona\",2447 => \"/meteo/Cremosano\",2448 => \"/meteo/Crescentino\",2449 => \"/meteo/Crespadoro\",2450 => \"/meteo/Crespano+del+Grappa\",2451 => \"/meteo/Crespellano\",2452 => \"/meteo/Crespiatica\",2453 => \"/meteo/Crespina\",2454 => \"/meteo/Crespino\",2455 => \"/meteo/Cressa\",8247 => \"/meteo/Crest\",8741 => \"/meteo/Cresta+Youla\",8646 => \"/meteo/Crevacol\",2456 => \"/meteo/Crevacuore\",2457 => \"/meteo/Crevalcore\",2458 => \"/meteo/Crevoladossola\",2459 => \"/meteo/Crispano\",2460 => \"/meteo/Crispiano\",2461 => \"/meteo/Crissolo\",8355 => \"/meteo/Crissolo+Pian+delle+Regine\",2462 => \"/meteo/Crocefieschi\",2463 => \"/meteo/Crocetta+del+Montello\",2464 => \"/meteo/Crodo\",2465 => \"/meteo/Crognaleto\",2466 => \"/meteo/Cropalati\",2467 => \"/meteo/Cropani\",2468 => \"/meteo/Crosa\",2469 => \"/meteo/Crosia\",2470 => \"/meteo/Crosio+della+valle\",2471 => \"/meteo/Crotone\",8552 => \"/meteo/Crotone+Sant'Anna\",2472 => \"/meteo/Crotta+d'Adda\",2473 => \"/meteo/Crova\",2474 => \"/meteo/Croviana\",2475 => \"/meteo/Crucoli\",2476 => \"/meteo/Cuasso+al+monte\",2477 => \"/meteo/Cuccaro+monferrato\",2478 => \"/meteo/Cuccaro+Vetere\",2479 => \"/meteo/Cucciago\",2480 => \"/meteo/Cuceglio\",2481 => \"/meteo/Cuggiono\",2482 => \"/meteo/Cugliate-fabiasco\",2483 => \"/meteo/Cuglieri\",2484 => \"/meteo/Cugnoli\",8718 => \"/meteo/Cuma\",2485 => \"/meteo/Cumiana\",2486 => \"/meteo/Cumignano+sul+Naviglio\",2487 => \"/meteo/Cunardo\",2488 => \"/meteo/Cuneo\",8553 => \"/meteo/Cuneo+Levaldigi\",2489 => \"/meteo/Cunevo\",2490 => \"/meteo/Cunico\",2491 => \"/meteo/Cuorgne'\",2492 => \"/meteo/Cupello\",2493 => \"/meteo/Cupra+marittima\",2494 => \"/meteo/Cupramontana\",2495 => \"/meteo/Cura+carpignano\",2496 => \"/meteo/Curcuris\",2497 => \"/meteo/Cureggio\",2498 => \"/meteo/Curiglia+con+Monteviasco\",2499 => \"/meteo/Curinga\",2500 => \"/meteo/Curino\",2501 => \"/meteo/Curno\",2502 => \"/meteo/Curon+Venosta\",2503 => \"/meteo/Cursi\",2504 => \"/meteo/Cursolo+orasso\",2505 => \"/meteo/Curtarolo\",2506 => \"/meteo/Curtatone\",2507 => \"/meteo/Curti\",2508 => \"/meteo/Cusago\",2509 => \"/meteo/Cusano+milanino\",2510 => \"/meteo/Cusano+Mutri\",2511 => \"/meteo/Cusino\",2512 => \"/meteo/Cusio\",2513 => \"/meteo/Custonaci\",2514 => \"/meteo/Cutigliano\",2515 => \"/meteo/Cutro\",2516 => \"/meteo/Cutrofiano\",2517 => \"/meteo/Cuveglio\",2518 => \"/meteo/Cuvio\",2519 => \"/meteo/Daiano\",2520 => \"/meteo/Dairago\",2521 => \"/meteo/Dalmine\",2522 => \"/meteo/Dambel\",2523 => \"/meteo/Danta+di+cadore\",2524 => \"/meteo/Daone\",2525 => \"/meteo/Dare'\",2526 => \"/meteo/Darfo+Boario+terme\",2527 => \"/meteo/Dasa'\",2528 => \"/meteo/Davagna\",2529 => \"/meteo/Daverio\",2530 => \"/meteo/Davoli\",2531 => \"/meteo/Dazio\",2532 => \"/meteo/Decimomannu\",2533 => \"/meteo/Decimoputzu\",2534 => \"/meteo/Decollatura\",2535 => \"/meteo/Dego\",2536 => \"/meteo/Deiva+marina\",2537 => \"/meteo/Delebio\",2538 => \"/meteo/Delia\",2539 => \"/meteo/Delianuova\",2540 => \"/meteo/Deliceto\",2541 => \"/meteo/Dello\",2542 => \"/meteo/Demonte\",2543 => \"/meteo/Denice\",2544 => \"/meteo/Denno\",2545 => \"/meteo/Dernice\",2546 => \"/meteo/Derovere\",2547 => \"/meteo/Deruta\",2548 => \"/meteo/Dervio\",2549 => \"/meteo/Desana\",2550 => \"/meteo/Desenzano+del+Garda\",2551 => \"/meteo/Desio\",2552 => \"/meteo/Desulo\",2553 => \"/meteo/Diamante\",2554 => \"/meteo/Diano+arentino\",2555 => \"/meteo/Diano+castello\",2556 => \"/meteo/Diano+d'Alba\",2557 => \"/meteo/Diano+marina\",2558 => \"/meteo/Diano+San+Pietro\",2559 => \"/meteo/Dicomano\",2560 => \"/meteo/Dignano\",2561 => \"/meteo/Dimaro\",2562 => \"/meteo/Dinami\",2563 => \"/meteo/Dipignano\",2564 => \"/meteo/Diso\",2565 => \"/meteo/Divignano\",2566 => \"/meteo/Dizzasco\",2567 => \"/meteo/Dobbiaco\",2568 => \"/meteo/Doberdo'+del+lago\",8628 => \"/meteo/Doganaccia\",2569 => \"/meteo/Dogliani\",2570 => \"/meteo/Dogliola\",2571 => \"/meteo/Dogna\",2572 => \"/meteo/Dolce'\",2573 => \"/meteo/Dolceacqua\",2574 => \"/meteo/Dolcedo\",2575 => \"/meteo/Dolegna+del+collio\",2576 => \"/meteo/Dolianova\",2577 => \"/meteo/Dolo\",8616 => \"/meteo/Dolonne\",2578 => \"/meteo/Dolzago\",2579 => \"/meteo/Domanico\",2580 => \"/meteo/Domaso\",2581 => \"/meteo/Domegge+di+cadore\",2582 => \"/meteo/Domicella\",2583 => \"/meteo/Domodossola\",2584 => \"/meteo/Domus+de+Maria\",2585 => \"/meteo/Domusnovas\",2586 => \"/meteo/Don\",2587 => \"/meteo/Donato\",2588 => \"/meteo/Dongo\",2589 => \"/meteo/Donnas\",2590 => \"/meteo/Donori'\",2591 => \"/meteo/Dorgali\",2592 => \"/meteo/Dorio\",2593 => \"/meteo/Dormelletto\",2594 => \"/meteo/Dorno\",2595 => \"/meteo/Dorsino\",2596 => \"/meteo/Dorzano\",2597 => \"/meteo/Dosolo\",2598 => \"/meteo/Dossena\",2599 => \"/meteo/Dosso+del+liro\",8323 => \"/meteo/Dosso+Pasò\",2600 => \"/meteo/Doues\",2601 => \"/meteo/Dovadola\",2602 => \"/meteo/Dovera\",2603 => \"/meteo/Dozza\",2604 => \"/meteo/Dragoni\",2605 => \"/meteo/Drapia\",2606 => \"/meteo/Drena\",2607 => \"/meteo/Drenchia\",2608 => \"/meteo/Dresano\",2609 => \"/meteo/Drezzo\",2610 => \"/meteo/Drizzona\",2611 => \"/meteo/Dro\",2612 => \"/meteo/Dronero\",2613 => \"/meteo/Druento\",2614 => \"/meteo/Druogno\",2615 => \"/meteo/Dualchi\",2616 => \"/meteo/Dubino\",2617 => \"/meteo/Due+carrare\",2618 => \"/meteo/Dueville\",2619 => \"/meteo/Dugenta\",2620 => \"/meteo/Duino+aurisina\",2621 => \"/meteo/Dumenza\",2622 => \"/meteo/Duno\",2623 => \"/meteo/Durazzano\",2624 => \"/meteo/Duronia\",2625 => \"/meteo/Dusino+San+Michele\",2626 => \"/meteo/Eboli\",2627 => \"/meteo/Edolo\",2628 => \"/meteo/Egna\",2629 => \"/meteo/Elice\",2630 => \"/meteo/Elini\",2631 => \"/meteo/Ello\",2632 => \"/meteo/Elmas\",2633 => \"/meteo/Elva\",2634 => \"/meteo/Emarese\",2635 => \"/meteo/Empoli\",2636 => \"/meteo/Endine+gaiano\",2637 => \"/meteo/Enego\",2638 => \"/meteo/Enemonzo\",2639 => \"/meteo/Enna\",2640 => \"/meteo/Entracque\",2641 => \"/meteo/Entratico\",8222 => \"/meteo/Entreves\",2642 => \"/meteo/Envie\",8397 => \"/meteo/Episcopia\",2644 => \"/meteo/Eraclea\",2645 => \"/meteo/Erba\",2646 => \"/meteo/Erbe'\",2647 => \"/meteo/Erbezzo\",2648 => \"/meteo/Erbusco\",2649 => \"/meteo/Erchie\",2650 => \"/meteo/Ercolano\",8531 => \"/meteo/Eremo+di+Camaldoli\",8606 => \"/meteo/Eremo+di+Carpegna\",2651 => \"/meteo/Erice\",2652 => \"/meteo/Erli\",2653 => \"/meteo/Erto+e+casso\",2654 => \"/meteo/Erula\",2655 => \"/meteo/Erve\",2656 => \"/meteo/Esanatoglia\",2657 => \"/meteo/Escalaplano\",2658 => \"/meteo/Escolca\",2659 => \"/meteo/Esine\",2660 => \"/meteo/Esino+lario\",2661 => \"/meteo/Esperia\",2662 => \"/meteo/Esporlatu\",2663 => \"/meteo/Este\",2664 => \"/meteo/Esterzili\",2665 => \"/meteo/Etroubles\",2666 => \"/meteo/Eupilio\",2667 => \"/meteo/Exilles\",2668 => \"/meteo/Fabbrica+Curone\",2669 => \"/meteo/Fabbriche+di+vallico\",2670 => \"/meteo/Fabbrico\",2671 => \"/meteo/Fabriano\",2672 => \"/meteo/Fabrica+di+Roma\",2673 => \"/meteo/Fabrizia\",2674 => \"/meteo/Fabro\",8458 => \"/meteo/Fabro+casello\",2675 => \"/meteo/Faedis\",2676 => \"/meteo/Faedo\",2677 => \"/meteo/Faedo+valtellino\",2678 => \"/meteo/Faenza\",2679 => \"/meteo/Faeto\",2680 => \"/meteo/Fagagna\",2681 => \"/meteo/Faggeto+lario\",2682 => \"/meteo/Faggiano\",2683 => \"/meteo/Fagnano+alto\",2684 => \"/meteo/Fagnano+castello\",2685 => \"/meteo/Fagnano+olona\",2686 => \"/meteo/Fai+della+paganella\",2687 => \"/meteo/Faicchio\",2688 => \"/meteo/Falcade\",2689 => \"/meteo/Falciano+del+massico\",2690 => \"/meteo/Falconara+albanese\",2691 => \"/meteo/Falconara+marittima\",2692 => \"/meteo/Falcone\",2693 => \"/meteo/Faleria\",2694 => \"/meteo/Falerna\",8116 => \"/meteo/Falerna+Marina\",2695 => \"/meteo/Falerone\",2696 => \"/meteo/Fallo\",2697 => \"/meteo/Falmenta\",2698 => \"/meteo/Faloppio\",2699 => \"/meteo/Falvaterra\",2700 => \"/meteo/Falzes\",2701 => \"/meteo/Fanano\",2702 => \"/meteo/Fanna\",2703 => \"/meteo/Fano\",2704 => \"/meteo/Fano+adriano\",2705 => \"/meteo/Fara+Filiorum+Petri\",2706 => \"/meteo/Fara+gera+d'Adda\",2707 => \"/meteo/Fara+in+sabina\",2708 => \"/meteo/Fara+novarese\",2709 => \"/meteo/Fara+Olivana+con+Sola\",2710 => \"/meteo/Fara+San+Martino\",2711 => \"/meteo/Fara+vicentino\",8360 => \"/meteo/Fardella\",2713 => \"/meteo/Farigliano\",2714 => \"/meteo/Farindola\",2715 => \"/meteo/Farini\",2716 => \"/meteo/Farnese\",2717 => \"/meteo/Farra+d'alpago\",2718 => \"/meteo/Farra+d'Isonzo\",2719 => \"/meteo/Farra+di+soligo\",2720 => \"/meteo/Fasano\",2721 => \"/meteo/Fascia\",2722 => \"/meteo/Fauglia\",2723 => \"/meteo/Faule\",2724 => \"/meteo/Favale+di+malvaro\",2725 => \"/meteo/Favara\",2726 => \"/meteo/Faver\",2727 => \"/meteo/Favignana\",2728 => \"/meteo/Favria\",2729 => \"/meteo/Feisoglio\",2730 => \"/meteo/Feletto\",2731 => \"/meteo/Felino\",2732 => \"/meteo/Felitto\",2733 => \"/meteo/Felizzano\",2734 => \"/meteo/Felonica\",2735 => \"/meteo/Feltre\",2736 => \"/meteo/Fenegro'\",2737 => \"/meteo/Fenestrelle\",2738 => \"/meteo/Fenis\",2739 => \"/meteo/Ferentillo\",2740 => \"/meteo/Ferentino\",2741 => \"/meteo/Ferla\",2742 => \"/meteo/Fermignano\",2743 => \"/meteo/Fermo\",2744 => \"/meteo/Ferno\",2745 => \"/meteo/Feroleto+Antico\",2746 => \"/meteo/Feroleto+della+chiesa\",8370 => \"/meteo/Ferrandina\",2748 => \"/meteo/Ferrara\",2749 => \"/meteo/Ferrara+di+monte+Baldo\",2750 => \"/meteo/Ferrazzano\",2751 => \"/meteo/Ferrera+di+Varese\",2752 => \"/meteo/Ferrera+Erbognone\",2753 => \"/meteo/Ferrere\",2754 => \"/meteo/Ferriere\",2755 => \"/meteo/Ferruzzano\",2756 => \"/meteo/Fiamignano\",2757 => \"/meteo/Fiano\",2758 => \"/meteo/Fiano+romano\",2759 => \"/meteo/Fiastra\",2760 => \"/meteo/Fiave'\",2761 => \"/meteo/Ficarazzi\",2762 => \"/meteo/Ficarolo\",2763 => \"/meteo/Ficarra\",2764 => \"/meteo/Ficulle\",2765 => \"/meteo/Fidenza\",2766 => \"/meteo/Fie'+allo+Sciliar\",2767 => \"/meteo/Fiera+di+primiero\",2768 => \"/meteo/Fierozzo\",2769 => \"/meteo/Fiesco\",2770 => \"/meteo/Fiesole\",2771 => \"/meteo/Fiesse\",2772 => \"/meteo/Fiesso+d'Artico\",2773 => \"/meteo/Fiesso+Umbertiano\",2774 => \"/meteo/Figino+Serenza\",2775 => \"/meteo/Figline+valdarno\",2776 => \"/meteo/Figline+Vegliaturo\",2777 => \"/meteo/Filacciano\",2778 => \"/meteo/Filadelfia\",2779 => \"/meteo/Filago\",2780 => \"/meteo/Filandari\",2781 => \"/meteo/Filattiera\",2782 => \"/meteo/Filettino\",2783 => \"/meteo/Filetto\",8392 => \"/meteo/Filiano\",2785 => \"/meteo/Filighera\",2786 => \"/meteo/Filignano\",2787 => \"/meteo/Filogaso\",2788 => \"/meteo/Filottrano\",2789 => \"/meteo/Finale+emilia\",2790 => \"/meteo/Finale+ligure\",2791 => \"/meteo/Fino+del+monte\",2792 => \"/meteo/Fino+Mornasco\",2793 => \"/meteo/Fiorano+al+Serio\",2794 => \"/meteo/Fiorano+canavese\",2795 => \"/meteo/Fiorano+modenese\",2796 => \"/meteo/Fiordimonte\",2797 => \"/meteo/Fiorenzuola+d'arda\",2798 => \"/meteo/Firenze\",8270 => \"/meteo/Firenze+Peretola\",2799 => \"/meteo/Firenzuola\",2800 => \"/meteo/Firmo\",2801 => \"/meteo/Fisciano\",2802 => \"/meteo/Fiuggi\",2803 => \"/meteo/Fiumalbo\",2804 => \"/meteo/Fiumara\",8489 => \"/meteo/Fiumata\",2805 => \"/meteo/Fiume+veneto\",2806 => \"/meteo/Fiumedinisi\",2807 => \"/meteo/Fiumefreddo+Bruzio\",2808 => \"/meteo/Fiumefreddo+di+Sicilia\",2809 => \"/meteo/Fiumicello\",2810 => \"/meteo/Fiumicino\",2811 => \"/meteo/Fiuminata\",2812 => \"/meteo/Fivizzano\",2813 => \"/meteo/Flaibano\",2814 => \"/meteo/Flavon\",2815 => \"/meteo/Flero\",2816 => \"/meteo/Floresta\",2817 => \"/meteo/Floridia\",2818 => \"/meteo/Florinas\",2819 => \"/meteo/Flumeri\",2820 => \"/meteo/Fluminimaggiore\",2821 => \"/meteo/Flussio\",2822 => \"/meteo/Fobello\",2823 => \"/meteo/Foggia\",2824 => \"/meteo/Foglianise\",2825 => \"/meteo/Fogliano+redipuglia\",2826 => \"/meteo/Foglizzo\",2827 => \"/meteo/Foiano+della+chiana\",2828 => \"/meteo/Foiano+di+val+fortore\",2829 => \"/meteo/Folgaria\",8202 => \"/meteo/Folgarida\",2830 => \"/meteo/Folignano\",2831 => \"/meteo/Foligno\",2832 => \"/meteo/Follina\",2833 => \"/meteo/Follo\",2834 => \"/meteo/Follonica\",2835 => \"/meteo/Fombio\",2836 => \"/meteo/Fondachelli+Fantina\",2837 => \"/meteo/Fondi\",2838 => \"/meteo/Fondo\",2839 => \"/meteo/Fonni\",2840 => \"/meteo/Fontainemore\",2841 => \"/meteo/Fontana+liri\",2842 => \"/meteo/Fontanafredda\",2843 => \"/meteo/Fontanarosa\",8185 => \"/meteo/Fontane+Bianche\",2844 => \"/meteo/Fontanelice\",2845 => \"/meteo/Fontanella\",2846 => \"/meteo/Fontanellato\",2847 => \"/meteo/Fontanelle\",2848 => \"/meteo/Fontaneto+d'Agogna\",2849 => \"/meteo/Fontanetto+po\",2850 => \"/meteo/Fontanigorda\",2851 => \"/meteo/Fontanile\",2852 => \"/meteo/Fontaniva\",2853 => \"/meteo/Fonte\",8643 => \"/meteo/Fonte+Cerreto\",2854 => \"/meteo/Fonte+Nuova\",2855 => \"/meteo/Fontecchio\",2856 => \"/meteo/Fontechiari\",2857 => \"/meteo/Fontegreca\",2858 => \"/meteo/Fonteno\",2859 => \"/meteo/Fontevivo\",2860 => \"/meteo/Fonzaso\",2861 => \"/meteo/Foppolo\",8540 => \"/meteo/Foppolo+IV+Baita\",2862 => \"/meteo/Forano\",2863 => \"/meteo/Force\",2864 => \"/meteo/Forchia\",2865 => \"/meteo/Forcola\",2866 => \"/meteo/Fordongianus\",2867 => \"/meteo/Forenza\",2868 => \"/meteo/Foresto+sparso\",2869 => \"/meteo/Forgaria+nel+friuli\",2870 => \"/meteo/Forino\",2871 => \"/meteo/Forio\",8551 => \"/meteo/Forlì+Ridolfi\",2872 => \"/meteo/Forli'\",2873 => \"/meteo/Forli'+del+sannio\",2874 => \"/meteo/Forlimpopoli\",2875 => \"/meteo/Formazza\",2876 => \"/meteo/Formello\",2877 => \"/meteo/Formia\",2878 => \"/meteo/Formicola\",2879 => \"/meteo/Formigara\",2880 => \"/meteo/Formigine\",2881 => \"/meteo/Formigliana\",2882 => \"/meteo/Formignana\",2883 => \"/meteo/Fornace\",2884 => \"/meteo/Fornelli\",2885 => \"/meteo/Forni+Avoltri\",2886 => \"/meteo/Forni+di+sopra\",2887 => \"/meteo/Forni+di+sotto\",8161 => \"/meteo/Forno+Alpi+Graie\",2888 => \"/meteo/Forno+canavese\",2889 => \"/meteo/Forno+di+Zoldo\",2890 => \"/meteo/Fornovo+di+Taro\",2891 => \"/meteo/Fornovo+San+Giovanni\",2892 => \"/meteo/Forte+dei+marmi\",2893 => \"/meteo/Fortezza\",2894 => \"/meteo/Fortunago\",2895 => \"/meteo/Forza+d'Agro'\",2896 => \"/meteo/Fosciandora\",8435 => \"/meteo/Fosdinovo\",2898 => \"/meteo/Fossa\",2899 => \"/meteo/Fossacesia\",2900 => \"/meteo/Fossalta+di+Piave\",2901 => \"/meteo/Fossalta+di+Portogruaro\",2902 => \"/meteo/Fossalto\",2903 => \"/meteo/Fossano\",2904 => \"/meteo/Fossato+di+vico\",2905 => \"/meteo/Fossato+serralta\",2906 => \"/meteo/Fosso'\",2907 => \"/meteo/Fossombrone\",2908 => \"/meteo/Foza\",2909 => \"/meteo/Frabosa+soprana\",2910 => \"/meteo/Frabosa+sottana\",2911 => \"/meteo/Fraconalto\",2912 => \"/meteo/Fragagnano\",2913 => \"/meteo/Fragneto+l'abate\",2914 => \"/meteo/Fragneto+monforte\",2915 => \"/meteo/Fraine\",2916 => \"/meteo/Framura\",2917 => \"/meteo/Francavilla+al+mare\",2918 => \"/meteo/Francavilla+angitola\",2919 => \"/meteo/Francavilla+bisio\",2920 => \"/meteo/Francavilla+d'ete\",2921 => \"/meteo/Francavilla+di+Sicilia\",2922 => \"/meteo/Francavilla+fontana\",8380 => \"/meteo/Francavilla+in+sinni\",2924 => \"/meteo/Francavilla+marittima\",2925 => \"/meteo/Francica\",2926 => \"/meteo/Francofonte\",2927 => \"/meteo/Francolise\",2928 => \"/meteo/Frascaro\",2929 => \"/meteo/Frascarolo\",2930 => \"/meteo/Frascati\",2931 => \"/meteo/Frascineto\",2932 => \"/meteo/Frassilongo\",2933 => \"/meteo/Frassinelle+polesine\",2934 => \"/meteo/Frassinello+monferrato\",2935 => \"/meteo/Frassineto+po\",2936 => \"/meteo/Frassinetto\",2937 => \"/meteo/Frassino\",2938 => \"/meteo/Frassinoro\",2939 => \"/meteo/Frasso+sabino\",2940 => \"/meteo/Frasso+telesino\",2941 => \"/meteo/Fratta+polesine\",2942 => \"/meteo/Fratta+todina\",2943 => \"/meteo/Frattamaggiore\",2944 => \"/meteo/Frattaminore\",2945 => \"/meteo/Fratte+rosa\",2946 => \"/meteo/Frazzano'\",8137 => \"/meteo/Fregene\",2947 => \"/meteo/Fregona\",8667 => \"/meteo/Frejusia\",2948 => \"/meteo/Fresagrandinaria\",2949 => \"/meteo/Fresonara\",2950 => \"/meteo/Frigento\",2951 => \"/meteo/Frignano\",2952 => \"/meteo/Frinco\",2953 => \"/meteo/Frisa\",2954 => \"/meteo/Frisanco\",2955 => \"/meteo/Front\",8153 => \"/meteo/Frontignano\",2956 => \"/meteo/Frontino\",2957 => \"/meteo/Frontone\",8751 => \"/meteo/Frontone+-+Monte+Catria\",2958 => \"/meteo/Frosinone\",8464 => \"/meteo/Frosinone+casello\",2959 => \"/meteo/Frosolone\",2960 => \"/meteo/Frossasco\",2961 => \"/meteo/Frugarolo\",2962 => \"/meteo/Fubine\",2963 => \"/meteo/Fucecchio\",2964 => \"/meteo/Fuipiano+valle+imagna\",2965 => \"/meteo/Fumane\",2966 => \"/meteo/Fumone\",2967 => \"/meteo/Funes\",2968 => \"/meteo/Furci\",2969 => \"/meteo/Furci+siculo\",2970 => \"/meteo/Furnari\",2971 => \"/meteo/Furore\",2972 => \"/meteo/Furtei\",2973 => \"/meteo/Fuscaldo\",2974 => \"/meteo/Fusignano\",2975 => \"/meteo/Fusine\",8702 => \"/meteo/Fusine+di+Zoldo\",8131 => \"/meteo/Fusine+in+Valromana\",2976 => \"/meteo/Futani\",2977 => \"/meteo/Gabbioneta+binanuova\",2978 => \"/meteo/Gabiano\",2979 => \"/meteo/Gabicce+mare\",8252 => \"/meteo/Gabiet\",2980 => \"/meteo/Gaby\",2981 => \"/meteo/Gadesco+Pieve+Delmona\",2982 => \"/meteo/Gadoni\",2983 => \"/meteo/Gaeta\",2984 => \"/meteo/Gaggi\",2985 => \"/meteo/Gaggiano\",2986 => \"/meteo/Gaggio+montano\",2987 => \"/meteo/Gaglianico\",2988 => \"/meteo/Gagliano+aterno\",2989 => \"/meteo/Gagliano+castelferrato\",2990 => \"/meteo/Gagliano+del+capo\",2991 => \"/meteo/Gagliato\",2992 => \"/meteo/Gagliole\",2993 => \"/meteo/Gaiarine\",2994 => \"/meteo/Gaiba\",2995 => \"/meteo/Gaiola\",2996 => \"/meteo/Gaiole+in+chianti\",2997 => \"/meteo/Gairo\",2998 => \"/meteo/Gais\",2999 => \"/meteo/Galati+Mamertino\",3000 => \"/meteo/Galatina\",3001 => \"/meteo/Galatone\",3002 => \"/meteo/Galatro\",3003 => \"/meteo/Galbiate\",3004 => \"/meteo/Galeata\",3005 => \"/meteo/Galgagnano\",3006 => \"/meteo/Gallarate\",3007 => \"/meteo/Gallese\",3008 => \"/meteo/Galliate\",3009 => \"/meteo/Galliate+lombardo\",3010 => \"/meteo/Galliavola\",3011 => \"/meteo/Gallicano\",3012 => \"/meteo/Gallicano+nel+Lazio\",8364 => \"/meteo/Gallicchio\",3014 => \"/meteo/Galliera\",3015 => \"/meteo/Galliera+veneta\",3016 => \"/meteo/Gallinaro\",3017 => \"/meteo/Gallio\",3018 => \"/meteo/Gallipoli\",3019 => \"/meteo/Gallo+matese\",3020 => \"/meteo/Gallodoro\",3021 => \"/meteo/Galluccio\",8315 => \"/meteo/Galluzzo\",3022 => \"/meteo/Galtelli\",3023 => \"/meteo/Galzignano+terme\",3024 => \"/meteo/Gamalero\",3025 => \"/meteo/Gambara\",3026 => \"/meteo/Gambarana\",8105 => \"/meteo/Gambarie\",3027 => \"/meteo/Gambasca\",3028 => \"/meteo/Gambassi+terme\",3029 => \"/meteo/Gambatesa\",3030 => \"/meteo/Gambellara\",3031 => \"/meteo/Gamberale\",3032 => \"/meteo/Gambettola\",3033 => \"/meteo/Gambolo'\",3034 => \"/meteo/Gambugliano\",3035 => \"/meteo/Gandellino\",3036 => \"/meteo/Gandino\",3037 => \"/meteo/Gandosso\",3038 => \"/meteo/Gangi\",8425 => \"/meteo/Garaguso\",3040 => \"/meteo/Garbagna\",3041 => \"/meteo/Garbagna+novarese\",3042 => \"/meteo/Garbagnate+milanese\",3043 => \"/meteo/Garbagnate+monastero\",3044 => \"/meteo/Garda\",3045 => \"/meteo/Gardone+riviera\",3046 => \"/meteo/Gardone+val+trompia\",3047 => \"/meteo/Garessio\",8349 => \"/meteo/Garessio+2000\",3048 => \"/meteo/Gargallo\",3049 => \"/meteo/Gargazzone\",3050 => \"/meteo/Gargnano\",3051 => \"/meteo/Garlasco\",3052 => \"/meteo/Garlate\",3053 => \"/meteo/Garlenda\",3054 => \"/meteo/Garniga\",3055 => \"/meteo/Garzeno\",3056 => \"/meteo/Garzigliana\",3057 => \"/meteo/Gasperina\",3058 => \"/meteo/Gassino+torinese\",3059 => \"/meteo/Gattatico\",3060 => \"/meteo/Gatteo\",3061 => \"/meteo/Gattico\",3062 => \"/meteo/Gattinara\",3063 => \"/meteo/Gavardo\",3064 => \"/meteo/Gavazzana\",3065 => \"/meteo/Gavello\",3066 => \"/meteo/Gaverina+terme\",3067 => \"/meteo/Gavi\",3068 => \"/meteo/Gavignano\",3069 => \"/meteo/Gavirate\",3070 => \"/meteo/Gavoi\",3071 => \"/meteo/Gavorrano\",3072 => \"/meteo/Gazoldo+degli+ippoliti\",3073 => \"/meteo/Gazzada+schianno\",3074 => \"/meteo/Gazzaniga\",3075 => \"/meteo/Gazzo\",3076 => \"/meteo/Gazzo+veronese\",3077 => \"/meteo/Gazzola\",3078 => \"/meteo/Gazzuolo\",3079 => \"/meteo/Gela\",3080 => \"/meteo/Gemmano\",3081 => \"/meteo/Gemona+del+friuli\",3082 => \"/meteo/Gemonio\",3083 => \"/meteo/Genazzano\",3084 => \"/meteo/Genga\",3085 => \"/meteo/Genivolta\",3086 => \"/meteo/Genola\",3087 => \"/meteo/Genoni\",3088 => \"/meteo/Genova\",8506 => \"/meteo/Genova+Nervi\",8276 => \"/meteo/Genova+Sestri\",3089 => \"/meteo/Genuri\",3090 => \"/meteo/Genzano+di+lucania\",3091 => \"/meteo/Genzano+di+roma\",3092 => \"/meteo/Genzone\",3093 => \"/meteo/Gera+lario\",3094 => \"/meteo/Gerace\",3095 => \"/meteo/Geraci+siculo\",3096 => \"/meteo/Gerano\",8176 => \"/meteo/Geremeas\",3097 => \"/meteo/Gerenzago\",3098 => \"/meteo/Gerenzano\",3099 => \"/meteo/Gergei\",3100 => \"/meteo/Germagnano\",3101 => \"/meteo/Germagno\",3102 => \"/meteo/Germasino\",3103 => \"/meteo/Germignaga\",8303 => \"/meteo/Gerno+di+Lesmo\",3104 => \"/meteo/Gerocarne\",3105 => \"/meteo/Gerola+alta\",3106 => \"/meteo/Gerosa\",3107 => \"/meteo/Gerre+de'caprioli\",3108 => \"/meteo/Gesico\",3109 => \"/meteo/Gessate\",3110 => \"/meteo/Gessopalena\",3111 => \"/meteo/Gesturi\",3112 => \"/meteo/Gesualdo\",3113 => \"/meteo/Ghedi\",3114 => \"/meteo/Ghemme\",8236 => \"/meteo/Ghiacciaio+Presena\",3115 => \"/meteo/Ghiffa\",3116 => \"/meteo/Ghilarza\",3117 => \"/meteo/Ghisalba\",3118 => \"/meteo/Ghislarengo\",3119 => \"/meteo/Giacciano+con+baruchella\",3120 => \"/meteo/Giaglione\",3121 => \"/meteo/Gianico\",3122 => \"/meteo/Giano+dell'umbria\",3123 => \"/meteo/Giano+vetusto\",3124 => \"/meteo/Giardinello\",3125 => \"/meteo/Giardini+Naxos\",3126 => \"/meteo/Giarole\",3127 => \"/meteo/Giarratana\",3128 => \"/meteo/Giarre\",3129 => \"/meteo/Giave\",3130 => \"/meteo/Giaveno\",3131 => \"/meteo/Giavera+del+montello\",3132 => \"/meteo/Giba\",3133 => \"/meteo/Gibellina\",3134 => \"/meteo/Gifflenga\",3135 => \"/meteo/Giffone\",3136 => \"/meteo/Giffoni+sei+casali\",3137 => \"/meteo/Giffoni+valle+piana\",3380 => \"/meteo/Giglio+castello\",3138 => \"/meteo/Gignese\",3139 => \"/meteo/Gignod\",3140 => \"/meteo/Gildone\",3141 => \"/meteo/Gimigliano\",8403 => \"/meteo/Ginestra\",3143 => \"/meteo/Ginestra+degli+schiavoni\",8430 => \"/meteo/Ginosa\",3145 => \"/meteo/Gioi\",3146 => \"/meteo/Gioia+dei+marsi\",3147 => \"/meteo/Gioia+del+colle\",3148 => \"/meteo/Gioia+sannitica\",3149 => \"/meteo/Gioia+tauro\",3150 => \"/meteo/Gioiosa+ionica\",3151 => \"/meteo/Gioiosa+marea\",3152 => \"/meteo/Giove\",3153 => \"/meteo/Giovinazzo\",3154 => \"/meteo/Giovo\",3155 => \"/meteo/Girasole\",3156 => \"/meteo/Girifalco\",3157 => \"/meteo/Gironico\",3158 => \"/meteo/Gissi\",3159 => \"/meteo/Giuggianello\",3160 => \"/meteo/Giugliano+in+campania\",3161 => \"/meteo/Giuliana\",3162 => \"/meteo/Giuliano+di+roma\",3163 => \"/meteo/Giuliano+teatino\",3164 => \"/meteo/Giulianova\",3165 => \"/meteo/Giuncugnano\",3166 => \"/meteo/Giungano\",3167 => \"/meteo/Giurdignano\",3168 => \"/meteo/Giussago\",3169 => \"/meteo/Giussano\",3170 => \"/meteo/Giustenice\",3171 => \"/meteo/Giustino\",3172 => \"/meteo/Giusvalla\",3173 => \"/meteo/Givoletto\",3174 => \"/meteo/Gizzeria\",3175 => \"/meteo/Glorenza\",3176 => \"/meteo/Godega+di+sant'urbano\",3177 => \"/meteo/Godiasco\",3178 => \"/meteo/Godrano\",3179 => \"/meteo/Goito\",3180 => \"/meteo/Golasecca\",3181 => \"/meteo/Golferenzo\",3182 => \"/meteo/Golfo+aranci\",3183 => \"/meteo/Gombito\",3184 => \"/meteo/Gonars\",3185 => \"/meteo/Goni\",3186 => \"/meteo/Gonnesa\",3187 => \"/meteo/Gonnoscodina\",3188 => \"/meteo/Gonnosfanadiga\",3189 => \"/meteo/Gonnosno'\",3190 => \"/meteo/Gonnostramatza\",3191 => \"/meteo/Gonzaga\",3192 => \"/meteo/Gordona\",3193 => \"/meteo/Gorga\",3194 => \"/meteo/Gorgo+al+monticano\",3195 => \"/meteo/Gorgoglione\",3196 => \"/meteo/Gorgonzola\",3197 => \"/meteo/Goriano+sicoli\",3198 => \"/meteo/Gorizia\",3199 => \"/meteo/Gorla+maggiore\",3200 => \"/meteo/Gorla+minore\",3201 => \"/meteo/Gorlago\",3202 => \"/meteo/Gorle\",3203 => \"/meteo/Gornate+olona\",3204 => \"/meteo/Gorno\",3205 => \"/meteo/Goro\",3206 => \"/meteo/Gorreto\",3207 => \"/meteo/Gorzegno\",3208 => \"/meteo/Gosaldo\",3209 => \"/meteo/Gossolengo\",3210 => \"/meteo/Gottasecca\",3211 => \"/meteo/Gottolengo\",3212 => \"/meteo/Govone\",3213 => \"/meteo/Gozzano\",3214 => \"/meteo/Gradara\",3215 => \"/meteo/Gradisca+d'isonzo\",3216 => \"/meteo/Grado\",3217 => \"/meteo/Gradoli\",3218 => \"/meteo/Graffignana\",3219 => \"/meteo/Graffignano\",3220 => \"/meteo/Graglia\",3221 => \"/meteo/Gragnano\",3222 => \"/meteo/Gragnano+trebbiense\",3223 => \"/meteo/Grammichele\",8485 => \"/meteo/Gran+Paradiso\",3224 => \"/meteo/Grana\",3225 => \"/meteo/Granaglione\",3226 => \"/meteo/Granarolo+dell'emilia\",3227 => \"/meteo/Grancona\",8728 => \"/meteo/Grand+Combin\",8327 => \"/meteo/Grand+Crot\",3228 => \"/meteo/Grandate\",3229 => \"/meteo/Grandola+ed+uniti\",3230 => \"/meteo/Graniti\",3231 => \"/meteo/Granozzo+con+monticello\",3232 => \"/meteo/Grantola\",3233 => \"/meteo/Grantorto\",3234 => \"/meteo/Granze\",8371 => \"/meteo/Grassano\",8504 => \"/meteo/Grassina\",3236 => \"/meteo/Grassobbio\",3237 => \"/meteo/Gratteri\",3238 => \"/meteo/Grauno\",3239 => \"/meteo/Gravedona\",3240 => \"/meteo/Gravellona+lomellina\",3241 => \"/meteo/Gravellona+toce\",3242 => \"/meteo/Gravere\",3243 => \"/meteo/Gravina+di+Catania\",3244 => \"/meteo/Gravina+in+puglia\",3245 => \"/meteo/Grazzanise\",3246 => \"/meteo/Grazzano+badoglio\",3247 => \"/meteo/Greccio\",3248 => \"/meteo/Greci\",3249 => \"/meteo/Greggio\",3250 => \"/meteo/Gremiasco\",3251 => \"/meteo/Gressan\",3252 => \"/meteo/Gressoney+la+trinite'\",3253 => \"/meteo/Gressoney+saint+jean\",3254 => \"/meteo/Greve+in+chianti\",3255 => \"/meteo/Grezzago\",3256 => \"/meteo/Grezzana\",3257 => \"/meteo/Griante\",3258 => \"/meteo/Gricignano+di+aversa\",8733 => \"/meteo/Grigna\",3259 => \"/meteo/Grignasco\",3260 => \"/meteo/Grigno\",3261 => \"/meteo/Grimacco\",3262 => \"/meteo/Grimaldi\",3263 => \"/meteo/Grinzane+cavour\",3264 => \"/meteo/Grisignano+di+zocco\",3265 => \"/meteo/Grisolia\",8520 => \"/meteo/Grivola\",3266 => \"/meteo/Grizzana+morandi\",3267 => \"/meteo/Grognardo\",3268 => \"/meteo/Gromo\",3269 => \"/meteo/Grondona\",3270 => \"/meteo/Grone\",3271 => \"/meteo/Grontardo\",3272 => \"/meteo/Gropello+cairoli\",3273 => \"/meteo/Gropparello\",3274 => \"/meteo/Groscavallo\",3275 => \"/meteo/Grosio\",3276 => \"/meteo/Grosotto\",3277 => \"/meteo/Grosseto\",3278 => \"/meteo/Grosso\",3279 => \"/meteo/Grottaferrata\",3280 => \"/meteo/Grottaglie\",3281 => \"/meteo/Grottaminarda\",3282 => \"/meteo/Grottammare\",3283 => \"/meteo/Grottazzolina\",3284 => \"/meteo/Grotte\",3285 => \"/meteo/Grotte+di+castro\",3286 => \"/meteo/Grotteria\",3287 => \"/meteo/Grottole\",3288 => \"/meteo/Grottolella\",3289 => \"/meteo/Gruaro\",3290 => \"/meteo/Grugliasco\",3291 => \"/meteo/Grumello+cremonese+ed+uniti\",3292 => \"/meteo/Grumello+del+monte\",8414 => \"/meteo/Grumento+nova\",3294 => \"/meteo/Grumes\",3295 => \"/meteo/Grumo+appula\",3296 => \"/meteo/Grumo+nevano\",3297 => \"/meteo/Grumolo+delle+abbadesse\",3298 => \"/meteo/Guagnano\",3299 => \"/meteo/Gualdo\",3300 => \"/meteo/Gualdo+Cattaneo\",3301 => \"/meteo/Gualdo+tadino\",3302 => \"/meteo/Gualtieri\",3303 => \"/meteo/Gualtieri+sicamino'\",3304 => \"/meteo/Guamaggiore\",3305 => \"/meteo/Guanzate\",3306 => \"/meteo/Guarcino\",3307 => \"/meteo/Guarda+veneta\",3308 => \"/meteo/Guardabosone\",3309 => \"/meteo/Guardamiglio\",3310 => \"/meteo/Guardavalle\",3311 => \"/meteo/Guardea\",3312 => \"/meteo/Guardia+lombardi\",8365 => \"/meteo/Guardia+perticara\",3314 => \"/meteo/Guardia+piemontese\",3315 => \"/meteo/Guardia+sanframondi\",3316 => \"/meteo/Guardiagrele\",3317 => \"/meteo/Guardialfiera\",3318 => \"/meteo/Guardiaregia\",3319 => \"/meteo/Guardistallo\",3320 => \"/meteo/Guarene\",3321 => \"/meteo/Guasila\",3322 => \"/meteo/Guastalla\",3323 => \"/meteo/Guazzora\",3324 => \"/meteo/Gubbio\",3325 => \"/meteo/Gudo+visconti\",3326 => \"/meteo/Guglionesi\",3327 => \"/meteo/Guidizzolo\",8508 => \"/meteo/Guidonia\",3328 => \"/meteo/Guidonia+montecelio\",3329 => \"/meteo/Guiglia\",3330 => \"/meteo/Guilmi\",3331 => \"/meteo/Gurro\",3332 => \"/meteo/Guspini\",3333 => \"/meteo/Gussago\",3334 => \"/meteo/Gussola\",3335 => \"/meteo/Hone\",8587 => \"/meteo/I+Prati\",3336 => \"/meteo/Idro\",3337 => \"/meteo/Iglesias\",3338 => \"/meteo/Igliano\",3339 => \"/meteo/Ilbono\",3340 => \"/meteo/Illasi\",3341 => \"/meteo/Illorai\",3342 => \"/meteo/Imbersago\",3343 => \"/meteo/Imer\",3344 => \"/meteo/Imola\",3345 => \"/meteo/Imperia\",3346 => \"/meteo/Impruneta\",3347 => \"/meteo/Inarzo\",3348 => \"/meteo/Incisa+in+val+d'arno\",3349 => \"/meteo/Incisa+scapaccino\",3350 => \"/meteo/Incudine\",3351 => \"/meteo/Induno+olona\",3352 => \"/meteo/Ingria\",3353 => \"/meteo/Intragna\",3354 => \"/meteo/Introbio\",3355 => \"/meteo/Introd\",3356 => \"/meteo/Introdacqua\",3357 => \"/meteo/Introzzo\",3358 => \"/meteo/Inverigo\",3359 => \"/meteo/Inverno+e+monteleone\",3360 => \"/meteo/Inverso+pinasca\",3361 => \"/meteo/Inveruno\",3362 => \"/meteo/Invorio\",3363 => \"/meteo/Inzago\",3364 => \"/meteo/Ionadi\",3365 => \"/meteo/Irgoli\",3366 => \"/meteo/Irma\",3367 => \"/meteo/Irsina\",3368 => \"/meteo/Isasca\",3369 => \"/meteo/Isca+sullo+ionio\",3370 => \"/meteo/Ischia\",3371 => \"/meteo/Ischia+di+castro\",3372 => \"/meteo/Ischitella\",3373 => \"/meteo/Iseo\",3374 => \"/meteo/Isera\",3375 => \"/meteo/Isernia\",3376 => \"/meteo/Isili\",3377 => \"/meteo/Isnello\",8742 => \"/meteo/Isola+Albarella\",3378 => \"/meteo/Isola+d'asti\",3379 => \"/meteo/Isola+del+cantone\",8190 => \"/meteo/Isola+del+Giglio\",3381 => \"/meteo/Isola+del+gran+sasso+d'italia\",3382 => \"/meteo/Isola+del+liri\",3383 => \"/meteo/Isola+del+piano\",3384 => \"/meteo/Isola+della+scala\",3385 => \"/meteo/Isola+delle+femmine\",3386 => \"/meteo/Isola+di+capo+rizzuto\",3387 => \"/meteo/Isola+di+fondra\",8671 => \"/meteo/Isola+di+Giannutri\",3388 => \"/meteo/Isola+dovarese\",3389 => \"/meteo/Isola+rizza\",8173 => \"/meteo/Isola+Rossa\",8183 => \"/meteo/Isola+Salina\",3390 => \"/meteo/Isola+sant'antonio\",3391 => \"/meteo/Isola+vicentina\",3392 => \"/meteo/Isolabella\",3393 => \"/meteo/Isolabona\",3394 => \"/meteo/Isole+tremiti\",3395 => \"/meteo/Isorella\",3396 => \"/meteo/Ispani\",3397 => \"/meteo/Ispica\",3398 => \"/meteo/Ispra\",3399 => \"/meteo/Issiglio\",3400 => \"/meteo/Issime\",3401 => \"/meteo/Isso\",3402 => \"/meteo/Issogne\",3403 => \"/meteo/Istrana\",3404 => \"/meteo/Itala\",3405 => \"/meteo/Itri\",3406 => \"/meteo/Ittireddu\",3407 => \"/meteo/Ittiri\",3408 => \"/meteo/Ivano+fracena\",3409 => \"/meteo/Ivrea\",3410 => \"/meteo/Izano\",3411 => \"/meteo/Jacurso\",3412 => \"/meteo/Jelsi\",3413 => \"/meteo/Jenne\",3414 => \"/meteo/Jerago+con+Orago\",3415 => \"/meteo/Jerzu\",3416 => \"/meteo/Jesi\",3417 => \"/meteo/Jesolo\",3418 => \"/meteo/Jolanda+di+Savoia\",3419 => \"/meteo/Joppolo\",3420 => \"/meteo/Joppolo+Giancaxio\",3421 => \"/meteo/Jovencan\",8568 => \"/meteo/Klausberg\",3422 => \"/meteo/L'Aquila\",3423 => \"/meteo/La+Cassa\",8227 => \"/meteo/La+Lechere\",3424 => \"/meteo/La+Loggia\",3425 => \"/meteo/La+Maddalena\",3426 => \"/meteo/La+Magdeleine\",3427 => \"/meteo/La+Morra\",8617 => \"/meteo/La+Palud\",3428 => \"/meteo/La+Salle\",3429 => \"/meteo/La+Spezia\",3430 => \"/meteo/La+Thuile\",3431 => \"/meteo/La+Valle\",3432 => \"/meteo/La+Valle+Agordina\",8762 => \"/meteo/La+Villa\",3433 => \"/meteo/Labico\",3434 => \"/meteo/Labro\",3435 => \"/meteo/Lacchiarella\",3436 => \"/meteo/Lacco+ameno\",3437 => \"/meteo/Lacedonia\",8245 => \"/meteo/Laceno\",3438 => \"/meteo/Laces\",3439 => \"/meteo/Laconi\",3440 => \"/meteo/Ladispoli\",8571 => \"/meteo/Ladurno\",3441 => \"/meteo/Laerru\",3442 => \"/meteo/Laganadi\",3443 => \"/meteo/Laghi\",3444 => \"/meteo/Laglio\",3445 => \"/meteo/Lagnasco\",3446 => \"/meteo/Lago\",3447 => \"/meteo/Lagonegro\",3448 => \"/meteo/Lagosanto\",3449 => \"/meteo/Lagundo\",3450 => \"/meteo/Laigueglia\",3451 => \"/meteo/Lainate\",3452 => \"/meteo/Laino\",3453 => \"/meteo/Laino+borgo\",3454 => \"/meteo/Laino+castello\",3455 => \"/meteo/Laion\",3456 => \"/meteo/Laives\",3457 => \"/meteo/Lajatico\",3458 => \"/meteo/Lallio\",3459 => \"/meteo/Lama+dei+peligni\",3460 => \"/meteo/Lama+mocogno\",3461 => \"/meteo/Lambrugo\",8477 => \"/meteo/Lamezia+Santa+Eufemia\",3462 => \"/meteo/Lamezia+terme\",3463 => \"/meteo/Lamon\",8179 => \"/meteo/Lampedusa\",3464 => \"/meteo/Lampedusa+e+linosa\",3465 => \"/meteo/Lamporecchio\",3466 => \"/meteo/Lamporo\",3467 => \"/meteo/Lana\",3468 => \"/meteo/Lanciano\",8467 => \"/meteo/Lanciano+casello\",3469 => \"/meteo/Landiona\",3470 => \"/meteo/Landriano\",3471 => \"/meteo/Langhirano\",3472 => \"/meteo/Langosco\",3473 => \"/meteo/Lanusei\",3474 => \"/meteo/Lanuvio\",3475 => \"/meteo/Lanzada\",3476 => \"/meteo/Lanzo+d'intelvi\",3477 => \"/meteo/Lanzo+torinese\",3478 => \"/meteo/Lapedona\",3479 => \"/meteo/Lapio\",3480 => \"/meteo/Lappano\",3481 => \"/meteo/Larciano\",3482 => \"/meteo/Lardaro\",3483 => \"/meteo/Lardirago\",3484 => \"/meteo/Lari\",3485 => \"/meteo/Lariano\",3486 => \"/meteo/Larino\",3487 => \"/meteo/Las+plassas\",3488 => \"/meteo/Lasa\",3489 => \"/meteo/Lascari\",3490 => \"/meteo/Lasino\",3491 => \"/meteo/Lasnigo\",3492 => \"/meteo/Lastebasse\",3493 => \"/meteo/Lastra+a+signa\",3494 => \"/meteo/Latera\",3495 => \"/meteo/Laterina\",3496 => \"/meteo/Laterza\",3497 => \"/meteo/Latiano\",3498 => \"/meteo/Latina\",3499 => \"/meteo/Latisana\",3500 => \"/meteo/Latronico\",3501 => \"/meteo/Lattarico\",3502 => \"/meteo/Lauco\",3503 => \"/meteo/Laureana+cilento\",3504 => \"/meteo/Laureana+di+borrello\",3505 => \"/meteo/Lauregno\",3506 => \"/meteo/Laurenzana\",3507 => \"/meteo/Lauria\",3508 => \"/meteo/Lauriano\",3509 => \"/meteo/Laurino\",3510 => \"/meteo/Laurito\",3511 => \"/meteo/Lauro\",3512 => \"/meteo/Lavagna\",3513 => \"/meteo/Lavagno\",3514 => \"/meteo/Lavarone\",3515 => \"/meteo/Lavello\",3516 => \"/meteo/Lavena+ponte+tresa\",3517 => \"/meteo/Laveno+mombello\",3518 => \"/meteo/Lavenone\",3519 => \"/meteo/Laviano\",8695 => \"/meteo/Lavinio\",3520 => \"/meteo/Lavis\",3521 => \"/meteo/Lazise\",3522 => \"/meteo/Lazzate\",8434 => \"/meteo/Le+polle\",3523 => \"/meteo/Lecce\",3524 => \"/meteo/Lecce+nei+marsi\",3525 => \"/meteo/Lecco\",3526 => \"/meteo/Leffe\",3527 => \"/meteo/Leggiuno\",3528 => \"/meteo/Legnago\",3529 => \"/meteo/Legnano\",3530 => \"/meteo/Legnaro\",3531 => \"/meteo/Lei\",3532 => \"/meteo/Leini\",3533 => \"/meteo/Leivi\",3534 => \"/meteo/Lemie\",3535 => \"/meteo/Lendinara\",3536 => \"/meteo/Leni\",3537 => \"/meteo/Lenna\",3538 => \"/meteo/Lenno\",3539 => \"/meteo/Leno\",3540 => \"/meteo/Lenola\",3541 => \"/meteo/Lenta\",3542 => \"/meteo/Lentate+sul+seveso\",3543 => \"/meteo/Lentella\",3544 => \"/meteo/Lentiai\",3545 => \"/meteo/Lentini\",3546 => \"/meteo/Leonessa\",3547 => \"/meteo/Leonforte\",3548 => \"/meteo/Leporano\",3549 => \"/meteo/Lequile\",3550 => \"/meteo/Lequio+berria\",3551 => \"/meteo/Lequio+tanaro\",3552 => \"/meteo/Lercara+friddi\",3553 => \"/meteo/Lerici\",3554 => \"/meteo/Lerma\",8250 => \"/meteo/Les+Suches\",3555 => \"/meteo/Lesa\",3556 => \"/meteo/Lesegno\",3557 => \"/meteo/Lesignano+de+'bagni\",3558 => \"/meteo/Lesina\",3559 => \"/meteo/Lesmo\",3560 => \"/meteo/Lessolo\",3561 => \"/meteo/Lessona\",3562 => \"/meteo/Lestizza\",3563 => \"/meteo/Letino\",3564 => \"/meteo/Letojanni\",3565 => \"/meteo/Lettere\",3566 => \"/meteo/Lettomanoppello\",3567 => \"/meteo/Lettopalena\",3568 => \"/meteo/Levanto\",3569 => \"/meteo/Levate\",3570 => \"/meteo/Leverano\",3571 => \"/meteo/Levice\",3572 => \"/meteo/Levico+terme\",3573 => \"/meteo/Levone\",3574 => \"/meteo/Lezzeno\",3575 => \"/meteo/Liberi\",3576 => \"/meteo/Librizzi\",3577 => \"/meteo/Licata\",3578 => \"/meteo/Licciana+nardi\",3579 => \"/meteo/Licenza\",3580 => \"/meteo/Licodia+eubea\",8442 => \"/meteo/Lido+degli+Estensi\",8441 => \"/meteo/Lido+delle+Nazioni\",8200 => \"/meteo/Lido+di+Camaiore\",8136 => \"/meteo/Lido+di+Ostia\",8746 => \"/meteo/Lido+di+Volano\",8594 => \"/meteo/Lido+Marini\",3581 => \"/meteo/Lierna\",3582 => \"/meteo/Lignana\",3583 => \"/meteo/Lignano+sabbiadoro\",3584 => \"/meteo/Ligonchio\",3585 => \"/meteo/Ligosullo\",3586 => \"/meteo/Lillianes\",3587 => \"/meteo/Limana\",3588 => \"/meteo/Limatola\",3589 => \"/meteo/Limbadi\",3590 => \"/meteo/Limbiate\",3591 => \"/meteo/Limena\",3592 => \"/meteo/Limido+comasco\",3593 => \"/meteo/Limina\",3594 => \"/meteo/Limone+piemonte\",3595 => \"/meteo/Limone+sul+garda\",3596 => \"/meteo/Limosano\",3597 => \"/meteo/Linarolo\",3598 => \"/meteo/Linguaglossa\",8180 => \"/meteo/Linosa\",3599 => \"/meteo/Lioni\",3600 => \"/meteo/Lipari\",3601 => \"/meteo/Lipomo\",3602 => \"/meteo/Lirio\",3603 => \"/meteo/Liscate\",3604 => \"/meteo/Liscia\",3605 => \"/meteo/Lisciano+niccone\",3606 => \"/meteo/Lisignago\",3607 => \"/meteo/Lisio\",3608 => \"/meteo/Lissone\",3609 => \"/meteo/Liveri\",3610 => \"/meteo/Livigno\",3611 => \"/meteo/Livinallongo+del+col+di+lana\",3613 => \"/meteo/Livo\",3612 => \"/meteo/Livo\",3614 => \"/meteo/Livorno\",3615 => \"/meteo/Livorno+ferraris\",3616 => \"/meteo/Livraga\",3617 => \"/meteo/Lizzanello\",3618 => \"/meteo/Lizzano\",3619 => \"/meteo/Lizzano+in+belvedere\",8300 => \"/meteo/Lizzola\",3620 => \"/meteo/Loano\",3621 => \"/meteo/Loazzolo\",3622 => \"/meteo/Locana\",3623 => \"/meteo/Locate+di+triulzi\",3624 => \"/meteo/Locate+varesino\",3625 => \"/meteo/Locatello\",3626 => \"/meteo/Loceri\",3627 => \"/meteo/Locorotondo\",3628 => \"/meteo/Locri\",3629 => \"/meteo/Loculi\",3630 => \"/meteo/Lode'\",3631 => \"/meteo/Lodi\",3632 => \"/meteo/Lodi+vecchio\",3633 => \"/meteo/Lodine\",3634 => \"/meteo/Lodrino\",3635 => \"/meteo/Lograto\",3636 => \"/meteo/Loiano\",8748 => \"/meteo/Loiano+RFI\",3637 => \"/meteo/Loiri+porto+san+paolo\",3638 => \"/meteo/Lomagna\",3639 => \"/meteo/Lomaso\",3640 => \"/meteo/Lomazzo\",3641 => \"/meteo/Lombardore\",3642 => \"/meteo/Lombriasco\",3643 => \"/meteo/Lomello\",3644 => \"/meteo/Lona+lases\",3645 => \"/meteo/Lonate+ceppino\",3646 => \"/meteo/Lonate+pozzolo\",3647 => \"/meteo/Lonato\",3648 => \"/meteo/Londa\",3649 => \"/meteo/Longano\",3650 => \"/meteo/Longare\",3651 => \"/meteo/Longarone\",3652 => \"/meteo/Longhena\",3653 => \"/meteo/Longi\",3654 => \"/meteo/Longiano\",3655 => \"/meteo/Longobardi\",3656 => \"/meteo/Longobucco\",3657 => \"/meteo/Longone+al+segrino\",3658 => \"/meteo/Longone+sabino\",3659 => \"/meteo/Lonigo\",3660 => \"/meteo/Loranze'\",3661 => \"/meteo/Loreggia\",3662 => \"/meteo/Loreglia\",3663 => \"/meteo/Lorenzago+di+cadore\",3664 => \"/meteo/Lorenzana\",3665 => \"/meteo/Loreo\",3666 => \"/meteo/Loreto\",3667 => \"/meteo/Loreto+aprutino\",3668 => \"/meteo/Loria\",8523 => \"/meteo/Lorica\",3669 => \"/meteo/Loro+ciuffenna\",3670 => \"/meteo/Loro+piceno\",3671 => \"/meteo/Lorsica\",3672 => \"/meteo/Losine\",3673 => \"/meteo/Lotzorai\",3674 => \"/meteo/Lovere\",3675 => \"/meteo/Lovero\",3676 => \"/meteo/Lozio\",3677 => \"/meteo/Lozza\",3678 => \"/meteo/Lozzo+atestino\",3679 => \"/meteo/Lozzo+di+cadore\",3680 => \"/meteo/Lozzolo\",3681 => \"/meteo/Lu\",3682 => \"/meteo/Lubriano\",3683 => \"/meteo/Lucca\",3684 => \"/meteo/Lucca+sicula\",3685 => \"/meteo/Lucera\",3686 => \"/meteo/Lucignano\",3687 => \"/meteo/Lucinasco\",3688 => \"/meteo/Lucito\",3689 => \"/meteo/Luco+dei+marsi\",3690 => \"/meteo/Lucoli\",3691 => \"/meteo/Lugagnano+val+d'arda\",3692 => \"/meteo/Lugnacco\",3693 => \"/meteo/Lugnano+in+teverina\",3694 => \"/meteo/Lugo\",3695 => \"/meteo/Lugo+di+vicenza\",3696 => \"/meteo/Luino\",3697 => \"/meteo/Luisago\",3698 => \"/meteo/Lula\",3699 => \"/meteo/Lumarzo\",3700 => \"/meteo/Lumezzane\",3701 => \"/meteo/Lunamatrona\",3702 => \"/meteo/Lunano\",3703 => \"/meteo/Lungavilla\",3704 => \"/meteo/Lungro\",3705 => \"/meteo/Luogosano\",3706 => \"/meteo/Luogosanto\",3707 => \"/meteo/Lupara\",3708 => \"/meteo/Lurago+d'erba\",3709 => \"/meteo/Lurago+marinone\",3710 => \"/meteo/Lurano\",3711 => \"/meteo/Luras\",3712 => \"/meteo/Lurate+caccivio\",3713 => \"/meteo/Lusciano\",8636 => \"/meteo/Lusentino\",3714 => \"/meteo/Luserna\",3715 => \"/meteo/Luserna+san+giovanni\",3716 => \"/meteo/Lusernetta\",3717 => \"/meteo/Lusevera\",3718 => \"/meteo/Lusia\",3719 => \"/meteo/Lusiana\",3720 => \"/meteo/Lusiglie'\",3721 => \"/meteo/Luson\",3722 => \"/meteo/Lustra\",8572 => \"/meteo/Lutago\",3723 => \"/meteo/Luvinate\",3724 => \"/meteo/Luzzana\",3725 => \"/meteo/Luzzara\",3726 => \"/meteo/Luzzi\",8447 => \"/meteo/L`Aquila+est\",8446 => \"/meteo/L`Aquila+ovest\",3727 => \"/meteo/Maccagno\",3728 => \"/meteo/Maccastorna\",3729 => \"/meteo/Macchia+d'isernia\",3730 => \"/meteo/Macchia+valfortore\",3731 => \"/meteo/Macchiagodena\",3732 => \"/meteo/Macello\",3733 => \"/meteo/Macerata\",3734 => \"/meteo/Macerata+campania\",3735 => \"/meteo/Macerata+feltria\",3736 => \"/meteo/Macherio\",3737 => \"/meteo/Maclodio\",3738 => \"/meteo/Macomer\",3739 => \"/meteo/Macra\",3740 => \"/meteo/Macugnaga\",3741 => \"/meteo/Maddaloni\",3742 => \"/meteo/Madesimo\",3743 => \"/meteo/Madignano\",3744 => \"/meteo/Madone\",3745 => \"/meteo/Madonna+del+sasso\",8201 => \"/meteo/Madonna+di+Campiglio\",3746 => \"/meteo/Maenza\",3747 => \"/meteo/Mafalda\",3748 => \"/meteo/Magasa\",3749 => \"/meteo/Magenta\",3750 => \"/meteo/Maggiora\",3751 => \"/meteo/Magherno\",3752 => \"/meteo/Magione\",3753 => \"/meteo/Magisano\",3754 => \"/meteo/Magliano+alfieri\",3755 => \"/meteo/Magliano+alpi\",8461 => \"/meteo/Magliano+casello\",3756 => \"/meteo/Magliano+de'+marsi\",3757 => \"/meteo/Magliano+di+tenna\",3758 => \"/meteo/Magliano+in+toscana\",3759 => \"/meteo/Magliano+romano\",3760 => \"/meteo/Magliano+sabina\",3761 => \"/meteo/Magliano+vetere\",3762 => \"/meteo/Maglie\",3763 => \"/meteo/Magliolo\",3764 => \"/meteo/Maglione\",3765 => \"/meteo/Magnacavallo\",3766 => \"/meteo/Magnago\",3767 => \"/meteo/Magnano\",3768 => \"/meteo/Magnano+in+riviera\",8322 => \"/meteo/Magnolta\",3769 => \"/meteo/Magomadas\",3770 => \"/meteo/Magre'+sulla+strada+del+vino\",3771 => \"/meteo/Magreglio\",3772 => \"/meteo/Maida\",3773 => \"/meteo/Maiera'\",3774 => \"/meteo/Maierato\",3775 => \"/meteo/Maiolati+spontini\",3776 => \"/meteo/Maiolo\",3777 => \"/meteo/Maiori\",3778 => \"/meteo/Mairago\",3779 => \"/meteo/Mairano\",3780 => \"/meteo/Maissana\",3781 => \"/meteo/Majano\",3782 => \"/meteo/Malagnino\",3783 => \"/meteo/Malalbergo\",3784 => \"/meteo/Malborghetto+valbruna\",3785 => \"/meteo/Malcesine\",3786 => \"/meteo/Male'\",3787 => \"/meteo/Malegno\",3788 => \"/meteo/Maleo\",3789 => \"/meteo/Malesco\",3790 => \"/meteo/Maletto\",3791 => \"/meteo/Malfa\",8229 => \"/meteo/Malga+Ciapela\",8333 => \"/meteo/Malga+Polzone\",8661 => \"/meteo/Malga+San+Giorgio\",3792 => \"/meteo/Malgesso\",3793 => \"/meteo/Malgrate\",3794 => \"/meteo/Malito\",3795 => \"/meteo/Mallare\",3796 => \"/meteo/Malles+Venosta\",3797 => \"/meteo/Malnate\",3798 => \"/meteo/Malo\",3799 => \"/meteo/Malonno\",3800 => \"/meteo/Malosco\",3801 => \"/meteo/Maltignano\",3802 => \"/meteo/Malvagna\",3803 => \"/meteo/Malvicino\",3804 => \"/meteo/Malvito\",3805 => \"/meteo/Mammola\",3806 => \"/meteo/Mamoiada\",3807 => \"/meteo/Manciano\",3808 => \"/meteo/Mandanici\",3809 => \"/meteo/Mandas\",3810 => \"/meteo/Mandatoriccio\",3811 => \"/meteo/Mandela\",3812 => \"/meteo/Mandello+del+lario\",3813 => \"/meteo/Mandello+vitta\",3814 => \"/meteo/Manduria\",3815 => \"/meteo/Manerba+del+garda\",3816 => \"/meteo/Manerbio\",3817 => \"/meteo/Manfredonia\",3818 => \"/meteo/Mango\",3819 => \"/meteo/Mangone\",3820 => \"/meteo/Maniace\",3821 => \"/meteo/Maniago\",3822 => \"/meteo/Manocalzati\",3823 => \"/meteo/Manoppello\",3824 => \"/meteo/Mansue'\",3825 => \"/meteo/Manta\",3826 => \"/meteo/Mantello\",3827 => \"/meteo/Mantova\",8129 => \"/meteo/Manzano\",3829 => \"/meteo/Manziana\",3830 => \"/meteo/Mapello\",3831 => \"/meteo/Mara\",3832 => \"/meteo/Maracalagonis\",3833 => \"/meteo/Maranello\",3834 => \"/meteo/Marano+di+napoli\",3835 => \"/meteo/Marano+di+valpolicella\",3836 => \"/meteo/Marano+equo\",3837 => \"/meteo/Marano+lagunare\",3838 => \"/meteo/Marano+marchesato\",3839 => \"/meteo/Marano+principato\",3840 => \"/meteo/Marano+sul+panaro\",3841 => \"/meteo/Marano+ticino\",3842 => \"/meteo/Marano+vicentino\",3843 => \"/meteo/Maranzana\",3844 => \"/meteo/Maratea\",3845 => \"/meteo/Marcallo+con+Casone\",3846 => \"/meteo/Marcaria\",3847 => \"/meteo/Marcedusa\",3848 => \"/meteo/Marcellina\",3849 => \"/meteo/Marcellinara\",3850 => \"/meteo/Marcetelli\",3851 => \"/meteo/Marcheno\",3852 => \"/meteo/Marchirolo\",3853 => \"/meteo/Marciana\",3854 => \"/meteo/Marciana+marina\",3855 => \"/meteo/Marcianise\",3856 => \"/meteo/Marciano+della+chiana\",3857 => \"/meteo/Marcignago\",3858 => \"/meteo/Marcon\",3859 => \"/meteo/Marebbe\",8478 => \"/meteo/Marene\",3861 => \"/meteo/Mareno+di+piave\",3862 => \"/meteo/Marentino\",3863 => \"/meteo/Maretto\",3864 => \"/meteo/Margarita\",3865 => \"/meteo/Margherita+di+savoia\",3866 => \"/meteo/Margno\",3867 => \"/meteo/Mariana+mantovana\",3868 => \"/meteo/Mariano+comense\",3869 => \"/meteo/Mariano+del+friuli\",3870 => \"/meteo/Marianopoli\",3871 => \"/meteo/Mariglianella\",3872 => \"/meteo/Marigliano\",8291 => \"/meteo/Marilleva\",8490 => \"/meteo/Marina+di+Arbus\",8599 => \"/meteo/Marina+di+Camerota\",8582 => \"/meteo/Marina+di+Campo\",8111 => \"/meteo/Marina+di+Cariati\",8118 => \"/meteo/Marina+di+Cetraro\",8175 => \"/meteo/Marina+di+Gairo\",8164 => \"/meteo/Marina+di+Ginosa\",3873 => \"/meteo/Marina+di+gioiosa+ionica\",8166 => \"/meteo/Marina+di+Leuca\",8184 => \"/meteo/Marina+di+Modica\",8156 => \"/meteo/Marina+di+montenero\",8165 => \"/meteo/Marina+di+Ostuni\",8186 => \"/meteo/Marina+di+Palma\",8141 => \"/meteo/Marina+di+Pescia+Romana\",8591 => \"/meteo/Marina+di+Pescoluse\",8298 => \"/meteo/Marina+di+Pietrasanta\",8128 => \"/meteo/Marina+di+Ravenna\",8174 => \"/meteo/Marina+di+Sorso\",8188 => \"/meteo/Marinella\",3874 => \"/meteo/Marineo\",3875 => \"/meteo/Marino\",3876 => \"/meteo/Marlengo\",3877 => \"/meteo/Marliana\",3878 => \"/meteo/Marmentino\",3879 => \"/meteo/Marmirolo\",8205 => \"/meteo/Marmolada\",3880 => \"/meteo/Marmora\",3881 => \"/meteo/Marnate\",3882 => \"/meteo/Marone\",3883 => \"/meteo/Maropati\",3884 => \"/meteo/Marostica\",8154 => \"/meteo/Marotta\",3885 => \"/meteo/Marradi\",3886 => \"/meteo/Marrubiu\",3887 => \"/meteo/Marsaglia\",3888 => \"/meteo/Marsala\",3889 => \"/meteo/Marsciano\",3890 => \"/meteo/Marsico+nuovo\",3891 => \"/meteo/Marsicovetere\",3892 => \"/meteo/Marta\",3893 => \"/meteo/Martano\",3894 => \"/meteo/Martellago\",3895 => \"/meteo/Martello\",3896 => \"/meteo/Martignacco\",3897 => \"/meteo/Martignana+di+po\",3898 => \"/meteo/Martignano\",3899 => \"/meteo/Martina+franca\",3900 => \"/meteo/Martinengo\",3901 => \"/meteo/Martiniana+po\",3902 => \"/meteo/Martinsicuro\",3903 => \"/meteo/Martirano\",3904 => \"/meteo/Martirano+lombardo\",3905 => \"/meteo/Martis\",3906 => \"/meteo/Martone\",3907 => \"/meteo/Marudo\",3908 => \"/meteo/Maruggio\",3909 => \"/meteo/Marzabotto\",3910 => \"/meteo/Marzano\",3911 => \"/meteo/Marzano+appio\",3912 => \"/meteo/Marzano+di+nola\",3913 => \"/meteo/Marzi\",3914 => \"/meteo/Marzio\",3915 => \"/meteo/Masainas\",3916 => \"/meteo/Masate\",3917 => \"/meteo/Mascali\",3918 => \"/meteo/Mascalucia\",3919 => \"/meteo/Maschito\",3920 => \"/meteo/Masciago+primo\",3921 => \"/meteo/Maser\",3922 => \"/meteo/Masera\",3923 => \"/meteo/Masera'+di+Padova\",3924 => \"/meteo/Maserada+sul+piave\",3925 => \"/meteo/Masi\",3926 => \"/meteo/Masi+torello\",3927 => \"/meteo/Masio\",3928 => \"/meteo/Maslianico\",8216 => \"/meteo/Maso+Corto\",3929 => \"/meteo/Mason+vicentino\",3930 => \"/meteo/Masone\",3931 => \"/meteo/Massa\",3932 => \"/meteo/Massa+d'albe\",3933 => \"/meteo/Massa+di+somma\",3934 => \"/meteo/Massa+e+cozzile\",3935 => \"/meteo/Massa+fermana\",3936 => \"/meteo/Massa+fiscaglia\",3937 => \"/meteo/Massa+lombarda\",3938 => \"/meteo/Massa+lubrense\",3939 => \"/meteo/Massa+marittima\",3940 => \"/meteo/Massa+martana\",3941 => \"/meteo/Massafra\",3942 => \"/meteo/Massalengo\",3943 => \"/meteo/Massanzago\",3944 => \"/meteo/Massarosa\",3945 => \"/meteo/Massazza\",3946 => \"/meteo/Massello\",3947 => \"/meteo/Masserano\",3948 => \"/meteo/Massignano\",3949 => \"/meteo/Massimeno\",3950 => \"/meteo/Massimino\",3951 => \"/meteo/Massino+visconti\",3952 => \"/meteo/Massiola\",3953 => \"/meteo/Masullas\",3954 => \"/meteo/Matelica\",3955 => \"/meteo/Matera\",3956 => \"/meteo/Mathi\",3957 => \"/meteo/Matino\",3958 => \"/meteo/Matrice\",3959 => \"/meteo/Mattie\",3960 => \"/meteo/Mattinata\",3961 => \"/meteo/Mazara+del+vallo\",3962 => \"/meteo/Mazzano\",3963 => \"/meteo/Mazzano+romano\",3964 => \"/meteo/Mazzarino\",3965 => \"/meteo/Mazzarra'+sant'andrea\",3966 => \"/meteo/Mazzarrone\",3967 => \"/meteo/Mazze'\",3968 => \"/meteo/Mazzin\",3969 => \"/meteo/Mazzo+di+valtellina\",3970 => \"/meteo/Meana+di+susa\",3971 => \"/meteo/Meana+sardo\",3972 => \"/meteo/Meda\",3973 => \"/meteo/Mede\",3974 => \"/meteo/Medea\",3975 => \"/meteo/Medesano\",3976 => \"/meteo/Medicina\",3977 => \"/meteo/Mediglia\",3978 => \"/meteo/Medolago\",3979 => \"/meteo/Medole\",3980 => \"/meteo/Medolla\",3981 => \"/meteo/Meduna+di+livenza\",3982 => \"/meteo/Meduno\",3983 => \"/meteo/Megliadino+san+fidenzio\",3984 => \"/meteo/Megliadino+san+vitale\",3985 => \"/meteo/Meina\",3986 => \"/meteo/Mel\",3987 => \"/meteo/Melara\",3988 => \"/meteo/Melazzo\",8443 => \"/meteo/Meldola\",3990 => \"/meteo/Mele\",3991 => \"/meteo/Melegnano\",3992 => \"/meteo/Melendugno\",3993 => \"/meteo/Meleti\",8666 => \"/meteo/Melezet\",3994 => \"/meteo/Melfi\",3995 => \"/meteo/Melicucca'\",3996 => \"/meteo/Melicucco\",3997 => \"/meteo/Melilli\",3998 => \"/meteo/Melissa\",3999 => \"/meteo/Melissano\",4000 => \"/meteo/Melito+di+napoli\",4001 => \"/meteo/Melito+di+porto+salvo\",4002 => \"/meteo/Melito+irpino\",4003 => \"/meteo/Melizzano\",4004 => \"/meteo/Melle\",4005 => \"/meteo/Mello\",4006 => \"/meteo/Melpignano\",4007 => \"/meteo/Meltina\",4008 => \"/meteo/Melzo\",4009 => \"/meteo/Menaggio\",4010 => \"/meteo/Menarola\",4011 => \"/meteo/Menconico\",4012 => \"/meteo/Mendatica\",4013 => \"/meteo/Mendicino\",4014 => \"/meteo/Menfi\",4015 => \"/meteo/Mentana\",4016 => \"/meteo/Meolo\",4017 => \"/meteo/Merana\",4018 => \"/meteo/Merano\",8351 => \"/meteo/Merano+2000\",4019 => \"/meteo/Merate\",4020 => \"/meteo/Mercallo\",4021 => \"/meteo/Mercatello+sul+metauro\",4022 => \"/meteo/Mercatino+conca\",8437 => \"/meteo/Mercato\",4023 => \"/meteo/Mercato+san+severino\",4024 => \"/meteo/Mercato+saraceno\",4025 => \"/meteo/Mercenasco\",4026 => \"/meteo/Mercogliano\",4027 => \"/meteo/Mereto+di+tomba\",4028 => \"/meteo/Mergo\",4029 => \"/meteo/Mergozzo\",4030 => \"/meteo/Meri'\",4031 => \"/meteo/Merlara\",4032 => \"/meteo/Merlino\",4033 => \"/meteo/Merone\",4034 => \"/meteo/Mesagne\",4035 => \"/meteo/Mese\",4036 => \"/meteo/Mesenzana\",4037 => \"/meteo/Mesero\",4038 => \"/meteo/Mesola\",4039 => \"/meteo/Mesoraca\",4040 => \"/meteo/Messina\",4041 => \"/meteo/Mestrino\",4042 => \"/meteo/Meta\",8104 => \"/meteo/Metaponto\",4043 => \"/meteo/Meugliano\",4044 => \"/meteo/Mezzago\",4045 => \"/meteo/Mezzana\",4046 => \"/meteo/Mezzana+bigli\",4047 => \"/meteo/Mezzana+mortigliengo\",4048 => \"/meteo/Mezzana+rabattone\",4049 => \"/meteo/Mezzane+di+sotto\",4050 => \"/meteo/Mezzanego\",4051 => \"/meteo/Mezzani\",4052 => \"/meteo/Mezzanino\",4053 => \"/meteo/Mezzano\",4054 => \"/meteo/Mezzegra\",4055 => \"/meteo/Mezzenile\",4056 => \"/meteo/Mezzocorona\",4057 => \"/meteo/Mezzojuso\",4058 => \"/meteo/Mezzoldo\",4059 => \"/meteo/Mezzolombardo\",4060 => \"/meteo/Mezzomerico\",8524 => \"/meteo/MI+Olgettina\",8526 => \"/meteo/MI+Primaticcio\",8527 => \"/meteo/MI+Silla\",8525 => \"/meteo/MI+Zama\",4061 => \"/meteo/Miagliano\",4062 => \"/meteo/Miane\",4063 => \"/meteo/Miasino\",4064 => \"/meteo/Miazzina\",4065 => \"/meteo/Micigliano\",4066 => \"/meteo/Miggiano\",4067 => \"/meteo/Miglianico\",4068 => \"/meteo/Migliarino\",4069 => \"/meteo/Migliaro\",4070 => \"/meteo/Miglierina\",4071 => \"/meteo/Miglionico\",4072 => \"/meteo/Mignanego\",4073 => \"/meteo/Mignano+monte+lungo\",4074 => \"/meteo/Milano\",8495 => \"/meteo/Milano+Linate\",8496 => \"/meteo/Milano+Malpensa\",8240 => \"/meteo/Milano+marittima\",4075 => \"/meteo/Milazzo\",4076 => \"/meteo/Milena\",4077 => \"/meteo/Mileto\",4078 => \"/meteo/Milis\",4079 => \"/meteo/Militello+in+val+di+catania\",4080 => \"/meteo/Militello+rosmarino\",4081 => \"/meteo/Millesimo\",4082 => \"/meteo/Milo\",4083 => \"/meteo/Milzano\",4084 => \"/meteo/Mineo\",4085 => \"/meteo/Minerbe\",4086 => \"/meteo/Minerbio\",4087 => \"/meteo/Minervino+di+lecce\",4088 => \"/meteo/Minervino+murge\",4089 => \"/meteo/Minori\",4090 => \"/meteo/Minturno\",4091 => \"/meteo/Minucciano\",4092 => \"/meteo/Mioglia\",4093 => \"/meteo/Mira\",4094 => \"/meteo/Mirabella+eclano\",4095 => \"/meteo/Mirabella+imbaccari\",4096 => \"/meteo/Mirabello\",4097 => \"/meteo/Mirabello+monferrato\",4098 => \"/meteo/Mirabello+sannitico\",4099 => \"/meteo/Miradolo+terme\",4100 => \"/meteo/Miranda\",4101 => \"/meteo/Mirandola\",4102 => \"/meteo/Mirano\",4103 => \"/meteo/Mirto\",4104 => \"/meteo/Misano+adriatico\",4105 => \"/meteo/Misano+di+gera+d'adda\",4106 => \"/meteo/Misilmeri\",4107 => \"/meteo/Misinto\",4108 => \"/meteo/Missaglia\",8416 => \"/meteo/Missanello\",4110 => \"/meteo/Misterbianco\",4111 => \"/meteo/Mistretta\",8623 => \"/meteo/Misurina\",4112 => \"/meteo/Moasca\",4113 => \"/meteo/Moconesi\",4114 => \"/meteo/Modena\",4115 => \"/meteo/Modica\",4116 => \"/meteo/Modigliana\",4117 => \"/meteo/Modolo\",4118 => \"/meteo/Modugno\",4119 => \"/meteo/Moena\",4120 => \"/meteo/Moggio\",4121 => \"/meteo/Moggio+udinese\",4122 => \"/meteo/Moglia\",4123 => \"/meteo/Mogliano\",4124 => \"/meteo/Mogliano+veneto\",4125 => \"/meteo/Mogorella\",4126 => \"/meteo/Mogoro\",4127 => \"/meteo/Moiano\",8615 => \"/meteo/Moie\",4128 => \"/meteo/Moimacco\",4129 => \"/meteo/Moio+Alcantara\",4130 => \"/meteo/Moio+de'calvi\",4131 => \"/meteo/Moio+della+civitella\",4132 => \"/meteo/Moiola\",4133 => \"/meteo/Mola+di+bari\",4134 => \"/meteo/Molare\",4135 => \"/meteo/Molazzana\",4136 => \"/meteo/Molfetta\",4137 => \"/meteo/Molina+aterno\",4138 => \"/meteo/Molina+di+ledro\",4139 => \"/meteo/Molinara\",4140 => \"/meteo/Molinella\",4141 => \"/meteo/Molini+di+triora\",4142 => \"/meteo/Molino+dei+torti\",4143 => \"/meteo/Molise\",4144 => \"/meteo/Moliterno\",4145 => \"/meteo/Mollia\",4146 => \"/meteo/Molochio\",4147 => \"/meteo/Molteno\",4148 => \"/meteo/Moltrasio\",4149 => \"/meteo/Molvena\",4150 => \"/meteo/Molveno\",4151 => \"/meteo/Mombaldone\",4152 => \"/meteo/Mombarcaro\",4153 => \"/meteo/Mombaroccio\",4154 => \"/meteo/Mombaruzzo\",4155 => \"/meteo/Mombasiglio\",4156 => \"/meteo/Mombello+di+torino\",4157 => \"/meteo/Mombello+monferrato\",4158 => \"/meteo/Mombercelli\",4159 => \"/meteo/Momo\",4160 => \"/meteo/Mompantero\",4161 => \"/meteo/Mompeo\",4162 => \"/meteo/Momperone\",4163 => \"/meteo/Monacilioni\",4164 => \"/meteo/Monale\",4165 => \"/meteo/Monasterace\",4166 => \"/meteo/Monastero+bormida\",4167 => \"/meteo/Monastero+di+lanzo\",4168 => \"/meteo/Monastero+di+vasco\",4169 => \"/meteo/Monasterolo+casotto\",4170 => \"/meteo/Monasterolo+del+castello\",4171 => \"/meteo/Monasterolo+di+savigliano\",4172 => \"/meteo/Monastier+di+treviso\",4173 => \"/meteo/Monastir\",4174 => \"/meteo/Moncalieri\",4175 => \"/meteo/Moncalvo\",4176 => \"/meteo/Moncenisio\",4177 => \"/meteo/Moncestino\",4178 => \"/meteo/Monchiero\",4179 => \"/meteo/Monchio+delle+corti\",4180 => \"/meteo/Monclassico\",4181 => \"/meteo/Moncrivello\",8649 => \"/meteo/Moncucco\",4182 => \"/meteo/Moncucco+torinese\",4183 => \"/meteo/Mondaino\",4184 => \"/meteo/Mondavio\",4185 => \"/meteo/Mondolfo\",4186 => \"/meteo/Mondovi'\",4187 => \"/meteo/Mondragone\",4188 => \"/meteo/Moneglia\",8143 => \"/meteo/Monesi\",4189 => \"/meteo/Monesiglio\",4190 => \"/meteo/Monfalcone\",4191 => \"/meteo/Monforte+d'alba\",4192 => \"/meteo/Monforte+san+giorgio\",4193 => \"/meteo/Monfumo\",4194 => \"/meteo/Mongardino\",4195 => \"/meteo/Monghidoro\",4196 => \"/meteo/Mongiana\",4197 => \"/meteo/Mongiardino+ligure\",8637 => \"/meteo/Monginevro+Montgenevre\",4198 => \"/meteo/Mongiuffi+melia\",4199 => \"/meteo/Mongrando\",4200 => \"/meteo/Mongrassano\",4201 => \"/meteo/Monguelfo\",4202 => \"/meteo/Monguzzo\",4203 => \"/meteo/Moniga+del+garda\",4204 => \"/meteo/Monleale\",4205 => \"/meteo/Monno\",4206 => \"/meteo/Monopoli\",4207 => \"/meteo/Monreale\",4208 => \"/meteo/Monrupino\",4209 => \"/meteo/Monsampietro+morico\",4210 => \"/meteo/Monsampolo+del+tronto\",4211 => \"/meteo/Monsano\",4212 => \"/meteo/Monselice\",4213 => \"/meteo/Monserrato\",4214 => \"/meteo/Monsummano+terme\",4215 => \"/meteo/Monta'\",4216 => \"/meteo/Montabone\",4217 => \"/meteo/Montacuto\",4218 => \"/meteo/Montafia\",4219 => \"/meteo/Montagano\",4220 => \"/meteo/Montagna\",4221 => \"/meteo/Montagna+in+valtellina\",8301 => \"/meteo/Montagnana\",4223 => \"/meteo/Montagnareale\",4224 => \"/meteo/Montagne\",4225 => \"/meteo/Montaguto\",4226 => \"/meteo/Montaione\",4227 => \"/meteo/Montalbano+Elicona\",4228 => \"/meteo/Montalbano+jonico\",4229 => \"/meteo/Montalcino\",4230 => \"/meteo/Montaldeo\",4231 => \"/meteo/Montaldo+bormida\",4232 => \"/meteo/Montaldo+di+mondovi'\",4233 => \"/meteo/Montaldo+roero\",4234 => \"/meteo/Montaldo+scarampi\",4235 => \"/meteo/Montaldo+torinese\",4236 => \"/meteo/Montale\",4237 => \"/meteo/Montalenghe\",4238 => \"/meteo/Montallegro\",4239 => \"/meteo/Montalto+delle+marche\",4240 => \"/meteo/Montalto+di+castro\",4241 => \"/meteo/Montalto+dora\",4242 => \"/meteo/Montalto+ligure\",4243 => \"/meteo/Montalto+pavese\",4244 => \"/meteo/Montalto+uffugo\",4245 => \"/meteo/Montanaro\",4246 => \"/meteo/Montanaso+lombardo\",4247 => \"/meteo/Montanera\",4248 => \"/meteo/Montano+antilia\",4249 => \"/meteo/Montano+lucino\",4250 => \"/meteo/Montappone\",4251 => \"/meteo/Montaquila\",4252 => \"/meteo/Montasola\",4253 => \"/meteo/Montauro\",4254 => \"/meteo/Montazzoli\",8738 => \"/meteo/Monte+Alben\",8350 => \"/meteo/Monte+Amiata\",4255 => \"/meteo/Monte+Argentario\",8696 => \"/meteo/Monte+Avena\",8660 => \"/meteo/Monte+Baldo\",8251 => \"/meteo/Monte+Belvedere\",8720 => \"/meteo/Monte+Bianco\",8292 => \"/meteo/Monte+Bondone\",8757 => \"/meteo/Monte+Caio\",8149 => \"/meteo/Monte+Campione\",4256 => \"/meteo/Monte+Castello+di+Vibio\",4257 => \"/meteo/Monte+Cavallo\",4258 => \"/meteo/Monte+Cerignone\",8722 => \"/meteo/Monte+Cervino\",8533 => \"/meteo/Monte+Cimone\",4259 => \"/meteo/Monte+Colombo\",8658 => \"/meteo/Monte+Cornizzolo\",4260 => \"/meteo/Monte+Cremasco\",4261 => \"/meteo/Monte+di+Malo\",4262 => \"/meteo/Monte+di+Procida\",8581 => \"/meteo/Monte+Elmo\",8701 => \"/meteo/Monte+Faloria\",4263 => \"/meteo/Monte+Giberto\",8486 => \"/meteo/Monte+Gomito\",8232 => \"/meteo/Monte+Grappa\",4264 => \"/meteo/Monte+Isola\",8735 => \"/meteo/Monte+Legnone\",8631 => \"/meteo/Monte+Livata\",8574 => \"/meteo/Monte+Lussari\",8484 => \"/meteo/Monte+Malanotte\",4265 => \"/meteo/Monte+Marenzo\",8611 => \"/meteo/Monte+Matajur\",8732 => \"/meteo/Monte+Matto\",8266 => \"/meteo/Monte+Moro\",8697 => \"/meteo/Monte+Mucrone\",8619 => \"/meteo/Monte+Pigna\",8288 => \"/meteo/Monte+Pora+Base\",8310 => \"/meteo/Monte+Pora+Cima\",4266 => \"/meteo/Monte+Porzio\",4267 => \"/meteo/Monte+Porzio+Catone\",8608 => \"/meteo/Monte+Prata\",8320 => \"/meteo/Monte+Pratello\",4268 => \"/meteo/Monte+Rinaldo\",4269 => \"/meteo/Monte+Roberto\",4270 => \"/meteo/Monte+Romano\",4271 => \"/meteo/Monte+San+Biagio\",4272 => \"/meteo/Monte+San+Giacomo\",4273 => \"/meteo/Monte+San+Giovanni+Campano\",4274 => \"/meteo/Monte+San+Giovanni+in+Sabina\",4275 => \"/meteo/Monte+San+Giusto\",4276 => \"/meteo/Monte+San+Martino\",4277 => \"/meteo/Monte+San+Pietrangeli\",4278 => \"/meteo/Monte+San+Pietro\",8538 => \"/meteo/Monte+San+Primo\",4279 => \"/meteo/Monte+San+Savino\",8652 => \"/meteo/Monte+San+Vigilio\",4280 => \"/meteo/Monte+San+Vito\",4281 => \"/meteo/Monte+Sant'Angelo\",4282 => \"/meteo/Monte+Santa+Maria+Tiberina\",8570 => \"/meteo/Monte+Scuro\",8278 => \"/meteo/Monte+Spinale\",4283 => \"/meteo/Monte+Urano\",8758 => \"/meteo/Monte+Ventasso\",4284 => \"/meteo/Monte+Vidon+Combatte\",4285 => \"/meteo/Monte+Vidon+Corrado\",8729 => \"/meteo/Monte+Volturino\",8346 => \"/meteo/Monte+Zoncolan\",4286 => \"/meteo/Montebello+della+Battaglia\",4287 => \"/meteo/Montebello+di+Bertona\",4288 => \"/meteo/Montebello+Ionico\",4289 => \"/meteo/Montebello+sul+Sangro\",4290 => \"/meteo/Montebello+Vicentino\",4291 => \"/meteo/Montebelluna\",4292 => \"/meteo/Montebruno\",4293 => \"/meteo/Montebuono\",4294 => \"/meteo/Montecalvo+in+Foglia\",4295 => \"/meteo/Montecalvo+Irpino\",4296 => \"/meteo/Montecalvo+Versiggia\",4297 => \"/meteo/Montecarlo\",4298 => \"/meteo/Montecarotto\",4299 => \"/meteo/Montecassiano\",4300 => \"/meteo/Montecastello\",4301 => \"/meteo/Montecastrilli\",4303 => \"/meteo/Montecatini+terme\",4302 => \"/meteo/Montecatini+Val+di+Cecina\",4304 => \"/meteo/Montecchia+di+Crosara\",4305 => \"/meteo/Montecchio\",4306 => \"/meteo/Montecchio+Emilia\",4307 => \"/meteo/Montecchio+Maggiore\",4308 => \"/meteo/Montecchio+Precalcino\",4309 => \"/meteo/Montechiaro+d'Acqui\",4310 => \"/meteo/Montechiaro+d'Asti\",4311 => \"/meteo/Montechiarugolo\",4312 => \"/meteo/Monteciccardo\",4313 => \"/meteo/Montecilfone\",4314 => \"/meteo/Montecompatri\",4315 => \"/meteo/Montecopiolo\",4316 => \"/meteo/Montecorice\",4317 => \"/meteo/Montecorvino+Pugliano\",4318 => \"/meteo/Montecorvino+Rovella\",4319 => \"/meteo/Montecosaro\",4320 => \"/meteo/Montecrestese\",4321 => \"/meteo/Montecreto\",4322 => \"/meteo/Montedinove\",4323 => \"/meteo/Montedoro\",4324 => \"/meteo/Montefalcione\",4325 => \"/meteo/Montefalco\",4326 => \"/meteo/Montefalcone+Appennino\",4327 => \"/meteo/Montefalcone+di+Val+Fortore\",4328 => \"/meteo/Montefalcone+nel+Sannio\",4329 => \"/meteo/Montefano\",4330 => \"/meteo/Montefelcino\",4331 => \"/meteo/Monteferrante\",4332 => \"/meteo/Montefiascone\",4333 => \"/meteo/Montefino\",4334 => \"/meteo/Montefiore+conca\",4335 => \"/meteo/Montefiore+dell'Aso\",4336 => \"/meteo/Montefiorino\",4337 => \"/meteo/Monteflavio\",4338 => \"/meteo/Monteforte+Cilento\",4339 => \"/meteo/Monteforte+d'Alpone\",4340 => \"/meteo/Monteforte+Irpino\",4341 => \"/meteo/Montefortino\",4342 => \"/meteo/Montefranco\",4343 => \"/meteo/Montefredane\",4344 => \"/meteo/Montefusco\",4345 => \"/meteo/Montegabbione\",4346 => \"/meteo/Montegalda\",4347 => \"/meteo/Montegaldella\",4348 => \"/meteo/Montegallo\",4349 => \"/meteo/Montegioco\",4350 => \"/meteo/Montegiordano\",4351 => \"/meteo/Montegiorgio\",4352 => \"/meteo/Montegranaro\",4353 => \"/meteo/Montegridolfo\",4354 => \"/meteo/Montegrimano\",4355 => \"/meteo/Montegrino+valtravaglia\",4356 => \"/meteo/Montegrosso+d'Asti\",4357 => \"/meteo/Montegrosso+pian+latte\",4358 => \"/meteo/Montegrotto+terme\",4359 => \"/meteo/Monteiasi\",4360 => \"/meteo/Montelabbate\",4361 => \"/meteo/Montelanico\",4362 => \"/meteo/Montelapiano\",4363 => \"/meteo/Monteleone+d'orvieto\",4364 => \"/meteo/Monteleone+di+fermo\",4365 => \"/meteo/Monteleone+di+puglia\",4366 => \"/meteo/Monteleone+di+spoleto\",4367 => \"/meteo/Monteleone+rocca+doria\",4368 => \"/meteo/Monteleone+sabino\",4369 => \"/meteo/Montelepre\",4370 => \"/meteo/Montelibretti\",4371 => \"/meteo/Montella\",4372 => \"/meteo/Montello\",4373 => \"/meteo/Montelongo\",4374 => \"/meteo/Montelparo\",4375 => \"/meteo/Montelupo+albese\",4376 => \"/meteo/Montelupo+fiorentino\",4377 => \"/meteo/Montelupone\",4378 => \"/meteo/Montemaggiore+al+metauro\",4379 => \"/meteo/Montemaggiore+belsito\",4380 => \"/meteo/Montemagno\",4381 => \"/meteo/Montemale+di+cuneo\",4382 => \"/meteo/Montemarano\",4383 => \"/meteo/Montemarciano\",4384 => \"/meteo/Montemarzino\",4385 => \"/meteo/Montemesola\",4386 => \"/meteo/Montemezzo\",4387 => \"/meteo/Montemignaio\",4388 => \"/meteo/Montemiletto\",8401 => \"/meteo/Montemilone\",4390 => \"/meteo/Montemitro\",4391 => \"/meteo/Montemonaco\",4392 => \"/meteo/Montemurlo\",8408 => \"/meteo/Montemurro\",4394 => \"/meteo/Montenars\",4395 => \"/meteo/Montenero+di+bisaccia\",4396 => \"/meteo/Montenero+sabino\",4397 => \"/meteo/Montenero+val+cocchiara\",4398 => \"/meteo/Montenerodomo\",4399 => \"/meteo/Monteodorisio\",4400 => \"/meteo/Montepaone\",4401 => \"/meteo/Monteparano\",8296 => \"/meteo/Montepiano\",4402 => \"/meteo/Monteprandone\",4403 => \"/meteo/Montepulciano\",4404 => \"/meteo/Monterado\",4405 => \"/meteo/Monterchi\",4406 => \"/meteo/Montereale\",4407 => \"/meteo/Montereale+valcellina\",4408 => \"/meteo/Monterenzio\",4409 => \"/meteo/Monteriggioni\",4410 => \"/meteo/Monteroduni\",4411 => \"/meteo/Monteroni+d'arbia\",4412 => \"/meteo/Monteroni+di+lecce\",4413 => \"/meteo/Monterosi\",4414 => \"/meteo/Monterosso+al+mare\",4415 => \"/meteo/Monterosso+almo\",4416 => \"/meteo/Monterosso+calabro\",4417 => \"/meteo/Monterosso+grana\",4418 => \"/meteo/Monterotondo\",4419 => \"/meteo/Monterotondo+marittimo\",4420 => \"/meteo/Monterubbiano\",4421 => \"/meteo/Montesano+salentino\",4422 => \"/meteo/Montesano+sulla+marcellana\",4423 => \"/meteo/Montesarchio\",8389 => \"/meteo/Montescaglioso\",4425 => \"/meteo/Montescano\",4426 => \"/meteo/Montescheno\",4427 => \"/meteo/Montescudaio\",4428 => \"/meteo/Montescudo\",4429 => \"/meteo/Montese\",4430 => \"/meteo/Montesegale\",4431 => \"/meteo/Montesilvano\",8491 => \"/meteo/Montesilvano+Marina\",4432 => \"/meteo/Montespertoli\",1730 => \"/meteo/Montespluga\",4433 => \"/meteo/Monteu+da+Po\",4434 => \"/meteo/Monteu+roero\",4435 => \"/meteo/Montevago\",4436 => \"/meteo/Montevarchi\",4437 => \"/meteo/Montevecchia\",4438 => \"/meteo/Monteveglio\",4439 => \"/meteo/Monteverde\",4440 => \"/meteo/Monteverdi+marittimo\",8589 => \"/meteo/Montevergine\",4441 => \"/meteo/Monteviale\",4442 => \"/meteo/Montezemolo\",4443 => \"/meteo/Monti\",4444 => \"/meteo/Montiano\",4445 => \"/meteo/Monticelli+brusati\",4446 => \"/meteo/Monticelli+d'ongina\",4447 => \"/meteo/Monticelli+pavese\",4448 => \"/meteo/Monticello+brianza\",4449 => \"/meteo/Monticello+conte+otto\",4450 => \"/meteo/Monticello+d'alba\",4451 => \"/meteo/Montichiari\",4452 => \"/meteo/Monticiano\",4453 => \"/meteo/Montieri\",4454 => \"/meteo/Montiglio+monferrato\",4455 => \"/meteo/Montignoso\",4456 => \"/meteo/Montirone\",4457 => \"/meteo/Montjovet\",4458 => \"/meteo/Montodine\",4459 => \"/meteo/Montoggio\",4460 => \"/meteo/Montone\",4461 => \"/meteo/Montopoli+di+sabina\",4462 => \"/meteo/Montopoli+in+val+d'arno\",4463 => \"/meteo/Montorfano\",4464 => \"/meteo/Montorio+al+vomano\",4465 => \"/meteo/Montorio+nei+frentani\",4466 => \"/meteo/Montorio+romano\",4467 => \"/meteo/Montoro+inferiore\",4468 => \"/meteo/Montoro+superiore\",4469 => \"/meteo/Montorso+vicentino\",4470 => \"/meteo/Montottone\",4471 => \"/meteo/Montresta\",4472 => \"/meteo/Montu'+beccaria\",8326 => \"/meteo/Montzeuc\",4473 => \"/meteo/Monvalle\",8726 => \"/meteo/Monviso\",4474 => \"/meteo/Monza\",4475 => \"/meteo/Monzambano\",4476 => \"/meteo/Monzuno\",4477 => \"/meteo/Morano+calabro\",4478 => \"/meteo/Morano+sul+Po\",4479 => \"/meteo/Moransengo\",4480 => \"/meteo/Moraro\",4481 => \"/meteo/Morazzone\",4482 => \"/meteo/Morbegno\",4483 => \"/meteo/Morbello\",4484 => \"/meteo/Morciano+di+leuca\",4485 => \"/meteo/Morciano+di+romagna\",4486 => \"/meteo/Morcone\",4487 => \"/meteo/Mordano\",8262 => \"/meteo/Morel\",4488 => \"/meteo/Morengo\",4489 => \"/meteo/Mores\",4490 => \"/meteo/Moresco\",4491 => \"/meteo/Moretta\",4492 => \"/meteo/Morfasso\",4493 => \"/meteo/Morgano\",8717 => \"/meteo/Morgantina\",4494 => \"/meteo/Morgex\",4495 => \"/meteo/Morgongiori\",4496 => \"/meteo/Mori\",4497 => \"/meteo/Moriago+della+battaglia\",4498 => \"/meteo/Moricone\",4499 => \"/meteo/Morigerati\",4500 => \"/meteo/Morimondo\",4501 => \"/meteo/Morino\",4502 => \"/meteo/Moriondo+torinese\",4503 => \"/meteo/Morlupo\",4504 => \"/meteo/Mormanno\",4505 => \"/meteo/Mornago\",4506 => \"/meteo/Mornese\",4507 => \"/meteo/Mornico+al+serio\",4508 => \"/meteo/Mornico+losana\",4509 => \"/meteo/Morolo\",4510 => \"/meteo/Morozzo\",4511 => \"/meteo/Morra+de+sanctis\",4512 => \"/meteo/Morro+d'alba\",4513 => \"/meteo/Morro+d'oro\",4514 => \"/meteo/Morro+reatino\",4515 => \"/meteo/Morrone+del+sannio\",4516 => \"/meteo/Morrovalle\",4517 => \"/meteo/Morsano+al+tagliamento\",4518 => \"/meteo/Morsasco\",4519 => \"/meteo/Mortara\",4520 => \"/meteo/Mortegliano\",4521 => \"/meteo/Morterone\",4522 => \"/meteo/Moruzzo\",4523 => \"/meteo/Moscazzano\",4524 => \"/meteo/Moschiano\",4525 => \"/meteo/Mosciano+sant'angelo\",4526 => \"/meteo/Moscufo\",4527 => \"/meteo/Moso+in+Passiria\",4528 => \"/meteo/Mossa\",4529 => \"/meteo/Mossano\",4530 => \"/meteo/Mosso+Santa+Maria\",4531 => \"/meteo/Motta+baluffi\",4532 => \"/meteo/Motta+Camastra\",4533 => \"/meteo/Motta+d'affermo\",4534 => \"/meteo/Motta+de'+conti\",4535 => \"/meteo/Motta+di+livenza\",4536 => \"/meteo/Motta+montecorvino\",4537 => \"/meteo/Motta+san+giovanni\",4538 => \"/meteo/Motta+sant'anastasia\",4539 => \"/meteo/Motta+santa+lucia\",4540 => \"/meteo/Motta+visconti\",4541 => \"/meteo/Mottafollone\",4542 => \"/meteo/Mottalciata\",8621 => \"/meteo/Mottarone\",4543 => \"/meteo/Motteggiana\",4544 => \"/meteo/Mottola\",8254 => \"/meteo/Mottolino\",4545 => \"/meteo/Mozzagrogna\",4546 => \"/meteo/Mozzanica\",4547 => \"/meteo/Mozzate\",4548 => \"/meteo/Mozzecane\",4549 => \"/meteo/Mozzo\",4550 => \"/meteo/Muccia\",4551 => \"/meteo/Muggia\",4552 => \"/meteo/Muggio'\",4553 => \"/meteo/Mugnano+del+cardinale\",4554 => \"/meteo/Mugnano+di+napoli\",4555 => \"/meteo/Mulazzano\",4556 => \"/meteo/Mulazzo\",4557 => \"/meteo/Mura\",4558 => \"/meteo/Muravera\",4559 => \"/meteo/Murazzano\",4560 => \"/meteo/Murello\",4561 => \"/meteo/Murialdo\",4562 => \"/meteo/Murisengo\",4563 => \"/meteo/Murlo\",4564 => \"/meteo/Muro+leccese\",4565 => \"/meteo/Muro+lucano\",4566 => \"/meteo/Muros\",4567 => \"/meteo/Muscoline\",4568 => \"/meteo/Musei\",4569 => \"/meteo/Musile+di+piave\",4570 => \"/meteo/Musso\",4571 => \"/meteo/Mussolente\",4572 => \"/meteo/Mussomeli\",4573 => \"/meteo/Muzzana+del+turgnano\",4574 => \"/meteo/Muzzano\",4575 => \"/meteo/Nago+torbole\",4576 => \"/meteo/Nalles\",4577 => \"/meteo/Nanno\",4578 => \"/meteo/Nanto\",4579 => \"/meteo/Napoli\",8498 => \"/meteo/Napoli+Capodichino\",4580 => \"/meteo/Narbolia\",4581 => \"/meteo/Narcao\",4582 => \"/meteo/Nardo'\",4583 => \"/meteo/Nardodipace\",4584 => \"/meteo/Narni\",4585 => \"/meteo/Naro\",4586 => \"/meteo/Narzole\",4587 => \"/meteo/Nasino\",4588 => \"/meteo/Naso\",4589 => \"/meteo/Naturno\",4590 => \"/meteo/Nave\",4591 => \"/meteo/Nave+san+rocco\",4592 => \"/meteo/Navelli\",4593 => \"/meteo/Naz+Sciaves\",4594 => \"/meteo/Nazzano\",4595 => \"/meteo/Ne\",4596 => \"/meteo/Nebbiuno\",4597 => \"/meteo/Negrar\",4598 => \"/meteo/Neirone\",4599 => \"/meteo/Neive\",4600 => \"/meteo/Nembro\",4601 => \"/meteo/Nemi\",8381 => \"/meteo/Nemoli\",4603 => \"/meteo/Neoneli\",4604 => \"/meteo/Nepi\",4605 => \"/meteo/Nereto\",4606 => \"/meteo/Nerola\",4607 => \"/meteo/Nervesa+della+battaglia\",4608 => \"/meteo/Nerviano\",4609 => \"/meteo/Nespolo\",4610 => \"/meteo/Nesso\",4611 => \"/meteo/Netro\",4612 => \"/meteo/Nettuno\",4613 => \"/meteo/Neviano\",4614 => \"/meteo/Neviano+degli+arduini\",4615 => \"/meteo/Neviglie\",4616 => \"/meteo/Niardo\",4617 => \"/meteo/Nibbiano\",4618 => \"/meteo/Nibbiola\",4619 => \"/meteo/Nibionno\",4620 => \"/meteo/Nichelino\",4621 => \"/meteo/Nicolosi\",4622 => \"/meteo/Nicorvo\",4623 => \"/meteo/Nicosia\",4624 => \"/meteo/Nicotera\",8117 => \"/meteo/Nicotera+Marina\",4625 => \"/meteo/Niella+belbo\",8475 => \"/meteo/Niella+Tanaro\",4627 => \"/meteo/Nimis\",4628 => \"/meteo/Niscemi\",4629 => \"/meteo/Nissoria\",4630 => \"/meteo/Nizza+di+sicilia\",4631 => \"/meteo/Nizza+monferrato\",4632 => \"/meteo/Noale\",4633 => \"/meteo/Noasca\",4634 => \"/meteo/Nocara\",4635 => \"/meteo/Nocciano\",4636 => \"/meteo/Nocera+inferiore\",4637 => \"/meteo/Nocera+superiore\",4638 => \"/meteo/Nocera+terinese\",4639 => \"/meteo/Nocera+umbra\",4640 => \"/meteo/Noceto\",4641 => \"/meteo/Noci\",4642 => \"/meteo/Nociglia\",8375 => \"/meteo/Noepoli\",4644 => \"/meteo/Nogara\",4645 => \"/meteo/Nogaredo\",4646 => \"/meteo/Nogarole+rocca\",4647 => \"/meteo/Nogarole+vicentino\",4648 => \"/meteo/Noicattaro\",4649 => \"/meteo/Nola\",4650 => \"/meteo/Nole\",4651 => \"/meteo/Noli\",4652 => \"/meteo/Nomaglio\",4653 => \"/meteo/Nomi\",4654 => \"/meteo/Nonantola\",4655 => \"/meteo/None\",4656 => \"/meteo/Nonio\",4657 => \"/meteo/Noragugume\",4658 => \"/meteo/Norbello\",4659 => \"/meteo/Norcia\",4660 => \"/meteo/Norma\",4661 => \"/meteo/Nosate\",4662 => \"/meteo/Notaresco\",4663 => \"/meteo/Noto\",4664 => \"/meteo/Nova+Levante\",4665 => \"/meteo/Nova+milanese\",4666 => \"/meteo/Nova+Ponente\",8428 => \"/meteo/Nova+siri\",4668 => \"/meteo/Novafeltria\",4669 => \"/meteo/Novaledo\",4670 => \"/meteo/Novalesa\",4671 => \"/meteo/Novara\",4672 => \"/meteo/Novara+di+Sicilia\",4673 => \"/meteo/Novate+mezzola\",4674 => \"/meteo/Novate+milanese\",4675 => \"/meteo/Nove\",4676 => \"/meteo/Novedrate\",4677 => \"/meteo/Novellara\",4678 => \"/meteo/Novello\",4679 => \"/meteo/Noventa+di+piave\",4680 => \"/meteo/Noventa+padovana\",4681 => \"/meteo/Noventa+vicentina\",4682 => \"/meteo/Novi+di+modena\",4683 => \"/meteo/Novi+ligure\",4684 => \"/meteo/Novi+velia\",4685 => \"/meteo/Noviglio\",4686 => \"/meteo/Novoli\",4687 => \"/meteo/Nucetto\",4688 => \"/meteo/Nughedu+di+san+nicolo'\",4689 => \"/meteo/Nughedu+santa+vittoria\",4690 => \"/meteo/Nule\",4691 => \"/meteo/Nulvi\",4692 => \"/meteo/Numana\",4693 => \"/meteo/Nuoro\",4694 => \"/meteo/Nurachi\",4695 => \"/meteo/Nuragus\",4696 => \"/meteo/Nurallao\",4697 => \"/meteo/Nuraminis\",4698 => \"/meteo/Nureci\",4699 => \"/meteo/Nurri\",4700 => \"/meteo/Nus\",4701 => \"/meteo/Nusco\",4702 => \"/meteo/Nuvolento\",4703 => \"/meteo/Nuvolera\",4704 => \"/meteo/Nuxis\",8260 => \"/meteo/Obereggen\",4705 => \"/meteo/Occhieppo+inferiore\",4706 => \"/meteo/Occhieppo+superiore\",4707 => \"/meteo/Occhiobello\",4708 => \"/meteo/Occimiano\",4709 => \"/meteo/Ocre\",4710 => \"/meteo/Odalengo+grande\",4711 => \"/meteo/Odalengo+piccolo\",4712 => \"/meteo/Oderzo\",4713 => \"/meteo/Odolo\",4714 => \"/meteo/Ofena\",4715 => \"/meteo/Offagna\",4716 => \"/meteo/Offanengo\",4717 => \"/meteo/Offida\",4718 => \"/meteo/Offlaga\",4719 => \"/meteo/Oggebbio\",4720 => \"/meteo/Oggiona+con+santo+stefano\",4721 => \"/meteo/Oggiono\",4722 => \"/meteo/Oglianico\",4723 => \"/meteo/Ogliastro+cilento\",4724 => \"/meteo/Olbia\",8470 => \"/meteo/Olbia+Costa+Smeralda\",4725 => \"/meteo/Olcenengo\",4726 => \"/meteo/Oldenico\",4727 => \"/meteo/Oleggio\",4728 => \"/meteo/Oleggio+castello\",4729 => \"/meteo/Olevano+di+lomellina\",4730 => \"/meteo/Olevano+romano\",4731 => \"/meteo/Olevano+sul+tusciano\",4732 => \"/meteo/Olgiate+comasco\",4733 => \"/meteo/Olgiate+molgora\",4734 => \"/meteo/Olgiate+olona\",4735 => \"/meteo/Olginate\",4736 => \"/meteo/Oliena\",4737 => \"/meteo/Oliva+gessi\",4738 => \"/meteo/Olivadi\",4739 => \"/meteo/Oliveri\",4740 => \"/meteo/Oliveto+citra\",4741 => \"/meteo/Oliveto+lario\",8426 => \"/meteo/Oliveto+lucano\",4743 => \"/meteo/Olivetta+san+michele\",4744 => \"/meteo/Olivola\",4745 => \"/meteo/Ollastra+simaxis\",4746 => \"/meteo/Ollolai\",4747 => \"/meteo/Ollomont\",4748 => \"/meteo/Olmedo\",4749 => \"/meteo/Olmeneta\",4750 => \"/meteo/Olmo+al+brembo\",4751 => \"/meteo/Olmo+gentile\",4752 => \"/meteo/Oltre+il+colle\",4753 => \"/meteo/Oltressenda+alta\",4754 => \"/meteo/Oltrona+di+san+mamette\",4755 => \"/meteo/Olzai\",4756 => \"/meteo/Ome\",4757 => \"/meteo/Omegna\",4758 => \"/meteo/Omignano\",4759 => \"/meteo/Onani\",4760 => \"/meteo/Onano\",4761 => \"/meteo/Oncino\",8283 => \"/meteo/Oneglia\",4762 => \"/meteo/Oneta\",4763 => \"/meteo/Onifai\",4764 => \"/meteo/Oniferi\",8664 => \"/meteo/Onna\",4765 => \"/meteo/Ono+san+pietro\",4766 => \"/meteo/Onore\",4767 => \"/meteo/Onzo\",4768 => \"/meteo/Opera\",4769 => \"/meteo/Opi\",4770 => \"/meteo/Oppeano\",8409 => \"/meteo/Oppido+lucano\",4772 => \"/meteo/Oppido+mamertina\",4773 => \"/meteo/Ora\",4774 => \"/meteo/Orani\",4775 => \"/meteo/Oratino\",4776 => \"/meteo/Orbassano\",4777 => \"/meteo/Orbetello\",4778 => \"/meteo/Orciano+di+pesaro\",4779 => \"/meteo/Orciano+pisano\",4780 => \"/meteo/Orco+feglino\",4781 => \"/meteo/Ordona\",4782 => \"/meteo/Orero\",4783 => \"/meteo/Orgiano\",4784 => \"/meteo/Orgosolo\",4785 => \"/meteo/Oria\",4786 => \"/meteo/Oricola\",4787 => \"/meteo/Origgio\",4788 => \"/meteo/Orino\",4789 => \"/meteo/Orio+al+serio\",4790 => \"/meteo/Orio+canavese\",4791 => \"/meteo/Orio+litta\",4792 => \"/meteo/Oriolo\",4793 => \"/meteo/Oriolo+romano\",4794 => \"/meteo/Oristano\",4795 => \"/meteo/Ormea\",4796 => \"/meteo/Ormelle\",4797 => \"/meteo/Ornago\",4798 => \"/meteo/Ornavasso\",4799 => \"/meteo/Ornica\",8348 => \"/meteo/Oropa\",8169 => \"/meteo/Orosei\",4801 => \"/meteo/Orotelli\",4802 => \"/meteo/Orria\",4803 => \"/meteo/Orroli\",4804 => \"/meteo/Orsago\",4805 => \"/meteo/Orsara+bormida\",4806 => \"/meteo/Orsara+di+puglia\",4807 => \"/meteo/Orsenigo\",4808 => \"/meteo/Orsogna\",4809 => \"/meteo/Orsomarso\",4810 => \"/meteo/Orta+di+atella\",4811 => \"/meteo/Orta+nova\",4812 => \"/meteo/Orta+san+giulio\",4813 => \"/meteo/Ortacesus\",4814 => \"/meteo/Orte\",8460 => \"/meteo/Orte+casello\",4815 => \"/meteo/Ortelle\",4816 => \"/meteo/Ortezzano\",4817 => \"/meteo/Ortignano+raggiolo\",4818 => \"/meteo/Ortisei\",8725 => \"/meteo/Ortles\",4819 => \"/meteo/Ortona\",4820 => \"/meteo/Ortona+dei+marsi\",4821 => \"/meteo/Ortonovo\",4822 => \"/meteo/Ortovero\",4823 => \"/meteo/Ortucchio\",4824 => \"/meteo/Ortueri\",4825 => \"/meteo/Orune\",4826 => \"/meteo/Orvieto\",8459 => \"/meteo/Orvieto+casello\",4827 => \"/meteo/Orvinio\",4828 => \"/meteo/Orzinuovi\",4829 => \"/meteo/Orzivecchi\",4830 => \"/meteo/Osasco\",4831 => \"/meteo/Osasio\",4832 => \"/meteo/Oschiri\",4833 => \"/meteo/Osidda\",4834 => \"/meteo/Osiglia\",4835 => \"/meteo/Osilo\",4836 => \"/meteo/Osimo\",4837 => \"/meteo/Osini\",4838 => \"/meteo/Osio+sopra\",4839 => \"/meteo/Osio+sotto\",4840 => \"/meteo/Osmate\",4841 => \"/meteo/Osnago\",8465 => \"/meteo/Osoppo\",4843 => \"/meteo/Ospedaletti\",4844 => \"/meteo/Ospedaletto\",4845 => \"/meteo/Ospedaletto+d'alpinolo\",4846 => \"/meteo/Ospedaletto+euganeo\",4847 => \"/meteo/Ospedaletto+lodigiano\",4848 => \"/meteo/Ospitale+di+cadore\",4849 => \"/meteo/Ospitaletto\",4850 => \"/meteo/Ossago+lodigiano\",4851 => \"/meteo/Ossana\",4852 => \"/meteo/Ossi\",4853 => \"/meteo/Ossimo\",4854 => \"/meteo/Ossona\",4855 => \"/meteo/Ossuccio\",4856 => \"/meteo/Ostana\",4857 => \"/meteo/Ostellato\",4858 => \"/meteo/Ostiano\",4859 => \"/meteo/Ostiglia\",4860 => \"/meteo/Ostra\",4861 => \"/meteo/Ostra+vetere\",4862 => \"/meteo/Ostuni\",4863 => \"/meteo/Otranto\",4864 => \"/meteo/Otricoli\",4865 => \"/meteo/Ottana\",4866 => \"/meteo/Ottati\",4867 => \"/meteo/Ottaviano\",4868 => \"/meteo/Ottiglio\",4869 => \"/meteo/Ottobiano\",4870 => \"/meteo/Ottone\",4871 => \"/meteo/Oulx\",4872 => \"/meteo/Ovada\",4873 => \"/meteo/Ovaro\",4874 => \"/meteo/Oviglio\",4875 => \"/meteo/Ovindoli\",4876 => \"/meteo/Ovodda\",4877 => \"/meteo/Oyace\",4878 => \"/meteo/Ozegna\",4879 => \"/meteo/Ozieri\",4880 => \"/meteo/Ozzano+dell'emilia\",4881 => \"/meteo/Ozzano+monferrato\",4882 => \"/meteo/Ozzero\",4883 => \"/meteo/Pabillonis\",4884 => \"/meteo/Pace+del+mela\",4885 => \"/meteo/Paceco\",4886 => \"/meteo/Pacentro\",4887 => \"/meteo/Pachino\",4888 => \"/meteo/Paciano\",4889 => \"/meteo/Padenghe+sul+garda\",4890 => \"/meteo/Padergnone\",4891 => \"/meteo/Paderna\",4892 => \"/meteo/Paderno+d'adda\",4893 => \"/meteo/Paderno+del+grappa\",4894 => \"/meteo/Paderno+dugnano\",4895 => \"/meteo/Paderno+franciacorta\",4896 => \"/meteo/Paderno+ponchielli\",4897 => \"/meteo/Padova\",4898 => \"/meteo/Padria\",4899 => \"/meteo/Padru\",4900 => \"/meteo/Padula\",4901 => \"/meteo/Paduli\",4902 => \"/meteo/Paesana\",4903 => \"/meteo/Paese\",8713 => \"/meteo/Paestum\",8203 => \"/meteo/Paganella\",4904 => \"/meteo/Pagani\",8663 => \"/meteo/Paganica\",4905 => \"/meteo/Paganico\",4906 => \"/meteo/Pagazzano\",4907 => \"/meteo/Pagliara\",4908 => \"/meteo/Paglieta\",4909 => \"/meteo/Pagnacco\",4910 => \"/meteo/Pagno\",4911 => \"/meteo/Pagnona\",4912 => \"/meteo/Pago+del+vallo+di+lauro\",4913 => \"/meteo/Pago+veiano\",4914 => \"/meteo/Paisco+loveno\",4915 => \"/meteo/Paitone\",4916 => \"/meteo/Paladina\",8534 => \"/meteo/Palafavera\",4917 => \"/meteo/Palagano\",4918 => \"/meteo/Palagianello\",4919 => \"/meteo/Palagiano\",4920 => \"/meteo/Palagonia\",4921 => \"/meteo/Palaia\",4922 => \"/meteo/Palanzano\",4923 => \"/meteo/Palata\",4924 => \"/meteo/Palau\",4925 => \"/meteo/Palazzago\",4926 => \"/meteo/Palazzo+adriano\",4927 => \"/meteo/Palazzo+canavese\",4928 => \"/meteo/Palazzo+pignano\",4929 => \"/meteo/Palazzo+san+gervasio\",4930 => \"/meteo/Palazzolo+acreide\",4931 => \"/meteo/Palazzolo+dello+stella\",4932 => \"/meteo/Palazzolo+sull'Oglio\",4933 => \"/meteo/Palazzolo+vercellese\",4934 => \"/meteo/Palazzuolo+sul+senio\",4935 => \"/meteo/Palena\",4936 => \"/meteo/Palermiti\",4937 => \"/meteo/Palermo\",8575 => \"/meteo/Palermo+Boccadifalco\",8272 => \"/meteo/Palermo+Punta+Raisi\",4938 => \"/meteo/Palestrina\",4939 => \"/meteo/Palestro\",4940 => \"/meteo/Paliano\",8121 => \"/meteo/Palinuro\",4941 => \"/meteo/Palizzi\",8108 => \"/meteo/Palizzi+Marina\",4942 => \"/meteo/Pallagorio\",4943 => \"/meteo/Pallanzeno\",4944 => \"/meteo/Pallare\",4945 => \"/meteo/Palma+campania\",4946 => \"/meteo/Palma+di+montechiaro\",4947 => \"/meteo/Palmanova\",4948 => \"/meteo/Palmariggi\",4949 => \"/meteo/Palmas+arborea\",4950 => \"/meteo/Palmi\",4951 => \"/meteo/Palmiano\",4952 => \"/meteo/Palmoli\",4953 => \"/meteo/Palo+del+colle\",4954 => \"/meteo/Palombara+sabina\",4955 => \"/meteo/Palombaro\",4956 => \"/meteo/Palomonte\",4957 => \"/meteo/Palosco\",4958 => \"/meteo/Palu'\",4959 => \"/meteo/Palu'+del+fersina\",4960 => \"/meteo/Paludi\",4961 => \"/meteo/Paluzza\",4962 => \"/meteo/Pamparato\",8257 => \"/meteo/Pampeago\",8753 => \"/meteo/Panarotta\",4963 => \"/meteo/Pancalieri\",8261 => \"/meteo/Pancani\",4964 => \"/meteo/Pancarana\",4965 => \"/meteo/Panchia'\",4966 => \"/meteo/Pandino\",4967 => \"/meteo/Panettieri\",4968 => \"/meteo/Panicale\",4969 => \"/meteo/Pannarano\",4970 => \"/meteo/Panni\",4971 => \"/meteo/Pantelleria\",4972 => \"/meteo/Pantigliate\",4973 => \"/meteo/Paola\",4974 => \"/meteo/Paolisi\",4975 => \"/meteo/Papasidero\",4976 => \"/meteo/Papozze\",4977 => \"/meteo/Parabiago\",4978 => \"/meteo/Parabita\",4979 => \"/meteo/Paratico\",4980 => \"/meteo/Parcines\",4981 => \"/meteo/Pare'\",4982 => \"/meteo/Parella\",4983 => \"/meteo/Parenti\",4984 => \"/meteo/Parete\",4985 => \"/meteo/Pareto\",4986 => \"/meteo/Parghelia\",4987 => \"/meteo/Parlasco\",4988 => \"/meteo/Parma\",8554 => \"/meteo/Parma+Verdi\",4989 => \"/meteo/Parodi+ligure\",4990 => \"/meteo/Paroldo\",4991 => \"/meteo/Parolise\",4992 => \"/meteo/Parona\",4993 => \"/meteo/Parrano\",4994 => \"/meteo/Parre\",4995 => \"/meteo/Partanna\",4996 => \"/meteo/Partinico\",4997 => \"/meteo/Paruzzaro\",4998 => \"/meteo/Parzanica\",4999 => \"/meteo/Pasian+di+prato\",5000 => \"/meteo/Pasiano+di+pordenone\",5001 => \"/meteo/Paspardo\",5002 => \"/meteo/Passerano+Marmorito\",5003 => \"/meteo/Passignano+sul+trasimeno\",5004 => \"/meteo/Passirano\",8613 => \"/meteo/Passo+Bernina\",8760 => \"/meteo/Passo+Campolongo\",8329 => \"/meteo/Passo+Costalunga\",8618 => \"/meteo/Passo+dei+Salati\",8207 => \"/meteo/Passo+del+Brennero\",8577 => \"/meteo/Passo+del+Brocon\",8627 => \"/meteo/Passo+del+Cerreto\",8147 => \"/meteo/Passo+del+Foscagno\",8308 => \"/meteo/Passo+del+Lupo\",8206 => \"/meteo/Passo+del+Rombo\",8150 => \"/meteo/Passo+del+Tonale\",8196 => \"/meteo/Passo+della+Cisa\",8235 => \"/meteo/Passo+della+Consuma\",8290 => \"/meteo/Passo+della+Presolana\",8659 => \"/meteo/Passo+delle+Fittanze\",8145 => \"/meteo/Passo+dello+Stelvio\",8213 => \"/meteo/Passo+di+Resia\",8752 => \"/meteo/Passo+di+Vezzena\",8328 => \"/meteo/Passo+Fedaia\",8759 => \"/meteo/Passo+Gardena\",8277 => \"/meteo/Passo+Groste'\",8756 => \"/meteo/Passo+Lanciano\",8280 => \"/meteo/Passo+Pordoi\",8626 => \"/meteo/Passo+Pramollo\",8210 => \"/meteo/Passo+Rolle\",8279 => \"/meteo/Passo+San+Pellegrino\",8325 => \"/meteo/Passo+Sella\",5005 => \"/meteo/Pastena\",5006 => \"/meteo/Pastorano\",5007 => \"/meteo/Pastrengo\",5008 => \"/meteo/Pasturana\",5009 => \"/meteo/Pasturo\",8417 => \"/meteo/Paterno\",5011 => \"/meteo/Paterno+calabro\",5012 => \"/meteo/Paterno'\",5013 => \"/meteo/Paternopoli\",5014 => \"/meteo/Patrica\",5015 => \"/meteo/Pattada\",5016 => \"/meteo/Patti\",5017 => \"/meteo/Patu'\",5018 => \"/meteo/Pau\",5019 => \"/meteo/Paularo\",5020 => \"/meteo/Pauli+arbarei\",5021 => \"/meteo/Paulilatino\",5022 => \"/meteo/Paullo\",5023 => \"/meteo/Paupisi\",5024 => \"/meteo/Pavarolo\",5025 => \"/meteo/Pavia\",5026 => \"/meteo/Pavia+di+udine\",5027 => \"/meteo/Pavone+canavese\",5028 => \"/meteo/Pavone+del+mella\",5029 => \"/meteo/Pavullo+nel+frignano\",5030 => \"/meteo/Pazzano\",5031 => \"/meteo/Peccioli\",5032 => \"/meteo/Pecco\",5033 => \"/meteo/Pecetto+di+valenza\",5034 => \"/meteo/Pecetto+torinese\",5035 => \"/meteo/Pecorara\",5036 => \"/meteo/Pedace\",5037 => \"/meteo/Pedara\",5038 => \"/meteo/Pedaso\",5039 => \"/meteo/Pedavena\",5040 => \"/meteo/Pedemonte\",5041 => \"/meteo/Pederobba\",5042 => \"/meteo/Pedesina\",5043 => \"/meteo/Pedivigliano\",8473 => \"/meteo/Pedraces\",5044 => \"/meteo/Pedrengo\",5045 => \"/meteo/Peglio\",5046 => \"/meteo/Peglio\",5047 => \"/meteo/Pegognaga\",5048 => \"/meteo/Peia\",8665 => \"/meteo/Pejo\",5050 => \"/meteo/Pelago\",5051 => \"/meteo/Pella\",5052 => \"/meteo/Pellegrino+parmense\",5053 => \"/meteo/Pellezzano\",5054 => \"/meteo/Pellio+intelvi\",5055 => \"/meteo/Pellizzano\",5056 => \"/meteo/Pelugo\",5057 => \"/meteo/Penango\",5058 => \"/meteo/Penna+in+teverina\",5059 => \"/meteo/Penna+san+giovanni\",5060 => \"/meteo/Penna+sant'andrea\",5061 => \"/meteo/Pennabilli\",5062 => \"/meteo/Pennadomo\",5063 => \"/meteo/Pennapiedimonte\",5064 => \"/meteo/Penne\",8208 => \"/meteo/Pennes\",5065 => \"/meteo/Pentone\",5066 => \"/meteo/Perano\",5067 => \"/meteo/Perarolo+di+cadore\",5068 => \"/meteo/Perca\",5069 => \"/meteo/Percile\",5070 => \"/meteo/Perdasdefogu\",5071 => \"/meteo/Perdaxius\",5072 => \"/meteo/Perdifumo\",5073 => \"/meteo/Perego\",5074 => \"/meteo/Pereto\",5075 => \"/meteo/Perfugas\",5076 => \"/meteo/Pergine+valdarno\",5077 => \"/meteo/Pergine+valsugana\",5078 => \"/meteo/Pergola\",5079 => \"/meteo/Perinaldo\",5080 => \"/meteo/Perito\",5081 => \"/meteo/Perledo\",5082 => \"/meteo/Perletto\",5083 => \"/meteo/Perlo\",5084 => \"/meteo/Perloz\",5085 => \"/meteo/Pernumia\",5086 => \"/meteo/Pero\",5087 => \"/meteo/Perosa+argentina\",5088 => \"/meteo/Perosa+canavese\",5089 => \"/meteo/Perrero\",5090 => \"/meteo/Persico+dosimo\",5091 => \"/meteo/Pertengo\",5092 => \"/meteo/Pertica+alta\",5093 => \"/meteo/Pertica+bassa\",8586 => \"/meteo/Perticara+di+Novafeltria\",5094 => \"/meteo/Pertosa\",5095 => \"/meteo/Pertusio\",5096 => \"/meteo/Perugia\",8555 => \"/meteo/Perugia+Sant'Egidio\",5097 => \"/meteo/Pesaro\",5098 => \"/meteo/Pescaglia\",5099 => \"/meteo/Pescantina\",5100 => \"/meteo/Pescara\",8275 => \"/meteo/Pescara+Liberi\",5101 => \"/meteo/Pescarolo+ed+uniti\",5102 => \"/meteo/Pescasseroli\",5103 => \"/meteo/Pescate\",8312 => \"/meteo/Pescegallo\",5104 => \"/meteo/Pesche\",5105 => \"/meteo/Peschici\",5106 => \"/meteo/Peschiera+borromeo\",5107 => \"/meteo/Peschiera+del+garda\",5108 => \"/meteo/Pescia\",5109 => \"/meteo/Pescina\",8454 => \"/meteo/Pescina+casello\",5110 => \"/meteo/Pesco+sannita\",5111 => \"/meteo/Pescocostanzo\",5112 => \"/meteo/Pescolanciano\",5113 => \"/meteo/Pescopagano\",5114 => \"/meteo/Pescopennataro\",5115 => \"/meteo/Pescorocchiano\",5116 => \"/meteo/Pescosansonesco\",5117 => \"/meteo/Pescosolido\",5118 => \"/meteo/Pessano+con+Bornago\",5119 => \"/meteo/Pessina+cremonese\",5120 => \"/meteo/Pessinetto\",5121 => \"/meteo/Petacciato\",5122 => \"/meteo/Petilia+policastro\",5123 => \"/meteo/Petina\",5124 => \"/meteo/Petralia+soprana\",5125 => \"/meteo/Petralia+sottana\",5126 => \"/meteo/Petrella+salto\",5127 => \"/meteo/Petrella+tifernina\",5128 => \"/meteo/Petriano\",5129 => \"/meteo/Petriolo\",5130 => \"/meteo/Petritoli\",5131 => \"/meteo/Petrizzi\",5132 => \"/meteo/Petrona'\",5133 => \"/meteo/Petrosino\",5134 => \"/meteo/Petruro+irpino\",5135 => \"/meteo/Pettenasco\",5136 => \"/meteo/Pettinengo\",5137 => \"/meteo/Pettineo\",5138 => \"/meteo/Pettoranello+del+molise\",5139 => \"/meteo/Pettorano+sul+gizio\",5140 => \"/meteo/Pettorazza+grimani\",5141 => \"/meteo/Peveragno\",5142 => \"/meteo/Pezzana\",5143 => \"/meteo/Pezzaze\",5144 => \"/meteo/Pezzolo+valle+uzzone\",5145 => \"/meteo/Piacenza\",5146 => \"/meteo/Piacenza+d'adige\",5147 => \"/meteo/Piadena\",5148 => \"/meteo/Piagge\",5149 => \"/meteo/Piaggine\",8706 => \"/meteo/Piamprato\",5150 => \"/meteo/Pian+camuno\",8309 => \"/meteo/Pian+Cavallaro\",8233 => \"/meteo/Pian+del+Cansiglio\",8642 => \"/meteo/Pian+del+Frais\",8705 => \"/meteo/Pian+della+Mussa\",8634 => \"/meteo/Pian+delle+Betulle\",5151 => \"/meteo/Pian+di+sco'\",8712 => \"/meteo/Pian+di+Sole\",5152 => \"/meteo/Piana+crixia\",5153 => \"/meteo/Piana+degli+albanesi\",8653 => \"/meteo/Piana+di+Marcesina\",5154 => \"/meteo/Piana+di+monte+verna\",8305 => \"/meteo/Pianalunga\",5155 => \"/meteo/Piancastagnaio\",8516 => \"/meteo/Piancavallo\",5156 => \"/meteo/Piancogno\",5157 => \"/meteo/Piandimeleto\",5158 => \"/meteo/Piane+crati\",8561 => \"/meteo/Piane+di+Mocogno\",5159 => \"/meteo/Pianella\",5160 => \"/meteo/Pianello+del+lario\",5161 => \"/meteo/Pianello+val+tidone\",5162 => \"/meteo/Pianengo\",5163 => \"/meteo/Pianezza\",5164 => \"/meteo/Pianezze\",5165 => \"/meteo/Pianfei\",8605 => \"/meteo/Piani+d'Erna\",8517 => \"/meteo/Piani+di+Artavaggio\",8234 => \"/meteo/Piani+di+Bobbio\",5166 => \"/meteo/Pianico\",5167 => \"/meteo/Pianiga\",8314 => \"/meteo/Piano+del+Voglio\",5168 => \"/meteo/Piano+di+Sorrento\",8630 => \"/meteo/Piano+Provenzana\",5169 => \"/meteo/Pianopoli\",5170 => \"/meteo/Pianoro\",5171 => \"/meteo/Piansano\",5172 => \"/meteo/Piantedo\",5173 => \"/meteo/Piario\",5174 => \"/meteo/Piasco\",5175 => \"/meteo/Piateda\",5176 => \"/meteo/Piatto\",5177 => \"/meteo/Piazza+al+serchio\",5178 => \"/meteo/Piazza+armerina\",5179 => \"/meteo/Piazza+brembana\",5180 => \"/meteo/Piazzatorre\",5181 => \"/meteo/Piazzola+sul+brenta\",5182 => \"/meteo/Piazzolo\",5183 => \"/meteo/Picciano\",5184 => \"/meteo/Picerno\",5185 => \"/meteo/Picinisco\",5186 => \"/meteo/Pico\",5187 => \"/meteo/Piea\",5188 => \"/meteo/Piedicavallo\",8218 => \"/meteo/Piediluco\",5189 => \"/meteo/Piedimonte+etneo\",5190 => \"/meteo/Piedimonte+matese\",5191 => \"/meteo/Piedimonte+san+germano\",5192 => \"/meteo/Piedimulera\",5193 => \"/meteo/Piegaro\",5194 => \"/meteo/Pienza\",5195 => \"/meteo/Pieranica\",5196 => \"/meteo/Pietra+de'giorgi\",5197 => \"/meteo/Pietra+ligure\",5198 => \"/meteo/Pietra+marazzi\",5199 => \"/meteo/Pietrabbondante\",5200 => \"/meteo/Pietrabruna\",5201 => \"/meteo/Pietracamela\",5202 => \"/meteo/Pietracatella\",5203 => \"/meteo/Pietracupa\",5204 => \"/meteo/Pietradefusi\",5205 => \"/meteo/Pietraferrazzana\",5206 => \"/meteo/Pietrafitta\",5207 => \"/meteo/Pietragalla\",5208 => \"/meteo/Pietralunga\",5209 => \"/meteo/Pietramelara\",5210 => \"/meteo/Pietramontecorvino\",5211 => \"/meteo/Pietranico\",5212 => \"/meteo/Pietrapaola\",5213 => \"/meteo/Pietrapertosa\",5214 => \"/meteo/Pietraperzia\",5215 => \"/meteo/Pietraporzio\",5216 => \"/meteo/Pietraroja\",5217 => \"/meteo/Pietrarubbia\",5218 => \"/meteo/Pietrasanta\",5219 => \"/meteo/Pietrastornina\",5220 => \"/meteo/Pietravairano\",5221 => \"/meteo/Pietrelcina\",5222 => \"/meteo/Pieve+a+nievole\",5223 => \"/meteo/Pieve+albignola\",5224 => \"/meteo/Pieve+d'alpago\",5225 => \"/meteo/Pieve+d'olmi\",5226 => \"/meteo/Pieve+del+cairo\",5227 => \"/meteo/Pieve+di+bono\",5228 => \"/meteo/Pieve+di+cadore\",5229 => \"/meteo/Pieve+di+cento\",5230 => \"/meteo/Pieve+di+coriano\",5231 => \"/meteo/Pieve+di+ledro\",5232 => \"/meteo/Pieve+di+soligo\",5233 => \"/meteo/Pieve+di+teco\",5234 => \"/meteo/Pieve+emanuele\",5235 => \"/meteo/Pieve+fissiraga\",5236 => \"/meteo/Pieve+fosciana\",5237 => \"/meteo/Pieve+ligure\",5238 => \"/meteo/Pieve+porto+morone\",5239 => \"/meteo/Pieve+san+giacomo\",5240 => \"/meteo/Pieve+santo+stefano\",5241 => \"/meteo/Pieve+tesino\",5242 => \"/meteo/Pieve+torina\",5243 => \"/meteo/Pieve+vergonte\",5244 => \"/meteo/Pievebovigliana\",5245 => \"/meteo/Pievepelago\",5246 => \"/meteo/Piglio\",5247 => \"/meteo/Pigna\",5248 => \"/meteo/Pignataro+interamna\",5249 => \"/meteo/Pignataro+maggiore\",5250 => \"/meteo/Pignola\",5251 => \"/meteo/Pignone\",5252 => \"/meteo/Pigra\",5253 => \"/meteo/Pila\",8221 => \"/meteo/Pila\",5254 => \"/meteo/Pimentel\",5255 => \"/meteo/Pimonte\",5256 => \"/meteo/Pinarolo+po\",5257 => \"/meteo/Pinasca\",5258 => \"/meteo/Pincara\",5259 => \"/meteo/Pinerolo\",5260 => \"/meteo/Pineto\",5261 => \"/meteo/Pino+d'asti\",5262 => \"/meteo/Pino+sulla+sponda+del+lago+magg.\",5263 => \"/meteo/Pino+torinese\",5264 => \"/meteo/Pinzano+al+tagliamento\",5265 => \"/meteo/Pinzolo\",5266 => \"/meteo/Piobbico\",5267 => \"/meteo/Piobesi+d'alba\",5268 => \"/meteo/Piobesi+torinese\",5269 => \"/meteo/Piode\",5270 => \"/meteo/Pioltello\",5271 => \"/meteo/Piombino\",5272 => \"/meteo/Piombino+dese\",5273 => \"/meteo/Pioraco\",5274 => \"/meteo/Piossasco\",5275 => \"/meteo/Piova'+massaia\",5276 => \"/meteo/Piove+di+sacco\",5277 => \"/meteo/Piovene+rocchette\",5278 => \"/meteo/Piovera\",5279 => \"/meteo/Piozzano\",5280 => \"/meteo/Piozzo\",5281 => \"/meteo/Piraino\",5282 => \"/meteo/Pisa\",8518 => \"/meteo/Pisa+San+Giusto\",5283 => \"/meteo/Pisano\",5284 => \"/meteo/Piscina\",5285 => \"/meteo/Piscinas\",5286 => \"/meteo/Pisciotta\",5287 => \"/meteo/Pisogne\",5288 => \"/meteo/Pisoniano\",5289 => \"/meteo/Pisticci\",5290 => \"/meteo/Pistoia\",5291 => \"/meteo/Piteglio\",5292 => \"/meteo/Pitigliano\",5293 => \"/meteo/Piubega\",5294 => \"/meteo/Piuro\",5295 => \"/meteo/Piverone\",5296 => \"/meteo/Pizzale\",5297 => \"/meteo/Pizzighettone\",5298 => \"/meteo/Pizzo\",8737 => \"/meteo/Pizzo+Arera\",8727 => \"/meteo/Pizzo+Bernina\",8736 => \"/meteo/Pizzo+dei+Tre+Signori\",8739 => \"/meteo/Pizzo+della+Presolana\",5299 => \"/meteo/Pizzoferrato\",5300 => \"/meteo/Pizzoli\",5301 => \"/meteo/Pizzone\",5302 => \"/meteo/Pizzoni\",5303 => \"/meteo/Placanica\",8342 => \"/meteo/Plaghera\",8685 => \"/meteo/Plain+Maison\",8324 => \"/meteo/Plain+Mason\",8337 => \"/meteo/Plan\",8469 => \"/meteo/Plan+Boè\",8633 => \"/meteo/Plan+Checrouit\",8204 => \"/meteo/Plan+de+Corones\",8576 => \"/meteo/Plan+in+Passiria\",5304 => \"/meteo/Plataci\",5305 => \"/meteo/Platania\",8241 => \"/meteo/Plateau+Rosa\",5306 => \"/meteo/Plati'\",5307 => \"/meteo/Plaus\",5308 => \"/meteo/Plesio\",5309 => \"/meteo/Ploaghe\",5310 => \"/meteo/Plodio\",8569 => \"/meteo/Plose\",5311 => \"/meteo/Pocapaglia\",5312 => \"/meteo/Pocenia\",5313 => \"/meteo/Podenzana\",5314 => \"/meteo/Podenzano\",5315 => \"/meteo/Pofi\",5316 => \"/meteo/Poggiardo\",5317 => \"/meteo/Poggibonsi\",5318 => \"/meteo/Poggio+a+caiano\",5319 => \"/meteo/Poggio+berni\",5320 => \"/meteo/Poggio+bustone\",5321 => \"/meteo/Poggio+catino\",5322 => \"/meteo/Poggio+imperiale\",5323 => \"/meteo/Poggio+mirteto\",5324 => \"/meteo/Poggio+moiano\",5325 => \"/meteo/Poggio+nativo\",5326 => \"/meteo/Poggio+picenze\",5327 => \"/meteo/Poggio+renatico\",5328 => \"/meteo/Poggio+rusco\",5329 => \"/meteo/Poggio+san+lorenzo\",5330 => \"/meteo/Poggio+san+marcello\",5331 => \"/meteo/Poggio+san+vicino\",5332 => \"/meteo/Poggio+sannita\",5333 => \"/meteo/Poggiodomo\",5334 => \"/meteo/Poggiofiorito\",5335 => \"/meteo/Poggiomarino\",5336 => \"/meteo/Poggioreale\",5337 => \"/meteo/Poggiorsini\",5338 => \"/meteo/Poggiridenti\",5339 => \"/meteo/Pogliano+milanese\",8339 => \"/meteo/Pogliola\",5340 => \"/meteo/Pognana+lario\",5341 => \"/meteo/Pognano\",5342 => \"/meteo/Pogno\",5343 => \"/meteo/Poiana+maggiore\",5344 => \"/meteo/Poirino\",5345 => \"/meteo/Polaveno\",5346 => \"/meteo/Polcenigo\",5347 => \"/meteo/Polesella\",5348 => \"/meteo/Polesine+parmense\",5349 => \"/meteo/Poli\",5350 => \"/meteo/Polia\",5351 => \"/meteo/Policoro\",5352 => \"/meteo/Polignano+a+mare\",5353 => \"/meteo/Polinago\",5354 => \"/meteo/Polino\",5355 => \"/meteo/Polistena\",5356 => \"/meteo/Polizzi+generosa\",5357 => \"/meteo/Polla\",5358 => \"/meteo/Pollein\",5359 => \"/meteo/Pollena+trocchia\",5360 => \"/meteo/Pollenza\",5361 => \"/meteo/Pollica\",5362 => \"/meteo/Pollina\",5363 => \"/meteo/Pollone\",5364 => \"/meteo/Pollutri\",5365 => \"/meteo/Polonghera\",5366 => \"/meteo/Polpenazze+del+garda\",8650 => \"/meteo/Polsa+San+Valentino\",5367 => \"/meteo/Polverara\",5368 => \"/meteo/Polverigi\",5369 => \"/meteo/Pomarance\",5370 => \"/meteo/Pomaretto\",8384 => \"/meteo/Pomarico\",5372 => \"/meteo/Pomaro+monferrato\",5373 => \"/meteo/Pomarolo\",5374 => \"/meteo/Pombia\",5375 => \"/meteo/Pomezia\",5376 => \"/meteo/Pomigliano+d'arco\",5377 => \"/meteo/Pompei\",5378 => \"/meteo/Pompeiana\",5379 => \"/meteo/Pompiano\",5380 => \"/meteo/Pomponesco\",5381 => \"/meteo/Pompu\",5382 => \"/meteo/Poncarale\",5383 => \"/meteo/Ponderano\",5384 => \"/meteo/Ponna\",5385 => \"/meteo/Ponsacco\",5386 => \"/meteo/Ponso\",8220 => \"/meteo/Pont\",5389 => \"/meteo/Pont+canavese\",5427 => \"/meteo/Pont+Saint+Martin\",5387 => \"/meteo/Pontassieve\",5388 => \"/meteo/Pontboset\",5390 => \"/meteo/Ponte\",5391 => \"/meteo/Ponte+buggianese\",5392 => \"/meteo/Ponte+dell'olio\",5393 => \"/meteo/Ponte+di+legno\",5394 => \"/meteo/Ponte+di+piave\",5395 => \"/meteo/Ponte+Gardena\",5396 => \"/meteo/Ponte+in+valtellina\",5397 => \"/meteo/Ponte+lambro\",5398 => \"/meteo/Ponte+nelle+alpi\",5399 => \"/meteo/Ponte+nizza\",5400 => \"/meteo/Ponte+nossa\",5401 => \"/meteo/Ponte+San+Nicolo'\",5402 => \"/meteo/Ponte+San+Pietro\",5403 => \"/meteo/Pontebba\",5404 => \"/meteo/Pontecagnano+faiano\",5405 => \"/meteo/Pontecchio+polesine\",5406 => \"/meteo/Pontechianale\",5407 => \"/meteo/Pontecorvo\",5408 => \"/meteo/Pontecurone\",5409 => \"/meteo/Pontedassio\",5410 => \"/meteo/Pontedera\",5411 => \"/meteo/Pontelandolfo\",5412 => \"/meteo/Pontelatone\",5413 => \"/meteo/Pontelongo\",5414 => \"/meteo/Pontenure\",5415 => \"/meteo/Ponteranica\",5416 => \"/meteo/Pontestura\",5417 => \"/meteo/Pontevico\",5418 => \"/meteo/Pontey\",5419 => \"/meteo/Ponti\",5420 => \"/meteo/Ponti+sul+mincio\",5421 => \"/meteo/Pontida\",5422 => \"/meteo/Pontinia\",5423 => \"/meteo/Pontinvrea\",5424 => \"/meteo/Pontirolo+nuovo\",5425 => \"/meteo/Pontoglio\",5426 => \"/meteo/Pontremoli\",5428 => \"/meteo/Ponza\",5429 => \"/meteo/Ponzano+di+fermo\",8462 => \"/meteo/Ponzano+galleria\",5430 => \"/meteo/Ponzano+monferrato\",5431 => \"/meteo/Ponzano+romano\",5432 => \"/meteo/Ponzano+veneto\",5433 => \"/meteo/Ponzone\",5434 => \"/meteo/Popoli\",5435 => \"/meteo/Poppi\",8192 => \"/meteo/Populonia\",5436 => \"/meteo/Porano\",5437 => \"/meteo/Porcari\",5438 => \"/meteo/Porcia\",5439 => \"/meteo/Pordenone\",5440 => \"/meteo/Porlezza\",5441 => \"/meteo/Pornassio\",5442 => \"/meteo/Porpetto\",5443 => \"/meteo/Porretta+terme\",5444 => \"/meteo/Portacomaro\",5445 => \"/meteo/Portalbera\",5446 => \"/meteo/Porte\",5447 => \"/meteo/Portici\",5448 => \"/meteo/Portico+di+caserta\",5449 => \"/meteo/Portico+e+san+benedetto\",5450 => \"/meteo/Portigliola\",8294 => \"/meteo/Porto+Alabe\",5451 => \"/meteo/Porto+azzurro\",5452 => \"/meteo/Porto+ceresio\",8528 => \"/meteo/Porto+Cervo\",5453 => \"/meteo/Porto+cesareo\",8295 => \"/meteo/Porto+Conte\",8612 => \"/meteo/Porto+Corsini\",5454 => \"/meteo/Porto+empedocle\",8669 => \"/meteo/Porto+Ercole\",8743 => \"/meteo/Porto+Levante\",5455 => \"/meteo/Porto+mantovano\",8178 => \"/meteo/Porto+Pino\",5456 => \"/meteo/Porto+recanati\",8529 => \"/meteo/Porto+Rotondo\",5457 => \"/meteo/Porto+san+giorgio\",5458 => \"/meteo/Porto+sant'elpidio\",8670 => \"/meteo/Porto+Santo+Stefano\",5459 => \"/meteo/Porto+tolle\",5460 => \"/meteo/Porto+torres\",5461 => \"/meteo/Porto+valtravaglia\",5462 => \"/meteo/Porto+viro\",8172 => \"/meteo/Portobello+di+Gallura\",5463 => \"/meteo/Portobuffole'\",5464 => \"/meteo/Portocannone\",5465 => \"/meteo/Portoferraio\",5466 => \"/meteo/Portofino\",5467 => \"/meteo/Portogruaro\",5468 => \"/meteo/Portomaggiore\",5469 => \"/meteo/Portopalo+di+capo+passero\",8171 => \"/meteo/Portorotondo\",5470 => \"/meteo/Portoscuso\",5471 => \"/meteo/Portovenere\",5472 => \"/meteo/Portula\",5473 => \"/meteo/Posada\",5474 => \"/meteo/Posina\",5475 => \"/meteo/Positano\",5476 => \"/meteo/Possagno\",5477 => \"/meteo/Posta\",5478 => \"/meteo/Posta+fibreno\",5479 => \"/meteo/Postal\",5480 => \"/meteo/Postalesio\",5481 => \"/meteo/Postiglione\",5482 => \"/meteo/Postua\",5483 => \"/meteo/Potenza\",5484 => \"/meteo/Potenza+picena\",5485 => \"/meteo/Pove+del+grappa\",5486 => \"/meteo/Povegliano\",5487 => \"/meteo/Povegliano+veronese\",5488 => \"/meteo/Poviglio\",5489 => \"/meteo/Povoletto\",5490 => \"/meteo/Pozza+di+fassa\",5491 => \"/meteo/Pozzaglia+sabino\",5492 => \"/meteo/Pozzaglio+ed+uniti\",5493 => \"/meteo/Pozzallo\",5494 => \"/meteo/Pozzilli\",5495 => \"/meteo/Pozzo+d'adda\",5496 => \"/meteo/Pozzol+groppo\",5497 => \"/meteo/Pozzolengo\",5498 => \"/meteo/Pozzoleone\",5499 => \"/meteo/Pozzolo+formigaro\",5500 => \"/meteo/Pozzomaggiore\",5501 => \"/meteo/Pozzonovo\",5502 => \"/meteo/Pozzuoli\",5503 => \"/meteo/Pozzuolo+del+friuli\",5504 => \"/meteo/Pozzuolo+martesana\",8693 => \"/meteo/Pra+Catinat\",5505 => \"/meteo/Pradalunga\",5506 => \"/meteo/Pradamano\",5507 => \"/meteo/Pradleves\",5508 => \"/meteo/Pragelato\",5509 => \"/meteo/Praia+a+mare\",5510 => \"/meteo/Praiano\",5511 => \"/meteo/Pralboino\",5512 => \"/meteo/Prali\",5513 => \"/meteo/Pralormo\",5514 => \"/meteo/Pralungo\",5515 => \"/meteo/Pramaggiore\",5516 => \"/meteo/Pramollo\",5517 => \"/meteo/Prarolo\",5518 => \"/meteo/Prarostino\",5519 => \"/meteo/Prasco\",5520 => \"/meteo/Prascorsano\",5521 => \"/meteo/Praso\",5522 => \"/meteo/Prata+camportaccio\",5523 => \"/meteo/Prata+d'ansidonia\",5524 => \"/meteo/Prata+di+pordenone\",5525 => \"/meteo/Prata+di+principato+ultra\",5526 => \"/meteo/Prata+sannita\",5527 => \"/meteo/Pratella\",8102 => \"/meteo/Prati+di+Tivo\",8694 => \"/meteo/Pratica+di+Mare\",5528 => \"/meteo/Pratiglione\",5529 => \"/meteo/Prato\",5530 => \"/meteo/Prato+allo+Stelvio\",5531 => \"/meteo/Prato+carnico\",8157 => \"/meteo/Prato+Nevoso\",5532 => \"/meteo/Prato+sesia\",8560 => \"/meteo/Prato+Spilla\",5533 => \"/meteo/Pratola+peligna\",5534 => \"/meteo/Pratola+serra\",5535 => \"/meteo/Pratovecchio\",5536 => \"/meteo/Pravisdomini\",5537 => \"/meteo/Pray\",5538 => \"/meteo/Prazzo\",5539 => \"/meteo/Pre'+Saint+Didier\",5540 => \"/meteo/Precenicco\",5541 => \"/meteo/Preci\",5542 => \"/meteo/Predappio\",5543 => \"/meteo/Predazzo\",5544 => \"/meteo/Predoi\",5545 => \"/meteo/Predore\",5546 => \"/meteo/Predosa\",5547 => \"/meteo/Preganziol\",5548 => \"/meteo/Pregnana+milanese\",5549 => \"/meteo/Prela'\",5550 => \"/meteo/Premana\",5551 => \"/meteo/Premariacco\",5552 => \"/meteo/Premeno\",5553 => \"/meteo/Premia\",5554 => \"/meteo/Premilcuore\",5555 => \"/meteo/Premolo\",5556 => \"/meteo/Premosello+chiovenda\",5557 => \"/meteo/Preone\",5558 => \"/meteo/Preore\",5559 => \"/meteo/Prepotto\",8578 => \"/meteo/Presanella\",5560 => \"/meteo/Preseglie\",5561 => \"/meteo/Presenzano\",5562 => \"/meteo/Presezzo\",5563 => \"/meteo/Presicce\",5564 => \"/meteo/Pressana\",5565 => \"/meteo/Prestine\",5566 => \"/meteo/Pretoro\",5567 => \"/meteo/Prevalle\",5568 => \"/meteo/Prezza\",5569 => \"/meteo/Prezzo\",5570 => \"/meteo/Priero\",5571 => \"/meteo/Prignano+cilento\",5572 => \"/meteo/Prignano+sulla+secchia\",5573 => \"/meteo/Primaluna\",5574 => \"/meteo/Priocca\",5575 => \"/meteo/Priola\",5576 => \"/meteo/Priolo+gargallo\",5577 => \"/meteo/Priverno\",5578 => \"/meteo/Prizzi\",5579 => \"/meteo/Proceno\",5580 => \"/meteo/Procida\",5581 => \"/meteo/Propata\",5582 => \"/meteo/Proserpio\",5583 => \"/meteo/Prossedi\",5584 => \"/meteo/Provaglio+d'iseo\",5585 => \"/meteo/Provaglio+val+sabbia\",5586 => \"/meteo/Proves\",5587 => \"/meteo/Provvidenti\",8189 => \"/meteo/Prunetta\",5588 => \"/meteo/Prunetto\",5589 => \"/meteo/Puegnago+sul+garda\",5590 => \"/meteo/Puglianello\",5591 => \"/meteo/Pula\",5592 => \"/meteo/Pulfero\",5593 => \"/meteo/Pulsano\",5594 => \"/meteo/Pumenengo\",8584 => \"/meteo/Punta+Ala\",8708 => \"/meteo/Punta+Ban\",8564 => \"/meteo/Punta+Helbronner\",8306 => \"/meteo/Punta+Indren\",8107 => \"/meteo/Punta+Stilo\",5595 => \"/meteo/Puos+d'alpago\",5596 => \"/meteo/Pusiano\",5597 => \"/meteo/Putifigari\",5598 => \"/meteo/Putignano\",5599 => \"/meteo/Quadrelle\",5600 => \"/meteo/Quadri\",5601 => \"/meteo/Quagliuzzo\",5602 => \"/meteo/Qualiano\",5603 => \"/meteo/Quaranti\",5604 => \"/meteo/Quaregna\",5605 => \"/meteo/Quargnento\",5606 => \"/meteo/Quarna+sopra\",5607 => \"/meteo/Quarna+sotto\",5608 => \"/meteo/Quarona\",5609 => \"/meteo/Quarrata\",5610 => \"/meteo/Quart\",5611 => \"/meteo/Quarto\",5612 => \"/meteo/Quarto+d'altino\",5613 => \"/meteo/Quartu+sant'elena\",5614 => \"/meteo/Quartucciu\",5615 => \"/meteo/Quassolo\",5616 => \"/meteo/Quattordio\",5617 => \"/meteo/Quattro+castella\",5618 => \"/meteo/Quero\",5619 => \"/meteo/Quiliano\",5620 => \"/meteo/Quincinetto\",5621 => \"/meteo/Quindici\",5622 => \"/meteo/Quingentole\",5623 => \"/meteo/Quintano\",5624 => \"/meteo/Quinto+di+treviso\",5625 => \"/meteo/Quinto+vercellese\",5626 => \"/meteo/Quinto+vicentino\",5627 => \"/meteo/Quinzano+d'oglio\",5628 => \"/meteo/Quistello\",5629 => \"/meteo/Quittengo\",5630 => \"/meteo/Rabbi\",5631 => \"/meteo/Racale\",5632 => \"/meteo/Racalmuto\",5633 => \"/meteo/Racconigi\",5634 => \"/meteo/Raccuja\",5635 => \"/meteo/Racines\",8352 => \"/meteo/Racines+Giovo\",5636 => \"/meteo/Radda+in+chianti\",5637 => \"/meteo/Raddusa\",5638 => \"/meteo/Radicofani\",5639 => \"/meteo/Radicondoli\",5640 => \"/meteo/Raffadali\",5641 => \"/meteo/Ragalna\",5642 => \"/meteo/Ragogna\",5643 => \"/meteo/Ragoli\",5644 => \"/meteo/Ragusa\",5645 => \"/meteo/Raiano\",5646 => \"/meteo/Ramacca\",5647 => \"/meteo/Ramiseto\",5648 => \"/meteo/Ramponio+verna\",5649 => \"/meteo/Rancio+valcuvia\",5650 => \"/meteo/Ranco\",5651 => \"/meteo/Randazzo\",5652 => \"/meteo/Ranica\",5653 => \"/meteo/Ranzanico\",5654 => \"/meteo/Ranzo\",5655 => \"/meteo/Rapagnano\",5656 => \"/meteo/Rapallo\",5657 => \"/meteo/Rapino\",5658 => \"/meteo/Rapolano+terme\",8394 => \"/meteo/Rapolla\",5660 => \"/meteo/Rapone\",5661 => \"/meteo/Rassa\",5662 => \"/meteo/Rasun+Anterselva\",5663 => \"/meteo/Rasura\",5664 => \"/meteo/Ravanusa\",5665 => \"/meteo/Ravarino\",5666 => \"/meteo/Ravascletto\",5667 => \"/meteo/Ravello\",5668 => \"/meteo/Ravenna\",5669 => \"/meteo/Raveo\",5670 => \"/meteo/Raviscanina\",5671 => \"/meteo/Re\",5672 => \"/meteo/Rea\",5673 => \"/meteo/Realmonte\",5674 => \"/meteo/Reana+del+roiale\",5675 => \"/meteo/Reano\",5676 => \"/meteo/Recale\",5677 => \"/meteo/Recanati\",5678 => \"/meteo/Recco\",5679 => \"/meteo/Recetto\",8639 => \"/meteo/Recoaro+Mille\",5680 => \"/meteo/Recoaro+Terme\",5681 => \"/meteo/Redavalle\",5682 => \"/meteo/Redondesco\",5683 => \"/meteo/Refrancore\",5684 => \"/meteo/Refrontolo\",5685 => \"/meteo/Regalbuto\",5686 => \"/meteo/Reggello\",8542 => \"/meteo/Reggio+Aeroporto+dello+Stretto\",5687 => \"/meteo/Reggio+Calabria\",5688 => \"/meteo/Reggio+Emilia\",5689 => \"/meteo/Reggiolo\",5690 => \"/meteo/Reino\",5691 => \"/meteo/Reitano\",5692 => \"/meteo/Remanzacco\",5693 => \"/meteo/Remedello\",5694 => \"/meteo/Renate\",5695 => \"/meteo/Rende\",5696 => \"/meteo/Renon\",5697 => \"/meteo/Resana\",5698 => \"/meteo/Rescaldina\",8734 => \"/meteo/Resegone\",5699 => \"/meteo/Resia\",5700 => \"/meteo/Resiutta\",5701 => \"/meteo/Resuttano\",5702 => \"/meteo/Retorbido\",5703 => \"/meteo/Revello\",5704 => \"/meteo/Revere\",5705 => \"/meteo/Revigliasco+d'asti\",5706 => \"/meteo/Revine+lago\",5707 => \"/meteo/Revo'\",5708 => \"/meteo/Rezzago\",5709 => \"/meteo/Rezzato\",5710 => \"/meteo/Rezzo\",5711 => \"/meteo/Rezzoaglio\",5712 => \"/meteo/Rhemes+Notre+Dame\",5713 => \"/meteo/Rhemes+Saint+Georges\",5714 => \"/meteo/Rho\",5715 => \"/meteo/Riace\",8106 => \"/meteo/Riace+Marina\",5716 => \"/meteo/Rialto\",5717 => \"/meteo/Riano\",5718 => \"/meteo/Riardo\",5719 => \"/meteo/Ribera\",5720 => \"/meteo/Ribordone\",5721 => \"/meteo/Ricadi\",5722 => \"/meteo/Ricaldone\",5723 => \"/meteo/Riccia\",5724 => \"/meteo/Riccione\",5725 => \"/meteo/Ricco'+del+golfo+di+spezia\",5726 => \"/meteo/Ricengo\",5727 => \"/meteo/Ricigliano\",5728 => \"/meteo/Riese+pio+x\",5729 => \"/meteo/Riesi\",5730 => \"/meteo/Rieti\",5731 => \"/meteo/Rifiano\",5732 => \"/meteo/Rifreddo\",8691 => \"/meteo/Rifugio+Boffalora+Ticino\",8244 => \"/meteo/Rifugio+Calvi+Laghi+Gemelli\",8684 => \"/meteo/Rifugio+Chivasso+-+Colle+del+Nivolet\",8678 => \"/meteo/Rifugio+Curò\",8679 => \"/meteo/Rifugio+laghi+Gemelli\",8731 => \"/meteo/Rifugio+Livio+Bianco\",8681 => \"/meteo/Rifugio+Mezzalama\",8682 => \"/meteo/Rifugio+Quintino+Sella\",8629 => \"/meteo/Rifugio+Sapienza\",8683 => \"/meteo/Rifugio+Torino\",8680 => \"/meteo/Rifugio+Viviani\",5733 => \"/meteo/Rignano+flaminio\",5734 => \"/meteo/Rignano+garganico\",5735 => \"/meteo/Rignano+sull'arno\",5736 => \"/meteo/Rigolato\",5737 => \"/meteo/Rima+san+giuseppe\",5738 => \"/meteo/Rimasco\",5739 => \"/meteo/Rimella\",5740 => \"/meteo/Rimini\",8546 => \"/meteo/Rimini+Miramare\",5741 => \"/meteo/Rio+di+Pusteria\",5742 => \"/meteo/Rio+marina\",5743 => \"/meteo/Rio+nell'elba\",5744 => \"/meteo/Rio+saliceto\",5745 => \"/meteo/Riofreddo\",5746 => \"/meteo/Riola+sardo\",5747 => \"/meteo/Riolo+terme\",5748 => \"/meteo/Riolunato\",5749 => \"/meteo/Riomaggiore\",5750 => \"/meteo/Rionero+in+vulture\",5751 => \"/meteo/Rionero+sannitico\",8503 => \"/meteo/Rioveggio\",5752 => \"/meteo/Ripa+teatina\",5753 => \"/meteo/Ripabottoni\",8404 => \"/meteo/Ripacandida\",5755 => \"/meteo/Ripalimosani\",5756 => \"/meteo/Ripalta+arpina\",5757 => \"/meteo/Ripalta+cremasca\",5758 => \"/meteo/Ripalta+guerina\",5759 => \"/meteo/Riparbella\",5760 => \"/meteo/Ripatransone\",5761 => \"/meteo/Ripe\",5762 => \"/meteo/Ripe+san+ginesio\",5763 => \"/meteo/Ripi\",5764 => \"/meteo/Riposto\",5765 => \"/meteo/Rittana\",5766 => \"/meteo/Riva+del+garda\",5767 => \"/meteo/Riva+di+solto\",8579 => \"/meteo/Riva+di+Tures\",5768 => \"/meteo/Riva+ligure\",5769 => \"/meteo/Riva+presso+chieri\",5770 => \"/meteo/Riva+valdobbia\",5771 => \"/meteo/Rivalba\",5772 => \"/meteo/Rivalta+bormida\",5773 => \"/meteo/Rivalta+di+torino\",5774 => \"/meteo/Rivamonte+agordino\",5775 => \"/meteo/Rivanazzano\",5776 => \"/meteo/Rivara\",5777 => \"/meteo/Rivarolo+canavese\",5778 => \"/meteo/Rivarolo+del+re+ed+uniti\",5779 => \"/meteo/Rivarolo+mantovano\",5780 => \"/meteo/Rivarone\",5781 => \"/meteo/Rivarossa\",5782 => \"/meteo/Rive\",5783 => \"/meteo/Rive+d'arcano\",8398 => \"/meteo/Rivello\",5785 => \"/meteo/Rivergaro\",5786 => \"/meteo/Rivignano\",5787 => \"/meteo/Rivisondoli\",5788 => \"/meteo/Rivodutri\",5789 => \"/meteo/Rivoli\",8436 => \"/meteo/Rivoli+veronese\",5791 => \"/meteo/Rivolta+d'adda\",5792 => \"/meteo/Rizziconi\",5793 => \"/meteo/Ro\",5794 => \"/meteo/Roana\",5795 => \"/meteo/Roaschia\",5796 => \"/meteo/Roascio\",5797 => \"/meteo/Roasio\",5798 => \"/meteo/Roatto\",5799 => \"/meteo/Robassomero\",5800 => \"/meteo/Robbiate\",5801 => \"/meteo/Robbio\",5802 => \"/meteo/Robecchetto+con+Induno\",5803 => \"/meteo/Robecco+d'oglio\",5804 => \"/meteo/Robecco+pavese\",5805 => \"/meteo/Robecco+sul+naviglio\",5806 => \"/meteo/Robella\",5807 => \"/meteo/Robilante\",5808 => \"/meteo/Roburent\",5809 => \"/meteo/Rocca+canavese\",5810 => \"/meteo/Rocca+Canterano\",5811 => \"/meteo/Rocca+Ciglie'\",5812 => \"/meteo/Rocca+d'Arazzo\",5813 => \"/meteo/Rocca+d'Arce\",5814 => \"/meteo/Rocca+d'Evandro\",5815 => \"/meteo/Rocca+de'+Baldi\",5816 => \"/meteo/Rocca+de'+Giorgi\",5817 => \"/meteo/Rocca+di+Botte\",5818 => \"/meteo/Rocca+di+Cambio\",5819 => \"/meteo/Rocca+di+Cave\",5820 => \"/meteo/Rocca+di+Mezzo\",5821 => \"/meteo/Rocca+di+Neto\",5822 => \"/meteo/Rocca+di+Papa\",5823 => \"/meteo/Rocca+Grimalda\",5824 => \"/meteo/Rocca+Imperiale\",8115 => \"/meteo/Rocca+Imperiale+Marina\",5825 => \"/meteo/Rocca+Massima\",5826 => \"/meteo/Rocca+Pia\",5827 => \"/meteo/Rocca+Pietore\",5828 => \"/meteo/Rocca+Priora\",5829 => \"/meteo/Rocca+San+Casciano\",5830 => \"/meteo/Rocca+San+Felice\",5831 => \"/meteo/Rocca+San+Giovanni\",5832 => \"/meteo/Rocca+Santa+Maria\",5833 => \"/meteo/Rocca+Santo+Stefano\",5834 => \"/meteo/Rocca+Sinibalda\",5835 => \"/meteo/Rocca+Susella\",5836 => \"/meteo/Roccabascerana\",5837 => \"/meteo/Roccabernarda\",5838 => \"/meteo/Roccabianca\",5839 => \"/meteo/Roccabruna\",8535 => \"/meteo/Roccacaramanico\",5840 => \"/meteo/Roccacasale\",5841 => \"/meteo/Roccadaspide\",5842 => \"/meteo/Roccafiorita\",5843 => \"/meteo/Roccafluvione\",5844 => \"/meteo/Roccaforte+del+greco\",5845 => \"/meteo/Roccaforte+ligure\",5846 => \"/meteo/Roccaforte+mondovi'\",5847 => \"/meteo/Roccaforzata\",5848 => \"/meteo/Roccafranca\",5849 => \"/meteo/Roccagiovine\",5850 => \"/meteo/Roccagloriosa\",5851 => \"/meteo/Roccagorga\",5852 => \"/meteo/Roccalbegna\",5853 => \"/meteo/Roccalumera\",5854 => \"/meteo/Roccamandolfi\",5855 => \"/meteo/Roccamena\",5856 => \"/meteo/Roccamonfina\",5857 => \"/meteo/Roccamontepiano\",5858 => \"/meteo/Roccamorice\",8418 => \"/meteo/Roccanova\",5860 => \"/meteo/Roccantica\",5861 => \"/meteo/Roccapalumba\",5862 => \"/meteo/Roccapiemonte\",5863 => \"/meteo/Roccarainola\",5864 => \"/meteo/Roccaraso\",5865 => \"/meteo/Roccaromana\",5866 => \"/meteo/Roccascalegna\",5867 => \"/meteo/Roccasecca\",5868 => \"/meteo/Roccasecca+dei+volsci\",5869 => \"/meteo/Roccasicura\",5870 => \"/meteo/Roccasparvera\",5871 => \"/meteo/Roccaspinalveti\",5872 => \"/meteo/Roccastrada\",5873 => \"/meteo/Roccavaldina\",5874 => \"/meteo/Roccaverano\",5875 => \"/meteo/Roccavignale\",5876 => \"/meteo/Roccavione\",5877 => \"/meteo/Roccavivara\",5878 => \"/meteo/Roccella+ionica\",5879 => \"/meteo/Roccella+valdemone\",5880 => \"/meteo/Rocchetta+a+volturno\",5881 => \"/meteo/Rocchetta+belbo\",5882 => \"/meteo/Rocchetta+di+vara\",5883 => \"/meteo/Rocchetta+e+croce\",5884 => \"/meteo/Rocchetta+ligure\",5885 => \"/meteo/Rocchetta+nervina\",5886 => \"/meteo/Rocchetta+palafea\",5887 => \"/meteo/Rocchetta+sant'antonio\",5888 => \"/meteo/Rocchetta+tanaro\",5889 => \"/meteo/Rodano\",5890 => \"/meteo/Roddi\",5891 => \"/meteo/Roddino\",5892 => \"/meteo/Rodello\",5893 => \"/meteo/Rodengo\",5894 => \"/meteo/Rodengo-saiano\",5895 => \"/meteo/Rodero\",5896 => \"/meteo/Rodi+garganico\",5897 => \"/meteo/Rodi'+milici\",5898 => \"/meteo/Rodigo\",5899 => \"/meteo/Roe'+volciano\",5900 => \"/meteo/Rofrano\",5901 => \"/meteo/Rogeno\",5902 => \"/meteo/Roggiano+gravina\",5903 => \"/meteo/Roghudi\",5904 => \"/meteo/Rogliano\",5905 => \"/meteo/Rognano\",5906 => \"/meteo/Rogno\",5907 => \"/meteo/Rogolo\",5908 => \"/meteo/Roiate\",5909 => \"/meteo/Roio+del+sangro\",5910 => \"/meteo/Roisan\",5911 => \"/meteo/Roletto\",5912 => \"/meteo/Rolo\",5913 => \"/meteo/Roma\",8545 => \"/meteo/Roma+Ciampino\",8499 => \"/meteo/Roma+Fiumicino\",5914 => \"/meteo/Romagnano+al+monte\",5915 => \"/meteo/Romagnano+sesia\",5916 => \"/meteo/Romagnese\",5917 => \"/meteo/Romallo\",5918 => \"/meteo/Romana\",5919 => \"/meteo/Romanengo\",5920 => \"/meteo/Romano+canavese\",5921 => \"/meteo/Romano+d'ezzelino\",5922 => \"/meteo/Romano+di+lombardia\",5923 => \"/meteo/Romans+d'isonzo\",5924 => \"/meteo/Rombiolo\",5925 => \"/meteo/Romeno\",5926 => \"/meteo/Romentino\",5927 => \"/meteo/Rometta\",5928 => \"/meteo/Ronago\",5929 => \"/meteo/Ronca'\",5930 => \"/meteo/Roncade\",5931 => \"/meteo/Roncadelle\",5932 => \"/meteo/Roncaro\",5933 => \"/meteo/Roncegno\",5934 => \"/meteo/Roncello\",5935 => \"/meteo/Ronchi+dei+legionari\",5936 => \"/meteo/Ronchi+valsugana\",5937 => \"/meteo/Ronchis\",5938 => \"/meteo/Ronciglione\",5939 => \"/meteo/Ronco+all'adige\",8231 => \"/meteo/Ronco+all`Adige\",5940 => \"/meteo/Ronco+biellese\",5941 => \"/meteo/Ronco+briantino\",5942 => \"/meteo/Ronco+canavese\",5943 => \"/meteo/Ronco+scrivia\",5944 => \"/meteo/Roncobello\",5945 => \"/meteo/Roncoferraro\",5946 => \"/meteo/Roncofreddo\",5947 => \"/meteo/Roncola\",5948 => \"/meteo/Roncone\",5949 => \"/meteo/Rondanina\",5950 => \"/meteo/Rondissone\",5951 => \"/meteo/Ronsecco\",5952 => \"/meteo/Ronzo+chienis\",5953 => \"/meteo/Ronzone\",5954 => \"/meteo/Roppolo\",5955 => \"/meteo/Rora'\",5956 => \"/meteo/Rosa'\",5957 => \"/meteo/Rosarno\",5958 => \"/meteo/Rosasco\",5959 => \"/meteo/Rosate\",5960 => \"/meteo/Rosazza\",5961 => \"/meteo/Rosciano\",5962 => \"/meteo/Roscigno\",5963 => \"/meteo/Rose\",5964 => \"/meteo/Rosello\",5965 => \"/meteo/Roseto+capo+spulico\",8439 => \"/meteo/Roseto+casello\",5966 => \"/meteo/Roseto+degli+abruzzi\",5967 => \"/meteo/Roseto+valfortore\",5968 => \"/meteo/Rosignano+marittimo\",5969 => \"/meteo/Rosignano+monferrato\",8195 => \"/meteo/Rosignano+Solvay\",5970 => \"/meteo/Rosolina\",8744 => \"/meteo/Rosolina+mare\",5971 => \"/meteo/Rosolini\",8704 => \"/meteo/Rosone\",5972 => \"/meteo/Rosora\",5973 => \"/meteo/Rossa\",5974 => \"/meteo/Rossana\",5975 => \"/meteo/Rossano\",8109 => \"/meteo/Rossano+Calabro+Marina\",5976 => \"/meteo/Rossano+veneto\",8431 => \"/meteo/Rossera\",5977 => \"/meteo/Rossiglione\",5978 => \"/meteo/Rosta\",5979 => \"/meteo/Rota+d'imagna\",5980 => \"/meteo/Rota+greca\",5981 => \"/meteo/Rotella\",5982 => \"/meteo/Rotello\",8429 => \"/meteo/Rotonda\",5984 => \"/meteo/Rotondella\",5985 => \"/meteo/Rotondi\",5986 => \"/meteo/Rottofreno\",5987 => \"/meteo/Rotzo\",5988 => \"/meteo/Roure\",5989 => \"/meteo/Rovagnate\",5990 => \"/meteo/Rovasenda\",5991 => \"/meteo/Rovato\",5992 => \"/meteo/Rovegno\",5993 => \"/meteo/Rovellasca\",5994 => \"/meteo/Rovello+porro\",5995 => \"/meteo/Roverbella\",5996 => \"/meteo/Roverchiara\",5997 => \"/meteo/Rovere'+della+luna\",5998 => \"/meteo/Rovere'+veronese\",5999 => \"/meteo/Roveredo+di+gua'\",6000 => \"/meteo/Roveredo+in+piano\",6001 => \"/meteo/Rovereto\",6002 => \"/meteo/Rovescala\",6003 => \"/meteo/Rovetta\",6004 => \"/meteo/Roviano\",6005 => \"/meteo/Rovigo\",6006 => \"/meteo/Rovito\",6007 => \"/meteo/Rovolon\",6008 => \"/meteo/Rozzano\",6009 => \"/meteo/Rubano\",6010 => \"/meteo/Rubiana\",6011 => \"/meteo/Rubiera\",8632 => \"/meteo/Rucas\",6012 => \"/meteo/Ruda\",6013 => \"/meteo/Rudiano\",6014 => \"/meteo/Rueglio\",6015 => \"/meteo/Ruffano\",6016 => \"/meteo/Ruffia\",6017 => \"/meteo/Ruffre'\",6018 => \"/meteo/Rufina\",6019 => \"/meteo/Ruinas\",6020 => \"/meteo/Ruino\",6021 => \"/meteo/Rumo\",8366 => \"/meteo/Ruoti\",6023 => \"/meteo/Russi\",6024 => \"/meteo/Rutigliano\",6025 => \"/meteo/Rutino\",6026 => \"/meteo/Ruviano\",8393 => \"/meteo/Ruvo+del+monte\",6028 => \"/meteo/Ruvo+di+Puglia\",6029 => \"/meteo/Sabaudia\",6030 => \"/meteo/Sabbia\",6031 => \"/meteo/Sabbio+chiese\",6032 => \"/meteo/Sabbioneta\",6033 => \"/meteo/Sacco\",6034 => \"/meteo/Saccolongo\",6035 => \"/meteo/Sacile\",8700 => \"/meteo/Sacra+di+San+Michele\",6036 => \"/meteo/Sacrofano\",6037 => \"/meteo/Sadali\",6038 => \"/meteo/Sagama\",6039 => \"/meteo/Sagliano+micca\",6040 => \"/meteo/Sagrado\",6041 => \"/meteo/Sagron+mis\",8602 => \"/meteo/Saint+Barthelemy\",6042 => \"/meteo/Saint+Christophe\",6043 => \"/meteo/Saint+Denis\",8304 => \"/meteo/Saint+Jacques\",6044 => \"/meteo/Saint+Marcel\",6045 => \"/meteo/Saint+Nicolas\",6046 => \"/meteo/Saint+Oyen+Flassin\",6047 => \"/meteo/Saint+Pierre\",6048 => \"/meteo/Saint+Rhemy+en+Bosses\",6049 => \"/meteo/Saint+Vincent\",6050 => \"/meteo/Sala+Baganza\",6051 => \"/meteo/Sala+Biellese\",6052 => \"/meteo/Sala+Bolognese\",6053 => \"/meteo/Sala+Comacina\",6054 => \"/meteo/Sala+Consilina\",6055 => \"/meteo/Sala+Monferrato\",8372 => \"/meteo/Salandra\",6057 => \"/meteo/Salaparuta\",6058 => \"/meteo/Salara\",6059 => \"/meteo/Salasco\",6060 => \"/meteo/Salassa\",6061 => \"/meteo/Salbertrand\",6062 => \"/meteo/Salcedo\",6063 => \"/meteo/Salcito\",6064 => \"/meteo/Sale\",6065 => \"/meteo/Sale+delle+Langhe\",6066 => \"/meteo/Sale+Marasino\",6067 => \"/meteo/Sale+San+Giovanni\",6068 => \"/meteo/Salemi\",6069 => \"/meteo/Salento\",6070 => \"/meteo/Salerano+Canavese\",6071 => \"/meteo/Salerano+sul+Lambro\",6072 => \"/meteo/Salerno\",6073 => \"/meteo/Saletto\",6074 => \"/meteo/Salgareda\",6075 => \"/meteo/Sali+Vercellese\",6076 => \"/meteo/Salice+Salentino\",6077 => \"/meteo/Saliceto\",6078 => \"/meteo/Salisano\",6079 => \"/meteo/Salizzole\",6080 => \"/meteo/Salle\",6081 => \"/meteo/Salmour\",6082 => \"/meteo/Salo'\",6083 => \"/meteo/Salorno\",6084 => \"/meteo/Salsomaggiore+Terme\",6085 => \"/meteo/Saltara\",6086 => \"/meteo/Saltrio\",6087 => \"/meteo/Saludecio\",6088 => \"/meteo/Saluggia\",6089 => \"/meteo/Salussola\",6090 => \"/meteo/Saluzzo\",6091 => \"/meteo/Salve\",6092 => \"/meteo/Salvirola\",6093 => \"/meteo/Salvitelle\",6094 => \"/meteo/Salza+di+Pinerolo\",6095 => \"/meteo/Salza+Irpina\",6096 => \"/meteo/Salzano\",6097 => \"/meteo/Samarate\",6098 => \"/meteo/Samassi\",6099 => \"/meteo/Samatzai\",6100 => \"/meteo/Sambuca+di+Sicilia\",6101 => \"/meteo/Sambuca+Pistoiese\",6102 => \"/meteo/Sambuci\",6103 => \"/meteo/Sambuco\",6104 => \"/meteo/Sammichele+di+Bari\",6105 => \"/meteo/Samo\",6106 => \"/meteo/Samolaco\",6107 => \"/meteo/Samone\",6108 => \"/meteo/Samone\",6109 => \"/meteo/Sampeyre\",6110 => \"/meteo/Samugheo\",6111 => \"/meteo/San+Bartolomeo+al+Mare\",6112 => \"/meteo/San+Bartolomeo+in+Galdo\",6113 => \"/meteo/San+Bartolomeo+Val+Cavargna\",6114 => \"/meteo/San+Basile\",6115 => \"/meteo/San+Basilio\",6116 => \"/meteo/San+Bassano\",6117 => \"/meteo/San+Bellino\",6118 => \"/meteo/San+Benedetto+Belbo\",6119 => \"/meteo/San+Benedetto+dei+Marsi\",6120 => \"/meteo/San+Benedetto+del+Tronto\",8126 => \"/meteo/San+Benedetto+in+Alpe\",6121 => \"/meteo/San+Benedetto+in+Perillis\",6122 => \"/meteo/San+Benedetto+Po\",6123 => \"/meteo/San+Benedetto+Ullano\",6124 => \"/meteo/San+Benedetto+val+di+Sambro\",6125 => \"/meteo/San+Benigno+Canavese\",8641 => \"/meteo/San+Bernardino\",6126 => \"/meteo/San+Bernardino+Verbano\",6127 => \"/meteo/San+Biagio+della+Cima\",6128 => \"/meteo/San+Biagio+di+Callalta\",6129 => \"/meteo/San+Biagio+Platani\",6130 => \"/meteo/San+Biagio+Saracinisco\",6131 => \"/meteo/San+Biase\",6132 => \"/meteo/San+Bonifacio\",6133 => \"/meteo/San+Buono\",6134 => \"/meteo/San+Calogero\",6135 => \"/meteo/San+Candido\",6136 => \"/meteo/San+Canzian+d'Isonzo\",6137 => \"/meteo/San+Carlo+Canavese\",6138 => \"/meteo/San+Casciano+dei+Bagni\",6139 => \"/meteo/San+Casciano+in+Val+di+Pesa\",6140 => \"/meteo/San+Cassiano\",8624 => \"/meteo/San+Cassiano+in+Badia\",6141 => \"/meteo/San+Cataldo\",6142 => \"/meteo/San+Cesareo\",6143 => \"/meteo/San+Cesario+di+Lecce\",6144 => \"/meteo/San+Cesario+sul+Panaro\",8367 => \"/meteo/San+Chirico+Nuovo\",6146 => \"/meteo/San+Chirico+Raparo\",6147 => \"/meteo/San+Cipirello\",6148 => \"/meteo/San+Cipriano+d'Aversa\",6149 => \"/meteo/San+Cipriano+Picentino\",6150 => \"/meteo/San+Cipriano+Po\",6151 => \"/meteo/San+Clemente\",6152 => \"/meteo/San+Colombano+al+Lambro\",6153 => \"/meteo/San+Colombano+Belmonte\",6154 => \"/meteo/San+Colombano+Certenoli\",8622 => \"/meteo/San+Colombano+Valdidentro\",6155 => \"/meteo/San+Cono\",6156 => \"/meteo/San+Cosmo+Albanese\",8376 => \"/meteo/San+Costantino+Albanese\",6158 => \"/meteo/San+Costantino+Calabro\",6159 => \"/meteo/San+Costanzo\",6160 => \"/meteo/San+Cristoforo\",6161 => \"/meteo/San+Damiano+al+Colle\",6162 => \"/meteo/San+Damiano+d'Asti\",6163 => \"/meteo/San+Damiano+Macra\",6164 => \"/meteo/San+Daniele+del+Friuli\",6165 => \"/meteo/San+Daniele+Po\",6166 => \"/meteo/San+Demetrio+Corone\",6167 => \"/meteo/San+Demetrio+ne'+Vestini\",6168 => \"/meteo/San+Didero\",8556 => \"/meteo/San+Domenico+di+Varzo\",6169 => \"/meteo/San+Dona'+di+Piave\",6170 => \"/meteo/San+Donaci\",6171 => \"/meteo/San+Donato+di+Lecce\",6172 => \"/meteo/San+Donato+di+Ninea\",6173 => \"/meteo/San+Donato+Milanese\",6174 => \"/meteo/San+Donato+Val+di+Comino\",6175 => \"/meteo/San+Dorligo+della+Valle\",6176 => \"/meteo/San+Fedele+Intelvi\",6177 => \"/meteo/San+Fele\",6178 => \"/meteo/San+Felice+a+Cancello\",6179 => \"/meteo/San+Felice+Circeo\",6180 => \"/meteo/San+Felice+del+Benaco\",6181 => \"/meteo/San+Felice+del+Molise\",6182 => \"/meteo/San+Felice+sul+Panaro\",6183 => \"/meteo/San+Ferdinando\",6184 => \"/meteo/San+Ferdinando+di+Puglia\",6185 => \"/meteo/San+Fermo+della+Battaglia\",6186 => \"/meteo/San+Fili\",6187 => \"/meteo/San+Filippo+del+mela\",6188 => \"/meteo/San+Fior\",6189 => \"/meteo/San+Fiorano\",6190 => \"/meteo/San+Floriano+del+collio\",6191 => \"/meteo/San+Floro\",6192 => \"/meteo/San+Francesco+al+campo\",6193 => \"/meteo/San+Fratello\",8690 => \"/meteo/San+Galgano\",6194 => \"/meteo/San+Gavino+monreale\",6195 => \"/meteo/San+Gemini\",6196 => \"/meteo/San+Genesio+Atesino\",6197 => \"/meteo/San+Genesio+ed+uniti\",6198 => \"/meteo/San+Gennaro+vesuviano\",6199 => \"/meteo/San+Germano+chisone\",6200 => \"/meteo/San+Germano+dei+berici\",6201 => \"/meteo/San+Germano+vercellese\",6202 => \"/meteo/San+Gervasio+bresciano\",6203 => \"/meteo/San+Giacomo+degli+schiavoni\",6204 => \"/meteo/San+Giacomo+delle+segnate\",8620 => \"/meteo/San+Giacomo+di+Roburent\",6205 => \"/meteo/San+Giacomo+filippo\",6206 => \"/meteo/San+Giacomo+vercellese\",6207 => \"/meteo/San+Gillio\",6208 => \"/meteo/San+Gimignano\",6209 => \"/meteo/San+Ginesio\",6210 => \"/meteo/San+Giorgio+a+cremano\",6211 => \"/meteo/San+Giorgio+a+liri\",6212 => \"/meteo/San+Giorgio+albanese\",6213 => \"/meteo/San+Giorgio+canavese\",6214 => \"/meteo/San+Giorgio+del+sannio\",6215 => \"/meteo/San+Giorgio+della+richinvelda\",6216 => \"/meteo/San+Giorgio+delle+Pertiche\",6217 => \"/meteo/San+Giorgio+di+lomellina\",6218 => \"/meteo/San+Giorgio+di+mantova\",6219 => \"/meteo/San+Giorgio+di+nogaro\",6220 => \"/meteo/San+Giorgio+di+pesaro\",6221 => \"/meteo/San+Giorgio+di+piano\",6222 => \"/meteo/San+Giorgio+in+bosco\",6223 => \"/meteo/San+Giorgio+ionico\",6224 => \"/meteo/San+Giorgio+la+molara\",6225 => \"/meteo/San+Giorgio+lucano\",6226 => \"/meteo/San+Giorgio+monferrato\",6227 => \"/meteo/San+Giorgio+morgeto\",6228 => \"/meteo/San+Giorgio+piacentino\",6229 => \"/meteo/San+Giorgio+scarampi\",6230 => \"/meteo/San+Giorgio+su+Legnano\",6231 => \"/meteo/San+Giorio+di+susa\",6232 => \"/meteo/San+Giovanni+a+piro\",6233 => \"/meteo/San+Giovanni+al+natisone\",6234 => \"/meteo/San+Giovanni+bianco\",6235 => \"/meteo/San+Giovanni+d'asso\",6236 => \"/meteo/San+Giovanni+del+dosso\",6237 => \"/meteo/San+Giovanni+di+gerace\",6238 => \"/meteo/San+Giovanni+gemini\",6239 => \"/meteo/San+Giovanni+ilarione\",6240 => \"/meteo/San+Giovanni+in+croce\",6241 => \"/meteo/San+Giovanni+in+fiore\",6242 => \"/meteo/San+Giovanni+in+galdo\",6243 => \"/meteo/San+Giovanni+in+marignano\",6244 => \"/meteo/San+Giovanni+in+persiceto\",8567 => \"/meteo/San+Giovanni+in+val+Aurina\",6245 => \"/meteo/San+Giovanni+incarico\",6246 => \"/meteo/San+Giovanni+la+punta\",6247 => \"/meteo/San+Giovanni+lipioni\",6248 => \"/meteo/San+Giovanni+lupatoto\",6249 => \"/meteo/San+Giovanni+rotondo\",6250 => \"/meteo/San+Giovanni+suergiu\",6251 => \"/meteo/San+Giovanni+teatino\",6252 => \"/meteo/San+Giovanni+valdarno\",6253 => \"/meteo/San+Giuliano+del+sannio\",6254 => \"/meteo/San+Giuliano+di+Puglia\",6255 => \"/meteo/San+Giuliano+milanese\",6256 => \"/meteo/San+Giuliano+terme\",6257 => \"/meteo/San+Giuseppe+jato\",6258 => \"/meteo/San+Giuseppe+vesuviano\",6259 => \"/meteo/San+Giustino\",6260 => \"/meteo/San+Giusto+canavese\",6261 => \"/meteo/San+Godenzo\",6262 => \"/meteo/San+Gregorio+d'ippona\",6263 => \"/meteo/San+Gregorio+da+sassola\",6264 => \"/meteo/San+Gregorio+di+Catania\",6265 => \"/meteo/San+Gregorio+Magno\",6266 => \"/meteo/San+Gregorio+Matese\",6267 => \"/meteo/San+Gregorio+nelle+Alpi\",6268 => \"/meteo/San+Lazzaro+di+Savena\",6269 => \"/meteo/San+Leo\",6270 => \"/meteo/San+Leonardo\",6271 => \"/meteo/San+Leonardo+in+Passiria\",8580 => \"/meteo/San+Leone\",6272 => \"/meteo/San+Leucio+del+Sannio\",6273 => \"/meteo/San+Lorenzello\",6274 => \"/meteo/San+Lorenzo\",6275 => \"/meteo/San+Lorenzo+al+mare\",6276 => \"/meteo/San+Lorenzo+Bellizzi\",6277 => \"/meteo/San+Lorenzo+del+vallo\",6278 => \"/meteo/San+Lorenzo+di+Sebato\",6279 => \"/meteo/San+Lorenzo+in+Banale\",6280 => \"/meteo/San+Lorenzo+in+campo\",6281 => \"/meteo/San+Lorenzo+isontino\",6282 => \"/meteo/San+Lorenzo+Maggiore\",6283 => \"/meteo/San+Lorenzo+Nuovo\",6284 => \"/meteo/San+Luca\",6285 => \"/meteo/San+Lucido\",6286 => \"/meteo/San+Lupo\",6287 => \"/meteo/San+Mango+d'Aquino\",6288 => \"/meteo/San+Mango+Piemonte\",6289 => \"/meteo/San+Mango+sul+Calore\",6290 => \"/meteo/San+Marcellino\",6291 => \"/meteo/San+Marcello\",6292 => \"/meteo/San+Marcello+pistoiese\",6293 => \"/meteo/San+Marco+argentano\",6294 => \"/meteo/San+Marco+d'Alunzio\",6295 => \"/meteo/San+Marco+dei+Cavoti\",6296 => \"/meteo/San+Marco+Evangelista\",6297 => \"/meteo/San+Marco+in+Lamis\",6298 => \"/meteo/San+Marco+la+Catola\",8152 => \"/meteo/San+Marino\",6299 => \"/meteo/San+Martino+al+Tagliamento\",6300 => \"/meteo/San+Martino+Alfieri\",6301 => \"/meteo/San+Martino+Buon+Albergo\",6302 => \"/meteo/San+Martino+Canavese\",6303 => \"/meteo/San+Martino+d'Agri\",6304 => \"/meteo/San+Martino+dall'argine\",6305 => \"/meteo/San+Martino+del+lago\",8209 => \"/meteo/San+Martino+di+Castrozza\",6306 => \"/meteo/San+Martino+di+Finita\",6307 => \"/meteo/San+Martino+di+Lupari\",6308 => \"/meteo/San+Martino+di+venezze\",8410 => \"/meteo/San+Martino+d`agri\",6309 => \"/meteo/San+Martino+in+Badia\",6310 => \"/meteo/San+Martino+in+Passiria\",6311 => \"/meteo/San+Martino+in+pensilis\",6312 => \"/meteo/San+Martino+in+rio\",6313 => \"/meteo/San+Martino+in+strada\",6314 => \"/meteo/San+Martino+sannita\",6315 => \"/meteo/San+Martino+siccomario\",6316 => \"/meteo/San+Martino+sulla+marrucina\",6317 => \"/meteo/San+Martino+valle+caudina\",6318 => \"/meteo/San+Marzano+di+San+Giuseppe\",6319 => \"/meteo/San+Marzano+oliveto\",6320 => \"/meteo/San+Marzano+sul+Sarno\",6321 => \"/meteo/San+Massimo\",6322 => \"/meteo/San+Maurizio+canavese\",6323 => \"/meteo/San+Maurizio+d'opaglio\",6324 => \"/meteo/San+Mauro+castelverde\",6325 => \"/meteo/San+Mauro+cilento\",6326 => \"/meteo/San+Mauro+di+saline\",8427 => \"/meteo/San+Mauro+forte\",6328 => \"/meteo/San+Mauro+la+bruca\",6329 => \"/meteo/San+Mauro+marchesato\",6330 => \"/meteo/San+Mauro+Pascoli\",6331 => \"/meteo/San+Mauro+torinese\",6332 => \"/meteo/San+Michele+al+Tagliamento\",6333 => \"/meteo/San+Michele+all'Adige\",6334 => \"/meteo/San+Michele+di+ganzaria\",6335 => \"/meteo/San+Michele+di+serino\",6336 => \"/meteo/San+Michele+Mondovi'\",6337 => \"/meteo/San+Michele+salentino\",6338 => \"/meteo/San+Miniato\",6339 => \"/meteo/San+Nazario\",6340 => \"/meteo/San+Nazzaro\",6341 => \"/meteo/San+Nazzaro+Sesia\",6342 => \"/meteo/San+Nazzaro+val+cavargna\",6343 => \"/meteo/San+Nicola+arcella\",6344 => \"/meteo/San+Nicola+baronia\",6345 => \"/meteo/San+Nicola+da+crissa\",6346 => \"/meteo/San+Nicola+dell'alto\",6347 => \"/meteo/San+Nicola+la+strada\",6348 => \"/meteo/San+nicola+manfredi\",6349 => \"/meteo/San+nicolo'+d'arcidano\",6350 => \"/meteo/San+nicolo'+di+comelico\",6351 => \"/meteo/San+Nicolo'+Gerrei\",6352 => \"/meteo/San+Pancrazio\",6353 => \"/meteo/San+Pancrazio+salentino\",6354 => \"/meteo/San+Paolo\",8361 => \"/meteo/San+Paolo+albanese\",6356 => \"/meteo/San+Paolo+bel+sito\",6357 => \"/meteo/San+Paolo+cervo\",6358 => \"/meteo/San+Paolo+d'argon\",6359 => \"/meteo/San+Paolo+di+civitate\",6360 => \"/meteo/San+Paolo+di+Jesi\",6361 => \"/meteo/San+Paolo+solbrito\",6362 => \"/meteo/San+Pellegrino+terme\",6363 => \"/meteo/San+Pier+d'isonzo\",6364 => \"/meteo/San+Pier+niceto\",6365 => \"/meteo/San+Piero+a+sieve\",6366 => \"/meteo/San+Piero+Patti\",6367 => \"/meteo/San+Pietro+a+maida\",6368 => \"/meteo/San+Pietro+al+Natisone\",6369 => \"/meteo/San+Pietro+al+Tanagro\",6370 => \"/meteo/San+Pietro+apostolo\",6371 => \"/meteo/San+Pietro+avellana\",6372 => \"/meteo/San+Pietro+clarenza\",6373 => \"/meteo/San+Pietro+di+cadore\",6374 => \"/meteo/San+Pietro+di+carida'\",6375 => \"/meteo/San+Pietro+di+feletto\",6376 => \"/meteo/San+Pietro+di+morubio\",6377 => \"/meteo/San+Pietro+in+Amantea\",6378 => \"/meteo/San+Pietro+in+cariano\",6379 => \"/meteo/San+Pietro+in+casale\",6380 => \"/meteo/San+Pietro+in+cerro\",6381 => \"/meteo/San+Pietro+in+gu\",6382 => \"/meteo/San+Pietro+in+guarano\",6383 => \"/meteo/San+Pietro+in+lama\",6384 => \"/meteo/San+Pietro+infine\",6385 => \"/meteo/San+Pietro+mosezzo\",6386 => \"/meteo/San+Pietro+mussolino\",6387 => \"/meteo/San+Pietro+val+lemina\",6388 => \"/meteo/San+Pietro+vernotico\",6389 => \"/meteo/San+Pietro+Viminario\",6390 => \"/meteo/San+Pio+delle+camere\",6391 => \"/meteo/San+Polo+d'enza\",6392 => \"/meteo/San+Polo+dei+cavalieri\",6393 => \"/meteo/San+Polo+di+Piave\",6394 => \"/meteo/San+Polo+matese\",6395 => \"/meteo/San+Ponso\",6396 => \"/meteo/San+Possidonio\",6397 => \"/meteo/San+Potito+sannitico\",6398 => \"/meteo/San+Potito+ultra\",6399 => \"/meteo/San+Prisco\",6400 => \"/meteo/San+Procopio\",6401 => \"/meteo/San+Prospero\",6402 => \"/meteo/San+Quirico+d'orcia\",8199 => \"/meteo/San+Quirico+d`Orcia\",6403 => \"/meteo/San+Quirino\",6404 => \"/meteo/San+Raffaele+cimena\",6405 => \"/meteo/San+Roberto\",6406 => \"/meteo/San+Rocco+al+porto\",6407 => \"/meteo/San+Romano+in+garfagnana\",6408 => \"/meteo/San+Rufo\",6409 => \"/meteo/San+Salvatore+di+fitalia\",6410 => \"/meteo/San+Salvatore+Monferrato\",6411 => \"/meteo/San+Salvatore+Telesino\",6412 => \"/meteo/San+Salvo\",8103 => \"/meteo/San+Salvo+Marina\",6413 => \"/meteo/San+Sebastiano+al+Vesuvio\",6414 => \"/meteo/San+Sebastiano+Curone\",6415 => \"/meteo/San+Sebastiano+da+Po\",6416 => \"/meteo/San+Secondo+di+Pinerolo\",6417 => \"/meteo/San+Secondo+Parmense\",6418 => \"/meteo/San+Severino+Lucano\",6419 => \"/meteo/San+Severino+Marche\",6420 => \"/meteo/San+Severo\",8347 => \"/meteo/San+Sicario+di+Cesana\",8289 => \"/meteo/San+Simone\",8539 => \"/meteo/San+Simone+Baita+del+Camoscio\",6421 => \"/meteo/San+Siro\",6422 => \"/meteo/San+Sossio+Baronia\",6423 => \"/meteo/San+Sostene\",6424 => \"/meteo/San+Sosti\",6425 => \"/meteo/San+Sperate\",6426 => \"/meteo/San+Tammaro\",6427 => \"/meteo/San+Teodoro\",8170 => \"/meteo/San+Teodoro\",6429 => \"/meteo/San+Tomaso+agordino\",8212 => \"/meteo/San+Valentino+alla+Muta\",6430 => \"/meteo/San+Valentino+in+abruzzo+citeriore\",6431 => \"/meteo/San+Valentino+torio\",6432 => \"/meteo/San+Venanzo\",6433 => \"/meteo/San+Vendemiano\",6434 => \"/meteo/San+Vero+milis\",6435 => \"/meteo/San+Vincenzo\",6436 => \"/meteo/San+Vincenzo+la+costa\",6437 => \"/meteo/San+Vincenzo+valle+roveto\",6438 => \"/meteo/San+Vitaliano\",8293 => \"/meteo/San+Vito\",6440 => \"/meteo/San+Vito+al+tagliamento\",6441 => \"/meteo/San+Vito+al+torre\",6442 => \"/meteo/San+Vito+chietino\",6443 => \"/meteo/San+Vito+dei+normanni\",6444 => \"/meteo/San+Vito+di+cadore\",6445 => \"/meteo/San+Vito+di+fagagna\",6446 => \"/meteo/San+Vito+di+leguzzano\",6447 => \"/meteo/San+Vito+lo+capo\",6448 => \"/meteo/San+Vito+romano\",6449 => \"/meteo/San+Vito+sullo+ionio\",6450 => \"/meteo/San+Vittore+del+lazio\",6451 => \"/meteo/San+Vittore+Olona\",6452 => \"/meteo/San+Zeno+di+montagna\",6453 => \"/meteo/San+Zeno+naviglio\",6454 => \"/meteo/San+Zenone+al+lambro\",6455 => \"/meteo/San+Zenone+al+po\",6456 => \"/meteo/San+Zenone+degli+ezzelini\",6457 => \"/meteo/Sanarica\",6458 => \"/meteo/Sandigliano\",6459 => \"/meteo/Sandrigo\",6460 => \"/meteo/Sanfre'\",6461 => \"/meteo/Sanfront\",6462 => \"/meteo/Sangano\",6463 => \"/meteo/Sangiano\",6464 => \"/meteo/Sangineto\",6465 => \"/meteo/Sanguinetto\",6466 => \"/meteo/Sanluri\",6467 => \"/meteo/Sannazzaro+de'+Burgondi\",6468 => \"/meteo/Sannicandro+di+bari\",6469 => \"/meteo/Sannicandro+garganico\",6470 => \"/meteo/Sannicola\",6471 => \"/meteo/Sanremo\",6472 => \"/meteo/Sansepolcro\",6473 => \"/meteo/Sant'Agapito\",6474 => \"/meteo/Sant'Agata+bolognese\",6475 => \"/meteo/Sant'Agata+de'+goti\",6476 => \"/meteo/Sant'Agata+del+bianco\",6477 => \"/meteo/Sant'Agata+di+esaro\",6478 => \"/meteo/Sant'Agata+di+Militello\",6479 => \"/meteo/Sant'Agata+di+Puglia\",6480 => \"/meteo/Sant'Agata+feltria\",6481 => \"/meteo/Sant'Agata+fossili\",6482 => \"/meteo/Sant'Agata+li+battiati\",6483 => \"/meteo/Sant'Agata+sul+Santerno\",6484 => \"/meteo/Sant'Agnello\",6485 => \"/meteo/Sant'Agostino\",6486 => \"/meteo/Sant'Albano+stura\",6487 => \"/meteo/Sant'Alessio+con+vialone\",6488 => \"/meteo/Sant'Alessio+in+aspromonte\",6489 => \"/meteo/Sant'Alessio+siculo\",6490 => \"/meteo/Sant'Alfio\",6491 => \"/meteo/Sant'Ambrogio+di+Torino\",6492 => \"/meteo/Sant'Ambrogio+di+valpolicella\",6493 => \"/meteo/Sant'Ambrogio+sul+garigliano\",6494 => \"/meteo/Sant'Anastasia\",6495 => \"/meteo/Sant'Anatolia+di+narco\",6496 => \"/meteo/Sant'Andrea+apostolo+dello+ionio\",6497 => \"/meteo/Sant'Andrea+del+garigliano\",6498 => \"/meteo/Sant'Andrea+di+conza\",6499 => \"/meteo/Sant'Andrea+Frius\",8763 => \"/meteo/Sant'Andrea+in+Monte\",6500 => \"/meteo/Sant'Angelo+a+cupolo\",6501 => \"/meteo/Sant'Angelo+a+fasanella\",6502 => \"/meteo/Sant'Angelo+a+scala\",6503 => \"/meteo/Sant'Angelo+all'esca\",6504 => \"/meteo/Sant'Angelo+d'alife\",6505 => \"/meteo/Sant'Angelo+dei+lombardi\",6506 => \"/meteo/Sant'Angelo+del+pesco\",6507 => \"/meteo/Sant'Angelo+di+brolo\",6508 => \"/meteo/Sant'Angelo+di+Piove+di+Sacco\",6509 => \"/meteo/Sant'Angelo+in+lizzola\",6510 => \"/meteo/Sant'Angelo+in+pontano\",6511 => \"/meteo/Sant'Angelo+in+vado\",6512 => \"/meteo/Sant'Angelo+le+fratte\",6513 => \"/meteo/Sant'Angelo+limosano\",6514 => \"/meteo/Sant'Angelo+lodigiano\",6515 => \"/meteo/Sant'Angelo+lomellina\",6516 => \"/meteo/Sant'Angelo+muxaro\",6517 => \"/meteo/Sant'Angelo+romano\",6518 => \"/meteo/Sant'Anna+Arresi\",6519 => \"/meteo/Sant'Anna+d'Alfaedo\",8730 => \"/meteo/Sant'Anna+di+Valdieri\",8698 => \"/meteo/Sant'Anna+di+Vinadio\",8563 => \"/meteo/Sant'Anna+Pelago\",6520 => \"/meteo/Sant'Antimo\",6521 => \"/meteo/Sant'Antioco\",6522 => \"/meteo/Sant'Antonino+di+Susa\",6523 => \"/meteo/Sant'Antonio+Abate\",6524 => \"/meteo/Sant'Antonio+di+gallura\",6525 => \"/meteo/Sant'Apollinare\",6526 => \"/meteo/Sant'Arcangelo\",6527 => \"/meteo/Sant'Arcangelo+trimonte\",6528 => \"/meteo/Sant'Arpino\",6529 => \"/meteo/Sant'Arsenio\",6530 => \"/meteo/Sant'Egidio+alla+vibrata\",6531 => \"/meteo/Sant'Egidio+del+monte+Albino\",6532 => \"/meteo/Sant'Elena\",6533 => \"/meteo/Sant'Elena+sannita\",6534 => \"/meteo/Sant'Elia+a+pianisi\",6535 => \"/meteo/Sant'Elia+fiumerapido\",6536 => \"/meteo/Sant'Elpidio+a+mare\",6537 => \"/meteo/Sant'Eufemia+a+maiella\",6538 => \"/meteo/Sant'Eufemia+d'Aspromonte\",6539 => \"/meteo/Sant'Eusanio+del+Sangro\",6540 => \"/meteo/Sant'Eusanio+forconese\",6541 => \"/meteo/Sant'Ilario+d'Enza\",6542 => \"/meteo/Sant'Ilario+dello+Ionio\",6543 => \"/meteo/Sant'Ippolito\",6544 => \"/meteo/Sant'Olcese\",6545 => \"/meteo/Sant'Omero\",6546 => \"/meteo/Sant'Omobono+imagna\",6547 => \"/meteo/Sant'Onofrio\",6548 => \"/meteo/Sant'Oreste\",6549 => \"/meteo/Sant'Orsola+terme\",6550 => \"/meteo/Sant'Urbano\",6551 => \"/meteo/Santa+Brigida\",6552 => \"/meteo/Santa+Caterina+albanese\",6553 => \"/meteo/Santa+Caterina+dello+ionio\",8144 => \"/meteo/Santa+Caterina+Valfurva\",6554 => \"/meteo/Santa+Caterina+villarmosa\",6555 => \"/meteo/Santa+Cesarea+terme\",6556 => \"/meteo/Santa+Cristina+d'Aspromonte\",6557 => \"/meteo/Santa+Cristina+e+Bissone\",6558 => \"/meteo/Santa+Cristina+gela\",6559 => \"/meteo/Santa+Cristina+Valgardena\",6560 => \"/meteo/Santa+Croce+camerina\",6561 => \"/meteo/Santa+Croce+del+sannio\",6562 => \"/meteo/Santa+Croce+di+Magliano\",6563 => \"/meteo/Santa+Croce+sull'Arno\",6564 => \"/meteo/Santa+Domenica+talao\",6565 => \"/meteo/Santa+Domenica+Vittoria\",6566 => \"/meteo/Santa+Elisabetta\",6567 => \"/meteo/Santa+Fiora\",6568 => \"/meteo/Santa+Flavia\",6569 => \"/meteo/Santa+Giuletta\",6570 => \"/meteo/Santa+Giusta\",6571 => \"/meteo/Santa+Giustina\",6572 => \"/meteo/Santa+Giustina+in+Colle\",6573 => \"/meteo/Santa+Luce\",6574 => \"/meteo/Santa+Lucia+del+Mela\",6575 => \"/meteo/Santa+Lucia+di+Piave\",6576 => \"/meteo/Santa+Lucia+di+serino\",6577 => \"/meteo/Santa+Margherita+d'adige\",6578 => \"/meteo/Santa+Margherita+di+belice\",6579 => \"/meteo/Santa+Margherita+di+staffora\",8285 => \"/meteo/Santa+Margherita+Ligure\",6581 => \"/meteo/Santa+Maria+a+monte\",6582 => \"/meteo/Santa+Maria+a+vico\",6583 => \"/meteo/Santa+Maria+Capua+Vetere\",6584 => \"/meteo/Santa+Maria+coghinas\",6585 => \"/meteo/Santa+Maria+del+cedro\",6586 => \"/meteo/Santa+Maria+del+Molise\",6587 => \"/meteo/Santa+Maria+della+Versa\",8122 => \"/meteo/Santa+Maria+di+Castellabate\",6588 => \"/meteo/Santa+Maria+di+Licodia\",6589 => \"/meteo/Santa+Maria+di+sala\",6590 => \"/meteo/Santa+Maria+Hoe'\",6591 => \"/meteo/Santa+Maria+imbaro\",6592 => \"/meteo/Santa+Maria+la+carita'\",6593 => \"/meteo/Santa+Maria+la+fossa\",6594 => \"/meteo/Santa+Maria+la+longa\",6595 => \"/meteo/Santa+Maria+Maggiore\",6596 => \"/meteo/Santa+Maria+Nuova\",6597 => \"/meteo/Santa+Marina\",6598 => \"/meteo/Santa+Marina+salina\",6599 => \"/meteo/Santa+Marinella\",6600 => \"/meteo/Santa+Ninfa\",6601 => \"/meteo/Santa+Paolina\",6602 => \"/meteo/Santa+Severina\",6603 => \"/meteo/Santa+Sofia\",6604 => \"/meteo/Santa+Sofia+d'Epiro\",6605 => \"/meteo/Santa+Teresa+di+Riva\",6606 => \"/meteo/Santa+Teresa+gallura\",6607 => \"/meteo/Santa+Venerina\",6608 => \"/meteo/Santa+Vittoria+d'Alba\",6609 => \"/meteo/Santa+Vittoria+in+matenano\",6610 => \"/meteo/Santadi\",6611 => \"/meteo/Santarcangelo+di+Romagna\",6612 => \"/meteo/Sante+marie\",6613 => \"/meteo/Santena\",6614 => \"/meteo/Santeramo+in+colle\",6615 => \"/meteo/Santhia'\",6616 => \"/meteo/Santi+Cosma+e+Damiano\",6617 => \"/meteo/Santo+Stefano+al+mare\",6618 => \"/meteo/Santo+Stefano+Belbo\",6619 => \"/meteo/Santo+Stefano+d'Aveto\",6620 => \"/meteo/Santo+Stefano+del+sole\",6621 => \"/meteo/Santo+Stefano+di+Cadore\",6622 => \"/meteo/Santo+Stefano+di+Camastra\",6623 => \"/meteo/Santo+Stefano+di+Magra\",6624 => \"/meteo/Santo+Stefano+di+Rogliano\",6625 => \"/meteo/Santo+Stefano+di+Sessanio\",6626 => \"/meteo/Santo+Stefano+in+Aspromonte\",6627 => \"/meteo/Santo+Stefano+lodigiano\",6628 => \"/meteo/Santo+Stefano+quisquina\",6629 => \"/meteo/Santo+Stefano+roero\",6630 => \"/meteo/Santo+Stefano+Ticino\",6631 => \"/meteo/Santo+Stino+di+Livenza\",6632 => \"/meteo/Santomenna\",6633 => \"/meteo/Santopadre\",6634 => \"/meteo/Santorso\",6635 => \"/meteo/Santu+Lussurgiu\",8419 => \"/meteo/Sant`Angelo+le+fratte\",6636 => \"/meteo/Sanza\",6637 => \"/meteo/Sanzeno\",6638 => \"/meteo/Saonara\",6639 => \"/meteo/Saponara\",6640 => \"/meteo/Sappada\",6641 => \"/meteo/Sapri\",6642 => \"/meteo/Saracena\",6643 => \"/meteo/Saracinesco\",6644 => \"/meteo/Sarcedo\",8377 => \"/meteo/Sarconi\",6646 => \"/meteo/Sardara\",6647 => \"/meteo/Sardigliano\",6648 => \"/meteo/Sarego\",6649 => \"/meteo/Sarentino\",6650 => \"/meteo/Sarezzano\",6651 => \"/meteo/Sarezzo\",6652 => \"/meteo/Sarmato\",6653 => \"/meteo/Sarmede\",6654 => \"/meteo/Sarnano\",6655 => \"/meteo/Sarnico\",6656 => \"/meteo/Sarno\",6657 => \"/meteo/Sarnonico\",6658 => \"/meteo/Saronno\",6659 => \"/meteo/Sarre\",6660 => \"/meteo/Sarroch\",6661 => \"/meteo/Sarsina\",6662 => \"/meteo/Sarteano\",6663 => \"/meteo/Sartirana+lomellina\",6664 => \"/meteo/Sarule\",6665 => \"/meteo/Sarzana\",6666 => \"/meteo/Sassano\",6667 => \"/meteo/Sassari\",6668 => \"/meteo/Sassello\",6669 => \"/meteo/Sassetta\",6670 => \"/meteo/Sassinoro\",8387 => \"/meteo/Sasso+di+castalda\",6672 => \"/meteo/Sasso+marconi\",6673 => \"/meteo/Sassocorvaro\",6674 => \"/meteo/Sassofeltrio\",6675 => \"/meteo/Sassoferrato\",8656 => \"/meteo/Sassotetto\",6676 => \"/meteo/Sassuolo\",6677 => \"/meteo/Satriano\",8420 => \"/meteo/Satriano+di+Lucania\",6679 => \"/meteo/Sauris\",6680 => \"/meteo/Sauze+d'Oulx\",6681 => \"/meteo/Sauze+di+Cesana\",6682 => \"/meteo/Sava\",6683 => \"/meteo/Savelli\",6684 => \"/meteo/Saviano\",6685 => \"/meteo/Savigliano\",6686 => \"/meteo/Savignano+irpino\",6687 => \"/meteo/Savignano+sul+Panaro\",6688 => \"/meteo/Savignano+sul+Rubicone\",6689 => \"/meteo/Savigno\",6690 => \"/meteo/Savignone\",6691 => \"/meteo/Saviore+dell'Adamello\",6692 => \"/meteo/Savoca\",6693 => \"/meteo/Savogna\",6694 => \"/meteo/Savogna+d'Isonzo\",8411 => \"/meteo/Savoia+di+Lucania\",6696 => \"/meteo/Savona\",6697 => \"/meteo/Scafa\",6698 => \"/meteo/Scafati\",6699 => \"/meteo/Scagnello\",6700 => \"/meteo/Scala\",6701 => \"/meteo/Scala+coeli\",6702 => \"/meteo/Scaldasole\",6703 => \"/meteo/Scalea\",6704 => \"/meteo/Scalenghe\",6705 => \"/meteo/Scaletta+Zanclea\",6706 => \"/meteo/Scampitella\",6707 => \"/meteo/Scandale\",6708 => \"/meteo/Scandiano\",6709 => \"/meteo/Scandicci\",6710 => \"/meteo/Scandolara+ravara\",6711 => \"/meteo/Scandolara+ripa+d'Oglio\",6712 => \"/meteo/Scandriglia\",6713 => \"/meteo/Scanno\",6714 => \"/meteo/Scano+di+montiferro\",6715 => \"/meteo/Scansano\",6716 => \"/meteo/Scanzano+jonico\",6717 => \"/meteo/Scanzorosciate\",6718 => \"/meteo/Scapoli\",8120 => \"/meteo/Scario\",6719 => \"/meteo/Scarlino\",6720 => \"/meteo/Scarmagno\",6721 => \"/meteo/Scarnafigi\",6722 => \"/meteo/Scarperia\",8139 => \"/meteo/Scauri\",6723 => \"/meteo/Scena\",6724 => \"/meteo/Scerni\",6725 => \"/meteo/Scheggia+e+pascelupo\",6726 => \"/meteo/Scheggino\",6727 => \"/meteo/Schiavi+di+Abruzzo\",6728 => \"/meteo/Schiavon\",8456 => \"/meteo/Schiavonea+di+Corigliano\",6729 => \"/meteo/Schignano\",6730 => \"/meteo/Schilpario\",6731 => \"/meteo/Schio\",6732 => \"/meteo/Schivenoglia\",6733 => \"/meteo/Sciacca\",6734 => \"/meteo/Sciara\",6735 => \"/meteo/Scicli\",6736 => \"/meteo/Scido\",6737 => \"/meteo/Scigliano\",6738 => \"/meteo/Scilla\",6739 => \"/meteo/Scillato\",6740 => \"/meteo/Sciolze\",6741 => \"/meteo/Scisciano\",6742 => \"/meteo/Sclafani+bagni\",6743 => \"/meteo/Scontrone\",6744 => \"/meteo/Scopa\",6745 => \"/meteo/Scopello\",6746 => \"/meteo/Scoppito\",6747 => \"/meteo/Scordia\",6748 => \"/meteo/Scorrano\",6749 => \"/meteo/Scorze'\",6750 => \"/meteo/Scurcola+marsicana\",6751 => \"/meteo/Scurelle\",6752 => \"/meteo/Scurzolengo\",6753 => \"/meteo/Seborga\",6754 => \"/meteo/Secinaro\",6755 => \"/meteo/Secli'\",8336 => \"/meteo/Secondino\",6756 => \"/meteo/Secugnago\",6757 => \"/meteo/Sedegliano\",6758 => \"/meteo/Sedico\",6759 => \"/meteo/Sedilo\",6760 => \"/meteo/Sedini\",6761 => \"/meteo/Sedriano\",6762 => \"/meteo/Sedrina\",6763 => \"/meteo/Sefro\",6764 => \"/meteo/Segariu\",8714 => \"/meteo/Segesta\",6765 => \"/meteo/Seggiano\",6766 => \"/meteo/Segni\",6767 => \"/meteo/Segonzano\",6768 => \"/meteo/Segrate\",6769 => \"/meteo/Segusino\",6770 => \"/meteo/Selargius\",6771 => \"/meteo/Selci\",6772 => \"/meteo/Selegas\",8715 => \"/meteo/Selinunte\",8130 => \"/meteo/Sella+Nevea\",6773 => \"/meteo/Sellano\",8651 => \"/meteo/Sellata+Arioso\",6774 => \"/meteo/Sellero\",8238 => \"/meteo/Selletta\",6775 => \"/meteo/Sellia\",6776 => \"/meteo/Sellia+marina\",6777 => \"/meteo/Selva+dei+Molini\",6778 => \"/meteo/Selva+di+Cadore\",6779 => \"/meteo/Selva+di+Progno\",6780 => \"/meteo/Selva+di+Val+Gardena\",6781 => \"/meteo/Selvazzano+dentro\",6782 => \"/meteo/Selve+marcone\",6783 => \"/meteo/Selvino\",6784 => \"/meteo/Semestene\",6785 => \"/meteo/Semiana\",6786 => \"/meteo/Seminara\",6787 => \"/meteo/Semproniano\",6788 => \"/meteo/Senago\",6789 => \"/meteo/Senale+San+Felice\",6790 => \"/meteo/Senales\",6791 => \"/meteo/Seneghe\",6792 => \"/meteo/Senerchia\",6793 => \"/meteo/Seniga\",6794 => \"/meteo/Senigallia\",6795 => \"/meteo/Senis\",6796 => \"/meteo/Senise\",6797 => \"/meteo/Senna+comasco\",6798 => \"/meteo/Senna+lodigiana\",6799 => \"/meteo/Sennariolo\",6800 => \"/meteo/Sennori\",6801 => \"/meteo/Senorbi'\",6802 => \"/meteo/Sepino\",6803 => \"/meteo/Seppiana\",6804 => \"/meteo/Sequals\",6805 => \"/meteo/Seravezza\",6806 => \"/meteo/Serdiana\",6807 => \"/meteo/Seregno\",6808 => \"/meteo/Seren+del+grappa\",6809 => \"/meteo/Sergnano\",6810 => \"/meteo/Seriate\",6811 => \"/meteo/Serina\",6812 => \"/meteo/Serino\",6813 => \"/meteo/Serle\",6814 => \"/meteo/Sermide\",6815 => \"/meteo/Sermoneta\",6816 => \"/meteo/Sernaglia+della+Battaglia\",6817 => \"/meteo/Sernio\",6818 => \"/meteo/Serole\",6819 => \"/meteo/Serra+d'aiello\",6820 => \"/meteo/Serra+de'conti\",6821 => \"/meteo/Serra+pedace\",6822 => \"/meteo/Serra+ricco'\",6823 => \"/meteo/Serra+San+Bruno\",6824 => \"/meteo/Serra+San+Quirico\",6825 => \"/meteo/Serra+Sant'Abbondio\",6826 => \"/meteo/Serracapriola\",6827 => \"/meteo/Serradifalco\",6828 => \"/meteo/Serralunga+d'Alba\",6829 => \"/meteo/Serralunga+di+Crea\",6830 => \"/meteo/Serramanna\",6831 => \"/meteo/Serramazzoni\",6832 => \"/meteo/Serramezzana\",6833 => \"/meteo/Serramonacesca\",6834 => \"/meteo/Serrapetrona\",6835 => \"/meteo/Serrara+fontana\",6836 => \"/meteo/Serrastretta\",6837 => \"/meteo/Serrata\",6838 => \"/meteo/Serravalle+a+po\",6839 => \"/meteo/Serravalle+di+chienti\",6840 => \"/meteo/Serravalle+langhe\",6841 => \"/meteo/Serravalle+pistoiese\",6842 => \"/meteo/Serravalle+Scrivia\",6843 => \"/meteo/Serravalle+Sesia\",6844 => \"/meteo/Serre\",6845 => \"/meteo/Serrenti\",6846 => \"/meteo/Serri\",6847 => \"/meteo/Serrone\",6848 => \"/meteo/Serrungarina\",6849 => \"/meteo/Sersale\",6850 => \"/meteo/Servigliano\",6851 => \"/meteo/Sessa+aurunca\",6852 => \"/meteo/Sessa+cilento\",6853 => \"/meteo/Sessame\",6854 => \"/meteo/Sessano+del+Molise\",6855 => \"/meteo/Sesta+godano\",6856 => \"/meteo/Sestino\",6857 => \"/meteo/Sesto\",6858 => \"/meteo/Sesto+al+reghena\",6859 => \"/meteo/Sesto+calende\",8709 => \"/meteo/Sesto+Calende+Alta\",6860 => \"/meteo/Sesto+campano\",6861 => \"/meteo/Sesto+ed+Uniti\",6862 => \"/meteo/Sesto+fiorentino\",6863 => \"/meteo/Sesto+San+Giovanni\",6864 => \"/meteo/Sestola\",6865 => \"/meteo/Sestri+levante\",6866 => \"/meteo/Sestriere\",6867 => \"/meteo/Sestu\",6868 => \"/meteo/Settala\",8316 => \"/meteo/Settebagni\",6869 => \"/meteo/Settefrati\",6870 => \"/meteo/Settime\",6871 => \"/meteo/Settimo+milanese\",6872 => \"/meteo/Settimo+rottaro\",6873 => \"/meteo/Settimo+San+Pietro\",6874 => \"/meteo/Settimo+torinese\",6875 => \"/meteo/Settimo+vittone\",6876 => \"/meteo/Settingiano\",6877 => \"/meteo/Setzu\",6878 => \"/meteo/Seui\",6879 => \"/meteo/Seulo\",6880 => \"/meteo/Seveso\",6881 => \"/meteo/Sezzadio\",6882 => \"/meteo/Sezze\",6883 => \"/meteo/Sfruz\",6884 => \"/meteo/Sgonico\",6885 => \"/meteo/Sgurgola\",6886 => \"/meteo/Siamaggiore\",6887 => \"/meteo/Siamanna\",6888 => \"/meteo/Siano\",6889 => \"/meteo/Siapiccia\",8114 => \"/meteo/Sibari\",6890 => \"/meteo/Sicignano+degli+Alburni\",6891 => \"/meteo/Siculiana\",6892 => \"/meteo/Siddi\",6893 => \"/meteo/Siderno\",6894 => \"/meteo/Siena\",6895 => \"/meteo/Sigillo\",6896 => \"/meteo/Signa\",8603 => \"/meteo/Sigonella\",6897 => \"/meteo/Silandro\",6898 => \"/meteo/Silanus\",6899 => \"/meteo/Silea\",6900 => \"/meteo/Siligo\",6901 => \"/meteo/Siliqua\",6902 => \"/meteo/Silius\",6903 => \"/meteo/Sillano\",6904 => \"/meteo/Sillavengo\",6905 => \"/meteo/Silvano+d'orba\",6906 => \"/meteo/Silvano+pietra\",6907 => \"/meteo/Silvi\",6908 => \"/meteo/Simala\",6909 => \"/meteo/Simaxis\",6910 => \"/meteo/Simbario\",6911 => \"/meteo/Simeri+crichi\",6912 => \"/meteo/Sinagra\",6913 => \"/meteo/Sinalunga\",6914 => \"/meteo/Sindia\",6915 => \"/meteo/Sini\",6916 => \"/meteo/Sinio\",6917 => \"/meteo/Siniscola\",6918 => \"/meteo/Sinnai\",6919 => \"/meteo/Sinopoli\",6920 => \"/meteo/Siracusa\",6921 => \"/meteo/Sirignano\",6922 => \"/meteo/Siris\",6923 => \"/meteo/Sirmione\",8457 => \"/meteo/Sirolo\",6925 => \"/meteo/Sirone\",6926 => \"/meteo/Siror\",6927 => \"/meteo/Sirtori\",6928 => \"/meteo/Sissa\",8492 => \"/meteo/Sistiana\",6929 => \"/meteo/Siurgus+donigala\",6930 => \"/meteo/Siziano\",6931 => \"/meteo/Sizzano\",8258 => \"/meteo/Ski+center+Latemar\",6932 => \"/meteo/Sluderno\",6933 => \"/meteo/Smarano\",6934 => \"/meteo/Smerillo\",6935 => \"/meteo/Soave\",8341 => \"/meteo/Sobretta+Vallalpe\",6936 => \"/meteo/Socchieve\",6937 => \"/meteo/Soddi\",6938 => \"/meteo/Sogliano+al+rubicone\",6939 => \"/meteo/Sogliano+Cavour\",6940 => \"/meteo/Soglio\",6941 => \"/meteo/Soiano+del+lago\",6942 => \"/meteo/Solagna\",6943 => \"/meteo/Solarino\",6944 => \"/meteo/Solaro\",6945 => \"/meteo/Solarolo\",6946 => \"/meteo/Solarolo+Rainerio\",6947 => \"/meteo/Solarussa\",6948 => \"/meteo/Solbiate\",6949 => \"/meteo/Solbiate+Arno\",6950 => \"/meteo/Solbiate+Olona\",8307 => \"/meteo/Solda\",6951 => \"/meteo/Soldano\",6952 => \"/meteo/Soleminis\",6953 => \"/meteo/Solero\",6954 => \"/meteo/Solesino\",6955 => \"/meteo/Soleto\",6956 => \"/meteo/Solferino\",6957 => \"/meteo/Soliera\",6958 => \"/meteo/Solignano\",6959 => \"/meteo/Solofra\",6960 => \"/meteo/Solonghello\",6961 => \"/meteo/Solopaca\",6962 => \"/meteo/Solto+collina\",6963 => \"/meteo/Solza\",6964 => \"/meteo/Somaglia\",6965 => \"/meteo/Somano\",6966 => \"/meteo/Somma+lombardo\",6967 => \"/meteo/Somma+vesuviana\",6968 => \"/meteo/Sommacampagna\",6969 => \"/meteo/Sommariva+del+bosco\",6970 => \"/meteo/Sommariva+Perno\",6971 => \"/meteo/Sommatino\",6972 => \"/meteo/Sommo\",6973 => \"/meteo/Sona\",6974 => \"/meteo/Soncino\",6975 => \"/meteo/Sondalo\",6976 => \"/meteo/Sondrio\",6977 => \"/meteo/Songavazzo\",6978 => \"/meteo/Sonico\",6979 => \"/meteo/Sonnino\",6980 => \"/meteo/Soprana\",6981 => \"/meteo/Sora\",6982 => \"/meteo/Soraga\",6983 => \"/meteo/Soragna\",6984 => \"/meteo/Sorano\",6985 => \"/meteo/Sorbo+San+Basile\",6986 => \"/meteo/Sorbo+Serpico\",6987 => \"/meteo/Sorbolo\",6988 => \"/meteo/Sordevolo\",6989 => \"/meteo/Sordio\",6990 => \"/meteo/Soresina\",6991 => \"/meteo/Sorga'\",6992 => \"/meteo/Sorgono\",6993 => \"/meteo/Sori\",6994 => \"/meteo/Sorianello\",6995 => \"/meteo/Soriano+calabro\",6996 => \"/meteo/Soriano+nel+cimino\",6997 => \"/meteo/Sorico\",6998 => \"/meteo/Soriso\",6999 => \"/meteo/Sorisole\",7000 => \"/meteo/Sormano\",7001 => \"/meteo/Sorradile\",7002 => \"/meteo/Sorrento\",7003 => \"/meteo/Sorso\",7004 => \"/meteo/Sortino\",7005 => \"/meteo/Sospiro\",7006 => \"/meteo/Sospirolo\",7007 => \"/meteo/Sossano\",7008 => \"/meteo/Sostegno\",7009 => \"/meteo/Sotto+il+monte+Giovanni+XXIII\",8747 => \"/meteo/Sottomarina\",7010 => \"/meteo/Sover\",7011 => \"/meteo/Soverato\",7012 => \"/meteo/Sovere\",7013 => \"/meteo/Soveria+mannelli\",7014 => \"/meteo/Soveria+simeri\",7015 => \"/meteo/Soverzene\",7016 => \"/meteo/Sovicille\",7017 => \"/meteo/Sovico\",7018 => \"/meteo/Sovizzo\",7019 => \"/meteo/Sovramonte\",7020 => \"/meteo/Sozzago\",7021 => \"/meteo/Spadafora\",7022 => \"/meteo/Spadola\",7023 => \"/meteo/Sparanise\",7024 => \"/meteo/Sparone\",7025 => \"/meteo/Specchia\",7026 => \"/meteo/Spello\",8585 => \"/meteo/Spelonga\",7027 => \"/meteo/Spera\",7028 => \"/meteo/Sperlinga\",7029 => \"/meteo/Sperlonga\",7030 => \"/meteo/Sperone\",7031 => \"/meteo/Spessa\",7032 => \"/meteo/Spezzano+albanese\",7033 => \"/meteo/Spezzano+della+Sila\",7034 => \"/meteo/Spezzano+piccolo\",7035 => \"/meteo/Spiazzo\",7036 => \"/meteo/Spigno+monferrato\",7037 => \"/meteo/Spigno+saturnia\",7038 => \"/meteo/Spilamberto\",7039 => \"/meteo/Spilimbergo\",7040 => \"/meteo/Spilinga\",7041 => \"/meteo/Spinadesco\",7042 => \"/meteo/Spinazzola\",7043 => \"/meteo/Spinea\",7044 => \"/meteo/Spineda\",7045 => \"/meteo/Spinete\",7046 => \"/meteo/Spineto+Scrivia\",7047 => \"/meteo/Spinetoli\",7048 => \"/meteo/Spino+d'Adda\",7049 => \"/meteo/Spinone+al+lago\",8421 => \"/meteo/Spinoso\",7051 => \"/meteo/Spirano\",7052 => \"/meteo/Spoleto\",7053 => \"/meteo/Spoltore\",7054 => \"/meteo/Spongano\",7055 => \"/meteo/Spormaggiore\",7056 => \"/meteo/Sporminore\",7057 => \"/meteo/Spotorno\",7058 => \"/meteo/Spresiano\",7059 => \"/meteo/Spriana\",7060 => \"/meteo/Squillace\",7061 => \"/meteo/Squinzano\",8248 => \"/meteo/Staffal\",7062 => \"/meteo/Staffolo\",7063 => \"/meteo/Stagno+lombardo\",7064 => \"/meteo/Staiti\",7065 => \"/meteo/Staletti\",7066 => \"/meteo/Stanghella\",7067 => \"/meteo/Staranzano\",7068 => \"/meteo/Statte\",7069 => \"/meteo/Stazzano\",7070 => \"/meteo/Stazzema\",7071 => \"/meteo/Stazzona\",7072 => \"/meteo/Stefanaconi\",7073 => \"/meteo/Stella\",7074 => \"/meteo/Stella+cilento\",7075 => \"/meteo/Stellanello\",7076 => \"/meteo/Stelvio\",7077 => \"/meteo/Stenico\",7078 => \"/meteo/Sternatia\",7079 => \"/meteo/Stezzano\",7080 => \"/meteo/Stia\",7081 => \"/meteo/Stienta\",7082 => \"/meteo/Stigliano\",7083 => \"/meteo/Stignano\",7084 => \"/meteo/Stilo\",7085 => \"/meteo/Stimigliano\",7086 => \"/meteo/Stintino\",7087 => \"/meteo/Stio\",7088 => \"/meteo/Stornara\",7089 => \"/meteo/Stornarella\",7090 => \"/meteo/Storo\",7091 => \"/meteo/Stra\",7092 => \"/meteo/Stradella\",7093 => \"/meteo/Strambinello\",7094 => \"/meteo/Strambino\",7095 => \"/meteo/Strangolagalli\",7096 => \"/meteo/Stregna\",7097 => \"/meteo/Strembo\",7098 => \"/meteo/Stresa\",7099 => \"/meteo/Strevi\",7100 => \"/meteo/Striano\",7101 => \"/meteo/Strigno\",8182 => \"/meteo/Stromboli\",7102 => \"/meteo/Strona\",7103 => \"/meteo/Stroncone\",7104 => \"/meteo/Strongoli\",7105 => \"/meteo/Stroppiana\",7106 => \"/meteo/Stroppo\",7107 => \"/meteo/Strozza\",8493 => \"/meteo/Stupizza\",7108 => \"/meteo/Sturno\",7109 => \"/meteo/Suardi\",7110 => \"/meteo/Subbiano\",7111 => \"/meteo/Subiaco\",7112 => \"/meteo/Succivo\",7113 => \"/meteo/Sueglio\",7114 => \"/meteo/Suelli\",7115 => \"/meteo/Suello\",7116 => \"/meteo/Suisio\",7117 => \"/meteo/Sulbiate\",7118 => \"/meteo/Sulmona\",7119 => \"/meteo/Sulzano\",7120 => \"/meteo/Sumirago\",7121 => \"/meteo/Summonte\",7122 => \"/meteo/Suni\",7123 => \"/meteo/Suno\",7124 => \"/meteo/Supersano\",7125 => \"/meteo/Supino\",7126 => \"/meteo/Surano\",7127 => \"/meteo/Surbo\",7128 => \"/meteo/Susa\",7129 => \"/meteo/Susegana\",7130 => \"/meteo/Sustinente\",7131 => \"/meteo/Sutera\",7132 => \"/meteo/Sutri\",7133 => \"/meteo/Sutrio\",7134 => \"/meteo/Suvereto\",7135 => \"/meteo/Suzzara\",7136 => \"/meteo/Taceno\",7137 => \"/meteo/Tadasuni\",7138 => \"/meteo/Taggia\",7139 => \"/meteo/Tagliacozzo\",8450 => \"/meteo/Tagliacozzo+casello\",7140 => \"/meteo/Taglio+di+po\",7141 => \"/meteo/Tagliolo+monferrato\",7142 => \"/meteo/Taibon+agordino\",7143 => \"/meteo/Taino\",7144 => \"/meteo/Taio\",7145 => \"/meteo/Taipana\",7146 => \"/meteo/Talamello\",7147 => \"/meteo/Talamona\",8299 => \"/meteo/Talamone\",7148 => \"/meteo/Talana\",7149 => \"/meteo/Taleggio\",7150 => \"/meteo/Talla\",7151 => \"/meteo/Talmassons\",7152 => \"/meteo/Tambre\",7153 => \"/meteo/Taormina\",7154 => \"/meteo/Tapogliano\",7155 => \"/meteo/Tarano\",7156 => \"/meteo/Taranta+peligna\",7157 => \"/meteo/Tarantasca\",7158 => \"/meteo/Taranto\",8550 => \"/meteo/Taranto+M.+A.+Grottaglie\",7159 => \"/meteo/Tarcento\",7160 => \"/meteo/Tarquinia\",8140 => \"/meteo/Tarquinia+Lido\",7161 => \"/meteo/Tarsia\",7162 => \"/meteo/Tartano\",7163 => \"/meteo/Tarvisio\",8466 => \"/meteo/Tarvisio+casello\",7164 => \"/meteo/Tarzo\",7165 => \"/meteo/Tassarolo\",7166 => \"/meteo/Tassullo\",7167 => \"/meteo/Taurano\",7168 => \"/meteo/Taurasi\",7169 => \"/meteo/Taurianova\",7170 => \"/meteo/Taurisano\",7171 => \"/meteo/Tavagnacco\",7172 => \"/meteo/Tavagnasco\",7173 => \"/meteo/Tavarnelle+val+di+pesa\",7174 => \"/meteo/Tavazzano+con+villavesco\",7175 => \"/meteo/Tavenna\",7176 => \"/meteo/Taverna\",7177 => \"/meteo/Tavernerio\",7178 => \"/meteo/Tavernola+bergamasca\",7179 => \"/meteo/Tavernole+sul+Mella\",7180 => \"/meteo/Taviano\",7181 => \"/meteo/Tavigliano\",7182 => \"/meteo/Tavoleto\",7183 => \"/meteo/Tavullia\",8362 => \"/meteo/Teana\",7185 => \"/meteo/Teano\",7186 => \"/meteo/Teggiano\",7187 => \"/meteo/Teglio\",7188 => \"/meteo/Teglio+veneto\",7189 => \"/meteo/Telese+terme\",7190 => \"/meteo/Telgate\",7191 => \"/meteo/Telti\",7192 => \"/meteo/Telve\",7193 => \"/meteo/Telve+di+sopra\",7194 => \"/meteo/Tempio+Pausania\",7195 => \"/meteo/Temu'\",7196 => \"/meteo/Tenna\",7197 => \"/meteo/Tenno\",7198 => \"/meteo/Teolo\",7199 => \"/meteo/Teor\",7200 => \"/meteo/Teora\",7201 => \"/meteo/Teramo\",8449 => \"/meteo/Teramo+Val+Vomano\",7202 => \"/meteo/Terdobbiate\",7203 => \"/meteo/Terelle\",7204 => \"/meteo/Terento\",7205 => \"/meteo/Terenzo\",7206 => \"/meteo/Tergu\",7207 => \"/meteo/Terlago\",7208 => \"/meteo/Terlano\",7209 => \"/meteo/Terlizzi\",8158 => \"/meteo/Terme+di+Lurisia\",7210 => \"/meteo/Terme+vigliatore\",7211 => \"/meteo/Termeno+sulla+strada+del+vino\",7212 => \"/meteo/Termini+imerese\",8133 => \"/meteo/Terminillo\",7213 => \"/meteo/Termoli\",7214 => \"/meteo/Ternate\",7215 => \"/meteo/Ternengo\",7216 => \"/meteo/Terni\",7217 => \"/meteo/Terno+d'isola\",7218 => \"/meteo/Terracina\",7219 => \"/meteo/Terragnolo\",7220 => \"/meteo/Terralba\",7221 => \"/meteo/Terranova+da+Sibari\",7222 => \"/meteo/Terranova+dei+passerini\",8379 => \"/meteo/Terranova+di+Pollino\",7224 => \"/meteo/Terranova+Sappo+Minulio\",7225 => \"/meteo/Terranuova+bracciolini\",7226 => \"/meteo/Terrasini\",7227 => \"/meteo/Terrassa+padovana\",7228 => \"/meteo/Terravecchia\",7229 => \"/meteo/Terrazzo\",7230 => \"/meteo/Terres\",7231 => \"/meteo/Terricciola\",7232 => \"/meteo/Terruggia\",7233 => \"/meteo/Tertenia\",7234 => \"/meteo/Terzigno\",7235 => \"/meteo/Terzo\",7236 => \"/meteo/Terzo+d'Aquileia\",7237 => \"/meteo/Terzolas\",7238 => \"/meteo/Terzorio\",7239 => \"/meteo/Tesero\",7240 => \"/meteo/Tesimo\",7241 => \"/meteo/Tessennano\",7242 => \"/meteo/Testico\",7243 => \"/meteo/Teti\",7244 => \"/meteo/Teulada\",7245 => \"/meteo/Teverola\",7246 => \"/meteo/Tezze+sul+Brenta\",8716 => \"/meteo/Tharros\",7247 => \"/meteo/Thiene\",7248 => \"/meteo/Thiesi\",7249 => \"/meteo/Tiana\",7250 => \"/meteo/Tiarno+di+sopra\",7251 => \"/meteo/Tiarno+di+sotto\",7252 => \"/meteo/Ticengo\",7253 => \"/meteo/Ticineto\",7254 => \"/meteo/Tiggiano\",7255 => \"/meteo/Tiglieto\",7256 => \"/meteo/Tigliole\",7257 => \"/meteo/Tignale\",7258 => \"/meteo/Tinnura\",7259 => \"/meteo/Tione+degli+Abruzzi\",7260 => \"/meteo/Tione+di+Trento\",7261 => \"/meteo/Tirano\",7262 => \"/meteo/Tires\",7263 => \"/meteo/Tiriolo\",7264 => \"/meteo/Tirolo\",8194 => \"/meteo/Tirrenia\",8719 => \"/meteo/Tiscali\",7265 => \"/meteo/Tissi\",8422 => \"/meteo/Tito\",7267 => \"/meteo/Tivoli\",8451 => \"/meteo/Tivoli+casello\",7268 => \"/meteo/Tizzano+val+Parma\",7269 => \"/meteo/Toano\",7270 => \"/meteo/Tocco+caudio\",7271 => \"/meteo/Tocco+da+Casauria\",7272 => \"/meteo/Toceno\",7273 => \"/meteo/Todi\",7274 => \"/meteo/Toffia\",7275 => \"/meteo/Toirano\",7276 => \"/meteo/Tolentino\",7277 => \"/meteo/Tolfa\",7278 => \"/meteo/Tollegno\",7279 => \"/meteo/Tollo\",7280 => \"/meteo/Tolmezzo\",8423 => \"/meteo/Tolve\",7282 => \"/meteo/Tombolo\",7283 => \"/meteo/Ton\",7284 => \"/meteo/Tonadico\",7285 => \"/meteo/Tonara\",7286 => \"/meteo/Tonco\",7287 => \"/meteo/Tonengo\",7288 => \"/meteo/Tonezza+del+Cimone\",7289 => \"/meteo/Tora+e+piccilli\",8132 => \"/meteo/Torano\",7290 => \"/meteo/Torano+castello\",7291 => \"/meteo/Torano+nuovo\",7292 => \"/meteo/Torbole+casaglia\",7293 => \"/meteo/Torcegno\",7294 => \"/meteo/Torchiara\",7295 => \"/meteo/Torchiarolo\",7296 => \"/meteo/Torella+dei+lombardi\",7297 => \"/meteo/Torella+del+sannio\",7298 => \"/meteo/Torgiano\",7299 => \"/meteo/Torgnon\",7300 => \"/meteo/Torino\",8271 => \"/meteo/Torino+Caselle\",7301 => \"/meteo/Torino+di+Sangro\",8494 => \"/meteo/Torino+di+Sangro+Marina\",7302 => \"/meteo/Toritto\",7303 => \"/meteo/Torlino+Vimercati\",7304 => \"/meteo/Tornaco\",7305 => \"/meteo/Tornareccio\",7306 => \"/meteo/Tornata\",7307 => \"/meteo/Tornimparte\",8445 => \"/meteo/Tornimparte+casello\",7308 => \"/meteo/Torno\",7309 => \"/meteo/Tornolo\",7310 => \"/meteo/Toro\",7311 => \"/meteo/Torpe'\",7312 => \"/meteo/Torraca\",7313 => \"/meteo/Torralba\",7314 => \"/meteo/Torrazza+coste\",7315 => \"/meteo/Torrazza+Piemonte\",7316 => \"/meteo/Torrazzo\",7317 => \"/meteo/Torre+Annunziata\",7318 => \"/meteo/Torre+Beretti+e+Castellaro\",7319 => \"/meteo/Torre+boldone\",7320 => \"/meteo/Torre+bormida\",7321 => \"/meteo/Torre+cajetani\",7322 => \"/meteo/Torre+canavese\",7323 => \"/meteo/Torre+d'arese\",7324 => \"/meteo/Torre+d'isola\",7325 => \"/meteo/Torre+de'+passeri\",7326 => \"/meteo/Torre+de'busi\",7327 => \"/meteo/Torre+de'negri\",7328 => \"/meteo/Torre+de'picenardi\",7329 => \"/meteo/Torre+de'roveri\",7330 => \"/meteo/Torre+del+greco\",7331 => \"/meteo/Torre+di+mosto\",7332 => \"/meteo/Torre+di+ruggiero\",7333 => \"/meteo/Torre+di+Santa+Maria\",7334 => \"/meteo/Torre+le+nocelle\",7335 => \"/meteo/Torre+mondovi'\",7336 => \"/meteo/Torre+orsaia\",8592 => \"/meteo/Torre+Pali\",7337 => \"/meteo/Torre+pallavicina\",7338 => \"/meteo/Torre+pellice\",7339 => \"/meteo/Torre+San+Giorgio\",8596 => \"/meteo/Torre+San+Giovanni\",8595 => \"/meteo/Torre+San+Gregorio\",7340 => \"/meteo/Torre+San+Patrizio\",7341 => \"/meteo/Torre+Santa+Susanna\",8593 => \"/meteo/Torre+Vado\",7342 => \"/meteo/Torreano\",7343 => \"/meteo/Torrebelvicino\",7344 => \"/meteo/Torrebruna\",7345 => \"/meteo/Torrecuso\",7346 => \"/meteo/Torreglia\",7347 => \"/meteo/Torregrotta\",7348 => \"/meteo/Torremaggiore\",7349 => \"/meteo/Torrenova\",7350 => \"/meteo/Torresina\",7351 => \"/meteo/Torretta\",7352 => \"/meteo/Torrevecchia+pia\",7353 => \"/meteo/Torrevecchia+teatina\",7354 => \"/meteo/Torri+del+benaco\",7355 => \"/meteo/Torri+di+quartesolo\",7356 => \"/meteo/Torri+in+sabina\",7357 => \"/meteo/Torriana\",7358 => \"/meteo/Torrice\",7359 => \"/meteo/Torricella\",7360 => \"/meteo/Torricella+del+pizzo\",7361 => \"/meteo/Torricella+in+sabina\",7362 => \"/meteo/Torricella+peligna\",7363 => \"/meteo/Torricella+sicura\",7364 => \"/meteo/Torricella+verzate\",7365 => \"/meteo/Torriglia\",7366 => \"/meteo/Torrile\",7367 => \"/meteo/Torrioni\",7368 => \"/meteo/Torrita+di+Siena\",7369 => \"/meteo/Torrita+tiberina\",7370 => \"/meteo/Tortoli'\",7371 => \"/meteo/Tortona\",7372 => \"/meteo/Tortora\",7373 => \"/meteo/Tortorella\",7374 => \"/meteo/Tortoreto\",8601 => \"/meteo/Tortoreto+lido\",7375 => \"/meteo/Tortorici\",8138 => \"/meteo/Torvaianica\",7376 => \"/meteo/Torviscosa\",7377 => \"/meteo/Toscolano+maderno\",7378 => \"/meteo/Tossicia\",7379 => \"/meteo/Tovo+di+Sant'Agata\",7380 => \"/meteo/Tovo+San+Giacomo\",7381 => \"/meteo/Trabia\",7382 => \"/meteo/Tradate\",8214 => \"/meteo/Trafoi\",7383 => \"/meteo/Tramatza\",7384 => \"/meteo/Trambileno\",7385 => \"/meteo/Tramonti\",7386 => \"/meteo/Tramonti+di+sopra\",7387 => \"/meteo/Tramonti+di+sotto\",8412 => \"/meteo/Tramutola\",7389 => \"/meteo/Trana\",7390 => \"/meteo/Trani\",7391 => \"/meteo/Transacqua\",7392 => \"/meteo/Traona\",7393 => \"/meteo/Trapani\",8544 => \"/meteo/Trapani+Birgi\",7394 => \"/meteo/Trappeto\",7395 => \"/meteo/Trarego+Viggiona\",7396 => \"/meteo/Trasacco\",7397 => \"/meteo/Trasaghis\",7398 => \"/meteo/Trasquera\",7399 => \"/meteo/Tratalias\",7400 => \"/meteo/Trausella\",7401 => \"/meteo/Travaco'+siccomario\",7402 => \"/meteo/Travagliato\",7403 => \"/meteo/Travedona+monate\",7404 => \"/meteo/Traversella\",7405 => \"/meteo/Traversetolo\",7406 => \"/meteo/Traves\",7407 => \"/meteo/Travesio\",7408 => \"/meteo/Travo\",8187 => \"/meteo/Tre+fontane\",7409 => \"/meteo/Trebaseleghe\",7410 => \"/meteo/Trebisacce\",7411 => \"/meteo/Trecasali\",7412 => \"/meteo/Trecase\",7413 => \"/meteo/Trecastagni\",7414 => \"/meteo/Trecate\",7415 => \"/meteo/Trecchina\",7416 => \"/meteo/Trecenta\",7417 => \"/meteo/Tredozio\",7418 => \"/meteo/Treglio\",7419 => \"/meteo/Tregnago\",7420 => \"/meteo/Treia\",7421 => \"/meteo/Treiso\",7422 => \"/meteo/Tremenico\",7423 => \"/meteo/Tremestieri+etneo\",7424 => \"/meteo/Tremezzo\",7425 => \"/meteo/Tremosine\",7426 => \"/meteo/Trenta\",7427 => \"/meteo/Trentinara\",7428 => \"/meteo/Trento\",7429 => \"/meteo/Trentola-ducenta\",7430 => \"/meteo/Trenzano\",8146 => \"/meteo/Trepalle\",7431 => \"/meteo/Treppo+carnico\",7432 => \"/meteo/Treppo+grande\",7433 => \"/meteo/Trepuzzi\",7434 => \"/meteo/Trequanda\",7435 => \"/meteo/Tres\",7436 => \"/meteo/Tresana\",7437 => \"/meteo/Trescore+balneario\",7438 => \"/meteo/Trescore+cremasco\",7439 => \"/meteo/Tresigallo\",7440 => \"/meteo/Tresivio\",7441 => \"/meteo/Tresnuraghes\",7442 => \"/meteo/Trevenzuolo\",7443 => \"/meteo/Trevi\",7444 => \"/meteo/Trevi+nel+lazio\",7445 => \"/meteo/Trevico\",7446 => \"/meteo/Treviglio\",7447 => \"/meteo/Trevignano\",7448 => \"/meteo/Trevignano+romano\",7449 => \"/meteo/Treville\",7450 => \"/meteo/Treviolo\",7451 => \"/meteo/Treviso\",7452 => \"/meteo/Treviso+bresciano\",8543 => \"/meteo/Treviso+Sant'Angelo\",7453 => \"/meteo/Trezzano+rosa\",7454 => \"/meteo/Trezzano+sul+Naviglio\",7455 => \"/meteo/Trezzo+sull'Adda\",7456 => \"/meteo/Trezzo+Tinella\",7457 => \"/meteo/Trezzone\",7458 => \"/meteo/Tribano\",7459 => \"/meteo/Tribiano\",7460 => \"/meteo/Tribogna\",7461 => \"/meteo/Tricarico\",7462 => \"/meteo/Tricase\",8597 => \"/meteo/Tricase+porto\",7463 => \"/meteo/Tricerro\",7464 => \"/meteo/Tricesimo\",7465 => \"/meteo/Trichiana\",7466 => \"/meteo/Triei\",7467 => \"/meteo/Trieste\",8472 => \"/meteo/Trieste+Ronchi+dei+Legionari\",7468 => \"/meteo/Triggiano\",7469 => \"/meteo/Trigolo\",7470 => \"/meteo/Trinita+d'Agultu+e+Vignola\",7471 => \"/meteo/Trinita'\",7472 => \"/meteo/Trinitapoli\",7473 => \"/meteo/Trino\",7474 => \"/meteo/Triora\",7475 => \"/meteo/Tripi\",7476 => \"/meteo/Trisobbio\",7477 => \"/meteo/Trissino\",7478 => \"/meteo/Triuggio\",7479 => \"/meteo/Trivento\",7480 => \"/meteo/Trivero\",7481 => \"/meteo/Trivigliano\",7482 => \"/meteo/Trivignano+udinese\",8413 => \"/meteo/Trivigno\",7484 => \"/meteo/Trivolzio\",7485 => \"/meteo/Trodena\",7486 => \"/meteo/Trofarello\",7487 => \"/meteo/Troia\",7488 => \"/meteo/Troina\",7489 => \"/meteo/Tromello\",7490 => \"/meteo/Trontano\",7491 => \"/meteo/Tronzano+lago+maggiore\",7492 => \"/meteo/Tronzano+vercellese\",7493 => \"/meteo/Tropea\",7494 => \"/meteo/Trovo\",7495 => \"/meteo/Truccazzano\",7496 => \"/meteo/Tubre\",7497 => \"/meteo/Tuenno\",7498 => \"/meteo/Tufara\",7499 => \"/meteo/Tufillo\",7500 => \"/meteo/Tufino\",7501 => \"/meteo/Tufo\",7502 => \"/meteo/Tuglie\",7503 => \"/meteo/Tuili\",7504 => \"/meteo/Tula\",7505 => \"/meteo/Tuoro+sul+trasimeno\",7506 => \"/meteo/Turania\",7507 => \"/meteo/Turano+lodigiano\",7508 => \"/meteo/Turate\",7509 => \"/meteo/Turbigo\",7510 => \"/meteo/Turi\",7511 => \"/meteo/Turri\",7512 => \"/meteo/Turriaco\",7513 => \"/meteo/Turrivalignani\",8390 => \"/meteo/Tursi\",7515 => \"/meteo/Tusa\",7516 => \"/meteo/Tuscania\",7517 => \"/meteo/Ubiale+Clanezzo\",7518 => \"/meteo/Uboldo\",7519 => \"/meteo/Ucria\",7520 => \"/meteo/Udine\",7521 => \"/meteo/Ugento\",7522 => \"/meteo/Uggiano+la+chiesa\",7523 => \"/meteo/Uggiate+trevano\",7524 => \"/meteo/Ula'+Tirso\",7525 => \"/meteo/Ulassai\",7526 => \"/meteo/Ultimo\",7527 => \"/meteo/Umbertide\",7528 => \"/meteo/Umbriatico\",7529 => \"/meteo/Urago+d'Oglio\",7530 => \"/meteo/Uras\",7531 => \"/meteo/Urbana\",7532 => \"/meteo/Urbania\",7533 => \"/meteo/Urbe\",7534 => \"/meteo/Urbino\",7535 => \"/meteo/Urbisaglia\",7536 => \"/meteo/Urgnano\",7537 => \"/meteo/Uri\",7538 => \"/meteo/Ururi\",7539 => \"/meteo/Urzulei\",7540 => \"/meteo/Uscio\",7541 => \"/meteo/Usellus\",7542 => \"/meteo/Usini\",7543 => \"/meteo/Usmate+Velate\",7544 => \"/meteo/Ussana\",7545 => \"/meteo/Ussaramanna\",7546 => \"/meteo/Ussassai\",7547 => \"/meteo/Usseaux\",7548 => \"/meteo/Usseglio\",7549 => \"/meteo/Ussita\",7550 => \"/meteo/Ustica\",7551 => \"/meteo/Uta\",7552 => \"/meteo/Uzzano\",7553 => \"/meteo/Vaccarizzo+albanese\",7554 => \"/meteo/Vacone\",7555 => \"/meteo/Vacri\",7556 => \"/meteo/Vadena\",7557 => \"/meteo/Vado+ligure\",7558 => \"/meteo/Vagli+sotto\",7559 => \"/meteo/Vaglia\",8388 => \"/meteo/Vaglio+Basilicata\",7561 => \"/meteo/Vaglio+serra\",7562 => \"/meteo/Vaiano\",7563 => \"/meteo/Vaiano+cremasco\",7564 => \"/meteo/Vaie\",7565 => \"/meteo/Vailate\",7566 => \"/meteo/Vairano+Patenora\",7567 => \"/meteo/Vajont\",8511 => \"/meteo/Val+Canale\",7568 => \"/meteo/Val+della+torre\",8243 => \"/meteo/Val+di+Lei\",8237 => \"/meteo/Val+di+Luce\",7569 => \"/meteo/Val+di+nizza\",8440 => \"/meteo/Val+di+Sangro+casello\",7570 => \"/meteo/Val+di+vizze\",8223 => \"/meteo/Val+Ferret\",8521 => \"/meteo/Val+Grauson\",7571 => \"/meteo/Val+Masino\",7572 => \"/meteo/Val+Rezzo\",8215 => \"/meteo/Val+Senales\",8522 => \"/meteo/Val+Urtier\",8224 => \"/meteo/Val+Veny\",7573 => \"/meteo/Valbondione\",7574 => \"/meteo/Valbrembo\",7575 => \"/meteo/Valbrevenna\",7576 => \"/meteo/Valbrona\",8311 => \"/meteo/Valcava\",7577 => \"/meteo/Valda\",7578 => \"/meteo/Valdagno\",7579 => \"/meteo/Valdaora\",7580 => \"/meteo/Valdastico\",7581 => \"/meteo/Valdengo\",7582 => \"/meteo/Valderice\",7583 => \"/meteo/Valdidentro\",7584 => \"/meteo/Valdieri\",7585 => \"/meteo/Valdina\",7586 => \"/meteo/Valdisotto\",7587 => \"/meteo/Valdobbiadene\",7588 => \"/meteo/Valduggia\",7589 => \"/meteo/Valeggio\",7590 => \"/meteo/Valeggio+sul+Mincio\",7591 => \"/meteo/Valentano\",7592 => \"/meteo/Valenza\",7593 => \"/meteo/Valenzano\",7594 => \"/meteo/Valera+fratta\",7595 => \"/meteo/Valfabbrica\",7596 => \"/meteo/Valfenera\",7597 => \"/meteo/Valfloriana\",7598 => \"/meteo/Valfurva\",7599 => \"/meteo/Valganna\",7600 => \"/meteo/Valgioie\",7601 => \"/meteo/Valgoglio\",7602 => \"/meteo/Valgrana\",7603 => \"/meteo/Valgreghentino\",7604 => \"/meteo/Valgrisenche\",7605 => \"/meteo/Valguarnera+caropepe\",8344 => \"/meteo/Valico+Citerna\",8510 => \"/meteo/Valico+dei+Giovi\",8318 => \"/meteo/Valico+di+Monforte\",8509 => \"/meteo/Valico+di+Montemiletto\",8507 => \"/meteo/Valico+di+Scampitella\",7606 => \"/meteo/Vallada+agordina\",7607 => \"/meteo/Vallanzengo\",7608 => \"/meteo/Vallarsa\",7609 => \"/meteo/Vallata\",7610 => \"/meteo/Valle+agricola\",7611 => \"/meteo/Valle+Aurina\",7612 => \"/meteo/Valle+castellana\",8444 => \"/meteo/Valle+del+salto\",7613 => \"/meteo/Valle+dell'Angelo\",7614 => \"/meteo/Valle+di+Cadore\",7615 => \"/meteo/Valle+di+Casies\",7616 => \"/meteo/Valle+di+maddaloni\",7617 => \"/meteo/Valle+lomellina\",7618 => \"/meteo/Valle+mosso\",7619 => \"/meteo/Valle+salimbene\",7620 => \"/meteo/Valle+San+Nicolao\",7621 => \"/meteo/Vallebona\",7622 => \"/meteo/Vallecorsa\",7623 => \"/meteo/Vallecrosia\",7624 => \"/meteo/Valledolmo\",7625 => \"/meteo/Valledoria\",7626 => \"/meteo/Vallefiorita\",7627 => \"/meteo/Vallelonga\",7628 => \"/meteo/Vallelunga+pratameno\",7629 => \"/meteo/Vallemaio\",7630 => \"/meteo/Vallepietra\",7631 => \"/meteo/Vallerano\",7632 => \"/meteo/Vallermosa\",7633 => \"/meteo/Vallerotonda\",7634 => \"/meteo/Vallesaccarda\",8749 => \"/meteo/Valletta\",7635 => \"/meteo/Valleve\",7636 => \"/meteo/Valli+del+Pasubio\",7637 => \"/meteo/Vallinfreda\",7638 => \"/meteo/Vallio+terme\",7639 => \"/meteo/Vallo+della+Lucania\",7640 => \"/meteo/Vallo+di+Nera\",7641 => \"/meteo/Vallo+torinese\",8191 => \"/meteo/Vallombrosa\",8471 => \"/meteo/Vallon\",7642 => \"/meteo/Valloriate\",7643 => \"/meteo/Valmacca\",7644 => \"/meteo/Valmadrera\",7645 => \"/meteo/Valmala\",8313 => \"/meteo/Valmasino\",7646 => \"/meteo/Valmontone\",7647 => \"/meteo/Valmorea\",7648 => \"/meteo/Valmozzola\",7649 => \"/meteo/Valnegra\",7650 => \"/meteo/Valpelline\",7651 => \"/meteo/Valperga\",7652 => \"/meteo/Valprato+Soana\",7653 => \"/meteo/Valsavarenche\",7654 => \"/meteo/Valsecca\",7655 => \"/meteo/Valsinni\",7656 => \"/meteo/Valsolda\",7657 => \"/meteo/Valstagna\",7658 => \"/meteo/Valstrona\",7659 => \"/meteo/Valtopina\",7660 => \"/meteo/Valtorta\",8148 => \"/meteo/Valtorta+impianti\",7661 => \"/meteo/Valtournenche\",7662 => \"/meteo/Valva\",7663 => \"/meteo/Valvasone\",7664 => \"/meteo/Valverde\",7665 => \"/meteo/Valverde\",7666 => \"/meteo/Valvestino\",7667 => \"/meteo/Vandoies\",7668 => \"/meteo/Vanzaghello\",7669 => \"/meteo/Vanzago\",7670 => \"/meteo/Vanzone+con+San+Carlo\",7671 => \"/meteo/Vaprio+d'Adda\",7672 => \"/meteo/Vaprio+d'Agogna\",7673 => \"/meteo/Varallo\",7674 => \"/meteo/Varallo+Pombia\",7675 => \"/meteo/Varano+Borghi\",7676 => \"/meteo/Varano+de'+Melegari\",7677 => \"/meteo/Varapodio\",7678 => \"/meteo/Varazze\",8600 => \"/meteo/Varcaturo\",7679 => \"/meteo/Varco+sabino\",7680 => \"/meteo/Varedo\",7681 => \"/meteo/Varena\",7682 => \"/meteo/Varenna\",7683 => \"/meteo/Varese\",7684 => \"/meteo/Varese+ligure\",8284 => \"/meteo/Varigotti\",7685 => \"/meteo/Varisella\",7686 => \"/meteo/Varmo\",7687 => \"/meteo/Varna\",7688 => \"/meteo/Varsi\",7689 => \"/meteo/Varzi\",7690 => \"/meteo/Varzo\",7691 => \"/meteo/Vas\",7692 => \"/meteo/Vasanello\",7693 => \"/meteo/Vasia\",7694 => \"/meteo/Vasto\",7695 => \"/meteo/Vastogirardi\",7696 => \"/meteo/Vattaro\",7697 => \"/meteo/Vauda+canavese\",7698 => \"/meteo/Vazzano\",7699 => \"/meteo/Vazzola\",7700 => \"/meteo/Vecchiano\",7701 => \"/meteo/Vedano+al+Lambro\",7702 => \"/meteo/Vedano+Olona\",7703 => \"/meteo/Veddasca\",7704 => \"/meteo/Vedelago\",7705 => \"/meteo/Vedeseta\",7706 => \"/meteo/Veduggio+con+Colzano\",7707 => \"/meteo/Veggiano\",7708 => \"/meteo/Veglie\",7709 => \"/meteo/Veglio\",7710 => \"/meteo/Vejano\",7711 => \"/meteo/Veleso\",7712 => \"/meteo/Velezzo+lomellina\",8530 => \"/meteo/Vellano\",7713 => \"/meteo/Velletri\",7714 => \"/meteo/Vellezzo+Bellini\",7715 => \"/meteo/Velo+d'Astico\",7716 => \"/meteo/Velo+veronese\",7717 => \"/meteo/Velturno\",7718 => \"/meteo/Venafro\",7719 => \"/meteo/Venaria\",7720 => \"/meteo/Venarotta\",7721 => \"/meteo/Venasca\",7722 => \"/meteo/Venaus\",7723 => \"/meteo/Vendone\",7724 => \"/meteo/Vendrogno\",7725 => \"/meteo/Venegono+inferiore\",7726 => \"/meteo/Venegono+superiore\",7727 => \"/meteo/Venetico\",7728 => \"/meteo/Venezia\",8502 => \"/meteo/Venezia+Mestre\",8268 => \"/meteo/Venezia+Tessera\",7729 => \"/meteo/Veniano\",7730 => \"/meteo/Venosa\",7731 => \"/meteo/Venticano\",7732 => \"/meteo/Ventimiglia\",7733 => \"/meteo/Ventimiglia+di+Sicilia\",7734 => \"/meteo/Ventotene\",7735 => \"/meteo/Venzone\",7736 => \"/meteo/Verano\",7737 => \"/meteo/Verano+brianza\",7738 => \"/meteo/Verbania\",7739 => \"/meteo/Verbicaro\",7740 => \"/meteo/Vercana\",7741 => \"/meteo/Verceia\",7742 => \"/meteo/Vercelli\",7743 => \"/meteo/Vercurago\",7744 => \"/meteo/Verdellino\",7745 => \"/meteo/Verdello\",7746 => \"/meteo/Verderio+inferiore\",7747 => \"/meteo/Verderio+superiore\",7748 => \"/meteo/Verduno\",7749 => \"/meteo/Vergato\",7750 => \"/meteo/Vergemoli\",7751 => \"/meteo/Verghereto\",7752 => \"/meteo/Vergiate\",7753 => \"/meteo/Vermezzo\",7754 => \"/meteo/Vermiglio\",8583 => \"/meteo/Vernago\",7755 => \"/meteo/Vernante\",7756 => \"/meteo/Vernasca\",7757 => \"/meteo/Vernate\",7758 => \"/meteo/Vernazza\",7759 => \"/meteo/Vernio\",7760 => \"/meteo/Vernole\",7761 => \"/meteo/Verolanuova\",7762 => \"/meteo/Verolavecchia\",7763 => \"/meteo/Verolengo\",7764 => \"/meteo/Veroli\",7765 => \"/meteo/Verona\",8269 => \"/meteo/Verona+Villafranca\",7766 => \"/meteo/Veronella\",7767 => \"/meteo/Verrayes\",7768 => \"/meteo/Verres\",7769 => \"/meteo/Verretto\",7770 => \"/meteo/Verrone\",7771 => \"/meteo/Verrua+po\",7772 => \"/meteo/Verrua+Savoia\",7773 => \"/meteo/Vertemate+con+Minoprio\",7774 => \"/meteo/Vertova\",7775 => \"/meteo/Verucchio\",7776 => \"/meteo/Veruno\",7777 => \"/meteo/Vervio\",7778 => \"/meteo/Vervo'\",7779 => \"/meteo/Verzegnis\",7780 => \"/meteo/Verzino\",7781 => \"/meteo/Verzuolo\",7782 => \"/meteo/Vescovana\",7783 => \"/meteo/Vescovato\",7784 => \"/meteo/Vesime\",7785 => \"/meteo/Vespolate\",7786 => \"/meteo/Vessalico\",7787 => \"/meteo/Vestenanova\",7788 => \"/meteo/Vestigne'\",7789 => \"/meteo/Vestone\",7790 => \"/meteo/Vestreno\",7791 => \"/meteo/Vetralla\",7792 => \"/meteo/Vetto\",7793 => \"/meteo/Vezza+d'Alba\",7794 => \"/meteo/Vezza+d'Oglio\",7795 => \"/meteo/Vezzano\",7796 => \"/meteo/Vezzano+ligure\",7797 => \"/meteo/Vezzano+sul+crostolo\",7798 => \"/meteo/Vezzi+portio\",8317 => \"/meteo/Vezzo\",7799 => \"/meteo/Viadana\",7800 => \"/meteo/Viadanica\",7801 => \"/meteo/Viagrande\",7802 => \"/meteo/Viale\",7803 => \"/meteo/Vialfre'\",7804 => \"/meteo/Viano\",7805 => \"/meteo/Viareggio\",7806 => \"/meteo/Viarigi\",8674 => \"/meteo/Vibo+Marina\",7807 => \"/meteo/Vibo+Valentia\",7808 => \"/meteo/Vibonati\",7809 => \"/meteo/Vicalvi\",7810 => \"/meteo/Vicari\",7811 => \"/meteo/Vicchio\",7812 => \"/meteo/Vicenza\",7813 => \"/meteo/Vico+canavese\",7814 => \"/meteo/Vico+del+Gargano\",7815 => \"/meteo/Vico+Equense\",7816 => \"/meteo/Vico+nel+Lazio\",7817 => \"/meteo/Vicoforte\",7818 => \"/meteo/Vicoli\",7819 => \"/meteo/Vicolungo\",7820 => \"/meteo/Vicopisano\",7821 => \"/meteo/Vicovaro\",7822 => \"/meteo/Viddalba\",7823 => \"/meteo/Vidigulfo\",7824 => \"/meteo/Vidor\",7825 => \"/meteo/Vidracco\",7826 => \"/meteo/Vieste\",7827 => \"/meteo/Vietri+di+Potenza\",7828 => \"/meteo/Vietri+sul+mare\",7829 => \"/meteo/Viganella\",7830 => \"/meteo/Vigano+San+Martino\",7831 => \"/meteo/Vigano'\",7832 => \"/meteo/Vigarano+Mainarda\",7833 => \"/meteo/Vigasio\",7834 => \"/meteo/Vigevano\",7835 => \"/meteo/Viggianello\",7836 => \"/meteo/Viggiano\",7837 => \"/meteo/Viggiu'\",7838 => \"/meteo/Vighizzolo+d'Este\",7839 => \"/meteo/Vigliano+biellese\",7840 => \"/meteo/Vigliano+d'Asti\",7841 => \"/meteo/Vignale+monferrato\",7842 => \"/meteo/Vignanello\",7843 => \"/meteo/Vignate\",8125 => \"/meteo/Vignola\",7845 => \"/meteo/Vignola+Falesina\",7846 => \"/meteo/Vignole+Borbera\",7847 => \"/meteo/Vignolo\",7848 => \"/meteo/Vignone\",8514 => \"/meteo/Vigo+Ciampedie\",7849 => \"/meteo/Vigo+di+Cadore\",7850 => \"/meteo/Vigo+di+Fassa\",7851 => \"/meteo/Vigo+Rendena\",7852 => \"/meteo/Vigodarzere\",7853 => \"/meteo/Vigolo\",7854 => \"/meteo/Vigolo+Vattaro\",7855 => \"/meteo/Vigolzone\",7856 => \"/meteo/Vigone\",7857 => \"/meteo/Vigonovo\",7858 => \"/meteo/Vigonza\",7859 => \"/meteo/Viguzzolo\",7860 => \"/meteo/Villa+agnedo\",7861 => \"/meteo/Villa+bartolomea\",7862 => \"/meteo/Villa+basilica\",7863 => \"/meteo/Villa+biscossi\",7864 => \"/meteo/Villa+carcina\",7865 => \"/meteo/Villa+castelli\",7866 => \"/meteo/Villa+celiera\",7867 => \"/meteo/Villa+collemandina\",7868 => \"/meteo/Villa+cortese\",7869 => \"/meteo/Villa+d'Adda\",7870 => \"/meteo/Villa+d'Alme'\",7871 => \"/meteo/Villa+d'Ogna\",7872 => \"/meteo/Villa+del+bosco\",7873 => \"/meteo/Villa+del+conte\",7874 => \"/meteo/Villa+di+briano\",7875 => \"/meteo/Villa+di+Chiavenna\",7876 => \"/meteo/Villa+di+Serio\",7877 => \"/meteo/Villa+di+Tirano\",7878 => \"/meteo/Villa+Estense\",7879 => \"/meteo/Villa+Faraldi\",7880 => \"/meteo/Villa+Guardia\",7881 => \"/meteo/Villa+Lagarina\",7882 => \"/meteo/Villa+Latina\",7883 => \"/meteo/Villa+Literno\",7884 => \"/meteo/Villa+minozzo\",7885 => \"/meteo/Villa+poma\",7886 => \"/meteo/Villa+rendena\",7887 => \"/meteo/Villa+San+Giovanni\",7888 => \"/meteo/Villa+San+Giovanni+in+Tuscia\",7889 => \"/meteo/Villa+San+Pietro\",7890 => \"/meteo/Villa+San+Secondo\",7891 => \"/meteo/Villa+Sant'Angelo\",7892 => \"/meteo/Villa+Sant'Antonio\",7893 => \"/meteo/Villa+Santa+Lucia\",7894 => \"/meteo/Villa+Santa+Lucia+degli+Abruzzi\",7895 => \"/meteo/Villa+Santa+Maria\",7896 => \"/meteo/Villa+Santina\",7897 => \"/meteo/Villa+Santo+Stefano\",7898 => \"/meteo/Villa+verde\",7899 => \"/meteo/Villa+vicentina\",7900 => \"/meteo/Villabassa\",7901 => \"/meteo/Villabate\",7902 => \"/meteo/Villachiara\",7903 => \"/meteo/Villacidro\",7904 => \"/meteo/Villadeati\",7905 => \"/meteo/Villadose\",7906 => \"/meteo/Villadossola\",7907 => \"/meteo/Villafalletto\",7908 => \"/meteo/Villafranca+d'Asti\",7909 => \"/meteo/Villafranca+di+Verona\",7910 => \"/meteo/Villafranca+in+Lunigiana\",7911 => \"/meteo/Villafranca+padovana\",7912 => \"/meteo/Villafranca+Piemonte\",7913 => \"/meteo/Villafranca+sicula\",7914 => \"/meteo/Villafranca+tirrena\",7915 => \"/meteo/Villafrati\",7916 => \"/meteo/Villaga\",7917 => \"/meteo/Villagrande+Strisaili\",7918 => \"/meteo/Villalago\",7919 => \"/meteo/Villalba\",7920 => \"/meteo/Villalfonsina\",7921 => \"/meteo/Villalvernia\",7922 => \"/meteo/Villamagna\",7923 => \"/meteo/Villamaina\",7924 => \"/meteo/Villamar\",7925 => \"/meteo/Villamarzana\",7926 => \"/meteo/Villamassargia\",7927 => \"/meteo/Villamiroglio\",7928 => \"/meteo/Villandro\",7929 => \"/meteo/Villanova+biellese\",7930 => \"/meteo/Villanova+canavese\",7931 => \"/meteo/Villanova+d'Albenga\",7932 => \"/meteo/Villanova+d'Ardenghi\",7933 => \"/meteo/Villanova+d'Asti\",7934 => \"/meteo/Villanova+del+Battista\",7935 => \"/meteo/Villanova+del+Ghebbo\",7936 => \"/meteo/Villanova+del+Sillaro\",7937 => \"/meteo/Villanova+di+Camposampiero\",7938 => \"/meteo/Villanova+marchesana\",7939 => \"/meteo/Villanova+Mondovi'\",7940 => \"/meteo/Villanova+Monferrato\",7941 => \"/meteo/Villanova+Monteleone\",7942 => \"/meteo/Villanova+solaro\",7943 => \"/meteo/Villanova+sull'Arda\",7944 => \"/meteo/Villanova+Truschedu\",7945 => \"/meteo/Villanova+Tulo\",7946 => \"/meteo/Villanovaforru\",7947 => \"/meteo/Villanovafranca\",7948 => \"/meteo/Villanterio\",7949 => \"/meteo/Villanuova+sul+Clisi\",7950 => \"/meteo/Villaperuccio\",7951 => \"/meteo/Villapiana\",7952 => \"/meteo/Villaputzu\",7953 => \"/meteo/Villar+dora\",7954 => \"/meteo/Villar+focchiardo\",7955 => \"/meteo/Villar+pellice\",7956 => \"/meteo/Villar+Perosa\",7957 => \"/meteo/Villar+San+Costanzo\",7958 => \"/meteo/Villarbasse\",7959 => \"/meteo/Villarboit\",7960 => \"/meteo/Villareggia\",7961 => \"/meteo/Villaricca\",7962 => \"/meteo/Villaromagnano\",7963 => \"/meteo/Villarosa\",7964 => \"/meteo/Villasalto\",7965 => \"/meteo/Villasanta\",7966 => \"/meteo/Villasimius\",7967 => \"/meteo/Villasor\",7968 => \"/meteo/Villaspeciosa\",7969 => \"/meteo/Villastellone\",7970 => \"/meteo/Villata\",7971 => \"/meteo/Villaurbana\",7972 => \"/meteo/Villavallelonga\",7973 => \"/meteo/Villaverla\",7974 => \"/meteo/Villeneuve\",7975 => \"/meteo/Villesse\",7976 => \"/meteo/Villetta+Barrea\",7977 => \"/meteo/Villette\",7978 => \"/meteo/Villimpenta\",7979 => \"/meteo/Villongo\",7980 => \"/meteo/Villorba\",7981 => \"/meteo/Vilminore+di+scalve\",7982 => \"/meteo/Vimercate\",7983 => \"/meteo/Vimodrone\",7984 => \"/meteo/Vinadio\",7985 => \"/meteo/Vinchiaturo\",7986 => \"/meteo/Vinchio\",7987 => \"/meteo/Vinci\",7988 => \"/meteo/Vinovo\",7989 => \"/meteo/Vinzaglio\",7990 => \"/meteo/Viola\",7991 => \"/meteo/Vione\",7992 => \"/meteo/Vipiteno\",7993 => \"/meteo/Virgilio\",7994 => \"/meteo/Virle+Piemonte\",7995 => \"/meteo/Visano\",7996 => \"/meteo/Vische\",7997 => \"/meteo/Visciano\",7998 => \"/meteo/Visco\",7999 => \"/meteo/Visone\",8000 => \"/meteo/Visso\",8001 => \"/meteo/Vistarino\",8002 => \"/meteo/Vistrorio\",8003 => \"/meteo/Vita\",8004 => \"/meteo/Viterbo\",8005 => \"/meteo/Viticuso\",8006 => \"/meteo/Vito+d'Asio\",8007 => \"/meteo/Vitorchiano\",8008 => \"/meteo/Vittoria\",8009 => \"/meteo/Vittorio+Veneto\",8010 => \"/meteo/Vittorito\",8011 => \"/meteo/Vittuone\",8012 => \"/meteo/Vitulano\",8013 => \"/meteo/Vitulazio\",8014 => \"/meteo/Viu'\",8015 => \"/meteo/Vivaro\",8016 => \"/meteo/Vivaro+romano\",8017 => \"/meteo/Viverone\",8018 => \"/meteo/Vizzini\",8019 => \"/meteo/Vizzola+Ticino\",8020 => \"/meteo/Vizzolo+Predabissi\",8021 => \"/meteo/Vo'\",8022 => \"/meteo/Vobarno\",8023 => \"/meteo/Vobbia\",8024 => \"/meteo/Vocca\",8025 => \"/meteo/Vodo+cadore\",8026 => \"/meteo/Voghera\",8027 => \"/meteo/Voghiera\",8028 => \"/meteo/Vogogna\",8029 => \"/meteo/Volano\",8030 => \"/meteo/Volla\",8031 => \"/meteo/Volongo\",8032 => \"/meteo/Volpago+del+montello\",8033 => \"/meteo/Volpara\",8034 => \"/meteo/Volpedo\",8035 => \"/meteo/Volpeglino\",8036 => \"/meteo/Volpiano\",8037 => \"/meteo/Volta+mantovana\",8038 => \"/meteo/Voltaggio\",8039 => \"/meteo/Voltago+agordino\",8040 => \"/meteo/Volterra\",8041 => \"/meteo/Voltido\",8042 => \"/meteo/Volturara+Appula\",8043 => \"/meteo/Volturara+irpina\",8044 => \"/meteo/Volturino\",8045 => \"/meteo/Volvera\",8046 => \"/meteo/Vottignasco\",8181 => \"/meteo/Vulcano+Porto\",8047 => \"/meteo/Zaccanopoli\",8048 => \"/meteo/Zafferana+etnea\",8049 => \"/meteo/Zagarise\",8050 => \"/meteo/Zagarolo\",8051 => \"/meteo/Zambana\",8707 => \"/meteo/Zambla\",8052 => \"/meteo/Zambrone\",8053 => \"/meteo/Zandobbio\",8054 => \"/meteo/Zane'\",8055 => \"/meteo/Zanica\",8056 => \"/meteo/Zapponeta\",8057 => \"/meteo/Zavattarello\",8058 => \"/meteo/Zeccone\",8059 => \"/meteo/Zeddiani\",8060 => \"/meteo/Zelbio\",8061 => \"/meteo/Zelo+Buon+Persico\",8062 => \"/meteo/Zelo+Surrigone\",8063 => \"/meteo/Zeme\",8064 => \"/meteo/Zenevredo\",8065 => \"/meteo/Zenson+di+Piave\",8066 => \"/meteo/Zerba\",8067 => \"/meteo/Zerbo\",8068 => \"/meteo/Zerbolo'\",8069 => \"/meteo/Zerfaliu\",8070 => \"/meteo/Zeri\",8071 => \"/meteo/Zermeghedo\",8072 => \"/meteo/Zero+Branco\",8073 => \"/meteo/Zevio\",8455 => \"/meteo/Ziano+di+Fiemme\",8075 => \"/meteo/Ziano+piacentino\",8076 => \"/meteo/Zibello\",8077 => \"/meteo/Zibido+San+Giacomo\",8078 => \"/meteo/Zignago\",8079 => \"/meteo/Zimella\",8080 => \"/meteo/Zimone\",8081 => \"/meteo/Zinasco\",8082 => \"/meteo/Zoagli\",8083 => \"/meteo/Zocca\",8084 => \"/meteo/Zogno\",8085 => \"/meteo/Zola+Predosa\",8086 => \"/meteo/Zoldo+alto\",8087 => \"/meteo/Zollino\",8088 => \"/meteo/Zone\",8089 => \"/meteo/Zoppe'+di+cadore\",8090 => \"/meteo/Zoppola\",8091 => \"/meteo/Zovencedo\",8092 => \"/meteo/Zubiena\",8093 => \"/meteo/Zuccarello\",8094 => \"/meteo/Zuclo\",8095 => \"/meteo/Zugliano\",8096 => \"/meteo/Zuglio\",8097 => \"/meteo/Zumaglia\",8098 => \"/meteo/Zumpano\",8099 => \"/meteo/Zungoli\",8100 => \"/meteo/Zungri\");\n\n$trebi_locs = array(1 => \"Abano terme\",2 => \"Abbadia cerreto\",3 => \"Abbadia lariana\",4 => \"Abbadia San Salvatore\",5 => \"Abbasanta\",6 => \"Abbateggio\",7 => \"Abbiategrasso\",8 => \"Abetone\",8399 => \"Abriola\",10 => \"Acate\",11 => \"Accadia\",12 => \"Acceglio\",8369 => \"Accettura\",14 => \"Acciano\",15 => \"Accumoli\",16 => \"Acerenza\",17 => \"Acerno\",18 => \"Acerra\",19 => \"Aci bonaccorsi\",20 => \"Aci castello\",21 => \"Aci Catena\",22 => \"Aci Sant'Antonio\",23 => \"Acireale\",24 => \"Acquacanina\",25 => \"Acquafondata\",26 => \"Acquaformosa\",27 => \"Acquafredda\",8750 => \"Acquafredda\",28 => \"Acqualagna\",29 => \"Acquanegra cremonese\",30 => \"Acquanegra sul chiese\",31 => \"Acquapendente\",32 => \"Acquappesa\",33 => \"Acquarica del capo\",34 => \"Acquaro\",35 => \"Acquasanta terme\",36 => \"Acquasparta\",37 => \"Acquaviva collecroce\",38 => \"Acquaviva d'Isernia\",39 => \"Acquaviva delle fonti\",40 => \"Acquaviva picena\",41 => \"Acquaviva platani\",42 => \"Acquedolci\",43 => \"Acqui terme\",44 => \"Acri\",45 => \"Acuto\",46 => \"Adelfia\",47 => \"Adrano\",48 => \"Adrara San Martino\",49 => \"Adrara San Rocco\",50 => \"Adria\",51 => \"Adro\",52 => \"Affi\",53 => \"Affile\",54 => \"Afragola\",55 => \"Africo\",56 => \"Agazzano\",57 => \"Agerola\",58 => \"Aggius\",59 => \"Agira\",60 => \"Agliana\",61 => \"Agliano\",62 => \"Aglie'\",63 => \"Aglientu\",64 => \"Agna\",65 => \"Agnadello\",66 => \"Agnana calabra\",8598 => \"Agnano\",67 => \"Agnone\",68 => \"Agnosine\",69 => \"Agordo\",70 => \"Agosta\",71 => \"Agra\",72 => \"Agrate brianza\",73 => \"Agrate conturbia\",74 => \"Agrigento\",75 => \"Agropoli\",76 => \"Agugliano\",77 => \"Agugliaro\",78 => \"Aicurzio\",79 => \"Aidomaggiore\",80 => \"Aidone\",81 => \"Aielli\",82 => \"Aiello calabro\",83 => \"Aiello del Friuli\",84 => \"Aiello del Sabato\",85 => \"Aieta\",86 => \"Ailano\",87 => \"Ailoche\",88 => \"Airasca\",89 => \"Airola\",90 => \"Airole\",91 => \"Airuno\",92 => \"Aisone\",93 => \"Ala\",94 => \"Ala di Stura\",95 => \"Ala' dei Sardi\",96 => \"Alagna\",97 => \"Alagna Valsesia\",98 => \"Alanno\",99 => \"Alano di Piave\",100 => \"Alassio\",101 => \"Alatri\",102 => \"Alba\",103 => \"Alba adriatica\",104 => \"Albagiara\",105 => \"Albairate\",106 => \"Albanella\",8386 => \"Albano di lucania\",108 => \"Albano laziale\",109 => \"Albano Sant'Alessandro\",110 => \"Albano vercellese\",111 => \"Albaredo arnaboldi\",112 => \"Albaredo d'Adige\",113 => \"Albaredo per San Marco\",114 => \"Albareto\",115 => \"Albaretto della torre\",116 => \"Albavilla\",117 => \"Albenga\",118 => \"Albera ligure\",119 => \"Alberobello\",120 => \"Alberona\",121 => \"Albese con Cassano\",122 => \"Albettone\",123 => \"Albi\",124 => \"Albiano\",125 => \"Albiano d'ivrea\",126 => \"Albiate\",127 => \"Albidona\",128 => \"Albignasego\",129 => \"Albinea\",130 => \"Albino\",131 => \"Albiolo\",132 => \"Albisola marina\",133 => \"Albisola superiore\",134 => \"Albizzate\",135 => \"Albonese\",136 => \"Albosaggia\",137 => \"Albugnano\",138 => \"Albuzzano\",139 => \"Alcamo\",140 => \"Alcara li Fusi\",141 => \"Aldeno\",142 => \"Aldino\",143 => \"Ales\",144 => \"Alessandria\",145 => \"Alessandria del Carretto\",146 => \"Alessandria della Rocca\",147 => \"Alessano\",148 => \"Alezio\",149 => \"Alfano\",150 => \"Alfedena\",151 => \"Alfianello\",152 => \"Alfiano natta\",153 => \"Alfonsine\",154 => \"Alghero\",8532 => \"Alghero Fertilia\",155 => \"Algua\",156 => \"Ali'\",157 => \"Ali' terme\",158 => \"Alia\",159 => \"Aliano\",160 => \"Alice bel colle\",161 => \"Alice castello\",162 => \"Alice superiore\",163 => \"Alife\",164 => \"Alimena\",165 => \"Aliminusa\",166 => \"Allai\",167 => \"Alleghe\",168 => \"Allein\",169 => \"Allerona\",170 => \"Alliste\",171 => \"Allumiere\",172 => \"Alluvioni cambio'\",173 => \"Alme'\",174 => \"Almenno San Bartolomeo\",175 => \"Almenno San Salvatore\",176 => \"Almese\",177 => \"Alonte\",8259 => \"Alpe Cermis\",8557 => \"Alpe Devero\",8162 => \"Alpe di Mera\",8565 => \"Alpe di Siusi\",8755 => \"Alpe Giumello\",8264 => \"Alpe Lusia\",8559 => \"Alpe Nevegal\",8239 => \"Alpe Tre Potenze\",8558 => \"Alpe Veglia\",8482 => \"Alpet\",178 => \"Alpette\",179 => \"Alpignano\",180 => \"Alseno\",181 => \"Alserio\",182 => \"Altamura\",8474 => \"Altare\",184 => \"Altavilla irpina\",185 => \"Altavilla milicia\",186 => \"Altavilla monferrato\",187 => \"Altavilla silentina\",188 => \"Altavilla vicentina\",189 => \"Altidona\",190 => \"Altilia\",191 => \"Altino\",192 => \"Altissimo\",193 => \"Altivole\",194 => \"Alto\",195 => \"Altofonte\",196 => \"Altomonte\",197 => \"Altopascio\",8536 => \"Altopiano dei Fiorentini\",8662 => \"Altopiano della Sila\",8640 => \"Altopiano di Renon\",198 => \"Alviano\",199 => \"Alvignano\",200 => \"Alvito\",201 => \"Alzano lombardo\",202 => \"Alzano scrivia\",203 => \"Alzate brianza\",204 => \"Amalfi\",205 => \"Amandola\",206 => \"Amantea\",207 => \"Amaro\",208 => \"Amaroni\",209 => \"Amaseno\",210 => \"Amato\",211 => \"Amatrice\",212 => \"Ambivere\",213 => \"Amblar\",214 => \"Ameglia\",215 => \"Amelia\",216 => \"Amendolara\",217 => \"Ameno\",218 => \"Amorosi\",219 => \"Ampezzo\",220 => \"Anacapri\",221 => \"Anagni\",8463 => \"Anagni casello\",222 => \"Ancarano\",223 => \"Ancona\",8267 => \"Ancona Falconara\",224 => \"Andali\",225 => \"Andalo\",226 => \"Andalo valtellino\",227 => \"Andezeno\",228 => \"Andora\",229 => \"Andorno micca\",230 => \"Andrano\",231 => \"Andrate\",232 => \"Andreis\",233 => \"Andretta\",234 => \"Andria\",235 => \"Andriano\",236 => \"Anela\",237 => \"Anfo\",238 => \"Angera\",239 => \"Anghiari\",240 => \"Angiari\",241 => \"Angolo terme\",242 => \"Angri\",243 => \"Angrogna\",244 => \"Anguillara sabazia\",245 => \"Anguillara veneta\",246 => \"Annicco\",247 => \"Annone di brianza\",248 => \"Annone veneto\",249 => \"Anoia\",8302 => \"Antagnod\",250 => \"Antegnate\",251 => \"Anterivo\",8211 => \"Anterselva di Sopra\",252 => \"Antey saint andre'\",253 => \"Anticoli Corrado\",254 => \"Antignano\",255 => \"Antillo\",256 => \"Antonimina\",257 => \"Antrodoco\",258 => \"Antrona Schieranco\",259 => \"Anversa degli Abruzzi\",260 => \"Anzano del Parco\",261 => \"Anzano di Puglia\",8400 => \"Anzi\",263 => \"Anzio\",264 => \"Anzola d'Ossola\",265 => \"Anzola dell'Emilia\",266 => \"Aosta\",8548 => \"Aosta Saint Christophe\",267 => \"Apecchio\",268 => \"Apice\",269 => \"Apiro\",270 => \"Apollosa\",271 => \"Appiano Gentile\",272 => \"Appiano sulla strada del vino\",273 => \"Appignano\",274 => \"Appignano del Tronto\",275 => \"Aprica\",276 => \"Apricale\",277 => \"Apricena\",278 => \"Aprigliano\",279 => \"Aprilia\",280 => \"Aquara\",281 => \"Aquila di Arroscia\",282 => \"Aquileia\",283 => \"Aquilonia\",284 => \"Aquino\",8228 => \"Arabba\",285 => \"Aradeo\",286 => \"Aragona\",287 => \"Aramengo\",288 => \"Arba\",8487 => \"Arbatax\",289 => \"Arborea\",290 => \"Arborio\",291 => \"Arbus\",292 => \"Arcade\",293 => \"Arce\",294 => \"Arcene\",295 => \"Arcevia\",296 => \"Archi\",297 => \"Arcidosso\",298 => \"Arcinazzo romano\",299 => \"Arcisate\",300 => \"Arco\",301 => \"Arcola\",302 => \"Arcole\",303 => \"Arconate\",304 => \"Arcore\",305 => \"Arcugnano\",306 => \"Ardara\",307 => \"Ardauli\",308 => \"Ardea\",309 => \"Ardenno\",310 => \"Ardesio\",311 => \"Ardore\",8675 => \"Ardore Marina\",8321 => \"Aremogna\",312 => \"Arena\",313 => \"Arena po\",314 => \"Arenzano\",315 => \"Arese\",316 => \"Arezzo\",317 => \"Argegno\",318 => \"Argelato\",319 => \"Argenta\",320 => \"Argentera\",321 => \"Arguello\",322 => \"Argusto\",323 => \"Ari\",324 => \"Ariano irpino\",325 => \"Ariano nel polesine\",326 => \"Ariccia\",327 => \"Arielli\",328 => \"Arienzo\",329 => \"Arignano\",330 => \"Aritzo\",331 => \"Arizzano\",332 => \"Arlena di castro\",333 => \"Arluno\",8677 => \"Arma di Taggia\",334 => \"Armeno\",8405 => \"Armento\",336 => \"Armo\",337 => \"Armungia\",338 => \"Arnad\",339 => \"Arnara\",340 => \"Arnasco\",341 => \"Arnesano\",342 => \"Arola\",343 => \"Arona\",344 => \"Arosio\",345 => \"Arpaia\",346 => \"Arpaise\",347 => \"Arpino\",348 => \"Arqua' Petrarca\",349 => \"Arqua' polesine\",350 => \"Arquata del tronto\",351 => \"Arquata scrivia\",352 => \"Arre\",353 => \"Arrone\",354 => \"Arsago Seprio\",355 => \"Arsie'\",356 => \"Arsiero\",357 => \"Arsita\",358 => \"Arsoli\",359 => \"Arta terme\",360 => \"Artegna\",361 => \"Artena\",8338 => \"Artesina\",362 => \"Artogne\",363 => \"Arvier\",364 => \"Arzachena\",365 => \"Arzago d'Adda\",366 => \"Arzana\",367 => \"Arzano\",368 => \"Arzene\",369 => \"Arzergrande\",370 => \"Arzignano\",371 => \"Ascea\",8513 => \"Asciano\",8198 => \"Asciano Pisano\",373 => \"Ascoli piceno\",374 => \"Ascoli satriano\",375 => \"Ascrea\",376 => \"Asiago\",377 => \"Asigliano Veneto\",378 => \"Asigliano vercellese\",379 => \"Asola\",380 => \"Asolo\",8438 => \"Aspio terme\",381 => \"Assago\",382 => \"Assemini\",8488 => \"Assergi\",8448 => \"Assergi casello\",383 => \"Assisi\",384 => \"Asso\",385 => \"Assolo\",386 => \"Assoro\",387 => \"Asti\",388 => \"Asuni\",389 => \"Ateleta\",8383 => \"Atella\",391 => \"Atena lucana\",392 => \"Atessa\",393 => \"Atina\",394 => \"Atrani\",395 => \"Atri\",396 => \"Atripalda\",397 => \"Attigliano\",398 => \"Attimis\",399 => \"Atzara\",400 => \"Auditore\",401 => \"Augusta\",402 => \"Auletta\",403 => \"Aulla\",404 => \"Aurano\",405 => \"Aurigo\",406 => \"Auronzo di cadore\",407 => \"Ausonia\",408 => \"Austis\",409 => \"Avegno\",410 => \"Avelengo\",411 => \"Avella\",412 => \"Avellino\",413 => \"Averara\",414 => \"Aversa\",415 => \"Avetrana\",416 => \"Avezzano\",417 => \"Aviano\",418 => \"Aviatico\",419 => \"Avigliana\",420 => \"Avigliano\",421 => \"Avigliano umbro\",422 => \"Avio\",423 => \"Avise\",424 => \"Avola\",425 => \"Avolasca\",426 => \"Ayas\",427 => \"Aymavilles\",428 => \"Azeglio\",429 => \"Azzanello\",430 => \"Azzano d'Asti\",431 => \"Azzano decimo\",432 => \"Azzano mella\",433 => \"Azzano San Paolo\",434 => \"Azzate\",435 => \"Azzio\",436 => \"Azzone\",437 => \"Baceno\",438 => \"Bacoli\",439 => \"Badalucco\",440 => \"Badesi\",441 => \"Badia\",442 => \"Badia calavena\",443 => \"Badia pavese\",444 => \"Badia polesine\",445 => \"Badia tedalda\",446 => \"Badolato\",447 => \"Bagaladi\",448 => \"Bagheria\",449 => \"Bagnacavallo\",450 => \"Bagnara calabra\",451 => \"Bagnara di romagna\",452 => \"Bagnaria\",453 => \"Bagnaria arsa\",454 => \"Bagnasco\",455 => \"Bagnatica\",456 => \"Bagni di Lucca\",8699 => \"Bagni di Vinadio\",457 => \"Bagno a Ripoli\",458 => \"Bagno di Romagna\",459 => \"Bagnoli del Trigno\",460 => \"Bagnoli di sopra\",461 => \"Bagnoli irpino\",462 => \"Bagnolo cremasco\",463 => \"Bagnolo del salento\",464 => \"Bagnolo di po\",465 => \"Bagnolo in piano\",466 => \"Bagnolo Mella\",467 => \"Bagnolo Piemonte\",468 => \"Bagnolo San Vito\",469 => \"Bagnone\",470 => \"Bagnoregio\",471 => \"Bagolino\",8123 => \"Baia Domizia\",472 => \"Baia e Latina\",473 => \"Baiano\",474 => \"Baiardo\",475 => \"Bairo\",476 => \"Baiso\",477 => \"Balangero\",478 => \"Baldichieri d'Asti\",479 => \"Baldissero canavese\",480 => \"Baldissero d'Alba\",481 => \"Baldissero torinese\",482 => \"Balestrate\",483 => \"Balestrino\",484 => \"Ballabio\",485 => \"Ballao\",486 => \"Balme\",487 => \"Balmuccia\",488 => \"Balocco\",489 => \"Balsorano\",490 => \"Balvano\",491 => \"Balzola\",492 => \"Banari\",493 => \"Banchette\",494 => \"Bannio anzino\",8368 => \"Banzi\",496 => \"Baone\",497 => \"Baradili\",8415 => \"Baragiano\",499 => \"Baranello\",500 => \"Barano d'Ischia\",501 => \"Barasso\",502 => \"Baratili San Pietro\",503 => \"Barbania\",504 => \"Barbara\",505 => \"Barbarano romano\",506 => \"Barbarano vicentino\",507 => \"Barbaresco\",508 => \"Barbariga\",509 => \"Barbata\",510 => \"Barberino di mugello\",511 => \"Barberino val d'elsa\",512 => \"Barbianello\",513 => \"Barbiano\",514 => \"Barbona\",515 => \"Barcellona pozzo di Gotto\",516 => \"Barchi\",517 => \"Barcis\",518 => \"Bard\",519 => \"Bardello\",520 => \"Bardi\",521 => \"Bardineto\",522 => \"Bardolino\",523 => \"Bardonecchia\",524 => \"Bareggio\",525 => \"Barengo\",526 => \"Baressa\",527 => \"Barete\",528 => \"Barga\",529 => \"Bargagli\",530 => \"Barge\",531 => \"Barghe\",532 => \"Bari\",8274 => \"Bari Palese\",533 => \"Bari sardo\",534 => \"Bariano\",535 => \"Baricella\",8402 => \"Barile\",537 => \"Barisciano\",538 => \"Barlassina\",539 => \"Barletta\",540 => \"Barni\",541 => \"Barolo\",542 => \"Barone canavese\",543 => \"Baronissi\",544 => \"Barrafranca\",545 => \"Barrali\",546 => \"Barrea\",8745 => \"Barricata\",547 => \"Barumini\",548 => \"Barzago\",549 => \"Barzana\",550 => \"Barzano'\",551 => \"Barzio\",552 => \"Basaluzzo\",553 => \"Bascape'\",554 => \"Baschi\",555 => \"Basciano\",556 => \"Baselga di Pine'\",557 => \"Baselice\",558 => \"Basiano\",559 => \"Basico'\",560 => \"Basiglio\",561 => \"Basiliano\",562 => \"Bassano bresciano\",563 => \"Bassano del grappa\",564 => \"Bassano in teverina\",565 => \"Bassano romano\",566 => \"Bassiano\",567 => \"Bassignana\",568 => \"Bastia\",569 => \"Bastia mondovi'\",570 => \"Bastida de' Dossi\",571 => \"Bastida pancarana\",572 => \"Bastiglia\",573 => \"Battaglia terme\",574 => \"Battifollo\",575 => \"Battipaglia\",576 => \"Battuda\",577 => \"Baucina\",578 => \"Bauladu\",579 => \"Baunei\",580 => \"Baveno\",581 => \"Bazzano\",582 => \"Bedero valcuvia\",583 => \"Bedizzole\",584 => \"Bedollo\",585 => \"Bedonia\",586 => \"Bedulita\",587 => \"Bee\",588 => \"Beinasco\",589 => \"Beinette\",590 => \"Belcastro\",591 => \"Belfiore\",592 => \"Belforte all'Isauro\",593 => \"Belforte del chienti\",594 => \"Belforte monferrato\",595 => \"Belgioioso\",596 => \"Belgirate\",597 => \"Bella\",598 => \"Bellagio\",8263 => \"Bellamonte\",599 => \"Bellano\",600 => \"Bellante\",601 => \"Bellaria Igea marina\",602 => \"Bellegra\",603 => \"Bellino\",604 => \"Bellinzago lombardo\",605 => \"Bellinzago novarese\",606 => \"Bellizzi\",607 => \"Bellona\",608 => \"Bellosguardo\",609 => \"Belluno\",610 => \"Bellusco\",611 => \"Belmonte calabro\",612 => \"Belmonte castello\",613 => \"Belmonte del sannio\",614 => \"Belmonte in sabina\",615 => \"Belmonte mezzagno\",616 => \"Belmonte piceno\",617 => \"Belpasso\",8573 => \"Belpiano Schoeneben\",618 => \"Belsito\",8265 => \"Belvedere\",619 => \"Belvedere di Spinello\",620 => \"Belvedere langhe\",621 => \"Belvedere marittimo\",622 => \"Belvedere ostrense\",623 => \"Belveglio\",624 => \"Belvi\",625 => \"Bema\",626 => \"Bene lario\",627 => \"Bene vagienna\",628 => \"Benestare\",629 => \"Benetutti\",630 => \"Benevello\",631 => \"Benevento\",632 => \"Benna\",633 => \"Bentivoglio\",634 => \"Berbenno\",635 => \"Berbenno di valtellina\",636 => \"Berceto\",637 => \"Berchidda\",638 => \"Beregazzo con Figliaro\",639 => \"Bereguardo\",640 => \"Bergamasco\",641 => \"Bergamo\",8519 => \"Bergamo città alta\",8497 => \"Bergamo Orio al Serio\",642 => \"Bergantino\",643 => \"Bergeggi\",644 => \"Bergolo\",645 => \"Berlingo\",646 => \"Bernalda\",647 => \"Bernareggio\",648 => \"Bernate ticino\",649 => \"Bernezzo\",650 => \"Berra\",651 => \"Bersone\",652 => \"Bertinoro\",653 => \"Bertiolo\",654 => \"Bertonico\",655 => \"Berzano di San Pietro\",656 => \"Berzano di Tortona\",657 => \"Berzo Demo\",658 => \"Berzo inferiore\",659 => \"Berzo San Fermo\",660 => \"Besana in brianza\",661 => \"Besano\",662 => \"Besate\",663 => \"Besenello\",664 => \"Besenzone\",665 => \"Besnate\",666 => \"Besozzo\",667 => \"Bessude\",668 => \"Bettola\",669 => \"Bettona\",670 => \"Beura Cardezza\",671 => \"Bevagna\",672 => \"Beverino\",673 => \"Bevilacqua\",674 => \"Bezzecca\",675 => \"Biancavilla\",676 => \"Bianchi\",677 => \"Bianco\",678 => \"Biandrate\",679 => \"Biandronno\",680 => \"Bianzano\",681 => \"Bianze'\",682 => \"Bianzone\",683 => \"Biassono\",684 => \"Bibbiano\",685 => \"Bibbiena\",686 => \"Bibbona\",687 => \"Bibiana\",8230 => \"Bibione\",688 => \"Biccari\",689 => \"Bicinicco\",690 => \"Bidoni'\",691 => \"Biella\",8163 => \"Bielmonte\",692 => \"Bienno\",693 => \"Bieno\",694 => \"Bientina\",695 => \"Bigarello\",696 => \"Binago\",697 => \"Binasco\",698 => \"Binetto\",699 => \"Bioglio\",700 => \"Bionaz\",701 => \"Bione\",702 => \"Birori\",703 => \"Bisaccia\",704 => \"Bisacquino\",705 => \"Bisceglie\",706 => \"Bisegna\",707 => \"Bisenti\",708 => \"Bisignano\",709 => \"Bistagno\",710 => \"Bisuschio\",711 => \"Bitetto\",712 => \"Bitonto\",713 => \"Bitritto\",714 => \"Bitti\",715 => \"Bivona\",716 => \"Bivongi\",717 => \"Bizzarone\",718 => \"Bleggio inferiore\",719 => \"Bleggio superiore\",720 => \"Blello\",721 => \"Blera\",722 => \"Blessagno\",723 => \"Blevio\",724 => \"Blufi\",725 => \"Boara Pisani\",726 => \"Bobbio\",727 => \"Bobbio Pellice\",728 => \"Boca\",8501 => \"Bocca di Magra\",729 => \"Bocchigliero\",730 => \"Boccioleto\",731 => \"Bocenago\",732 => \"Bodio Lomnago\",733 => \"Boffalora d'Adda\",734 => \"Boffalora sopra Ticino\",735 => \"Bogliasco\",736 => \"Bognanco\",8287 => \"Bognanco fonti\",737 => \"Bogogno\",738 => \"Boissano\",739 => \"Bojano\",740 => \"Bolano\",741 => \"Bolbeno\",742 => \"Bolgare\",743 => \"Bollate\",744 => \"Bollengo\",745 => \"Bologna\",8476 => \"Bologna Borgo Panigale\",746 => \"Bolognano\",747 => \"Bolognetta\",748 => \"Bolognola\",749 => \"Bolotana\",750 => \"Bolsena\",751 => \"Boltiere\",8505 => \"Bolzaneto\",752 => \"Bolzano\",753 => \"Bolzano novarese\",754 => \"Bolzano vicentino\",755 => \"Bomarzo\",756 => \"Bomba\",757 => \"Bompensiere\",758 => \"Bompietro\",759 => \"Bomporto\",760 => \"Bonarcado\",761 => \"Bonassola\",762 => \"Bonate sopra\",763 => \"Bonate sotto\",764 => \"Bonavigo\",765 => \"Bondeno\",766 => \"Bondo\",767 => \"Bondone\",768 => \"Bonea\",769 => \"Bonefro\",770 => \"Bonemerse\",771 => \"Bonifati\",772 => \"Bonito\",773 => \"Bonnanaro\",774 => \"Bono\",775 => \"Bonorva\",776 => \"Bonvicino\",777 => \"Borbona\",778 => \"Borca di cadore\",779 => \"Bordano\",780 => \"Bordighera\",781 => \"Bordolano\",782 => \"Bore\",783 => \"Boretto\",784 => \"Borgarello\",785 => \"Borgaro torinese\",786 => \"Borgetto\",787 => \"Borghetto d'arroscia\",788 => \"Borghetto di borbera\",789 => \"Borghetto di vara\",790 => \"Borghetto lodigiano\",791 => \"Borghetto Santo Spirito\",792 => \"Borghi\",793 => \"Borgia\",794 => \"Borgiallo\",795 => \"Borgio Verezzi\",796 => \"Borgo a Mozzano\",797 => \"Borgo d'Ale\",798 => \"Borgo di Terzo\",8159 => \"Borgo d`Ale\",799 => \"Borgo Pace\",800 => \"Borgo Priolo\",801 => \"Borgo San Dalmazzo\",802 => \"Borgo San Giacomo\",803 => \"Borgo San Giovanni\",804 => \"Borgo San Lorenzo\",805 => \"Borgo San Martino\",806 => \"Borgo San Siro\",807 => \"Borgo Ticino\",808 => \"Borgo Tossignano\",809 => \"Borgo Val di Taro\",810 => \"Borgo Valsugana\",811 => \"Borgo Velino\",812 => \"Borgo Vercelli\",813 => \"Borgoforte\",814 => \"Borgofranco d'Ivrea\",815 => \"Borgofranco sul Po\",816 => \"Borgolavezzaro\",817 => \"Borgomale\",818 => \"Borgomanero\",819 => \"Borgomaro\",820 => \"Borgomasino\",821 => \"Borgone susa\",822 => \"Borgonovo val tidone\",823 => \"Borgoratto alessandrino\",824 => \"Borgoratto mormorolo\",825 => \"Borgoricco\",826 => \"Borgorose\",827 => \"Borgosatollo\",828 => \"Borgosesia\",829 => \"Bormida\",830 => \"Bormio\",8334 => \"Bormio 2000\",8335 => \"Bormio 3000\",831 => \"Bornasco\",832 => \"Borno\",833 => \"Boroneddu\",834 => \"Borore\",835 => \"Borrello\",836 => \"Borriana\",837 => \"Borso del Grappa\",838 => \"Bortigali\",839 => \"Bortigiadas\",840 => \"Borutta\",841 => \"Borzonasca\",842 => \"Bosa\",843 => \"Bosaro\",844 => \"Boschi Sant'Anna\",845 => \"Bosco Chiesanuova\",846 => \"Bosco Marengo\",847 => \"Bosconero\",848 => \"Boscoreale\",849 => \"Boscotrecase\",850 => \"Bosentino\",851 => \"Bosia\",852 => \"Bosio\",853 => \"Bosisio Parini\",854 => \"Bosnasco\",855 => \"Bossico\",856 => \"Bossolasco\",857 => \"Botricello\",858 => \"Botrugno\",859 => \"Bottanuco\",860 => \"Botticino\",861 => \"Bottidda\",8655 => \"Bourg San Bernard\",862 => \"Bova\",863 => \"Bova marina\",864 => \"Bovalino\",865 => \"Bovegno\",866 => \"Boves\",867 => \"Bovezzo\",868 => \"Boville Ernica\",869 => \"Bovino\",870 => \"Bovisio Masciago\",871 => \"Bovolenta\",872 => \"Bovolone\",873 => \"Bozzole\",874 => \"Bozzolo\",875 => \"Bra\",876 => \"Bracca\",877 => \"Bracciano\",878 => \"Bracigliano\",879 => \"Braies\",880 => \"Brallo di Pregola\",881 => \"Brancaleone\",882 => \"Brandico\",883 => \"Brandizzo\",884 => \"Branzi\",885 => \"Braone\",8740 => \"Bratto\",886 => \"Brebbia\",887 => \"Breda di Piave\",888 => \"Bregano\",889 => \"Breganze\",890 => \"Bregnano\",891 => \"Breguzzo\",892 => \"Breia\",8724 => \"Breithorn\",893 => \"Brembate\",894 => \"Brembate di sopra\",895 => \"Brembilla\",896 => \"Brembio\",897 => \"Breme\",898 => \"Brendola\",899 => \"Brenna\",900 => \"Brennero\",901 => \"Breno\",902 => \"Brenta\",903 => \"Brentino Belluno\",904 => \"Brentonico\",905 => \"Brenzone\",906 => \"Brescello\",907 => \"Brescia\",8547 => \"Brescia Montichiari\",908 => \"Bresimo\",909 => \"Bressana Bottarone\",910 => \"Bressanone\",911 => \"Bressanvido\",912 => \"Bresso\",8226 => \"Breuil-Cervinia\",913 => \"Brez\",914 => \"Brezzo di Bedero\",915 => \"Briaglia\",916 => \"Briatico\",917 => \"Bricherasio\",918 => \"Brienno\",919 => \"Brienza\",920 => \"Briga alta\",921 => \"Briga novarese\",923 => \"Brignano Frascata\",922 => \"Brignano Gera d'Adda\",924 => \"Brindisi\",8358 => \"Brindisi montagna\",8549 => \"Brindisi Papola Casale\",926 => \"Brinzio\",927 => \"Briona\",928 => \"Brione\",929 => \"Brione\",930 => \"Briosco\",931 => \"Brisighella\",932 => \"Brissago valtravaglia\",933 => \"Brissogne\",934 => \"Brittoli\",935 => \"Brivio\",936 => \"Broccostella\",937 => \"Brogliano\",938 => \"Brognaturo\",939 => \"Brolo\",940 => \"Brondello\",941 => \"Broni\",942 => \"Bronte\",943 => \"Bronzolo\",944 => \"Brossasco\",945 => \"Brosso\",946 => \"Brovello Carpugnino\",947 => \"Brozolo\",948 => \"Brugherio\",949 => \"Brugine\",950 => \"Brugnato\",951 => \"Brugnera\",952 => \"Bruino\",953 => \"Brumano\",954 => \"Brunate\",955 => \"Brunello\",956 => \"Brunico\",957 => \"Bruno\",958 => \"Brusaporto\",959 => \"Brusasco\",960 => \"Brusciano\",961 => \"Brusimpiano\",962 => \"Brusnengo\",963 => \"Brusson\",8645 => \"Brusson 2000 Estoul\",964 => \"Bruzolo\",965 => \"Bruzzano Zeffirio\",966 => \"Bubbiano\",967 => \"Bubbio\",968 => \"Buccheri\",969 => \"Bucchianico\",970 => \"Bucciano\",971 => \"Buccinasco\",972 => \"Buccino\",973 => \"Bucine\",974 => \"Budduso'\",975 => \"Budoia\",976 => \"Budoni\",977 => \"Budrio\",978 => \"Buggerru\",979 => \"Buggiano\",980 => \"Buglio in Monte\",981 => \"Bugnara\",982 => \"Buguggiate\",983 => \"Buia\",984 => \"Bulciago\",985 => \"Bulgarograsso\",986 => \"Bultei\",987 => \"Bulzi\",988 => \"Buonabitacolo\",989 => \"Buonalbergo\",990 => \"Buonconvento\",991 => \"Buonvicino\",992 => \"Burago di Molgora\",993 => \"Burcei\",994 => \"Burgio\",995 => \"Burgos\",996 => \"Buriasco\",997 => \"Burolo\",998 => \"Buronzo\",8483 => \"Burrino\",999 => \"Busachi\",1000 => \"Busalla\",1001 => \"Busana\",1002 => \"Busano\",1003 => \"Busca\",1004 => \"Buscate\",1005 => \"Buscemi\",1006 => \"Buseto Palizzolo\",1007 => \"Busnago\",1008 => \"Bussero\",1009 => \"Busseto\",1010 => \"Bussi sul Tirino\",1011 => \"Busso\",1012 => \"Bussolengo\",1013 => \"Bussoleno\",1014 => \"Busto Arsizio\",1015 => \"Busto Garolfo\",1016 => \"Butera\",1017 => \"Buti\",1018 => \"Buttapietra\",1019 => \"Buttigliera alta\",1020 => \"Buttigliera d'Asti\",1021 => \"Buttrio\",1022 => \"Ca' d'Andrea\",1023 => \"Cabella ligure\",1024 => \"Cabiate\",1025 => \"Cabras\",1026 => \"Caccamo\",1027 => \"Caccuri\",1028 => \"Cadegliano Viconago\",1029 => \"Cadelbosco di sopra\",1030 => \"Cadeo\",1031 => \"Caderzone\",8566 => \"Cadipietra\",1032 => \"Cadoneghe\",1033 => \"Cadorago\",1034 => \"Cadrezzate\",1035 => \"Caerano di San Marco\",1036 => \"Cafasse\",1037 => \"Caggiano\",1038 => \"Cagli\",1039 => \"Cagliari\",8500 => \"Cagliari Elmas\",1040 => \"Caglio\",1041 => \"Cagnano Amiterno\",1042 => \"Cagnano Varano\",1043 => \"Cagno\",1044 => \"Cagno'\",1045 => \"Caianello\",1046 => \"Caiazzo\",1047 => \"Caines\",1048 => \"Caino\",1049 => \"Caiolo\",1050 => \"Cairano\",1051 => \"Cairate\",1052 => \"Cairo Montenotte\",1053 => \"Caivano\",8168 => \"Cala Gonone\",1054 => \"Calabritto\",1055 => \"Calalzo di cadore\",1056 => \"Calamandrana\",1057 => \"Calamonaci\",1058 => \"Calangianus\",1059 => \"Calanna\",1060 => \"Calasca Castiglione\",1061 => \"Calascibetta\",1062 => \"Calascio\",1063 => \"Calasetta\",1064 => \"Calatabiano\",1065 => \"Calatafimi\",1066 => \"Calavino\",1067 => \"Calcata\",1068 => \"Calceranica al lago\",1069 => \"Calci\",8424 => \"Calciano\",1071 => \"Calcinaia\",1072 => \"Calcinate\",1073 => \"Calcinato\",1074 => \"Calcio\",1075 => \"Calco\",1076 => \"Caldaro sulla strada del vino\",1077 => \"Caldarola\",1078 => \"Calderara di Reno\",1079 => \"Caldes\",1080 => \"Caldiero\",1081 => \"Caldogno\",1082 => \"Caldonazzo\",1083 => \"Calendasco\",8614 => \"Calenella\",1084 => \"Calenzano\",1085 => \"Calestano\",1086 => \"Calice al Cornoviglio\",1087 => \"Calice ligure\",8692 => \"California di Lesmo\",1088 => \"Calimera\",1089 => \"Calitri\",1090 => \"Calizzano\",1091 => \"Callabiana\",1092 => \"Calliano\",1093 => \"Calliano\",1094 => \"Calolziocorte\",1095 => \"Calopezzati\",1096 => \"Calosso\",1097 => \"Caloveto\",1098 => \"Caltabellotta\",1099 => \"Caltagirone\",1100 => \"Caltanissetta\",1101 => \"Caltavuturo\",1102 => \"Caltignaga\",1103 => \"Calto\",1104 => \"Caltrano\",1105 => \"Calusco d'Adda\",1106 => \"Caluso\",1107 => \"Calvagese della Riviera\",1108 => \"Calvanico\",1109 => \"Calvatone\",8406 => \"Calvello\",1111 => \"Calvene\",1112 => \"Calvenzano\",8373 => \"Calvera\",1114 => \"Calvi\",1115 => \"Calvi dell'Umbria\",1116 => \"Calvi risorta\",1117 => \"Calvignano\",1118 => \"Calvignasco\",1119 => \"Calvisano\",1120 => \"Calvizzano\",1121 => \"Camagna monferrato\",1122 => \"Camaiore\",1123 => \"Camairago\",1124 => \"Camandona\",1125 => \"Camastra\",1126 => \"Cambiago\",1127 => \"Cambiano\",1128 => \"Cambiasca\",1129 => \"Camburzano\",1130 => \"Camerana\",1131 => \"Camerano\",1132 => \"Camerano Casasco\",1133 => \"Camerata Cornello\",1134 => \"Camerata Nuova\",1135 => \"Camerata picena\",1136 => \"Cameri\",1137 => \"Camerino\",1138 => \"Camerota\",1139 => \"Camigliano\",8119 => \"Camigliatello silano\",1140 => \"Caminata\",1141 => \"Camini\",1142 => \"Camino\",1143 => \"Camino al Tagliamento\",1144 => \"Camisano\",1145 => \"Camisano vicentino\",1146 => \"Cammarata\",1147 => \"Camo\",1148 => \"Camogli\",1149 => \"Campagna\",1150 => \"Campagna Lupia\",1151 => \"Campagnano di Roma\",1152 => \"Campagnatico\",1153 => \"Campagnola cremasca\",1154 => \"Campagnola emilia\",1155 => \"Campana\",1156 => \"Camparada\",1157 => \"Campegine\",1158 => \"Campello sul Clitunno\",1159 => \"Campertogno\",1160 => \"Campi Bisenzio\",1161 => \"Campi salentina\",1162 => \"Campiglia cervo\",1163 => \"Campiglia dei Berici\",1164 => \"Campiglia marittima\",1165 => \"Campiglione Fenile\",8127 => \"Campigna\",1166 => \"Campione d'Italia\",1167 => \"Campitello di Fassa\",8155 => \"Campitello matese\",1168 => \"Campli\",1169 => \"Campo calabro\",8754 => \"Campo Carlo Magno\",8134 => \"Campo Catino\",8610 => \"Campo Cecina\",1170 => \"Campo di Giove\",1171 => \"Campo di Trens\",8345 => \"Campo Felice\",8101 => \"Campo imperatore\",1172 => \"Campo ligure\",1173 => \"Campo nell'Elba\",1174 => \"Campo San Martino\",8135 => \"Campo Staffi\",8644 => \"Campo Tenese\",1175 => \"Campo Tures\",1176 => \"Campobasso\",1177 => \"Campobello di Licata\",1178 => \"Campobello di Mazara\",1179 => \"Campochiaro\",1180 => \"Campodarsego\",1181 => \"Campodenno\",8357 => \"Campodimele\",1183 => \"Campodipietra\",1184 => \"Campodolcino\",1185 => \"Campodoro\",1186 => \"Campofelice di Fitalia\",1187 => \"Campofelice di Roccella\",1188 => \"Campofilone\",1189 => \"Campofiorito\",1190 => \"Campoformido\",1191 => \"Campofranco\",1192 => \"Campogalliano\",1193 => \"Campolattaro\",1194 => \"Campoli Appennino\",1195 => \"Campoli del Monte Taburno\",1196 => \"Campolieto\",1197 => \"Campolongo al Torre\",1198 => \"Campolongo Maggiore\",1199 => \"Campolongo sul Brenta\",8391 => \"Campomaggiore\",1201 => \"Campomarino\",1202 => \"Campomorone\",1203 => \"Camponogara\",1204 => \"Campora\",1205 => \"Camporeale\",1206 => \"Camporgiano\",1207 => \"Camporosso\",1208 => \"Camporotondo di Fiastrone\",1209 => \"Camporotondo etneo\",1210 => \"Camposampiero\",1211 => \"Camposano\",1212 => \"Camposanto\",1213 => \"Campospinoso\",1214 => \"Campotosto\",1215 => \"Camugnano\",1216 => \"Canal San Bovo\",1217 => \"Canale\",1218 => \"Canale d'Agordo\",1219 => \"Canale Monterano\",1220 => \"Canaro\",1221 => \"Canazei\",8407 => \"Cancellara\",1223 => \"Cancello ed Arnone\",1224 => \"Canda\",1225 => \"Candela\",8468 => \"Candela casello\",1226 => \"Candelo\",1227 => \"Candia canavese\",1228 => \"Candia lomellina\",1229 => \"Candiana\",1230 => \"Candida\",1231 => \"Candidoni\",1232 => \"Candiolo\",1233 => \"Canegrate\",1234 => \"Canelli\",1235 => \"Canepina\",1236 => \"Caneva\",8562 => \"Canevare di Fanano\",1237 => \"Canevino\",1238 => \"Canicatti'\",1239 => \"Canicattini Bagni\",1240 => \"Canino\",1241 => \"Canischio\",1242 => \"Canistro\",1243 => \"Canna\",1244 => \"Cannalonga\",1245 => \"Cannara\",1246 => \"Cannero riviera\",1247 => \"Canneto pavese\",1248 => \"Canneto sull'Oglio\",8588 => \"Cannigione\",1249 => \"Cannobio\",1250 => \"Cannole\",1251 => \"Canolo\",1252 => \"Canonica d'Adda\",1253 => \"Canosa di Puglia\",1254 => \"Canosa sannita\",1255 => \"Canosio\",1256 => \"Canossa\",1257 => \"Cansano\",1258 => \"Cantagallo\",1259 => \"Cantalice\",1260 => \"Cantalupa\",1261 => \"Cantalupo in Sabina\",1262 => \"Cantalupo ligure\",1263 => \"Cantalupo nel Sannio\",1264 => \"Cantarana\",1265 => \"Cantello\",1266 => \"Canterano\",1267 => \"Cantiano\",1268 => \"Cantoira\",1269 => \"Cantu'\",1270 => \"Canzano\",1271 => \"Canzo\",1272 => \"Caorle\",1273 => \"Caorso\",1274 => \"Capaccio\",1275 => \"Capaci\",1276 => \"Capalbio\",8242 => \"Capanna Margherita\",8297 => \"Capanne di Sillano\",1277 => \"Capannoli\",1278 => \"Capannori\",1279 => \"Capena\",1280 => \"Capergnanica\",1281 => \"Capestrano\",1282 => \"Capiago Intimiano\",1283 => \"Capistrano\",1284 => \"Capistrello\",1285 => \"Capitignano\",1286 => \"Capizzi\",1287 => \"Capizzone\",8609 => \"Capo Bellavista\",8113 => \"Capo Colonna\",1288 => \"Capo d'Orlando\",1289 => \"Capo di Ponte\",8676 => \"Capo Mele\",8607 => \"Capo Palinuro\",8112 => \"Capo Rizzuto\",1290 => \"Capodimonte\",1291 => \"Capodrise\",1292 => \"Capoliveri\",1293 => \"Capolona\",1294 => \"Caponago\",1295 => \"Caporciano\",1296 => \"Caposele\",1297 => \"Capoterra\",1298 => \"Capovalle\",1299 => \"Cappadocia\",1300 => \"Cappella Cantone\",1301 => \"Cappella de' Picenardi\",1302 => \"Cappella Maggiore\",1303 => \"Cappelle sul Tavo\",1304 => \"Capracotta\",1305 => \"Capraia e Limite\",1306 => \"Capraia isola\",1307 => \"Capralba\",1308 => \"Capranica\",1309 => \"Capranica Prenestina\",1310 => \"Caprarica di Lecce\",1311 => \"Caprarola\",1312 => \"Caprauna\",1313 => \"Caprese Michelangelo\",1314 => \"Caprezzo\",1315 => \"Capri\",1316 => \"Capri Leone\",1317 => \"Capriana\",1318 => \"Capriano del Colle\",1319 => \"Capriata d'Orba\",1320 => \"Capriate San Gervasio\",1321 => \"Capriati a Volturno\",1322 => \"Caprie\",1323 => \"Capriglia irpina\",1324 => \"Capriglio\",1325 => \"Caprile\",1326 => \"Caprino bergamasco\",1327 => \"Caprino veronese\",1328 => \"Capriolo\",1329 => \"Capriva del Friuli\",1330 => \"Capua\",1331 => \"Capurso\",1332 => \"Caraffa del Bianco\",1333 => \"Caraffa di Catanzaro\",1334 => \"Caraglio\",1335 => \"Caramagna Piemonte\",1336 => \"Caramanico terme\",1337 => \"Carano\",1338 => \"Carapelle\",1339 => \"Carapelle Calvisio\",1340 => \"Carasco\",1341 => \"Carassai\",1342 => \"Carate brianza\",1343 => \"Carate Urio\",1344 => \"Caravaggio\",1345 => \"Caravate\",1346 => \"Caravino\",1347 => \"Caravonica\",1348 => \"Carbognano\",1349 => \"Carbonara al Ticino\",1350 => \"Carbonara di Nola\",1351 => \"Carbonara di Po\",1352 => \"Carbonara Scrivia\",1353 => \"Carbonate\",8374 => \"Carbone\",1355 => \"Carbonera\",1356 => \"Carbonia\",1357 => \"Carcare\",1358 => \"Carceri\",1359 => \"Carcoforo\",1360 => \"Cardano al Campo\",1361 => \"Carde'\",1362 => \"Cardedu\",1363 => \"Cardeto\",1364 => \"Cardinale\",1365 => \"Cardito\",1366 => \"Careggine\",1367 => \"Carema\",1368 => \"Carenno\",1369 => \"Carentino\",1370 => \"Careri\",1371 => \"Caresana\",1372 => \"Caresanablot\",8625 => \"Carezza al lago\",1373 => \"Carezzano\",1374 => \"Carfizzi\",1375 => \"Cargeghe\",1376 => \"Cariati\",1377 => \"Carife\",1378 => \"Carignano\",1379 => \"Carimate\",1380 => \"Carinaro\",1381 => \"Carini\",1382 => \"Carinola\",1383 => \"Carisio\",1384 => \"Carisolo\",1385 => \"Carlantino\",1386 => \"Carlazzo\",1387 => \"Carlentini\",1388 => \"Carlino\",1389 => \"Carloforte\",1390 => \"Carlopoli\",1391 => \"Carmagnola\",1392 => \"Carmiano\",1393 => \"Carmignano\",1394 => \"Carmignano di Brenta\",1395 => \"Carnago\",1396 => \"Carnate\",1397 => \"Carobbio degli Angeli\",1398 => \"Carolei\",1399 => \"Carona\",8541 => \"Carona Carisole\",1400 => \"Caronia\",1401 => \"Caronno Pertusella\",1402 => \"Caronno varesino\",8253 => \"Carosello 3000\",1403 => \"Carosino\",1404 => \"Carovigno\",1405 => \"Carovilli\",1406 => \"Carpaneto piacentino\",1407 => \"Carpanzano\",1408 => \"Carpasio\",1409 => \"Carpegna\",1410 => \"Carpenedolo\",1411 => \"Carpeneto\",1412 => \"Carpi\",1413 => \"Carpiano\",1414 => \"Carpignano salentino\",1415 => \"Carpignano Sesia\",1416 => \"Carpineti\",1417 => \"Carpineto della Nora\",1418 => \"Carpineto romano\",1419 => \"Carpineto Sinello\",1420 => \"Carpino\",1421 => \"Carpinone\",1422 => \"Carrara\",1423 => \"Carre'\",1424 => \"Carrega ligure\",1425 => \"Carro\",1426 => \"Carrodano\",1427 => \"Carrosio\",1428 => \"Carru'\",1429 => \"Carsoli\",1430 => \"Cartigliano\",1431 => \"Cartignano\",1432 => \"Cartoceto\",1433 => \"Cartosio\",1434 => \"Cartura\",1435 => \"Carugate\",1436 => \"Carugo\",1437 => \"Carunchio\",1438 => \"Carvico\",1439 => \"Carzano\",1440 => \"Casabona\",1441 => \"Casacalenda\",1442 => \"Casacanditella\",1443 => \"Casagiove\",1444 => \"Casal Cermelli\",1445 => \"Casal di Principe\",1446 => \"Casal Velino\",1447 => \"Casalanguida\",1448 => \"Casalattico\",8648 => \"Casalavera\",1449 => \"Casalbeltrame\",1450 => \"Casalbordino\",1451 => \"Casalbore\",1452 => \"Casalborgone\",1453 => \"Casalbuono\",1454 => \"Casalbuttano ed Uniti\",1455 => \"Casalciprano\",1456 => \"Casalduni\",1457 => \"Casale Corte Cerro\",1458 => \"Casale cremasco Vidolasco\",1459 => \"Casale di Scodosia\",1460 => \"Casale Litta\",1461 => \"Casale marittimo\",1462 => \"Casale monferrato\",1463 => \"Casale sul Sile\",1464 => \"Casalecchio di Reno\",1465 => \"Casaleggio Boiro\",1466 => \"Casaleggio Novara\",1467 => \"Casaleone\",1468 => \"Casaletto Ceredano\",1469 => \"Casaletto di sopra\",1470 => \"Casaletto lodigiano\",1471 => \"Casaletto Spartano\",1472 => \"Casaletto Vaprio\",1473 => \"Casalfiumanese\",1474 => \"Casalgrande\",1475 => \"Casalgrasso\",1476 => \"Casalincontrada\",1477 => \"Casalino\",1478 => \"Casalmaggiore\",1479 => \"Casalmaiocco\",1480 => \"Casalmorano\",1481 => \"Casalmoro\",1482 => \"Casalnoceto\",1483 => \"Casalnuovo di Napoli\",1484 => \"Casalnuovo Monterotaro\",1485 => \"Casaloldo\",1486 => \"Casalpusterlengo\",1487 => \"Casalromano\",1488 => \"Casalserugo\",1489 => \"Casaluce\",1490 => \"Casalvecchio di Puglia\",1491 => \"Casalvecchio siculo\",1492 => \"Casalvieri\",1493 => \"Casalvolone\",1494 => \"Casalzuigno\",1495 => \"Casamarciano\",1496 => \"Casamassima\",1497 => \"Casamicciola terme\",1498 => \"Casandrino\",1499 => \"Casanova Elvo\",1500 => \"Casanova Lerrone\",1501 => \"Casanova Lonati\",1502 => \"Casape\",1503 => \"Casapesenna\",1504 => \"Casapinta\",1505 => \"Casaprota\",1506 => \"Casapulla\",1507 => \"Casarano\",1508 => \"Casargo\",1509 => \"Casarile\",1510 => \"Casarsa della Delizia\",1511 => \"Casarza ligure\",1512 => \"Casasco\",1513 => \"Casasco d'Intelvi\",1514 => \"Casatenovo\",1515 => \"Casatisma\",1516 => \"Casavatore\",1517 => \"Casazza\",8160 => \"Cascate del Toce\",1518 => \"Cascia\",1519 => \"Casciago\",1520 => \"Casciana terme\",1521 => \"Cascina\",1522 => \"Cascinette d'Ivrea\",1523 => \"Casei Gerola\",1524 => \"Caselette\",1525 => \"Casella\",1526 => \"Caselle in Pittari\",1527 => \"Caselle Landi\",1528 => \"Caselle Lurani\",1529 => \"Caselle torinese\",1530 => \"Caserta\",1531 => \"Casier\",1532 => \"Casignana\",1533 => \"Casina\",1534 => \"Casirate d'Adda\",1535 => \"Caslino d'Erba\",1536 => \"Casnate con Bernate\",1537 => \"Casnigo\",1538 => \"Casola di Napoli\",1539 => \"Casola in lunigiana\",1540 => \"Casola valsenio\",1541 => \"Casole Bruzio\",1542 => \"Casole d'Elsa\",1543 => \"Casoli\",1544 => \"Casorate Primo\",1545 => \"Casorate Sempione\",1546 => \"Casorezzo\",1547 => \"Casoria\",1548 => \"Casorzo\",1549 => \"Casperia\",1550 => \"Caspoggio\",1551 => \"Cassacco\",1552 => \"Cassago brianza\",1553 => \"Cassano allo Ionio\",1554 => \"Cassano d'Adda\",1555 => \"Cassano delle murge\",1556 => \"Cassano irpino\",1557 => \"Cassano Magnago\",1558 => \"Cassano Spinola\",1559 => \"Cassano valcuvia\",1560 => \"Cassaro\",1561 => \"Cassiglio\",1562 => \"Cassina de' Pecchi\",1563 => \"Cassina Rizzardi\",1564 => \"Cassina valsassina\",1565 => \"Cassinasco\",1566 => \"Cassine\",1567 => \"Cassinelle\",1568 => \"Cassinetta di Lugagnano\",1569 => \"Cassino\",1570 => \"Cassola\",1571 => \"Cassolnovo\",1572 => \"Castagnaro\",1573 => \"Castagneto Carducci\",1574 => \"Castagneto po\",1575 => \"Castagnito\",1576 => \"Castagnole delle Lanze\",1577 => \"Castagnole monferrato\",1578 => \"Castagnole Piemonte\",1579 => \"Castana\",1580 => \"Castano Primo\",1581 => \"Casteggio\",1582 => \"Castegnato\",1583 => \"Castegnero\",1584 => \"Castel Baronia\",1585 => \"Castel Boglione\",1586 => \"Castel bolognese\",1587 => \"Castel Campagnano\",1588 => \"Castel Castagna\",1589 => \"Castel Colonna\",1590 => \"Castel Condino\",1591 => \"Castel d'Aiano\",1592 => \"Castel d'Ario\",1593 => \"Castel d'Azzano\",1594 => \"Castel del Giudice\",1595 => \"Castel del monte\",1596 => \"Castel del piano\",1597 => \"Castel del rio\",1598 => \"Castel di Casio\",1599 => \"Castel di Ieri\",1600 => \"Castel di Iudica\",1601 => \"Castel di Lama\",1602 => \"Castel di Lucio\",1603 => \"Castel di Sangro\",1604 => \"Castel di Sasso\",1605 => \"Castel di Tora\",1606 => \"Castel Focognano\",1607 => \"Castel frentano\",1608 => \"Castel Gabbiano\",1609 => \"Castel Gandolfo\",1610 => \"Castel Giorgio\",1611 => \"Castel Goffredo\",1612 => \"Castel Guelfo di Bologna\",1613 => \"Castel Madama\",1614 => \"Castel Maggiore\",1615 => \"Castel Mella\",1616 => \"Castel Morrone\",1617 => \"Castel Ritaldi\",1618 => \"Castel Rocchero\",1619 => \"Castel Rozzone\",1620 => \"Castel San Giorgio\",1621 => \"Castel San Giovanni\",1622 => \"Castel San Lorenzo\",1623 => \"Castel San Niccolo'\",1624 => \"Castel San Pietro romano\",1625 => \"Castel San Pietro terme\",1626 => \"Castel San Vincenzo\",1627 => \"Castel Sant'Angelo\",1628 => \"Castel Sant'Elia\",1629 => \"Castel Viscardo\",1630 => \"Castel Vittorio\",1631 => \"Castel volturno\",1632 => \"Castelbaldo\",1633 => \"Castelbelforte\",1634 => \"Castelbellino\",1635 => \"Castelbello Ciardes\",1636 => \"Castelbianco\",1637 => \"Castelbottaccio\",1638 => \"Castelbuono\",1639 => \"Castelcivita\",1640 => \"Castelcovati\",1641 => \"Castelcucco\",1642 => \"Casteldaccia\",1643 => \"Casteldelci\",1644 => \"Casteldelfino\",1645 => \"Casteldidone\",1646 => \"Castelfidardo\",1647 => \"Castelfiorentino\",1648 => \"Castelfondo\",1649 => \"Castelforte\",1650 => \"Castelfranci\",1651 => \"Castelfranco di sopra\",1652 => \"Castelfranco di sotto\",1653 => \"Castelfranco Emilia\",1654 => \"Castelfranco in Miscano\",1655 => \"Castelfranco Veneto\",1656 => \"Castelgomberto\",8385 => \"Castelgrande\",1658 => \"Castelguglielmo\",1659 => \"Castelguidone\",1660 => \"Castell'alfero\",1661 => \"Castell'arquato\",1662 => \"Castell'azzara\",1663 => \"Castell'umberto\",1664 => \"Castellabate\",1665 => \"Castellafiume\",1666 => \"Castellalto\",1667 => \"Castellammare del Golfo\",1668 => \"Castellammare di Stabia\",1669 => \"Castellamonte\",1670 => \"Castellana Grotte\",1671 => \"Castellana sicula\",1672 => \"Castellaneta\",1673 => \"Castellania\",1674 => \"Castellanza\",1675 => \"Castellar\",1676 => \"Castellar Guidobono\",1677 => \"Castellarano\",1678 => \"Castellaro\",1679 => \"Castellazzo Bormida\",1680 => \"Castellazzo novarese\",1681 => \"Castelleone\",1682 => \"Castelleone di Suasa\",1683 => \"Castellero\",1684 => \"Castelletto Cervo\",1685 => \"Castelletto d'Erro\",1686 => \"Castelletto d'Orba\",1687 => \"Castelletto di Branduzzo\",1688 => \"Castelletto Merli\",1689 => \"Castelletto Molina\",1690 => \"Castelletto monferrato\",1691 => \"Castelletto sopra Ticino\",1692 => \"Castelletto Stura\",1693 => \"Castelletto Uzzone\",1694 => \"Castelli\",1695 => \"Castelli Calepio\",1696 => \"Castellina in chianti\",1697 => \"Castellina marittima\",1698 => \"Castellinaldo\",1699 => \"Castellino del Biferno\",1700 => \"Castellino Tanaro\",1701 => \"Castelliri\",1702 => \"Castello Cabiaglio\",1703 => \"Castello d'Agogna\",1704 => \"Castello d'Argile\",1705 => \"Castello del matese\",1706 => \"Castello dell'Acqua\",1707 => \"Castello di Annone\",1708 => \"Castello di brianza\",1709 => \"Castello di Cisterna\",1710 => \"Castello di Godego\",1711 => \"Castello di Serravalle\",1712 => \"Castello Lavazzo\",1714 => \"Castello Molina di Fiemme\",1713 => \"Castello tesino\",1715 => \"Castellucchio\",8219 => \"Castelluccio\",1716 => \"Castelluccio dei Sauri\",8395 => \"Castelluccio inferiore\",8359 => \"Castelluccio superiore\",1719 => \"Castelluccio valmaggiore\",8452 => \"Castelmadama casello\",1720 => \"Castelmagno\",1721 => \"Castelmarte\",1722 => \"Castelmassa\",1723 => \"Castelmauro\",8363 => \"Castelmezzano\",1725 => \"Castelmola\",1726 => \"Castelnovetto\",1727 => \"Castelnovo Bariano\",1728 => \"Castelnovo del Friuli\",1729 => \"Castelnovo di sotto\",8124 => \"Castelnovo ne' Monti\",1731 => \"Castelnuovo\",1732 => \"Castelnuovo Belbo\",1733 => \"Castelnuovo Berardenga\",1734 => \"Castelnuovo bocca d'Adda\",1735 => \"Castelnuovo Bormida\",1736 => \"Castelnuovo Bozzente\",1737 => \"Castelnuovo Calcea\",1738 => \"Castelnuovo cilento\",1739 => \"Castelnuovo del Garda\",1740 => \"Castelnuovo della daunia\",1741 => \"Castelnuovo di Ceva\",1742 => \"Castelnuovo di Conza\",1743 => \"Castelnuovo di Farfa\",1744 => \"Castelnuovo di Garfagnana\",1745 => \"Castelnuovo di Porto\",1746 => \"Castelnuovo di val di Cecina\",1747 => \"Castelnuovo Don Bosco\",1748 => \"Castelnuovo Magra\",1749 => \"Castelnuovo Nigra\",1750 => \"Castelnuovo Parano\",1751 => \"Castelnuovo Rangone\",1752 => \"Castelnuovo Scrivia\",1753 => \"Castelpagano\",1754 => \"Castelpetroso\",1755 => \"Castelpizzuto\",1756 => \"Castelplanio\",1757 => \"Castelpoto\",1758 => \"Castelraimondo\",1759 => \"Castelrotto\",1760 => \"Castelsantangelo sul Nera\",8378 => \"Castelsaraceno\",1762 => \"Castelsardo\",1763 => \"Castelseprio\",1764 => \"Castelsilano\",1765 => \"Castelspina\",1766 => \"Casteltermini\",1767 => \"Castelveccana\",1768 => \"Castelvecchio Calvisio\",1769 => \"Castelvecchio di Rocca Barbena\",1770 => \"Castelvecchio Subequo\",1771 => \"Castelvenere\",1772 => \"Castelverde\",1773 => \"Castelverrino\",1774 => \"Castelvetere in val fortore\",1775 => \"Castelvetere sul Calore\",1776 => \"Castelvetrano\",1777 => \"Castelvetro di Modena\",1778 => \"Castelvetro piacentino\",1779 => \"Castelvisconti\",1780 => \"Castenaso\",1781 => \"Castenedolo\",1782 => \"Castiadas\",1783 => \"Castiglion Fibocchi\",1784 => \"Castiglion fiorentino\",8193 => \"Castiglioncello\",1785 => \"Castiglione a Casauria\",1786 => \"Castiglione chiavarese\",1787 => \"Castiglione cosentino\",1788 => \"Castiglione d'Adda\",1789 => \"Castiglione d'Intelvi\",1790 => \"Castiglione d'Orcia\",1791 => \"Castiglione dei Pepoli\",1792 => \"Castiglione del Genovesi\",1793 => \"Castiglione del Lago\",1794 => \"Castiglione della Pescaia\",1795 => \"Castiglione delle Stiviere\",1796 => \"Castiglione di garfagnana\",1797 => \"Castiglione di Sicilia\",1798 => \"Castiglione Falletto\",1799 => \"Castiglione in teverina\",1800 => \"Castiglione Messer Marino\",1801 => \"Castiglione Messer Raimondo\",1802 => \"Castiglione Olona\",1803 => \"Castiglione Tinella\",1804 => \"Castiglione torinese\",1805 => \"Castignano\",1806 => \"Castilenti\",1807 => \"Castino\",1808 => \"Castione Andevenno\",1809 => \"Castione della Presolana\",1810 => \"Castions di Strada\",1811 => \"Castiraga Vidardo\",1812 => \"Casto\",1813 => \"Castorano\",8723 => \"Castore\",1814 => \"Castrezzato\",1815 => \"Castri di Lecce\",1816 => \"Castrignano de' Greci\",1817 => \"Castrignano del Capo\",1818 => \"Castro\",1819 => \"Castro\",1820 => \"Castro dei Volsci\",8167 => \"Castro Marina\",1821 => \"Castrocaro terme e terra del Sole\",1822 => \"Castrocielo\",1823 => \"Castrofilippo\",1824 => \"Castrolibero\",1825 => \"Castronno\",1826 => \"Castronuovo di Sant'Andrea\",1827 => \"Castronuovo di Sicilia\",1828 => \"Castropignano\",1829 => \"Castroreale\",1830 => \"Castroregio\",1831 => \"Castrovillari\",1832 => \"Catania\",8273 => \"Catania Fontanarossa\",1833 => \"Catanzaro\",1834 => \"Catenanuova\",1835 => \"Catignano\",8281 => \"Catinaccio\",1836 => \"Cattolica\",1837 => \"Cattolica Eraclea\",1838 => \"Caulonia\",8673 => \"Caulonia Marina\",1839 => \"Cautano\",1840 => \"Cava de' Tirreni\",1841 => \"Cava manara\",1842 => \"Cavacurta\",1843 => \"Cavaglia'\",1844 => \"Cavaglietto\",1845 => \"Cavaglio d'Agogna\",1846 => \"Cavaglio Spoccia\",1847 => \"Cavagnolo\",1848 => \"Cavaion veronese\",1849 => \"Cavalese\",1850 => \"Cavallasca\",1851 => \"Cavallerleone\",1852 => \"Cavallermaggiore\",1853 => \"Cavallino\",8657 => \"Cavallino\",1854 => \"Cavallino treporti\",1855 => \"Cavallirio\",1856 => \"Cavareno\",1857 => \"Cavargna\",1858 => \"Cavaria con Premezzo\",1859 => \"Cavarzere\",1860 => \"Cavaso del Tomba\",1861 => \"Cavasso nuovo\",1862 => \"Cavatore\",1863 => \"Cavazzo carnico\",1864 => \"Cave\",1865 => \"Cavedago\",1866 => \"Cavedine\",1867 => \"Cavenago d'Adda\",1868 => \"Cavenago di brianza\",1869 => \"Cavernago\",1870 => \"Cavezzo\",1871 => \"Cavizzana\",1872 => \"Cavour\",1873 => \"Cavriago\",1874 => \"Cavriana\",1875 => \"Cavriglia\",1876 => \"Cazzago Brabbia\",1877 => \"Cazzago San Martino\",1878 => \"Cazzano di Tramigna\",1879 => \"Cazzano Sant'Andrea\",1880 => \"Ceccano\",1881 => \"Cecima\",1882 => \"Cecina\",1883 => \"Cedegolo\",1884 => \"Cedrasco\",1885 => \"Cefala' Diana\",1886 => \"Cefalu'\",1887 => \"Ceggia\",1888 => \"Ceglie Messapica\",1889 => \"Celano\",1890 => \"Celenza sul Trigno\",1891 => \"Celenza valfortore\",1892 => \"Celico\",1893 => \"Cella dati\",1894 => \"Cella monte\",1895 => \"Cellamare\",1896 => \"Cellara\",1897 => \"Cellarengo\",1898 => \"Cellatica\",1899 => \"Celle di Bulgheria\",1900 => \"Celle di Macra\",1901 => \"Celle di San Vito\",1902 => \"Celle Enomondo\",1903 => \"Celle ligure\",1904 => \"Celleno\",1905 => \"Cellere\",1906 => \"Cellino Attanasio\",1907 => \"Cellino San Marco\",1908 => \"Cellio\",1909 => \"Cellole\",1910 => \"Cembra\",1911 => \"Cenadi\",1912 => \"Cenate sopra\",1913 => \"Cenate sotto\",1914 => \"Cencenighe Agordino\",1915 => \"Cene\",1916 => \"Ceneselli\",1917 => \"Cengio\",1918 => \"Centa San Nicolo'\",1919 => \"Centallo\",1920 => \"Cento\",1921 => \"Centola\",1922 => \"Centrache\",1923 => \"Centuripe\",1924 => \"Cepagatti\",1925 => \"Ceppaloni\",1926 => \"Ceppo Morelli\",1927 => \"Ceprano\",1928 => \"Cerami\",1929 => \"Ceranesi\",1930 => \"Cerano\",1931 => \"Cerano d'intelvi\",1932 => \"Ceranova\",1933 => \"Ceraso\",1934 => \"Cercemaggiore\",1935 => \"Cercenasco\",1936 => \"Cercepiccola\",1937 => \"Cerchiara di Calabria\",1938 => \"Cerchio\",1939 => \"Cercino\",1940 => \"Cercivento\",1941 => \"Cercola\",1942 => \"Cerda\",1943 => \"Cerea\",1944 => \"Ceregnano\",1945 => \"Cerenzia\",1946 => \"Ceres\",1947 => \"Ceresara\",1948 => \"Cereseto\",1949 => \"Ceresole Alba\",1950 => \"Ceresole reale\",1951 => \"Cerete\",1952 => \"Ceretto lomellina\",1953 => \"Cergnago\",1954 => \"Ceriale\",1955 => \"Ceriana\",1956 => \"Ceriano Laghetto\",1957 => \"Cerignale\",1958 => \"Cerignola\",1959 => \"Cerisano\",1960 => \"Cermenate\",1961 => \"Cermes\",1962 => \"Cermignano\",1963 => \"Cernobbio\",1964 => \"Cernusco lombardone\",1965 => \"Cernusco sul Naviglio\",1966 => \"Cerreto Castello\",1967 => \"Cerreto d'Asti\",1968 => \"Cerreto d'Esi\",1969 => \"Cerreto di Spoleto\",1970 => \"Cerreto Grue\",1971 => \"Cerreto Guidi\",1972 => \"Cerreto langhe\",1973 => \"Cerreto laziale\",1974 => \"Cerreto sannita\",1975 => \"Cerrina monferrato\",1976 => \"Cerrione\",1977 => \"Cerro al Lambro\",1978 => \"Cerro al Volturno\",1979 => \"Cerro maggiore\",1980 => \"Cerro Tanaro\",1981 => \"Cerro veronese\",8396 => \"Cersosimo\",1983 => \"Certaldo\",1984 => \"Certosa di Pavia\",1985 => \"Cerva\",1986 => \"Cervara di Roma\",1987 => \"Cervarese Santa Croce\",1988 => \"Cervaro\",1989 => \"Cervasca\",1990 => \"Cervatto\",1991 => \"Cerveno\",1992 => \"Cervere\",1993 => \"Cervesina\",1994 => \"Cerveteri\",1995 => \"Cervia\",1996 => \"Cervicati\",1997 => \"Cervignano d'Adda\",1998 => \"Cervignano del Friuli\",1999 => \"Cervinara\",2000 => \"Cervino\",2001 => \"Cervo\",2002 => \"Cerzeto\",2003 => \"Cesa\",2004 => \"Cesana brianza\",2005 => \"Cesana torinese\",2006 => \"Cesano Boscone\",2007 => \"Cesano Maderno\",2008 => \"Cesara\",2009 => \"Cesaro'\",2010 => \"Cesate\",2011 => \"Cesena\",2012 => \"Cesenatico\",2013 => \"Cesinali\",2014 => \"Cesio\",2015 => \"Cesiomaggiore\",2016 => \"Cessalto\",2017 => \"Cessaniti\",2018 => \"Cessapalombo\",2019 => \"Cessole\",2020 => \"Cetara\",2021 => \"Ceto\",2022 => \"Cetona\",2023 => \"Cetraro\",2024 => \"Ceva\",8721 => \"Cevedale\",2025 => \"Cevo\",2026 => \"Challand Saint Anselme\",2027 => \"Challand Saint Victor\",2028 => \"Chambave\",2029 => \"Chamois\",8255 => \"Chamole`\",2030 => \"Champdepraz\",8225 => \"Champoluc\",2031 => \"Champorcher\",8331 => \"Champorcher Cimetta Rossa\",8330 => \"Champorcher Laris\",2032 => \"Charvensod\",2033 => \"Chatillon\",2034 => \"Cherasco\",2035 => \"Cheremule\",8668 => \"Chesal\",2036 => \"Chialamberto\",2037 => \"Chiampo\",2038 => \"Chianche\",2039 => \"Chianciano terme\",2040 => \"Chianni\",2041 => \"Chianocco\",2042 => \"Chiaramonte Gulfi\",2043 => \"Chiaramonti\",2044 => \"Chiarano\",2045 => \"Chiaravalle\",2046 => \"Chiaravalle centrale\",8151 => \"Chiareggio\",2047 => \"Chiari\",2048 => \"Chiaromonte\",8432 => \"Chiasso\",2049 => \"Chiauci\",2050 => \"Chiavari\",2051 => \"Chiavenna\",2052 => \"Chiaverano\",2053 => \"Chienes\",2054 => \"Chieri\",2055 => \"Chies d'Alpago\",2056 => \"Chiesa in valmalenco\",2057 => \"Chiesanuova\",2058 => \"Chiesina uzzanese\",2059 => \"Chieti\",8319 => \"Chieti Scalo\",2060 => \"Chieuti\",2061 => \"Chieve\",2062 => \"Chignolo d'Isola\",2063 => \"Chignolo Po\",2064 => \"Chioggia\",2065 => \"Chiomonte\",2066 => \"Chions\",2067 => \"Chiopris Viscone\",2068 => \"Chitignano\",2069 => \"Chiuduno\",2070 => \"Chiuppano\",2071 => \"Chiuro\",2072 => \"Chiusa\",2073 => \"Chiusa di Pesio\",2074 => \"Chiusa di San Michele\",2075 => \"Chiusa Sclafani\",2076 => \"Chiusaforte\",2077 => \"Chiusanico\",2078 => \"Chiusano d'Asti\",2079 => \"Chiusano di San Domenico\",2080 => \"Chiusavecchia\",2081 => \"Chiusdino\",2082 => \"Chiusi\",2083 => \"Chiusi della Verna\",2084 => \"Chivasso\",8515 => \"Ciampac Alba\",2085 => \"Ciampino\",2086 => \"Cianciana\",2087 => \"Cibiana di cadore\",2088 => \"Cicagna\",2089 => \"Cicala\",2090 => \"Cicciano\",2091 => \"Cicerale\",2092 => \"Ciciliano\",2093 => \"Cicognolo\",2094 => \"Ciconio\",2095 => \"Cigliano\",2096 => \"Ciglie'\",2097 => \"Cigognola\",2098 => \"Cigole\",2099 => \"Cilavegna\",8340 => \"Cima Durand\",8590 => \"Cima Pisciadu'\",8764 => \"Cima Plose\",8703 => \"Cima Portavescovo\",8282 => \"Cima Sole\",2100 => \"Cimadolmo\",2101 => \"Cimbergo\",8332 => \"Cime Bianche\",2102 => \"Cimego\",2103 => \"Cimina'\",2104 => \"Ciminna\",2105 => \"Cimitile\",2106 => \"Cimolais\",8433 => \"Cimoncino\",2107 => \"Cimone\",2108 => \"Cinaglio\",2109 => \"Cineto romano\",2110 => \"Cingia de' Botti\",2111 => \"Cingoli\",2112 => \"Cinigiano\",2113 => \"Cinisello Balsamo\",2114 => \"Cinisi\",2115 => \"Cino\",2116 => \"Cinquefrondi\",2117 => \"Cintano\",2118 => \"Cinte tesino\",2119 => \"Cinto Caomaggiore\",2120 => \"Cinto Euganeo\",2121 => \"Cinzano\",2122 => \"Ciorlano\",2123 => \"Cipressa\",2124 => \"Circello\",2125 => \"Cirie'\",2126 => \"Cirigliano\",2127 => \"Cirimido\",2128 => \"Ciro'\",2129 => \"Ciro' marina\",2130 => \"Cis\",2131 => \"Cisano bergamasco\",2132 => \"Cisano sul Neva\",2133 => \"Ciserano\",2134 => \"Cislago\",2135 => \"Cisliano\",2136 => \"Cismon del Grappa\",2137 => \"Cison di valmarino\",2138 => \"Cissone\",2139 => \"Cisterna d'Asti\",2140 => \"Cisterna di Latina\",2141 => \"Cisternino\",2142 => \"Citerna\",8142 => \"Città del Vaticano\",2143 => \"Citta' della Pieve\",2144 => \"Citta' di Castello\",2145 => \"Citta' Sant'Angelo\",2146 => \"Cittadella\",2147 => \"Cittaducale\",2148 => \"Cittanova\",2149 => \"Cittareale\",2150 => \"Cittiglio\",2151 => \"Civate\",2152 => \"Civenna\",2153 => \"Civezza\",2154 => \"Civezzano\",2155 => \"Civiasco\",2156 => \"Cividale del Friuli\",2157 => \"Cividate al piano\",2158 => \"Cividate camuno\",2159 => \"Civita\",2160 => \"Civita Castellana\",2161 => \"Civita d'Antino\",2162 => \"Civitacampomarano\",2163 => \"Civitaluparella\",2164 => \"Civitanova del sannio\",2165 => \"Civitanova Marche\",8356 => \"Civitaquana\",2167 => \"Civitavecchia\",2168 => \"Civitella Alfedena\",2169 => \"Civitella Casanova\",2170 => \"Civitella d'Agliano\",2171 => \"Civitella del Tronto\",2172 => \"Civitella di Romagna\",2173 => \"Civitella in val di Chiana\",2174 => \"Civitella Messer Raimondo\",2175 => \"Civitella Paganico\",2176 => \"Civitella Roveto\",2177 => \"Civitella San Paolo\",2178 => \"Civo\",2179 => \"Claino con osteno\",2180 => \"Claut\",2181 => \"Clauzetto\",2182 => \"Clavesana\",2183 => \"Claviere\",2184 => \"Cles\",2185 => \"Cleto\",2186 => \"Clivio\",2187 => \"Cloz\",2188 => \"Clusone\",2189 => \"Coassolo torinese\",2190 => \"Coazze\",2191 => \"Coazzolo\",2192 => \"Coccaglio\",2193 => \"Cocconato\",2194 => \"Cocquio Trevisago\",2195 => \"Cocullo\",2196 => \"Codevigo\",2197 => \"Codevilla\",2198 => \"Codigoro\",2199 => \"Codogne'\",2200 => \"Codogno\",2201 => \"Codroipo\",2202 => \"Codrongianos\",2203 => \"Coggiola\",2204 => \"Cogliate\",2205 => \"Cogne\",8654 => \"Cogne Lillaz\",2206 => \"Cogoleto\",2207 => \"Cogollo del Cengio\",5049 => \"Cogolo\",2208 => \"Cogorno\",8354 => \"Col de Joux\",8604 => \"Col Indes\",2209 => \"Colazza\",2210 => \"Colbordolo\",2211 => \"Colere\",2212 => \"Colfelice\",8217 => \"Colfiorito\",8761 => \"Colfosco\",2213 => \"Coli\",2214 => \"Colico\",2215 => \"Collagna\",2216 => \"Collalto sabino\",2217 => \"Collarmele\",2218 => \"Collazzone\",8249 => \"Colle Bettaforca\",2219 => \"Colle Brianza\",2220 => \"Colle d'Anchise\",8687 => \"Colle del Gran San Bernardo\",8688 => \"Colle del Moncenisio\",8686 => \"Colle del Piccolo San Bernardo\",8481 => \"Colle del Prel\",2221 => \"Colle di Tora\",2222 => \"Colle di val d'Elsa\",2223 => \"Colle San Magno\",2224 => \"Colle sannita\",2225 => \"Colle Santa Lucia\",8246 => \"Colle Sarezza\",2226 => \"Colle Umberto\",2227 => \"Collebeato\",2228 => \"Collecchio\",2229 => \"Collecorvino\",2230 => \"Colledara\",8453 => \"Colledara casello\",2231 => \"Colledimacine\",2232 => \"Colledimezzo\",2233 => \"Colleferro\",2234 => \"Collegiove\",2235 => \"Collegno\",2236 => \"Collelongo\",2237 => \"Collepardo\",2238 => \"Collepasso\",2239 => \"Collepietro\",2240 => \"Colleretto castelnuovo\",2241 => \"Colleretto Giacosa\",2242 => \"Collesalvetti\",2243 => \"Collesano\",2244 => \"Colletorto\",2245 => \"Collevecchio\",2246 => \"Colli a volturno\",2247 => \"Colli del Tronto\",2248 => \"Colli sul Velino\",2249 => \"Colliano\",2250 => \"Collinas\",2251 => \"Collio\",2252 => \"Collobiano\",2253 => \"Colloredo di monte Albano\",2254 => \"Colmurano\",2255 => \"Colobraro\",2256 => \"Cologna veneta\",2257 => \"Cologne\",2258 => \"Cologno al Serio\",2259 => \"Cologno monzese\",2260 => \"Colognola ai Colli\",2261 => \"Colonna\",2262 => \"Colonnella\",2263 => \"Colonno\",2264 => \"Colorina\",2265 => \"Colorno\",2266 => \"Colosimi\",2267 => \"Colturano\",2268 => \"Colzate\",2269 => \"Comabbio\",2270 => \"Comacchio\",2271 => \"Comano\",2272 => \"Comazzo\",2273 => \"Comeglians\",2274 => \"Comelico superiore\",2275 => \"Comerio\",2276 => \"Comezzano Cizzago\",2277 => \"Comignago\",2278 => \"Comiso\",2279 => \"Comitini\",2280 => \"Comiziano\",2281 => \"Commessaggio\",2282 => \"Commezzadura\",2283 => \"Como\",2284 => \"Compiano\",8711 => \"Comprensorio Cimone\",2285 => \"Comun nuovo\",2286 => \"Comunanza\",2287 => \"Cona\",2288 => \"Conca Casale\",2289 => \"Conca dei Marini\",2290 => \"Conca della Campania\",2291 => \"Concamarise\",2292 => \"Concei\",2293 => \"Concerviano\",2294 => \"Concesio\",2295 => \"Conco\",2296 => \"Concordia Sagittaria\",2297 => \"Concordia sulla Secchia\",2298 => \"Concorezzo\",2299 => \"Condino\",2300 => \"Condofuri\",8689 => \"Condofuri Marina\",2301 => \"Condove\",2302 => \"Condro'\",2303 => \"Conegliano\",2304 => \"Confienza\",2305 => \"Configni\",2306 => \"Conflenti\",2307 => \"Coniolo\",2308 => \"Conselice\",2309 => \"Conselve\",2310 => \"Consiglio di Rumo\",2311 => \"Contessa Entellina\",2312 => \"Contigliano\",2313 => \"Contrada\",2314 => \"Controguerra\",2315 => \"Controne\",2316 => \"Contursi terme\",2317 => \"Conversano\",2318 => \"Conza della Campania\",2319 => \"Conzano\",2320 => \"Copertino\",2321 => \"Copiano\",2322 => \"Copparo\",2323 => \"Corana\",2324 => \"Corato\",2325 => \"Corbara\",2326 => \"Corbetta\",2327 => \"Corbola\",2328 => \"Corchiano\",2329 => \"Corciano\",2330 => \"Cordenons\",2331 => \"Cordignano\",2332 => \"Cordovado\",2333 => \"Coredo\",2334 => \"Coreglia Antelminelli\",2335 => \"Coreglia ligure\",2336 => \"Coreno Ausonio\",2337 => \"Corfinio\",2338 => \"Cori\",2339 => \"Coriano\",2340 => \"Corigliano calabro\",8110 => \"Corigliano Calabro Marina\",2341 => \"Corigliano d'Otranto\",2342 => \"Corinaldo\",2343 => \"Corio\",2344 => \"Corleone\",2345 => \"Corleto monforte\",2346 => \"Corleto Perticara\",2347 => \"Cormano\",2348 => \"Cormons\",2349 => \"Corna imagna\",2350 => \"Cornalba\",2351 => \"Cornale\",2352 => \"Cornaredo\",2353 => \"Cornate d'Adda\",2354 => \"Cornedo all'Isarco\",2355 => \"Cornedo vicentino\",2356 => \"Cornegliano laudense\",2357 => \"Corneliano d'Alba\",2358 => \"Corniglio\",8537 => \"Corno alle Scale\",8353 => \"Corno del Renon\",2359 => \"Corno di Rosazzo\",2360 => \"Corno Giovine\",2361 => \"Cornovecchio\",2362 => \"Cornuda\",2363 => \"Correggio\",2364 => \"Correzzana\",2365 => \"Correzzola\",2366 => \"Corrido\",2367 => \"Corridonia\",2368 => \"Corropoli\",2369 => \"Corsano\",2370 => \"Corsico\",2371 => \"Corsione\",2372 => \"Cortaccia sulla strada del vino\",2373 => \"Cortale\",2374 => \"Cortandone\",2375 => \"Cortanze\",2376 => \"Cortazzone\",2377 => \"Corte brugnatella\",2378 => \"Corte de' Cortesi con Cignone\",2379 => \"Corte de' Frati\",2380 => \"Corte Franca\",2381 => \"Corte Palasio\",2382 => \"Cortemaggiore\",2383 => \"Cortemilia\",2384 => \"Corteno Golgi\",2385 => \"Cortenova\",2386 => \"Cortenuova\",2387 => \"Corteolona\",2388 => \"Cortiglione\",2389 => \"Cortina d'Ampezzo\",2390 => \"Cortina sulla strada del vino\",2391 => \"Cortino\",2392 => \"Cortona\",2393 => \"Corvara\",2394 => \"Corvara in Badia\",2395 => \"Corvino san Quirico\",2396 => \"Corzano\",2397 => \"Coseano\",2398 => \"Cosenza\",2399 => \"Cosio di Arroscia\",2400 => \"Cosio valtellino\",2401 => \"Cosoleto\",2402 => \"Cossano belbo\",2403 => \"Cossano canavese\",2404 => \"Cossato\",2405 => \"Cosseria\",2406 => \"Cossignano\",2407 => \"Cossogno\",2408 => \"Cossoine\",2409 => \"Cossombrato\",2410 => \"Costa de' Nobili\",2411 => \"Costa di Mezzate\",2412 => \"Costa di Rovigo\",2413 => \"Costa di serina\",2414 => \"Costa masnaga\",8177 => \"Costa Rei\",2415 => \"Costa valle imagna\",2416 => \"Costa Vescovato\",2417 => \"Costa Volpino\",2418 => \"Costabissara\",2419 => \"Costacciaro\",2420 => \"Costanzana\",2421 => \"Costarainera\",2422 => \"Costermano\",2423 => \"Costigliole d'Asti\",2424 => \"Costigliole Saluzzo\",2425 => \"Cotignola\",2426 => \"Cotronei\",2427 => \"Cottanello\",8256 => \"Couis 2\",2428 => \"Courmayeur\",2429 => \"Covo\",2430 => \"Cozzo\",8382 => \"Craco\",2432 => \"Crandola valsassina\",2433 => \"Cravagliana\",2434 => \"Cravanzana\",2435 => \"Craveggia\",2436 => \"Creazzo\",2437 => \"Crecchio\",2438 => \"Credaro\",2439 => \"Credera Rubbiano\",2440 => \"Crema\",2441 => \"Cremella\",2442 => \"Cremenaga\",2443 => \"Cremeno\",2444 => \"Cremia\",2445 => \"Cremolino\",2446 => \"Cremona\",2447 => \"Cremosano\",2448 => \"Crescentino\",2449 => \"Crespadoro\",2450 => \"Crespano del Grappa\",2451 => \"Crespellano\",2452 => \"Crespiatica\",2453 => \"Crespina\",2454 => \"Crespino\",2455 => \"Cressa\",8247 => \"Crest\",8741 => \"Cresta Youla\",8646 => \"Crevacol\",2456 => \"Crevacuore\",2457 => \"Crevalcore\",2458 => \"Crevoladossola\",2459 => \"Crispano\",2460 => \"Crispiano\",2461 => \"Crissolo\",8355 => \"Crissolo Pian delle Regine\",2462 => \"Crocefieschi\",2463 => \"Crocetta del Montello\",2464 => \"Crodo\",2465 => \"Crognaleto\",2466 => \"Cropalati\",2467 => \"Cropani\",2468 => \"Crosa\",2469 => \"Crosia\",2470 => \"Crosio della valle\",2471 => \"Crotone\",8552 => \"Crotone Sant'Anna\",2472 => \"Crotta d'Adda\",2473 => \"Crova\",2474 => \"Croviana\",2475 => \"Crucoli\",2476 => \"Cuasso al monte\",2477 => \"Cuccaro monferrato\",2478 => \"Cuccaro Vetere\",2479 => \"Cucciago\",2480 => \"Cuceglio\",2481 => \"Cuggiono\",2482 => \"Cugliate-fabiasco\",2483 => \"Cuglieri\",2484 => \"Cugnoli\",8718 => \"Cuma\",2485 => \"Cumiana\",2486 => \"Cumignano sul Naviglio\",2487 => \"Cunardo\",2488 => \"Cuneo\",8553 => \"Cuneo Levaldigi\",2489 => \"Cunevo\",2490 => \"Cunico\",2491 => \"Cuorgne'\",2492 => \"Cupello\",2493 => \"Cupra marittima\",2494 => \"Cupramontana\",2495 => \"Cura carpignano\",2496 => \"Curcuris\",2497 => \"Cureggio\",2498 => \"Curiglia con Monteviasco\",2499 => \"Curinga\",2500 => \"Curino\",2501 => \"Curno\",2502 => \"Curon Venosta\",2503 => \"Cursi\",2504 => \"Cursolo orasso\",2505 => \"Curtarolo\",2506 => \"Curtatone\",2507 => \"Curti\",2508 => \"Cusago\",2509 => \"Cusano milanino\",2510 => \"Cusano Mutri\",2511 => \"Cusino\",2512 => \"Cusio\",2513 => \"Custonaci\",2514 => \"Cutigliano\",2515 => \"Cutro\",2516 => \"Cutrofiano\",2517 => \"Cuveglio\",2518 => \"Cuvio\",2519 => \"Daiano\",2520 => \"Dairago\",2521 => \"Dalmine\",2522 => \"Dambel\",2523 => \"Danta di cadore\",2524 => \"Daone\",2525 => \"Dare'\",2526 => \"Darfo Boario terme\",2527 => \"Dasa'\",2528 => \"Davagna\",2529 => \"Daverio\",2530 => \"Davoli\",2531 => \"Dazio\",2532 => \"Decimomannu\",2533 => \"Decimoputzu\",2534 => \"Decollatura\",2535 => \"Dego\",2536 => \"Deiva marina\",2537 => \"Delebio\",2538 => \"Delia\",2539 => \"Delianuova\",2540 => \"Deliceto\",2541 => \"Dello\",2542 => \"Demonte\",2543 => \"Denice\",2544 => \"Denno\",2545 => \"Dernice\",2546 => \"Derovere\",2547 => \"Deruta\",2548 => \"Dervio\",2549 => \"Desana\",2550 => \"Desenzano del Garda\",2551 => \"Desio\",2552 => \"Desulo\",2553 => \"Diamante\",2554 => \"Diano arentino\",2555 => \"Diano castello\",2556 => \"Diano d'Alba\",2557 => \"Diano marina\",2558 => \"Diano San Pietro\",2559 => \"Dicomano\",2560 => \"Dignano\",2561 => \"Dimaro\",2562 => \"Dinami\",2563 => \"Dipignano\",2564 => \"Diso\",2565 => \"Divignano\",2566 => \"Dizzasco\",2567 => \"Dobbiaco\",2568 => \"Doberdo' del lago\",8628 => \"Doganaccia\",2569 => \"Dogliani\",2570 => \"Dogliola\",2571 => \"Dogna\",2572 => \"Dolce'\",2573 => \"Dolceacqua\",2574 => \"Dolcedo\",2575 => \"Dolegna del collio\",2576 => \"Dolianova\",2577 => \"Dolo\",8616 => \"Dolonne\",2578 => \"Dolzago\",2579 => \"Domanico\",2580 => \"Domaso\",2581 => \"Domegge di cadore\",2582 => \"Domicella\",2583 => \"Domodossola\",2584 => \"Domus de Maria\",2585 => \"Domusnovas\",2586 => \"Don\",2587 => \"Donato\",2588 => \"Dongo\",2589 => \"Donnas\",2590 => \"Donori'\",2591 => \"Dorgali\",2592 => \"Dorio\",2593 => \"Dormelletto\",2594 => \"Dorno\",2595 => \"Dorsino\",2596 => \"Dorzano\",2597 => \"Dosolo\",2598 => \"Dossena\",2599 => \"Dosso del liro\",8323 => \"Dosso Pasò\",2600 => \"Doues\",2601 => \"Dovadola\",2602 => \"Dovera\",2603 => \"Dozza\",2604 => \"Dragoni\",2605 => \"Drapia\",2606 => \"Drena\",2607 => \"Drenchia\",2608 => \"Dresano\",2609 => \"Drezzo\",2610 => \"Drizzona\",2611 => \"Dro\",2612 => \"Dronero\",2613 => \"Druento\",2614 => \"Druogno\",2615 => \"Dualchi\",2616 => \"Dubino\",2617 => \"Due carrare\",2618 => \"Dueville\",2619 => \"Dugenta\",2620 => \"Duino aurisina\",2621 => \"Dumenza\",2622 => \"Duno\",2623 => \"Durazzano\",2624 => \"Duronia\",2625 => \"Dusino San Michele\",2626 => \"Eboli\",2627 => \"Edolo\",2628 => \"Egna\",2629 => \"Elice\",2630 => \"Elini\",2631 => \"Ello\",2632 => \"Elmas\",2633 => \"Elva\",2634 => \"Emarese\",2635 => \"Empoli\",2636 => \"Endine gaiano\",2637 => \"Enego\",2638 => \"Enemonzo\",2639 => \"Enna\",2640 => \"Entracque\",2641 => \"Entratico\",8222 => \"Entreves\",2642 => \"Envie\",8397 => \"Episcopia\",2644 => \"Eraclea\",2645 => \"Erba\",2646 => \"Erbe'\",2647 => \"Erbezzo\",2648 => \"Erbusco\",2649 => \"Erchie\",2650 => \"Ercolano\",8531 => \"Eremo di Camaldoli\",8606 => \"Eremo di Carpegna\",2651 => \"Erice\",2652 => \"Erli\",2653 => \"Erto e casso\",2654 => \"Erula\",2655 => \"Erve\",2656 => \"Esanatoglia\",2657 => \"Escalaplano\",2658 => \"Escolca\",2659 => \"Esine\",2660 => \"Esino lario\",2661 => \"Esperia\",2662 => \"Esporlatu\",2663 => \"Este\",2664 => \"Esterzili\",2665 => \"Etroubles\",2666 => \"Eupilio\",2667 => \"Exilles\",2668 => \"Fabbrica Curone\",2669 => \"Fabbriche di vallico\",2670 => \"Fabbrico\",2671 => \"Fabriano\",2672 => \"Fabrica di Roma\",2673 => \"Fabrizia\",2674 => \"Fabro\",8458 => \"Fabro casello\",2675 => \"Faedis\",2676 => \"Faedo\",2677 => \"Faedo valtellino\",2678 => \"Faenza\",2679 => \"Faeto\",2680 => \"Fagagna\",2681 => \"Faggeto lario\",2682 => \"Faggiano\",2683 => \"Fagnano alto\",2684 => \"Fagnano castello\",2685 => \"Fagnano olona\",2686 => \"Fai della paganella\",2687 => \"Faicchio\",2688 => \"Falcade\",2689 => \"Falciano del massico\",2690 => \"Falconara albanese\",2691 => \"Falconara marittima\",2692 => \"Falcone\",2693 => \"Faleria\",2694 => \"Falerna\",8116 => \"Falerna Marina\",2695 => \"Falerone\",2696 => \"Fallo\",2697 => \"Falmenta\",2698 => \"Faloppio\",2699 => \"Falvaterra\",2700 => \"Falzes\",2701 => \"Fanano\",2702 => \"Fanna\",2703 => \"Fano\",2704 => \"Fano adriano\",2705 => \"Fara Filiorum Petri\",2706 => \"Fara gera d'Adda\",2707 => \"Fara in sabina\",2708 => \"Fara novarese\",2709 => \"Fara Olivana con Sola\",2710 => \"Fara San Martino\",2711 => \"Fara vicentino\",8360 => \"Fardella\",2713 => \"Farigliano\",2714 => \"Farindola\",2715 => \"Farini\",2716 => \"Farnese\",2717 => \"Farra d'alpago\",2718 => \"Farra d'Isonzo\",2719 => \"Farra di soligo\",2720 => \"Fasano\",2721 => \"Fascia\",2722 => \"Fauglia\",2723 => \"Faule\",2724 => \"Favale di malvaro\",2725 => \"Favara\",2726 => \"Faver\",2727 => \"Favignana\",2728 => \"Favria\",2729 => \"Feisoglio\",2730 => \"Feletto\",2731 => \"Felino\",2732 => \"Felitto\",2733 => \"Felizzano\",2734 => \"Felonica\",2735 => \"Feltre\",2736 => \"Fenegro'\",2737 => \"Fenestrelle\",2738 => \"Fenis\",2739 => \"Ferentillo\",2740 => \"Ferentino\",2741 => \"Ferla\",2742 => \"Fermignano\",2743 => \"Fermo\",2744 => \"Ferno\",2745 => \"Feroleto Antico\",2746 => \"Feroleto della chiesa\",8370 => \"Ferrandina\",2748 => \"Ferrara\",2749 => \"Ferrara di monte Baldo\",2750 => \"Ferrazzano\",2751 => \"Ferrera di Varese\",2752 => \"Ferrera Erbognone\",2753 => \"Ferrere\",2754 => \"Ferriere\",2755 => \"Ferruzzano\",2756 => \"Fiamignano\",2757 => \"Fiano\",2758 => \"Fiano romano\",2759 => \"Fiastra\",2760 => \"Fiave'\",2761 => \"Ficarazzi\",2762 => \"Ficarolo\",2763 => \"Ficarra\",2764 => \"Ficulle\",2765 => \"Fidenza\",2766 => \"Fie' allo Sciliar\",2767 => \"Fiera di primiero\",2768 => \"Fierozzo\",2769 => \"Fiesco\",2770 => \"Fiesole\",2771 => \"Fiesse\",2772 => \"Fiesso d'Artico\",2773 => \"Fiesso Umbertiano\",2774 => \"Figino Serenza\",2775 => \"Figline valdarno\",2776 => \"Figline Vegliaturo\",2777 => \"Filacciano\",2778 => \"Filadelfia\",2779 => \"Filago\",2780 => \"Filandari\",2781 => \"Filattiera\",2782 => \"Filettino\",2783 => \"Filetto\",8392 => \"Filiano\",2785 => \"Filighera\",2786 => \"Filignano\",2787 => \"Filogaso\",2788 => \"Filottrano\",2789 => \"Finale emilia\",2790 => \"Finale ligure\",2791 => \"Fino del monte\",2792 => \"Fino Mornasco\",2793 => \"Fiorano al Serio\",2794 => \"Fiorano canavese\",2795 => \"Fiorano modenese\",2796 => \"Fiordimonte\",2797 => \"Fiorenzuola d'arda\",2798 => \"Firenze\",8270 => \"Firenze Peretola\",2799 => \"Firenzuola\",2800 => \"Firmo\",2801 => \"Fisciano\",2802 => \"Fiuggi\",2803 => \"Fiumalbo\",2804 => \"Fiumara\",8489 => \"Fiumata\",2805 => \"Fiume veneto\",2806 => \"Fiumedinisi\",2807 => \"Fiumefreddo Bruzio\",2808 => \"Fiumefreddo di Sicilia\",2809 => \"Fiumicello\",2810 => \"Fiumicino\",2811 => \"Fiuminata\",2812 => \"Fivizzano\",2813 => \"Flaibano\",2814 => \"Flavon\",2815 => \"Flero\",2816 => \"Floresta\",2817 => \"Floridia\",2818 => \"Florinas\",2819 => \"Flumeri\",2820 => \"Fluminimaggiore\",2821 => \"Flussio\",2822 => \"Fobello\",2823 => \"Foggia\",2824 => \"Foglianise\",2825 => \"Fogliano redipuglia\",2826 => \"Foglizzo\",2827 => \"Foiano della chiana\",2828 => \"Foiano di val fortore\",2829 => \"Folgaria\",8202 => \"Folgarida\",2830 => \"Folignano\",2831 => \"Foligno\",2832 => \"Follina\",2833 => \"Follo\",2834 => \"Follonica\",2835 => \"Fombio\",2836 => \"Fondachelli Fantina\",2837 => \"Fondi\",2838 => \"Fondo\",2839 => \"Fonni\",2840 => \"Fontainemore\",2841 => \"Fontana liri\",2842 => \"Fontanafredda\",2843 => \"Fontanarosa\",8185 => \"Fontane Bianche\",2844 => \"Fontanelice\",2845 => \"Fontanella\",2846 => \"Fontanellato\",2847 => \"Fontanelle\",2848 => \"Fontaneto d'Agogna\",2849 => \"Fontanetto po\",2850 => \"Fontanigorda\",2851 => \"Fontanile\",2852 => \"Fontaniva\",2853 => \"Fonte\",8643 => \"Fonte Cerreto\",2854 => \"Fonte Nuova\",2855 => \"Fontecchio\",2856 => \"Fontechiari\",2857 => \"Fontegreca\",2858 => \"Fonteno\",2859 => \"Fontevivo\",2860 => \"Fonzaso\",2861 => \"Foppolo\",8540 => \"Foppolo IV Baita\",2862 => \"Forano\",2863 => \"Force\",2864 => \"Forchia\",2865 => \"Forcola\",2866 => \"Fordongianus\",2867 => \"Forenza\",2868 => \"Foresto sparso\",2869 => \"Forgaria nel friuli\",2870 => \"Forino\",2871 => \"Forio\",8551 => \"Forlì Ridolfi\",2872 => \"Forli'\",2873 => \"Forli' del sannio\",2874 => \"Forlimpopoli\",2875 => \"Formazza\",2876 => \"Formello\",2877 => \"Formia\",2878 => \"Formicola\",2879 => \"Formigara\",2880 => \"Formigine\",2881 => \"Formigliana\",2882 => \"Formignana\",2883 => \"Fornace\",2884 => \"Fornelli\",2885 => \"Forni Avoltri\",2886 => \"Forni di sopra\",2887 => \"Forni di sotto\",8161 => \"Forno Alpi Graie\",2888 => \"Forno canavese\",2889 => \"Forno di Zoldo\",2890 => \"Fornovo di Taro\",2891 => \"Fornovo San Giovanni\",2892 => \"Forte dei marmi\",2893 => \"Fortezza\",2894 => \"Fortunago\",2895 => \"Forza d'Agro'\",2896 => \"Fosciandora\",8435 => \"Fosdinovo\",2898 => \"Fossa\",2899 => \"Fossacesia\",2900 => \"Fossalta di Piave\",2901 => \"Fossalta di Portogruaro\",2902 => \"Fossalto\",2903 => \"Fossano\",2904 => \"Fossato di vico\",2905 => \"Fossato serralta\",2906 => \"Fosso'\",2907 => \"Fossombrone\",2908 => \"Foza\",2909 => \"Frabosa soprana\",2910 => \"Frabosa sottana\",2911 => \"Fraconalto\",2912 => \"Fragagnano\",2913 => \"Fragneto l'abate\",2914 => \"Fragneto monforte\",2915 => \"Fraine\",2916 => \"Framura\",2917 => \"Francavilla al mare\",2918 => \"Francavilla angitola\",2919 => \"Francavilla bisio\",2920 => \"Francavilla d'ete\",2921 => \"Francavilla di Sicilia\",2922 => \"Francavilla fontana\",8380 => \"Francavilla in sinni\",2924 => \"Francavilla marittima\",2925 => \"Francica\",2926 => \"Francofonte\",2927 => \"Francolise\",2928 => \"Frascaro\",2929 => \"Frascarolo\",2930 => \"Frascati\",2931 => \"Frascineto\",2932 => \"Frassilongo\",2933 => \"Frassinelle polesine\",2934 => \"Frassinello monferrato\",2935 => \"Frassineto po\",2936 => \"Frassinetto\",2937 => \"Frassino\",2938 => \"Frassinoro\",2939 => \"Frasso sabino\",2940 => \"Frasso telesino\",2941 => \"Fratta polesine\",2942 => \"Fratta todina\",2943 => \"Frattamaggiore\",2944 => \"Frattaminore\",2945 => \"Fratte rosa\",2946 => \"Frazzano'\",8137 => \"Fregene\",2947 => \"Fregona\",8667 => \"Frejusia\",2948 => \"Fresagrandinaria\",2949 => \"Fresonara\",2950 => \"Frigento\",2951 => \"Frignano\",2952 => \"Frinco\",2953 => \"Frisa\",2954 => \"Frisanco\",2955 => \"Front\",8153 => \"Frontignano\",2956 => \"Frontino\",2957 => \"Frontone\",8751 => \"Frontone - Monte Catria\",2958 => \"Frosinone\",8464 => \"Frosinone casello\",2959 => \"Frosolone\",2960 => \"Frossasco\",2961 => \"Frugarolo\",2962 => \"Fubine\",2963 => \"Fucecchio\",2964 => \"Fuipiano valle imagna\",2965 => \"Fumane\",2966 => \"Fumone\",2967 => \"Funes\",2968 => \"Furci\",2969 => \"Furci siculo\",2970 => \"Furnari\",2971 => \"Furore\",2972 => \"Furtei\",2973 => \"Fuscaldo\",2974 => \"Fusignano\",2975 => \"Fusine\",8702 => \"Fusine di Zoldo\",8131 => \"Fusine in Valromana\",2976 => \"Futani\",2977 => \"Gabbioneta binanuova\",2978 => \"Gabiano\",2979 => \"Gabicce mare\",8252 => \"Gabiet\",2980 => \"Gaby\",2981 => \"Gadesco Pieve Delmona\",2982 => \"Gadoni\",2983 => \"Gaeta\",2984 => \"Gaggi\",2985 => \"Gaggiano\",2986 => \"Gaggio montano\",2987 => \"Gaglianico\",2988 => \"Gagliano aterno\",2989 => \"Gagliano castelferrato\",2990 => \"Gagliano del capo\",2991 => \"Gagliato\",2992 => \"Gagliole\",2993 => \"Gaiarine\",2994 => \"Gaiba\",2995 => \"Gaiola\",2996 => \"Gaiole in chianti\",2997 => \"Gairo\",2998 => \"Gais\",2999 => \"Galati Mamertino\",3000 => \"Galatina\",3001 => \"Galatone\",3002 => \"Galatro\",3003 => \"Galbiate\",3004 => \"Galeata\",3005 => \"Galgagnano\",3006 => \"Gallarate\",3007 => \"Gallese\",3008 => \"Galliate\",3009 => \"Galliate lombardo\",3010 => \"Galliavola\",3011 => \"Gallicano\",3012 => \"Gallicano nel Lazio\",8364 => \"Gallicchio\",3014 => \"Galliera\",3015 => \"Galliera veneta\",3016 => \"Gallinaro\",3017 => \"Gallio\",3018 => \"Gallipoli\",3019 => \"Gallo matese\",3020 => \"Gallodoro\",3021 => \"Galluccio\",8315 => \"Galluzzo\",3022 => \"Galtelli\",3023 => \"Galzignano terme\",3024 => \"Gamalero\",3025 => \"Gambara\",3026 => \"Gambarana\",8105 => \"Gambarie\",3027 => \"Gambasca\",3028 => \"Gambassi terme\",3029 => \"Gambatesa\",3030 => \"Gambellara\",3031 => \"Gamberale\",3032 => \"Gambettola\",3033 => \"Gambolo'\",3034 => \"Gambugliano\",3035 => \"Gandellino\",3036 => \"Gandino\",3037 => \"Gandosso\",3038 => \"Gangi\",8425 => \"Garaguso\",3040 => \"Garbagna\",3041 => \"Garbagna novarese\",3042 => \"Garbagnate milanese\",3043 => \"Garbagnate monastero\",3044 => \"Garda\",3045 => \"Gardone riviera\",3046 => \"Gardone val trompia\",3047 => \"Garessio\",8349 => \"Garessio 2000\",3048 => \"Gargallo\",3049 => \"Gargazzone\",3050 => \"Gargnano\",3051 => \"Garlasco\",3052 => \"Garlate\",3053 => \"Garlenda\",3054 => \"Garniga\",3055 => \"Garzeno\",3056 => \"Garzigliana\",3057 => \"Gasperina\",3058 => \"Gassino torinese\",3059 => \"Gattatico\",3060 => \"Gatteo\",3061 => \"Gattico\",3062 => \"Gattinara\",3063 => \"Gavardo\",3064 => \"Gavazzana\",3065 => \"Gavello\",3066 => \"Gaverina terme\",3067 => \"Gavi\",3068 => \"Gavignano\",3069 => \"Gavirate\",3070 => \"Gavoi\",3071 => \"Gavorrano\",3072 => \"Gazoldo degli ippoliti\",3073 => \"Gazzada schianno\",3074 => \"Gazzaniga\",3075 => \"Gazzo\",3076 => \"Gazzo veronese\",3077 => \"Gazzola\",3078 => \"Gazzuolo\",3079 => \"Gela\",3080 => \"Gemmano\",3081 => \"Gemona del friuli\",3082 => \"Gemonio\",3083 => \"Genazzano\",3084 => \"Genga\",3085 => \"Genivolta\",3086 => \"Genola\",3087 => \"Genoni\",3088 => \"Genova\",8506 => \"Genova Nervi\",8276 => \"Genova Sestri\",3089 => \"Genuri\",3090 => \"Genzano di lucania\",3091 => \"Genzano di roma\",3092 => \"Genzone\",3093 => \"Gera lario\",3094 => \"Gerace\",3095 => \"Geraci siculo\",3096 => \"Gerano\",8176 => \"Geremeas\",3097 => \"Gerenzago\",3098 => \"Gerenzano\",3099 => \"Gergei\",3100 => \"Germagnano\",3101 => \"Germagno\",3102 => \"Germasino\",3103 => \"Germignaga\",8303 => \"Gerno di Lesmo\",3104 => \"Gerocarne\",3105 => \"Gerola alta\",3106 => \"Gerosa\",3107 => \"Gerre de'caprioli\",3108 => \"Gesico\",3109 => \"Gessate\",3110 => \"Gessopalena\",3111 => \"Gesturi\",3112 => \"Gesualdo\",3113 => \"Ghedi\",3114 => \"Ghemme\",8236 => \"Ghiacciaio Presena\",3115 => \"Ghiffa\",3116 => \"Ghilarza\",3117 => \"Ghisalba\",3118 => \"Ghislarengo\",3119 => \"Giacciano con baruchella\",3120 => \"Giaglione\",3121 => \"Gianico\",3122 => \"Giano dell'umbria\",3123 => \"Giano vetusto\",3124 => \"Giardinello\",3125 => \"Giardini Naxos\",3126 => \"Giarole\",3127 => \"Giarratana\",3128 => \"Giarre\",3129 => \"Giave\",3130 => \"Giaveno\",3131 => \"Giavera del montello\",3132 => \"Giba\",3133 => \"Gibellina\",3134 => \"Gifflenga\",3135 => \"Giffone\",3136 => \"Giffoni sei casali\",3137 => \"Giffoni valle piana\",3380 => \"Giglio castello\",3138 => \"Gignese\",3139 => \"Gignod\",3140 => \"Gildone\",3141 => \"Gimigliano\",8403 => \"Ginestra\",3143 => \"Ginestra degli schiavoni\",8430 => \"Ginosa\",3145 => \"Gioi\",3146 => \"Gioia dei marsi\",3147 => \"Gioia del colle\",3148 => \"Gioia sannitica\",3149 => \"Gioia tauro\",3150 => \"Gioiosa ionica\",3151 => \"Gioiosa marea\",3152 => \"Giove\",3153 => \"Giovinazzo\",3154 => \"Giovo\",3155 => \"Girasole\",3156 => \"Girifalco\",3157 => \"Gironico\",3158 => \"Gissi\",3159 => \"Giuggianello\",3160 => \"Giugliano in campania\",3161 => \"Giuliana\",3162 => \"Giuliano di roma\",3163 => \"Giuliano teatino\",3164 => \"Giulianova\",3165 => \"Giuncugnano\",3166 => \"Giungano\",3167 => \"Giurdignano\",3168 => \"Giussago\",3169 => \"Giussano\",3170 => \"Giustenice\",3171 => \"Giustino\",3172 => \"Giusvalla\",3173 => \"Givoletto\",3174 => \"Gizzeria\",3175 => \"Glorenza\",3176 => \"Godega di sant'urbano\",3177 => \"Godiasco\",3178 => \"Godrano\",3179 => \"Goito\",3180 => \"Golasecca\",3181 => \"Golferenzo\",3182 => \"Golfo aranci\",3183 => \"Gombito\",3184 => \"Gonars\",3185 => \"Goni\",3186 => \"Gonnesa\",3187 => \"Gonnoscodina\",3188 => \"Gonnosfanadiga\",3189 => \"Gonnosno'\",3190 => \"Gonnostramatza\",3191 => \"Gonzaga\",3192 => \"Gordona\",3193 => \"Gorga\",3194 => \"Gorgo al monticano\",3195 => \"Gorgoglione\",3196 => \"Gorgonzola\",3197 => \"Goriano sicoli\",3198 => \"Gorizia\",3199 => \"Gorla maggiore\",3200 => \"Gorla minore\",3201 => \"Gorlago\",3202 => \"Gorle\",3203 => \"Gornate olona\",3204 => \"Gorno\",3205 => \"Goro\",3206 => \"Gorreto\",3207 => \"Gorzegno\",3208 => \"Gosaldo\",3209 => \"Gossolengo\",3210 => \"Gottasecca\",3211 => \"Gottolengo\",3212 => \"Govone\",3213 => \"Gozzano\",3214 => \"Gradara\",3215 => \"Gradisca d'isonzo\",3216 => \"Grado\",3217 => \"Gradoli\",3218 => \"Graffignana\",3219 => \"Graffignano\",3220 => \"Graglia\",3221 => \"Gragnano\",3222 => \"Gragnano trebbiense\",3223 => \"Grammichele\",8485 => \"Gran Paradiso\",3224 => \"Grana\",3225 => \"Granaglione\",3226 => \"Granarolo dell'emilia\",3227 => \"Grancona\",8728 => \"Grand Combin\",8327 => \"Grand Crot\",3228 => \"Grandate\",3229 => \"Grandola ed uniti\",3230 => \"Graniti\",3231 => \"Granozzo con monticello\",3232 => \"Grantola\",3233 => \"Grantorto\",3234 => \"Granze\",8371 => \"Grassano\",8504 => \"Grassina\",3236 => \"Grassobbio\",3237 => \"Gratteri\",3238 => \"Grauno\",3239 => \"Gravedona\",3240 => \"Gravellona lomellina\",3241 => \"Gravellona toce\",3242 => \"Gravere\",3243 => \"Gravina di Catania\",3244 => \"Gravina in puglia\",3245 => \"Grazzanise\",3246 => \"Grazzano badoglio\",3247 => \"Greccio\",3248 => \"Greci\",3249 => \"Greggio\",3250 => \"Gremiasco\",3251 => \"Gressan\",3252 => \"Gressoney la trinite'\",3253 => \"Gressoney saint jean\",3254 => \"Greve in chianti\",3255 => \"Grezzago\",3256 => \"Grezzana\",3257 => \"Griante\",3258 => \"Gricignano di aversa\",8733 => \"Grigna\",3259 => \"Grignasco\",3260 => \"Grigno\",3261 => \"Grimacco\",3262 => \"Grimaldi\",3263 => \"Grinzane cavour\",3264 => \"Grisignano di zocco\",3265 => \"Grisolia\",8520 => \"Grivola\",3266 => \"Grizzana morandi\",3267 => \"Grognardo\",3268 => \"Gromo\",3269 => \"Grondona\",3270 => \"Grone\",3271 => \"Grontardo\",3272 => \"Gropello cairoli\",3273 => \"Gropparello\",3274 => \"Groscavallo\",3275 => \"Grosio\",3276 => \"Grosotto\",3277 => \"Grosseto\",3278 => \"Grosso\",3279 => \"Grottaferrata\",3280 => \"Grottaglie\",3281 => \"Grottaminarda\",3282 => \"Grottammare\",3283 => \"Grottazzolina\",3284 => \"Grotte\",3285 => \"Grotte di castro\",3286 => \"Grotteria\",3287 => \"Grottole\",3288 => \"Grottolella\",3289 => \"Gruaro\",3290 => \"Grugliasco\",3291 => \"Grumello cremonese ed uniti\",3292 => \"Grumello del monte\",8414 => \"Grumento nova\",3294 => \"Grumes\",3295 => \"Grumo appula\",3296 => \"Grumo nevano\",3297 => \"Grumolo delle abbadesse\",3298 => \"Guagnano\",3299 => \"Gualdo\",3300 => \"Gualdo Cattaneo\",3301 => \"Gualdo tadino\",3302 => \"Gualtieri\",3303 => \"Gualtieri sicamino'\",3304 => \"Guamaggiore\",3305 => \"Guanzate\",3306 => \"Guarcino\",3307 => \"Guarda veneta\",3308 => \"Guardabosone\",3309 => \"Guardamiglio\",3310 => \"Guardavalle\",3311 => \"Guardea\",3312 => \"Guardia lombardi\",8365 => \"Guardia perticara\",3314 => \"Guardia piemontese\",3315 => \"Guardia sanframondi\",3316 => \"Guardiagrele\",3317 => \"Guardialfiera\",3318 => \"Guardiaregia\",3319 => \"Guardistallo\",3320 => \"Guarene\",3321 => \"Guasila\",3322 => \"Guastalla\",3323 => \"Guazzora\",3324 => \"Gubbio\",3325 => \"Gudo visconti\",3326 => \"Guglionesi\",3327 => \"Guidizzolo\",8508 => \"Guidonia\",3328 => \"Guidonia montecelio\",3329 => \"Guiglia\",3330 => \"Guilmi\",3331 => \"Gurro\",3332 => \"Guspini\",3333 => \"Gussago\",3334 => \"Gussola\",3335 => \"Hone\",8587 => \"I Prati\",3336 => \"Idro\",3337 => \"Iglesias\",3338 => \"Igliano\",3339 => \"Ilbono\",3340 => \"Illasi\",3341 => \"Illorai\",3342 => \"Imbersago\",3343 => \"Imer\",3344 => \"Imola\",3345 => \"Imperia\",3346 => \"Impruneta\",3347 => \"Inarzo\",3348 => \"Incisa in val d'arno\",3349 => \"Incisa scapaccino\",3350 => \"Incudine\",3351 => \"Induno olona\",3352 => \"Ingria\",3353 => \"Intragna\",3354 => \"Introbio\",3355 => \"Introd\",3356 => \"Introdacqua\",3357 => \"Introzzo\",3358 => \"Inverigo\",3359 => \"Inverno e monteleone\",3360 => \"Inverso pinasca\",3361 => \"Inveruno\",3362 => \"Invorio\",3363 => \"Inzago\",3364 => \"Ionadi\",3365 => \"Irgoli\",3366 => \"Irma\",3367 => \"Irsina\",3368 => \"Isasca\",3369 => \"Isca sullo ionio\",3370 => \"Ischia\",3371 => \"Ischia di castro\",3372 => \"Ischitella\",3373 => \"Iseo\",3374 => \"Isera\",3375 => \"Isernia\",3376 => \"Isili\",3377 => \"Isnello\",8742 => \"Isola Albarella\",3378 => \"Isola d'asti\",3379 => \"Isola del cantone\",8190 => \"Isola del Giglio\",3381 => \"Isola del gran sasso d'italia\",3382 => \"Isola del liri\",3383 => \"Isola del piano\",3384 => \"Isola della scala\",3385 => \"Isola delle femmine\",3386 => \"Isola di capo rizzuto\",3387 => \"Isola di fondra\",8671 => \"Isola di Giannutri\",3388 => \"Isola dovarese\",3389 => \"Isola rizza\",8173 => \"Isola Rossa\",8183 => \"Isola Salina\",3390 => \"Isola sant'antonio\",3391 => \"Isola vicentina\",3392 => \"Isolabella\",3393 => \"Isolabona\",3394 => \"Isole tremiti\",3395 => \"Isorella\",3396 => \"Ispani\",3397 => \"Ispica\",3398 => \"Ispra\",3399 => \"Issiglio\",3400 => \"Issime\",3401 => \"Isso\",3402 => \"Issogne\",3403 => \"Istrana\",3404 => \"Itala\",3405 => \"Itri\",3406 => \"Ittireddu\",3407 => \"Ittiri\",3408 => \"Ivano fracena\",3409 => \"Ivrea\",3410 => \"Izano\",3411 => \"Jacurso\",3412 => \"Jelsi\",3413 => \"Jenne\",3414 => \"Jerago con Orago\",3415 => \"Jerzu\",3416 => \"Jesi\",3417 => \"Jesolo\",3418 => \"Jolanda di Savoia\",3419 => \"Joppolo\",3420 => \"Joppolo Giancaxio\",3421 => \"Jovencan\",8568 => \"Klausberg\",3422 => \"L'Aquila\",3423 => \"La Cassa\",8227 => \"La Lechere\",3424 => \"La Loggia\",3425 => \"La Maddalena\",3426 => \"La Magdeleine\",3427 => \"La Morra\",8617 => \"La Palud\",3428 => \"La Salle\",3429 => \"La Spezia\",3430 => \"La Thuile\",3431 => \"La Valle\",3432 => \"La Valle Agordina\",8762 => \"La Villa\",3433 => \"Labico\",3434 => \"Labro\",3435 => \"Lacchiarella\",3436 => \"Lacco ameno\",3437 => \"Lacedonia\",8245 => \"Laceno\",3438 => \"Laces\",3439 => \"Laconi\",3440 => \"Ladispoli\",8571 => \"Ladurno\",3441 => \"Laerru\",3442 => \"Laganadi\",3443 => \"Laghi\",3444 => \"Laglio\",3445 => \"Lagnasco\",3446 => \"Lago\",3447 => \"Lagonegro\",3448 => \"Lagosanto\",3449 => \"Lagundo\",3450 => \"Laigueglia\",3451 => \"Lainate\",3452 => \"Laino\",3453 => \"Laino borgo\",3454 => \"Laino castello\",3455 => \"Laion\",3456 => \"Laives\",3457 => \"Lajatico\",3458 => \"Lallio\",3459 => \"Lama dei peligni\",3460 => \"Lama mocogno\",3461 => \"Lambrugo\",8477 => \"Lamezia Santa Eufemia\",3462 => \"Lamezia terme\",3463 => \"Lamon\",8179 => \"Lampedusa\",3464 => \"Lampedusa e linosa\",3465 => \"Lamporecchio\",3466 => \"Lamporo\",3467 => \"Lana\",3468 => \"Lanciano\",8467 => \"Lanciano casello\",3469 => \"Landiona\",3470 => \"Landriano\",3471 => \"Langhirano\",3472 => \"Langosco\",3473 => \"Lanusei\",3474 => \"Lanuvio\",3475 => \"Lanzada\",3476 => \"Lanzo d'intelvi\",3477 => \"Lanzo torinese\",3478 => \"Lapedona\",3479 => \"Lapio\",3480 => \"Lappano\",3481 => \"Larciano\",3482 => \"Lardaro\",3483 => \"Lardirago\",3484 => \"Lari\",3485 => \"Lariano\",3486 => \"Larino\",3487 => \"Las plassas\",3488 => \"Lasa\",3489 => \"Lascari\",3490 => \"Lasino\",3491 => \"Lasnigo\",3492 => \"Lastebasse\",3493 => \"Lastra a signa\",3494 => \"Latera\",3495 => \"Laterina\",3496 => \"Laterza\",3497 => \"Latiano\",3498 => \"Latina\",3499 => \"Latisana\",3500 => \"Latronico\",3501 => \"Lattarico\",3502 => \"Lauco\",3503 => \"Laureana cilento\",3504 => \"Laureana di borrello\",3505 => \"Lauregno\",3506 => \"Laurenzana\",3507 => \"Lauria\",3508 => \"Lauriano\",3509 => \"Laurino\",3510 => \"Laurito\",3511 => \"Lauro\",3512 => \"Lavagna\",3513 => \"Lavagno\",3514 => \"Lavarone\",3515 => \"Lavello\",3516 => \"Lavena ponte tresa\",3517 => \"Laveno mombello\",3518 => \"Lavenone\",3519 => \"Laviano\",8695 => \"Lavinio\",3520 => \"Lavis\",3521 => \"Lazise\",3522 => \"Lazzate\",8434 => \"Le polle\",3523 => \"Lecce\",3524 => \"Lecce nei marsi\",3525 => \"Lecco\",3526 => \"Leffe\",3527 => \"Leggiuno\",3528 => \"Legnago\",3529 => \"Legnano\",3530 => \"Legnaro\",3531 => \"Lei\",3532 => \"Leini\",3533 => \"Leivi\",3534 => \"Lemie\",3535 => \"Lendinara\",3536 => \"Leni\",3537 => \"Lenna\",3538 => \"Lenno\",3539 => \"Leno\",3540 => \"Lenola\",3541 => \"Lenta\",3542 => \"Lentate sul seveso\",3543 => \"Lentella\",3544 => \"Lentiai\",3545 => \"Lentini\",3546 => \"Leonessa\",3547 => \"Leonforte\",3548 => \"Leporano\",3549 => \"Lequile\",3550 => \"Lequio berria\",3551 => \"Lequio tanaro\",3552 => \"Lercara friddi\",3553 => \"Lerici\",3554 => \"Lerma\",8250 => \"Les Suches\",3555 => \"Lesa\",3556 => \"Lesegno\",3557 => \"Lesignano de 'bagni\",3558 => \"Lesina\",3559 => \"Lesmo\",3560 => \"Lessolo\",3561 => \"Lessona\",3562 => \"Lestizza\",3563 => \"Letino\",3564 => \"Letojanni\",3565 => \"Lettere\",3566 => \"Lettomanoppello\",3567 => \"Lettopalena\",3568 => \"Levanto\",3569 => \"Levate\",3570 => \"Leverano\",3571 => \"Levice\",3572 => \"Levico terme\",3573 => \"Levone\",3574 => \"Lezzeno\",3575 => \"Liberi\",3576 => \"Librizzi\",3577 => \"Licata\",3578 => \"Licciana nardi\",3579 => \"Licenza\",3580 => \"Licodia eubea\",8442 => \"Lido degli Estensi\",8441 => \"Lido delle Nazioni\",8200 => \"Lido di Camaiore\",8136 => \"Lido di Ostia\",8746 => \"Lido di Volano\",8594 => \"Lido Marini\",3581 => \"Lierna\",3582 => \"Lignana\",3583 => \"Lignano sabbiadoro\",3584 => \"Ligonchio\",3585 => \"Ligosullo\",3586 => \"Lillianes\",3587 => \"Limana\",3588 => \"Limatola\",3589 => \"Limbadi\",3590 => \"Limbiate\",3591 => \"Limena\",3592 => \"Limido comasco\",3593 => \"Limina\",3594 => \"Limone piemonte\",3595 => \"Limone sul garda\",3596 => \"Limosano\",3597 => \"Linarolo\",3598 => \"Linguaglossa\",8180 => \"Linosa\",3599 => \"Lioni\",3600 => \"Lipari\",3601 => \"Lipomo\",3602 => \"Lirio\",3603 => \"Liscate\",3604 => \"Liscia\",3605 => \"Lisciano niccone\",3606 => \"Lisignago\",3607 => \"Lisio\",3608 => \"Lissone\",3609 => \"Liveri\",3610 => \"Livigno\",3611 => \"Livinallongo del col di lana\",3613 => \"Livo\",3612 => \"Livo\",3614 => \"Livorno\",3615 => \"Livorno ferraris\",3616 => \"Livraga\",3617 => \"Lizzanello\",3618 => \"Lizzano\",3619 => \"Lizzano in belvedere\",8300 => \"Lizzola\",3620 => \"Loano\",3621 => \"Loazzolo\",3622 => \"Locana\",3623 => \"Locate di triulzi\",3624 => \"Locate varesino\",3625 => \"Locatello\",3626 => \"Loceri\",3627 => \"Locorotondo\",3628 => \"Locri\",3629 => \"Loculi\",3630 => \"Lode'\",3631 => \"Lodi\",3632 => \"Lodi vecchio\",3633 => \"Lodine\",3634 => \"Lodrino\",3635 => \"Lograto\",3636 => \"Loiano\",8748 => \"Loiano RFI\",3637 => \"Loiri porto san paolo\",3638 => \"Lomagna\",3639 => \"Lomaso\",3640 => \"Lomazzo\",3641 => \"Lombardore\",3642 => \"Lombriasco\",3643 => \"Lomello\",3644 => \"Lona lases\",3645 => \"Lonate ceppino\",3646 => \"Lonate pozzolo\",3647 => \"Lonato\",3648 => \"Londa\",3649 => \"Longano\",3650 => \"Longare\",3651 => \"Longarone\",3652 => \"Longhena\",3653 => \"Longi\",3654 => \"Longiano\",3655 => \"Longobardi\",3656 => \"Longobucco\",3657 => \"Longone al segrino\",3658 => \"Longone sabino\",3659 => \"Lonigo\",3660 => \"Loranze'\",3661 => \"Loreggia\",3662 => \"Loreglia\",3663 => \"Lorenzago di cadore\",3664 => \"Lorenzana\",3665 => \"Loreo\",3666 => \"Loreto\",3667 => \"Loreto aprutino\",3668 => \"Loria\",8523 => \"Lorica\",3669 => \"Loro ciuffenna\",3670 => \"Loro piceno\",3671 => \"Lorsica\",3672 => \"Losine\",3673 => \"Lotzorai\",3674 => \"Lovere\",3675 => \"Lovero\",3676 => \"Lozio\",3677 => \"Lozza\",3678 => \"Lozzo atestino\",3679 => \"Lozzo di cadore\",3680 => \"Lozzolo\",3681 => \"Lu\",3682 => \"Lubriano\",3683 => \"Lucca\",3684 => \"Lucca sicula\",3685 => \"Lucera\",3686 => \"Lucignano\",3687 => \"Lucinasco\",3688 => \"Lucito\",3689 => \"Luco dei marsi\",3690 => \"Lucoli\",3691 => \"Lugagnano val d'arda\",3692 => \"Lugnacco\",3693 => \"Lugnano in teverina\",3694 => \"Lugo\",3695 => \"Lugo di vicenza\",3696 => \"Luino\",3697 => \"Luisago\",3698 => \"Lula\",3699 => \"Lumarzo\",3700 => \"Lumezzane\",3701 => \"Lunamatrona\",3702 => \"Lunano\",3703 => \"Lungavilla\",3704 => \"Lungro\",3705 => \"Luogosano\",3706 => \"Luogosanto\",3707 => \"Lupara\",3708 => \"Lurago d'erba\",3709 => \"Lurago marinone\",3710 => \"Lurano\",3711 => \"Luras\",3712 => \"Lurate caccivio\",3713 => \"Lusciano\",8636 => \"Lusentino\",3714 => \"Luserna\",3715 => \"Luserna san giovanni\",3716 => \"Lusernetta\",3717 => \"Lusevera\",3718 => \"Lusia\",3719 => \"Lusiana\",3720 => \"Lusiglie'\",3721 => \"Luson\",3722 => \"Lustra\",8572 => \"Lutago\",3723 => \"Luvinate\",3724 => \"Luzzana\",3725 => \"Luzzara\",3726 => \"Luzzi\",8447 => \"L`Aquila est\",8446 => \"L`Aquila ovest\",3727 => \"Maccagno\",3728 => \"Maccastorna\",3729 => \"Macchia d'isernia\",3730 => \"Macchia valfortore\",3731 => \"Macchiagodena\",3732 => \"Macello\",3733 => \"Macerata\",3734 => \"Macerata campania\",3735 => \"Macerata feltria\",3736 => \"Macherio\",3737 => \"Maclodio\",3738 => \"Macomer\",3739 => \"Macra\",3740 => \"Macugnaga\",3741 => \"Maddaloni\",3742 => \"Madesimo\",3743 => \"Madignano\",3744 => \"Madone\",3745 => \"Madonna del sasso\",8201 => \"Madonna di Campiglio\",3746 => \"Maenza\",3747 => \"Mafalda\",3748 => \"Magasa\",3749 => \"Magenta\",3750 => \"Maggiora\",3751 => \"Magherno\",3752 => \"Magione\",3753 => \"Magisano\",3754 => \"Magliano alfieri\",3755 => \"Magliano alpi\",8461 => \"Magliano casello\",3756 => \"Magliano de' marsi\",3757 => \"Magliano di tenna\",3758 => \"Magliano in toscana\",3759 => \"Magliano romano\",3760 => \"Magliano sabina\",3761 => \"Magliano vetere\",3762 => \"Maglie\",3763 => \"Magliolo\",3764 => \"Maglione\",3765 => \"Magnacavallo\",3766 => \"Magnago\",3767 => \"Magnano\",3768 => \"Magnano in riviera\",8322 => \"Magnolta\",3769 => \"Magomadas\",3770 => \"Magre' sulla strada del vino\",3771 => \"Magreglio\",3772 => \"Maida\",3773 => \"Maiera'\",3774 => \"Maierato\",3775 => \"Maiolati spontini\",3776 => \"Maiolo\",3777 => \"Maiori\",3778 => \"Mairago\",3779 => \"Mairano\",3780 => \"Maissana\",3781 => \"Majano\",3782 => \"Malagnino\",3783 => \"Malalbergo\",3784 => \"Malborghetto valbruna\",3785 => \"Malcesine\",3786 => \"Male'\",3787 => \"Malegno\",3788 => \"Maleo\",3789 => \"Malesco\",3790 => \"Maletto\",3791 => \"Malfa\",8229 => \"Malga Ciapela\",8333 => \"Malga Polzone\",8661 => \"Malga San Giorgio\",3792 => \"Malgesso\",3793 => \"Malgrate\",3794 => \"Malito\",3795 => \"Mallare\",3796 => \"Malles Venosta\",3797 => \"Malnate\",3798 => \"Malo\",3799 => \"Malonno\",3800 => \"Malosco\",3801 => \"Maltignano\",3802 => \"Malvagna\",3803 => \"Malvicino\",3804 => \"Malvito\",3805 => \"Mammola\",3806 => \"Mamoiada\",3807 => \"Manciano\",3808 => \"Mandanici\",3809 => \"Mandas\",3810 => \"Mandatoriccio\",3811 => \"Mandela\",3812 => \"Mandello del lario\",3813 => \"Mandello vitta\",3814 => \"Manduria\",3815 => \"Manerba del garda\",3816 => \"Manerbio\",3817 => \"Manfredonia\",3818 => \"Mango\",3819 => \"Mangone\",3820 => \"Maniace\",3821 => \"Maniago\",3822 => \"Manocalzati\",3823 => \"Manoppello\",3824 => \"Mansue'\",3825 => \"Manta\",3826 => \"Mantello\",3827 => \"Mantova\",8129 => \"Manzano\",3829 => \"Manziana\",3830 => \"Mapello\",3831 => \"Mara\",3832 => \"Maracalagonis\",3833 => \"Maranello\",3834 => \"Marano di napoli\",3835 => \"Marano di valpolicella\",3836 => \"Marano equo\",3837 => \"Marano lagunare\",3838 => \"Marano marchesato\",3839 => \"Marano principato\",3840 => \"Marano sul panaro\",3841 => \"Marano ticino\",3842 => \"Marano vicentino\",3843 => \"Maranzana\",3844 => \"Maratea\",3845 => \"Marcallo con Casone\",3846 => \"Marcaria\",3847 => \"Marcedusa\",3848 => \"Marcellina\",3849 => \"Marcellinara\",3850 => \"Marcetelli\",3851 => \"Marcheno\",3852 => \"Marchirolo\",3853 => \"Marciana\",3854 => \"Marciana marina\",3855 => \"Marcianise\",3856 => \"Marciano della chiana\",3857 => \"Marcignago\",3858 => \"Marcon\",3859 => \"Marebbe\",8478 => \"Marene\",3861 => \"Mareno di piave\",3862 => \"Marentino\",3863 => \"Maretto\",3864 => \"Margarita\",3865 => \"Margherita di savoia\",3866 => \"Margno\",3867 => \"Mariana mantovana\",3868 => \"Mariano comense\",3869 => \"Mariano del friuli\",3870 => \"Marianopoli\",3871 => \"Mariglianella\",3872 => \"Marigliano\",8291 => \"Marilleva\",8490 => \"Marina di Arbus\",8599 => \"Marina di Camerota\",8582 => \"Marina di Campo\",8111 => \"Marina di Cariati\",8118 => \"Marina di Cetraro\",8175 => \"Marina di Gairo\",8164 => \"Marina di Ginosa\",3873 => \"Marina di gioiosa ionica\",8166 => \"Marina di Leuca\",8184 => \"Marina di Modica\",8156 => \"Marina di montenero\",8165 => \"Marina di Ostuni\",8186 => \"Marina di Palma\",8141 => \"Marina di Pescia Romana\",8591 => \"Marina di Pescoluse\",8298 => \"Marina di Pietrasanta\",8128 => \"Marina di Ravenna\",8174 => \"Marina di Sorso\",8188 => \"Marinella\",3874 => \"Marineo\",3875 => \"Marino\",3876 => \"Marlengo\",3877 => \"Marliana\",3878 => \"Marmentino\",3879 => \"Marmirolo\",8205 => \"Marmolada\",3880 => \"Marmora\",3881 => \"Marnate\",3882 => \"Marone\",3883 => \"Maropati\",3884 => \"Marostica\",8154 => \"Marotta\",3885 => \"Marradi\",3886 => \"Marrubiu\",3887 => \"Marsaglia\",3888 => \"Marsala\",3889 => \"Marsciano\",3890 => \"Marsico nuovo\",3891 => \"Marsicovetere\",3892 => \"Marta\",3893 => \"Martano\",3894 => \"Martellago\",3895 => \"Martello\",3896 => \"Martignacco\",3897 => \"Martignana di po\",3898 => \"Martignano\",3899 => \"Martina franca\",3900 => \"Martinengo\",3901 => \"Martiniana po\",3902 => \"Martinsicuro\",3903 => \"Martirano\",3904 => \"Martirano lombardo\",3905 => \"Martis\",3906 => \"Martone\",3907 => \"Marudo\",3908 => \"Maruggio\",3909 => \"Marzabotto\",3910 => \"Marzano\",3911 => \"Marzano appio\",3912 => \"Marzano di nola\",3913 => \"Marzi\",3914 => \"Marzio\",3915 => \"Masainas\",3916 => \"Masate\",3917 => \"Mascali\",3918 => \"Mascalucia\",3919 => \"Maschito\",3920 => \"Masciago primo\",3921 => \"Maser\",3922 => \"Masera\",3923 => \"Masera' di Padova\",3924 => \"Maserada sul piave\",3925 => \"Masi\",3926 => \"Masi torello\",3927 => \"Masio\",3928 => \"Maslianico\",8216 => \"Maso Corto\",3929 => \"Mason vicentino\",3930 => \"Masone\",3931 => \"Massa\",3932 => \"Massa d'albe\",3933 => \"Massa di somma\",3934 => \"Massa e cozzile\",3935 => \"Massa fermana\",3936 => \"Massa fiscaglia\",3937 => \"Massa lombarda\",3938 => \"Massa lubrense\",3939 => \"Massa marittima\",3940 => \"Massa martana\",3941 => \"Massafra\",3942 => \"Massalengo\",3943 => \"Massanzago\",3944 => \"Massarosa\",3945 => \"Massazza\",3946 => \"Massello\",3947 => \"Masserano\",3948 => \"Massignano\",3949 => \"Massimeno\",3950 => \"Massimino\",3951 => \"Massino visconti\",3952 => \"Massiola\",3953 => \"Masullas\",3954 => \"Matelica\",3955 => \"Matera\",3956 => \"Mathi\",3957 => \"Matino\",3958 => \"Matrice\",3959 => \"Mattie\",3960 => \"Mattinata\",3961 => \"Mazara del vallo\",3962 => \"Mazzano\",3963 => \"Mazzano romano\",3964 => \"Mazzarino\",3965 => \"Mazzarra' sant'andrea\",3966 => \"Mazzarrone\",3967 => \"Mazze'\",3968 => \"Mazzin\",3969 => \"Mazzo di valtellina\",3970 => \"Meana di susa\",3971 => \"Meana sardo\",3972 => \"Meda\",3973 => \"Mede\",3974 => \"Medea\",3975 => \"Medesano\",3976 => \"Medicina\",3977 => \"Mediglia\",3978 => \"Medolago\",3979 => \"Medole\",3980 => \"Medolla\",3981 => \"Meduna di livenza\",3982 => \"Meduno\",3983 => \"Megliadino san fidenzio\",3984 => \"Megliadino san vitale\",3985 => \"Meina\",3986 => \"Mel\",3987 => \"Melara\",3988 => \"Melazzo\",8443 => \"Meldola\",3990 => \"Mele\",3991 => \"Melegnano\",3992 => \"Melendugno\",3993 => \"Meleti\",8666 => \"Melezet\",3994 => \"Melfi\",3995 => \"Melicucca'\",3996 => \"Melicucco\",3997 => \"Melilli\",3998 => \"Melissa\",3999 => \"Melissano\",4000 => \"Melito di napoli\",4001 => \"Melito di porto salvo\",4002 => \"Melito irpino\",4003 => \"Melizzano\",4004 => \"Melle\",4005 => \"Mello\",4006 => \"Melpignano\",4007 => \"Meltina\",4008 => \"Melzo\",4009 => \"Menaggio\",4010 => \"Menarola\",4011 => \"Menconico\",4012 => \"Mendatica\",4013 => \"Mendicino\",4014 => \"Menfi\",4015 => \"Mentana\",4016 => \"Meolo\",4017 => \"Merana\",4018 => \"Merano\",8351 => \"Merano 2000\",4019 => \"Merate\",4020 => \"Mercallo\",4021 => \"Mercatello sul metauro\",4022 => \"Mercatino conca\",8437 => \"Mercato\",4023 => \"Mercato san severino\",4024 => \"Mercato saraceno\",4025 => \"Mercenasco\",4026 => \"Mercogliano\",4027 => \"Mereto di tomba\",4028 => \"Mergo\",4029 => \"Mergozzo\",4030 => \"Meri'\",4031 => \"Merlara\",4032 => \"Merlino\",4033 => \"Merone\",4034 => \"Mesagne\",4035 => \"Mese\",4036 => \"Mesenzana\",4037 => \"Mesero\",4038 => \"Mesola\",4039 => \"Mesoraca\",4040 => \"Messina\",4041 => \"Mestrino\",4042 => \"Meta\",8104 => \"Metaponto\",4043 => \"Meugliano\",4044 => \"Mezzago\",4045 => \"Mezzana\",4046 => \"Mezzana bigli\",4047 => \"Mezzana mortigliengo\",4048 => \"Mezzana rabattone\",4049 => \"Mezzane di sotto\",4050 => \"Mezzanego\",4051 => \"Mezzani\",4052 => \"Mezzanino\",4053 => \"Mezzano\",4054 => \"Mezzegra\",4055 => \"Mezzenile\",4056 => \"Mezzocorona\",4057 => \"Mezzojuso\",4058 => \"Mezzoldo\",4059 => \"Mezzolombardo\",4060 => \"Mezzomerico\",8524 => \"MI Olgettina\",8526 => \"MI Primaticcio\",8527 => \"MI Silla\",8525 => \"MI Zama\",4061 => \"Miagliano\",4062 => \"Miane\",4063 => \"Miasino\",4064 => \"Miazzina\",4065 => \"Micigliano\",4066 => \"Miggiano\",4067 => \"Miglianico\",4068 => \"Migliarino\",4069 => \"Migliaro\",4070 => \"Miglierina\",4071 => \"Miglionico\",4072 => \"Mignanego\",4073 => \"Mignano monte lungo\",4074 => \"Milano\",8495 => \"Milano Linate\",8496 => \"Milano Malpensa\",8240 => \"Milano marittima\",4075 => \"Milazzo\",4076 => \"Milena\",4077 => \"Mileto\",4078 => \"Milis\",4079 => \"Militello in val di catania\",4080 => \"Militello rosmarino\",4081 => \"Millesimo\",4082 => \"Milo\",4083 => \"Milzano\",4084 => \"Mineo\",4085 => \"Minerbe\",4086 => \"Minerbio\",4087 => \"Minervino di lecce\",4088 => \"Minervino murge\",4089 => \"Minori\",4090 => \"Minturno\",4091 => \"Minucciano\",4092 => \"Mioglia\",4093 => \"Mira\",4094 => \"Mirabella eclano\",4095 => \"Mirabella imbaccari\",4096 => \"Mirabello\",4097 => \"Mirabello monferrato\",4098 => \"Mirabello sannitico\",4099 => \"Miradolo terme\",4100 => \"Miranda\",4101 => \"Mirandola\",4102 => \"Mirano\",4103 => \"Mirto\",4104 => \"Misano adriatico\",4105 => \"Misano di gera d'adda\",4106 => \"Misilmeri\",4107 => \"Misinto\",4108 => \"Missaglia\",8416 => \"Missanello\",4110 => \"Misterbianco\",4111 => \"Mistretta\",8623 => \"Misurina\",4112 => \"Moasca\",4113 => \"Moconesi\",4114 => \"Modena\",4115 => \"Modica\",4116 => \"Modigliana\",4117 => \"Modolo\",4118 => \"Modugno\",4119 => \"Moena\",4120 => \"Moggio\",4121 => \"Moggio udinese\",4122 => \"Moglia\",4123 => \"Mogliano\",4124 => \"Mogliano veneto\",4125 => \"Mogorella\",4126 => \"Mogoro\",4127 => \"Moiano\",8615 => \"Moie\",4128 => \"Moimacco\",4129 => \"Moio Alcantara\",4130 => \"Moio de'calvi\",4131 => \"Moio della civitella\",4132 => \"Moiola\",4133 => \"Mola di bari\",4134 => \"Molare\",4135 => \"Molazzana\",4136 => \"Molfetta\",4137 => \"Molina aterno\",4138 => \"Molina di ledro\",4139 => \"Molinara\",4140 => \"Molinella\",4141 => \"Molini di triora\",4142 => \"Molino dei torti\",4143 => \"Molise\",4144 => \"Moliterno\",4145 => \"Mollia\",4146 => \"Molochio\",4147 => \"Molteno\",4148 => \"Moltrasio\",4149 => \"Molvena\",4150 => \"Molveno\",4151 => \"Mombaldone\",4152 => \"Mombarcaro\",4153 => \"Mombaroccio\",4154 => \"Mombaruzzo\",4155 => \"Mombasiglio\",4156 => \"Mombello di torino\",4157 => \"Mombello monferrato\",4158 => \"Mombercelli\",4159 => \"Momo\",4160 => \"Mompantero\",4161 => \"Mompeo\",4162 => \"Momperone\",4163 => \"Monacilioni\",4164 => \"Monale\",4165 => \"Monasterace\",4166 => \"Monastero bormida\",4167 => \"Monastero di lanzo\",4168 => \"Monastero di vasco\",4169 => \"Monasterolo casotto\",4170 => \"Monasterolo del castello\",4171 => \"Monasterolo di savigliano\",4172 => \"Monastier di treviso\",4173 => \"Monastir\",4174 => \"Moncalieri\",4175 => \"Moncalvo\",4176 => \"Moncenisio\",4177 => \"Moncestino\",4178 => \"Monchiero\",4179 => \"Monchio delle corti\",4180 => \"Monclassico\",4181 => \"Moncrivello\",8649 => \"Moncucco\",4182 => \"Moncucco torinese\",4183 => \"Mondaino\",4184 => \"Mondavio\",4185 => \"Mondolfo\",4186 => \"Mondovi'\",4187 => \"Mondragone\",4188 => \"Moneglia\",8143 => \"Monesi\",4189 => \"Monesiglio\",4190 => \"Monfalcone\",4191 => \"Monforte d'alba\",4192 => \"Monforte san giorgio\",4193 => \"Monfumo\",4194 => \"Mongardino\",4195 => \"Monghidoro\",4196 => \"Mongiana\",4197 => \"Mongiardino ligure\",8637 => \"Monginevro Montgenevre\",4198 => \"Mongiuffi melia\",4199 => \"Mongrando\",4200 => \"Mongrassano\",4201 => \"Monguelfo\",4202 => \"Monguzzo\",4203 => \"Moniga del garda\",4204 => \"Monleale\",4205 => \"Monno\",4206 => \"Monopoli\",4207 => \"Monreale\",4208 => \"Monrupino\",4209 => \"Monsampietro morico\",4210 => \"Monsampolo del tronto\",4211 => \"Monsano\",4212 => \"Monselice\",4213 => \"Monserrato\",4214 => \"Monsummano terme\",4215 => \"Monta'\",4216 => \"Montabone\",4217 => \"Montacuto\",4218 => \"Montafia\",4219 => \"Montagano\",4220 => \"Montagna\",4221 => \"Montagna in valtellina\",8301 => \"Montagnana\",4223 => \"Montagnareale\",4224 => \"Montagne\",4225 => \"Montaguto\",4226 => \"Montaione\",4227 => \"Montalbano Elicona\",4228 => \"Montalbano jonico\",4229 => \"Montalcino\",4230 => \"Montaldeo\",4231 => \"Montaldo bormida\",4232 => \"Montaldo di mondovi'\",4233 => \"Montaldo roero\",4234 => \"Montaldo scarampi\",4235 => \"Montaldo torinese\",4236 => \"Montale\",4237 => \"Montalenghe\",4238 => \"Montallegro\",4239 => \"Montalto delle marche\",4240 => \"Montalto di castro\",4241 => \"Montalto dora\",4242 => \"Montalto ligure\",4243 => \"Montalto pavese\",4244 => \"Montalto uffugo\",4245 => \"Montanaro\",4246 => \"Montanaso lombardo\",4247 => \"Montanera\",4248 => \"Montano antilia\",4249 => \"Montano lucino\",4250 => \"Montappone\",4251 => \"Montaquila\",4252 => \"Montasola\",4253 => \"Montauro\",4254 => \"Montazzoli\",8738 => \"Monte Alben\",8350 => \"Monte Amiata\",4255 => \"Monte Argentario\",8696 => \"Monte Avena\",8660 => \"Monte Baldo\",8251 => \"Monte Belvedere\",8720 => \"Monte Bianco\",8292 => \"Monte Bondone\",8757 => \"Monte Caio\",8149 => \"Monte Campione\",4256 => \"Monte Castello di Vibio\",4257 => \"Monte Cavallo\",4258 => \"Monte Cerignone\",8722 => \"Monte Cervino\",8533 => \"Monte Cimone\",4259 => \"Monte Colombo\",8658 => \"Monte Cornizzolo\",4260 => \"Monte Cremasco\",4261 => \"Monte di Malo\",4262 => \"Monte di Procida\",8581 => \"Monte Elmo\",8701 => \"Monte Faloria\",4263 => \"Monte Giberto\",8486 => \"Monte Gomito\",8232 => \"Monte Grappa\",4264 => \"Monte Isola\",8735 => \"Monte Legnone\",8631 => \"Monte Livata\",8574 => \"Monte Lussari\",8484 => \"Monte Malanotte\",4265 => \"Monte Marenzo\",8611 => \"Monte Matajur\",8732 => \"Monte Matto\",8266 => \"Monte Moro\",8697 => \"Monte Mucrone\",8619 => \"Monte Pigna\",8288 => \"Monte Pora Base\",8310 => \"Monte Pora Cima\",4266 => \"Monte Porzio\",4267 => \"Monte Porzio Catone\",8608 => \"Monte Prata\",8320 => \"Monte Pratello\",4268 => \"Monte Rinaldo\",4269 => \"Monte Roberto\",4270 => \"Monte Romano\",4271 => \"Monte San Biagio\",4272 => \"Monte San Giacomo\",4273 => \"Monte San Giovanni Campano\",4274 => \"Monte San Giovanni in Sabina\",4275 => \"Monte San Giusto\",4276 => \"Monte San Martino\",4277 => \"Monte San Pietrangeli\",4278 => \"Monte San Pietro\",8538 => \"Monte San Primo\",4279 => \"Monte San Savino\",8652 => \"Monte San Vigilio\",4280 => \"Monte San Vito\",4281 => \"Monte Sant'Angelo\",4282 => \"Monte Santa Maria Tiberina\",8570 => \"Monte Scuro\",8278 => \"Monte Spinale\",4283 => \"Monte Urano\",8758 => \"Monte Ventasso\",4284 => \"Monte Vidon Combatte\",4285 => \"Monte Vidon Corrado\",8729 => \"Monte Volturino\",8346 => \"Monte Zoncolan\",4286 => \"Montebello della Battaglia\",4287 => \"Montebello di Bertona\",4288 => \"Montebello Ionico\",4289 => \"Montebello sul Sangro\",4290 => \"Montebello Vicentino\",4291 => \"Montebelluna\",4292 => \"Montebruno\",4293 => \"Montebuono\",4294 => \"Montecalvo in Foglia\",4295 => \"Montecalvo Irpino\",4296 => \"Montecalvo Versiggia\",4297 => \"Montecarlo\",4298 => \"Montecarotto\",4299 => \"Montecassiano\",4300 => \"Montecastello\",4301 => \"Montecastrilli\",4303 => \"Montecatini terme\",4302 => \"Montecatini Val di Cecina\",4304 => \"Montecchia di Crosara\",4305 => \"Montecchio\",4306 => \"Montecchio Emilia\",4307 => \"Montecchio Maggiore\",4308 => \"Montecchio Precalcino\",4309 => \"Montechiaro d'Acqui\",4310 => \"Montechiaro d'Asti\",4311 => \"Montechiarugolo\",4312 => \"Monteciccardo\",4313 => \"Montecilfone\",4314 => \"Montecompatri\",4315 => \"Montecopiolo\",4316 => \"Montecorice\",4317 => \"Montecorvino Pugliano\",4318 => \"Montecorvino Rovella\",4319 => \"Montecosaro\",4320 => \"Montecrestese\",4321 => \"Montecreto\",4322 => \"Montedinove\",4323 => \"Montedoro\",4324 => \"Montefalcione\",4325 => \"Montefalco\",4326 => \"Montefalcone Appennino\",4327 => \"Montefalcone di Val Fortore\",4328 => \"Montefalcone nel Sannio\",4329 => \"Montefano\",4330 => \"Montefelcino\",4331 => \"Monteferrante\",4332 => \"Montefiascone\",4333 => \"Montefino\",4334 => \"Montefiore conca\",4335 => \"Montefiore dell'Aso\",4336 => \"Montefiorino\",4337 => \"Monteflavio\",4338 => \"Monteforte Cilento\",4339 => \"Monteforte d'Alpone\",4340 => \"Monteforte Irpino\",4341 => \"Montefortino\",4342 => \"Montefranco\",4343 => \"Montefredane\",4344 => \"Montefusco\",4345 => \"Montegabbione\",4346 => \"Montegalda\",4347 => \"Montegaldella\",4348 => \"Montegallo\",4349 => \"Montegioco\",4350 => \"Montegiordano\",4351 => \"Montegiorgio\",4352 => \"Montegranaro\",4353 => \"Montegridolfo\",4354 => \"Montegrimano\",4355 => \"Montegrino valtravaglia\",4356 => \"Montegrosso d'Asti\",4357 => \"Montegrosso pian latte\",4358 => \"Montegrotto terme\",4359 => \"Monteiasi\",4360 => \"Montelabbate\",4361 => \"Montelanico\",4362 => \"Montelapiano\",4363 => \"Monteleone d'orvieto\",4364 => \"Monteleone di fermo\",4365 => \"Monteleone di puglia\",4366 => \"Monteleone di spoleto\",4367 => \"Monteleone rocca doria\",4368 => \"Monteleone sabino\",4369 => \"Montelepre\",4370 => \"Montelibretti\",4371 => \"Montella\",4372 => \"Montello\",4373 => \"Montelongo\",4374 => \"Montelparo\",4375 => \"Montelupo albese\",4376 => \"Montelupo fiorentino\",4377 => \"Montelupone\",4378 => \"Montemaggiore al metauro\",4379 => \"Montemaggiore belsito\",4380 => \"Montemagno\",4381 => \"Montemale di cuneo\",4382 => \"Montemarano\",4383 => \"Montemarciano\",4384 => \"Montemarzino\",4385 => \"Montemesola\",4386 => \"Montemezzo\",4387 => \"Montemignaio\",4388 => \"Montemiletto\",8401 => \"Montemilone\",4390 => \"Montemitro\",4391 => \"Montemonaco\",4392 => \"Montemurlo\",8408 => \"Montemurro\",4394 => \"Montenars\",4395 => \"Montenero di bisaccia\",4396 => \"Montenero sabino\",4397 => \"Montenero val cocchiara\",4398 => \"Montenerodomo\",4399 => \"Monteodorisio\",4400 => \"Montepaone\",4401 => \"Monteparano\",8296 => \"Montepiano\",4402 => \"Monteprandone\",4403 => \"Montepulciano\",4404 => \"Monterado\",4405 => \"Monterchi\",4406 => \"Montereale\",4407 => \"Montereale valcellina\",4408 => \"Monterenzio\",4409 => \"Monteriggioni\",4410 => \"Monteroduni\",4411 => \"Monteroni d'arbia\",4412 => \"Monteroni di lecce\",4413 => \"Monterosi\",4414 => \"Monterosso al mare\",4415 => \"Monterosso almo\",4416 => \"Monterosso calabro\",4417 => \"Monterosso grana\",4418 => \"Monterotondo\",4419 => \"Monterotondo marittimo\",4420 => \"Monterubbiano\",4421 => \"Montesano salentino\",4422 => \"Montesano sulla marcellana\",4423 => \"Montesarchio\",8389 => \"Montescaglioso\",4425 => \"Montescano\",4426 => \"Montescheno\",4427 => \"Montescudaio\",4428 => \"Montescudo\",4429 => \"Montese\",4430 => \"Montesegale\",4431 => \"Montesilvano\",8491 => \"Montesilvano Marina\",4432 => \"Montespertoli\",1730 => \"Montespluga\",4433 => \"Monteu da Po\",4434 => \"Monteu roero\",4435 => \"Montevago\",4436 => \"Montevarchi\",4437 => \"Montevecchia\",4438 => \"Monteveglio\",4439 => \"Monteverde\",4440 => \"Monteverdi marittimo\",8589 => \"Montevergine\",4441 => \"Monteviale\",4442 => \"Montezemolo\",4443 => \"Monti\",4444 => \"Montiano\",4445 => \"Monticelli brusati\",4446 => \"Monticelli d'ongina\",4447 => \"Monticelli pavese\",4448 => \"Monticello brianza\",4449 => \"Monticello conte otto\",4450 => \"Monticello d'alba\",4451 => \"Montichiari\",4452 => \"Monticiano\",4453 => \"Montieri\",4454 => \"Montiglio monferrato\",4455 => \"Montignoso\",4456 => \"Montirone\",4457 => \"Montjovet\",4458 => \"Montodine\",4459 => \"Montoggio\",4460 => \"Montone\",4461 => \"Montopoli di sabina\",4462 => \"Montopoli in val d'arno\",4463 => \"Montorfano\",4464 => \"Montorio al vomano\",4465 => \"Montorio nei frentani\",4466 => \"Montorio romano\",4467 => \"Montoro inferiore\",4468 => \"Montoro superiore\",4469 => \"Montorso vicentino\",4470 => \"Montottone\",4471 => \"Montresta\",4472 => \"Montu' beccaria\",8326 => \"Montzeuc\",4473 => \"Monvalle\",8726 => \"Monviso\",4474 => \"Monza\",4475 => \"Monzambano\",4476 => \"Monzuno\",4477 => \"Morano calabro\",4478 => \"Morano sul Po\",4479 => \"Moransengo\",4480 => \"Moraro\",4481 => \"Morazzone\",4482 => \"Morbegno\",4483 => \"Morbello\",4484 => \"Morciano di leuca\",4485 => \"Morciano di romagna\",4486 => \"Morcone\",4487 => \"Mordano\",8262 => \"Morel\",4488 => \"Morengo\",4489 => \"Mores\",4490 => \"Moresco\",4491 => \"Moretta\",4492 => \"Morfasso\",4493 => \"Morgano\",8717 => \"Morgantina\",4494 => \"Morgex\",4495 => \"Morgongiori\",4496 => \"Mori\",4497 => \"Moriago della battaglia\",4498 => \"Moricone\",4499 => \"Morigerati\",4500 => \"Morimondo\",4501 => \"Morino\",4502 => \"Moriondo torinese\",4503 => \"Morlupo\",4504 => \"Mormanno\",4505 => \"Mornago\",4506 => \"Mornese\",4507 => \"Mornico al serio\",4508 => \"Mornico losana\",4509 => \"Morolo\",4510 => \"Morozzo\",4511 => \"Morra de sanctis\",4512 => \"Morro d'alba\",4513 => \"Morro d'oro\",4514 => \"Morro reatino\",4515 => \"Morrone del sannio\",4516 => \"Morrovalle\",4517 => \"Morsano al tagliamento\",4518 => \"Morsasco\",4519 => \"Mortara\",4520 => \"Mortegliano\",4521 => \"Morterone\",4522 => \"Moruzzo\",4523 => \"Moscazzano\",4524 => \"Moschiano\",4525 => \"Mosciano sant'angelo\",4526 => \"Moscufo\",4527 => \"Moso in Passiria\",4528 => \"Mossa\",4529 => \"Mossano\",4530 => \"Mosso Santa Maria\",4531 => \"Motta baluffi\",4532 => \"Motta Camastra\",4533 => \"Motta d'affermo\",4534 => \"Motta de' conti\",4535 => \"Motta di livenza\",4536 => \"Motta montecorvino\",4537 => \"Motta san giovanni\",4538 => \"Motta sant'anastasia\",4539 => \"Motta santa lucia\",4540 => \"Motta visconti\",4541 => \"Mottafollone\",4542 => \"Mottalciata\",8621 => \"Mottarone\",4543 => \"Motteggiana\",4544 => \"Mottola\",8254 => \"Mottolino\",4545 => \"Mozzagrogna\",4546 => \"Mozzanica\",4547 => \"Mozzate\",4548 => \"Mozzecane\",4549 => \"Mozzo\",4550 => \"Muccia\",4551 => \"Muggia\",4552 => \"Muggio'\",4553 => \"Mugnano del cardinale\",4554 => \"Mugnano di napoli\",4555 => \"Mulazzano\",4556 => \"Mulazzo\",4557 => \"Mura\",4558 => \"Muravera\",4559 => \"Murazzano\",4560 => \"Murello\",4561 => \"Murialdo\",4562 => \"Murisengo\",4563 => \"Murlo\",4564 => \"Muro leccese\",4565 => \"Muro lucano\",4566 => \"Muros\",4567 => \"Muscoline\",4568 => \"Musei\",4569 => \"Musile di piave\",4570 => \"Musso\",4571 => \"Mussolente\",4572 => \"Mussomeli\",4573 => \"Muzzana del turgnano\",4574 => \"Muzzano\",4575 => \"Nago torbole\",4576 => \"Nalles\",4577 => \"Nanno\",4578 => \"Nanto\",4579 => \"Napoli\",8498 => \"Napoli Capodichino\",4580 => \"Narbolia\",4581 => \"Narcao\",4582 => \"Nardo'\",4583 => \"Nardodipace\",4584 => \"Narni\",4585 => \"Naro\",4586 => \"Narzole\",4587 => \"Nasino\",4588 => \"Naso\",4589 => \"Naturno\",4590 => \"Nave\",4591 => \"Nave san rocco\",4592 => \"Navelli\",4593 => \"Naz Sciaves\",4594 => \"Nazzano\",4595 => \"Ne\",4596 => \"Nebbiuno\",4597 => \"Negrar\",4598 => \"Neirone\",4599 => \"Neive\",4600 => \"Nembro\",4601 => \"Nemi\",8381 => \"Nemoli\",4603 => \"Neoneli\",4604 => \"Nepi\",4605 => \"Nereto\",4606 => \"Nerola\",4607 => \"Nervesa della battaglia\",4608 => \"Nerviano\",4609 => \"Nespolo\",4610 => \"Nesso\",4611 => \"Netro\",4612 => \"Nettuno\",4613 => \"Neviano\",4614 => \"Neviano degli arduini\",4615 => \"Neviglie\",4616 => \"Niardo\",4617 => \"Nibbiano\",4618 => \"Nibbiola\",4619 => \"Nibionno\",4620 => \"Nichelino\",4621 => \"Nicolosi\",4622 => \"Nicorvo\",4623 => \"Nicosia\",4624 => \"Nicotera\",8117 => \"Nicotera Marina\",4625 => \"Niella belbo\",8475 => \"Niella Tanaro\",4627 => \"Nimis\",4628 => \"Niscemi\",4629 => \"Nissoria\",4630 => \"Nizza di sicilia\",4631 => \"Nizza monferrato\",4632 => \"Noale\",4633 => \"Noasca\",4634 => \"Nocara\",4635 => \"Nocciano\",4636 => \"Nocera inferiore\",4637 => \"Nocera superiore\",4638 => \"Nocera terinese\",4639 => \"Nocera umbra\",4640 => \"Noceto\",4641 => \"Noci\",4642 => \"Nociglia\",8375 => \"Noepoli\",4644 => \"Nogara\",4645 => \"Nogaredo\",4646 => \"Nogarole rocca\",4647 => \"Nogarole vicentino\",4648 => \"Noicattaro\",4649 => \"Nola\",4650 => \"Nole\",4651 => \"Noli\",4652 => \"Nomaglio\",4653 => \"Nomi\",4654 => \"Nonantola\",4655 => \"None\",4656 => \"Nonio\",4657 => \"Noragugume\",4658 => \"Norbello\",4659 => \"Norcia\",4660 => \"Norma\",4661 => \"Nosate\",4662 => \"Notaresco\",4663 => \"Noto\",4664 => \"Nova Levante\",4665 => \"Nova milanese\",4666 => \"Nova Ponente\",8428 => \"Nova siri\",4668 => \"Novafeltria\",4669 => \"Novaledo\",4670 => \"Novalesa\",4671 => \"Novara\",4672 => \"Novara di Sicilia\",4673 => \"Novate mezzola\",4674 => \"Novate milanese\",4675 => \"Nove\",4676 => \"Novedrate\",4677 => \"Novellara\",4678 => \"Novello\",4679 => \"Noventa di piave\",4680 => \"Noventa padovana\",4681 => \"Noventa vicentina\",4682 => \"Novi di modena\",4683 => \"Novi ligure\",4684 => \"Novi velia\",4685 => \"Noviglio\",4686 => \"Novoli\",4687 => \"Nucetto\",4688 => \"Nughedu di san nicolo'\",4689 => \"Nughedu santa vittoria\",4690 => \"Nule\",4691 => \"Nulvi\",4692 => \"Numana\",4693 => \"Nuoro\",4694 => \"Nurachi\",4695 => \"Nuragus\",4696 => \"Nurallao\",4697 => \"Nuraminis\",4698 => \"Nureci\",4699 => \"Nurri\",4700 => \"Nus\",4701 => \"Nusco\",4702 => \"Nuvolento\",4703 => \"Nuvolera\",4704 => \"Nuxis\",8260 => \"Obereggen\",4705 => \"Occhieppo inferiore\",4706 => \"Occhieppo superiore\",4707 => \"Occhiobello\",4708 => \"Occimiano\",4709 => \"Ocre\",4710 => \"Odalengo grande\",4711 => \"Odalengo piccolo\",4712 => \"Oderzo\",4713 => \"Odolo\",4714 => \"Ofena\",4715 => \"Offagna\",4716 => \"Offanengo\",4717 => \"Offida\",4718 => \"Offlaga\",4719 => \"Oggebbio\",4720 => \"Oggiona con santo stefano\",4721 => \"Oggiono\",4722 => \"Oglianico\",4723 => \"Ogliastro cilento\",4724 => \"Olbia\",8470 => \"Olbia Costa Smeralda\",4725 => \"Olcenengo\",4726 => \"Oldenico\",4727 => \"Oleggio\",4728 => \"Oleggio castello\",4729 => \"Olevano di lomellina\",4730 => \"Olevano romano\",4731 => \"Olevano sul tusciano\",4732 => \"Olgiate comasco\",4733 => \"Olgiate molgora\",4734 => \"Olgiate olona\",4735 => \"Olginate\",4736 => \"Oliena\",4737 => \"Oliva gessi\",4738 => \"Olivadi\",4739 => \"Oliveri\",4740 => \"Oliveto citra\",4741 => \"Oliveto lario\",8426 => \"Oliveto lucano\",4743 => \"Olivetta san michele\",4744 => \"Olivola\",4745 => \"Ollastra simaxis\",4746 => \"Ollolai\",4747 => \"Ollomont\",4748 => \"Olmedo\",4749 => \"Olmeneta\",4750 => \"Olmo al brembo\",4751 => \"Olmo gentile\",4752 => \"Oltre il colle\",4753 => \"Oltressenda alta\",4754 => \"Oltrona di san mamette\",4755 => \"Olzai\",4756 => \"Ome\",4757 => \"Omegna\",4758 => \"Omignano\",4759 => \"Onani\",4760 => \"Onano\",4761 => \"Oncino\",8283 => \"Oneglia\",4762 => \"Oneta\",4763 => \"Onifai\",4764 => \"Oniferi\",8664 => \"Onna\",4765 => \"Ono san pietro\",4766 => \"Onore\",4767 => \"Onzo\",4768 => \"Opera\",4769 => \"Opi\",4770 => \"Oppeano\",8409 => \"Oppido lucano\",4772 => \"Oppido mamertina\",4773 => \"Ora\",4774 => \"Orani\",4775 => \"Oratino\",4776 => \"Orbassano\",4777 => \"Orbetello\",4778 => \"Orciano di pesaro\",4779 => \"Orciano pisano\",4780 => \"Orco feglino\",4781 => \"Ordona\",4782 => \"Orero\",4783 => \"Orgiano\",4784 => \"Orgosolo\",4785 => \"Oria\",4786 => \"Oricola\",4787 => \"Origgio\",4788 => \"Orino\",4789 => \"Orio al serio\",4790 => \"Orio canavese\",4791 => \"Orio litta\",4792 => \"Oriolo\",4793 => \"Oriolo romano\",4794 => \"Oristano\",4795 => \"Ormea\",4796 => \"Ormelle\",4797 => \"Ornago\",4798 => \"Ornavasso\",4799 => \"Ornica\",8348 => \"Oropa\",8169 => \"Orosei\",4801 => \"Orotelli\",4802 => \"Orria\",4803 => \"Orroli\",4804 => \"Orsago\",4805 => \"Orsara bormida\",4806 => \"Orsara di puglia\",4807 => \"Orsenigo\",4808 => \"Orsogna\",4809 => \"Orsomarso\",4810 => \"Orta di atella\",4811 => \"Orta nova\",4812 => \"Orta san giulio\",4813 => \"Ortacesus\",4814 => \"Orte\",8460 => \"Orte casello\",4815 => \"Ortelle\",4816 => \"Ortezzano\",4817 => \"Ortignano raggiolo\",4818 => \"Ortisei\",8725 => \"Ortles\",4819 => \"Ortona\",4820 => \"Ortona dei marsi\",4821 => \"Ortonovo\",4822 => \"Ortovero\",4823 => \"Ortucchio\",4824 => \"Ortueri\",4825 => \"Orune\",4826 => \"Orvieto\",8459 => \"Orvieto casello\",4827 => \"Orvinio\",4828 => \"Orzinuovi\",4829 => \"Orzivecchi\",4830 => \"Osasco\",4831 => \"Osasio\",4832 => \"Oschiri\",4833 => \"Osidda\",4834 => \"Osiglia\",4835 => \"Osilo\",4836 => \"Osimo\",4837 => \"Osini\",4838 => \"Osio sopra\",4839 => \"Osio sotto\",4840 => \"Osmate\",4841 => \"Osnago\",8465 => \"Osoppo\",4843 => \"Ospedaletti\",4844 => \"Ospedaletto\",4845 => \"Ospedaletto d'alpinolo\",4846 => \"Ospedaletto euganeo\",4847 => \"Ospedaletto lodigiano\",4848 => \"Ospitale di cadore\",4849 => \"Ospitaletto\",4850 => \"Ossago lodigiano\",4851 => \"Ossana\",4852 => \"Ossi\",4853 => \"Ossimo\",4854 => \"Ossona\",4855 => \"Ossuccio\",4856 => \"Ostana\",4857 => \"Ostellato\",4858 => \"Ostiano\",4859 => \"Ostiglia\",4860 => \"Ostra\",4861 => \"Ostra vetere\",4862 => \"Ostuni\",4863 => \"Otranto\",4864 => \"Otricoli\",4865 => \"Ottana\",4866 => \"Ottati\",4867 => \"Ottaviano\",4868 => \"Ottiglio\",4869 => \"Ottobiano\",4870 => \"Ottone\",4871 => \"Oulx\",4872 => \"Ovada\",4873 => \"Ovaro\",4874 => \"Oviglio\",4875 => \"Ovindoli\",4876 => \"Ovodda\",4877 => \"Oyace\",4878 => \"Ozegna\",4879 => \"Ozieri\",4880 => \"Ozzano dell'emilia\",4881 => \"Ozzano monferrato\",4882 => \"Ozzero\",4883 => \"Pabillonis\",4884 => \"Pace del mela\",4885 => \"Paceco\",4886 => \"Pacentro\",4887 => \"Pachino\",4888 => \"Paciano\",4889 => \"Padenghe sul garda\",4890 => \"Padergnone\",4891 => \"Paderna\",4892 => \"Paderno d'adda\",4893 => \"Paderno del grappa\",4894 => \"Paderno dugnano\",4895 => \"Paderno franciacorta\",4896 => \"Paderno ponchielli\",4897 => \"Padova\",4898 => \"Padria\",4899 => \"Padru\",4900 => \"Padula\",4901 => \"Paduli\",4902 => \"Paesana\",4903 => \"Paese\",8713 => \"Paestum\",8203 => \"Paganella\",4904 => \"Pagani\",8663 => \"Paganica\",4905 => \"Paganico\",4906 => \"Pagazzano\",4907 => \"Pagliara\",4908 => \"Paglieta\",4909 => \"Pagnacco\",4910 => \"Pagno\",4911 => \"Pagnona\",4912 => \"Pago del vallo di lauro\",4913 => \"Pago veiano\",4914 => \"Paisco loveno\",4915 => \"Paitone\",4916 => \"Paladina\",8534 => \"Palafavera\",4917 => \"Palagano\",4918 => \"Palagianello\",4919 => \"Palagiano\",4920 => \"Palagonia\",4921 => \"Palaia\",4922 => \"Palanzano\",4923 => \"Palata\",4924 => \"Palau\",4925 => \"Palazzago\",4926 => \"Palazzo adriano\",4927 => \"Palazzo canavese\",4928 => \"Palazzo pignano\",4929 => \"Palazzo san gervasio\",4930 => \"Palazzolo acreide\",4931 => \"Palazzolo dello stella\",4932 => \"Palazzolo sull'Oglio\",4933 => \"Palazzolo vercellese\",4934 => \"Palazzuolo sul senio\",4935 => \"Palena\",4936 => \"Palermiti\",4937 => \"Palermo\",8575 => \"Palermo Boccadifalco\",8272 => \"Palermo Punta Raisi\",4938 => \"Palestrina\",4939 => \"Palestro\",4940 => \"Paliano\",8121 => \"Palinuro\",4941 => \"Palizzi\",8108 => \"Palizzi Marina\",4942 => \"Pallagorio\",4943 => \"Pallanzeno\",4944 => \"Pallare\",4945 => \"Palma campania\",4946 => \"Palma di montechiaro\",4947 => \"Palmanova\",4948 => \"Palmariggi\",4949 => \"Palmas arborea\",4950 => \"Palmi\",4951 => \"Palmiano\",4952 => \"Palmoli\",4953 => \"Palo del colle\",4954 => \"Palombara sabina\",4955 => \"Palombaro\",4956 => \"Palomonte\",4957 => \"Palosco\",4958 => \"Palu'\",4959 => \"Palu' del fersina\",4960 => \"Paludi\",4961 => \"Paluzza\",4962 => \"Pamparato\",8257 => \"Pampeago\",8753 => \"Panarotta\",4963 => \"Pancalieri\",8261 => \"Pancani\",4964 => \"Pancarana\",4965 => \"Panchia'\",4966 => \"Pandino\",4967 => \"Panettieri\",4968 => \"Panicale\",4969 => \"Pannarano\",4970 => \"Panni\",4971 => \"Pantelleria\",4972 => \"Pantigliate\",4973 => \"Paola\",4974 => \"Paolisi\",4975 => \"Papasidero\",4976 => \"Papozze\",4977 => \"Parabiago\",4978 => \"Parabita\",4979 => \"Paratico\",4980 => \"Parcines\",4981 => \"Pare'\",4982 => \"Parella\",4983 => \"Parenti\",4984 => \"Parete\",4985 => \"Pareto\",4986 => \"Parghelia\",4987 => \"Parlasco\",4988 => \"Parma\",8554 => \"Parma Verdi\",4989 => \"Parodi ligure\",4990 => \"Paroldo\",4991 => \"Parolise\",4992 => \"Parona\",4993 => \"Parrano\",4994 => \"Parre\",4995 => \"Partanna\",4996 => \"Partinico\",4997 => \"Paruzzaro\",4998 => \"Parzanica\",4999 => \"Pasian di prato\",5000 => \"Pasiano di pordenone\",5001 => \"Paspardo\",5002 => \"Passerano Marmorito\",5003 => \"Passignano sul trasimeno\",5004 => \"Passirano\",8613 => \"Passo Bernina\",8760 => \"Passo Campolongo\",8329 => \"Passo Costalunga\",8618 => \"Passo dei Salati\",8207 => \"Passo del Brennero\",8577 => \"Passo del Brocon\",8627 => \"Passo del Cerreto\",8147 => \"Passo del Foscagno\",8308 => \"Passo del Lupo\",8206 => \"Passo del Rombo\",8150 => \"Passo del Tonale\",8196 => \"Passo della Cisa\",8235 => \"Passo della Consuma\",8290 => \"Passo della Presolana\",8659 => \"Passo delle Fittanze\",8145 => \"Passo dello Stelvio\",8213 => \"Passo di Resia\",8752 => \"Passo di Vezzena\",8328 => \"Passo Fedaia\",8759 => \"Passo Gardena\",8277 => \"Passo Groste'\",8756 => \"Passo Lanciano\",8280 => \"Passo Pordoi\",8626 => \"Passo Pramollo\",8210 => \"Passo Rolle\",8279 => \"Passo San Pellegrino\",8325 => \"Passo Sella\",5005 => \"Pastena\",5006 => \"Pastorano\",5007 => \"Pastrengo\",5008 => \"Pasturana\",5009 => \"Pasturo\",8417 => \"Paterno\",5011 => \"Paterno calabro\",5012 => \"Paterno'\",5013 => \"Paternopoli\",5014 => \"Patrica\",5015 => \"Pattada\",5016 => \"Patti\",5017 => \"Patu'\",5018 => \"Pau\",5019 => \"Paularo\",5020 => \"Pauli arbarei\",5021 => \"Paulilatino\",5022 => \"Paullo\",5023 => \"Paupisi\",5024 => \"Pavarolo\",5025 => \"Pavia\",5026 => \"Pavia di udine\",5027 => \"Pavone canavese\",5028 => \"Pavone del mella\",5029 => \"Pavullo nel frignano\",5030 => \"Pazzano\",5031 => \"Peccioli\",5032 => \"Pecco\",5033 => \"Pecetto di valenza\",5034 => \"Pecetto torinese\",5035 => \"Pecorara\",5036 => \"Pedace\",5037 => \"Pedara\",5038 => \"Pedaso\",5039 => \"Pedavena\",5040 => \"Pedemonte\",5041 => \"Pederobba\",5042 => \"Pedesina\",5043 => \"Pedivigliano\",8473 => \"Pedraces\",5044 => \"Pedrengo\",5045 => \"Peglio\",5046 => \"Peglio\",5047 => \"Pegognaga\",5048 => \"Peia\",8665 => \"Pejo\",5050 => \"Pelago\",5051 => \"Pella\",5052 => \"Pellegrino parmense\",5053 => \"Pellezzano\",5054 => \"Pellio intelvi\",5055 => \"Pellizzano\",5056 => \"Pelugo\",5057 => \"Penango\",5058 => \"Penna in teverina\",5059 => \"Penna san giovanni\",5060 => \"Penna sant'andrea\",5061 => \"Pennabilli\",5062 => \"Pennadomo\",5063 => \"Pennapiedimonte\",5064 => \"Penne\",8208 => \"Pennes\",5065 => \"Pentone\",5066 => \"Perano\",5067 => \"Perarolo di cadore\",5068 => \"Perca\",5069 => \"Percile\",5070 => \"Perdasdefogu\",5071 => \"Perdaxius\",5072 => \"Perdifumo\",5073 => \"Perego\",5074 => \"Pereto\",5075 => \"Perfugas\",5076 => \"Pergine valdarno\",5077 => \"Pergine valsugana\",5078 => \"Pergola\",5079 => \"Perinaldo\",5080 => \"Perito\",5081 => \"Perledo\",5082 => \"Perletto\",5083 => \"Perlo\",5084 => \"Perloz\",5085 => \"Pernumia\",5086 => \"Pero\",5087 => \"Perosa argentina\",5088 => \"Perosa canavese\",5089 => \"Perrero\",5090 => \"Persico dosimo\",5091 => \"Pertengo\",5092 => \"Pertica alta\",5093 => \"Pertica bassa\",8586 => \"Perticara di Novafeltria\",5094 => \"Pertosa\",5095 => \"Pertusio\",5096 => \"Perugia\",8555 => \"Perugia Sant'Egidio\",5097 => \"Pesaro\",5098 => \"Pescaglia\",5099 => \"Pescantina\",5100 => \"Pescara\",8275 => \"Pescara Liberi\",5101 => \"Pescarolo ed uniti\",5102 => \"Pescasseroli\",5103 => \"Pescate\",8312 => \"Pescegallo\",5104 => \"Pesche\",5105 => \"Peschici\",5106 => \"Peschiera borromeo\",5107 => \"Peschiera del garda\",5108 => \"Pescia\",5109 => \"Pescina\",8454 => \"Pescina casello\",5110 => \"Pesco sannita\",5111 => \"Pescocostanzo\",5112 => \"Pescolanciano\",5113 => \"Pescopagano\",5114 => \"Pescopennataro\",5115 => \"Pescorocchiano\",5116 => \"Pescosansonesco\",5117 => \"Pescosolido\",5118 => \"Pessano con Bornago\",5119 => \"Pessina cremonese\",5120 => \"Pessinetto\",5121 => \"Petacciato\",5122 => \"Petilia policastro\",5123 => \"Petina\",5124 => \"Petralia soprana\",5125 => \"Petralia sottana\",5126 => \"Petrella salto\",5127 => \"Petrella tifernina\",5128 => \"Petriano\",5129 => \"Petriolo\",5130 => \"Petritoli\",5131 => \"Petrizzi\",5132 => \"Petrona'\",5133 => \"Petrosino\",5134 => \"Petruro irpino\",5135 => \"Pettenasco\",5136 => \"Pettinengo\",5137 => \"Pettineo\",5138 => \"Pettoranello del molise\",5139 => \"Pettorano sul gizio\",5140 => \"Pettorazza grimani\",5141 => \"Peveragno\",5142 => \"Pezzana\",5143 => \"Pezzaze\",5144 => \"Pezzolo valle uzzone\",5145 => \"Piacenza\",5146 => \"Piacenza d'adige\",5147 => \"Piadena\",5148 => \"Piagge\",5149 => \"Piaggine\",8706 => \"Piamprato\",5150 => \"Pian camuno\",8309 => \"Pian Cavallaro\",8233 => \"Pian del Cansiglio\",8642 => \"Pian del Frais\",8705 => \"Pian della Mussa\",8634 => \"Pian delle Betulle\",5151 => \"Pian di sco'\",8712 => \"Pian di Sole\",5152 => \"Piana crixia\",5153 => \"Piana degli albanesi\",8653 => \"Piana di Marcesina\",5154 => \"Piana di monte verna\",8305 => \"Pianalunga\",5155 => \"Piancastagnaio\",8516 => \"Piancavallo\",5156 => \"Piancogno\",5157 => \"Piandimeleto\",5158 => \"Piane crati\",8561 => \"Piane di Mocogno\",5159 => \"Pianella\",5160 => \"Pianello del lario\",5161 => \"Pianello val tidone\",5162 => \"Pianengo\",5163 => \"Pianezza\",5164 => \"Pianezze\",5165 => \"Pianfei\",8605 => \"Piani d'Erna\",8517 => \"Piani di Artavaggio\",8234 => \"Piani di Bobbio\",5166 => \"Pianico\",5167 => \"Pianiga\",8314 => \"Piano del Voglio\",5168 => \"Piano di Sorrento\",8630 => \"Piano Provenzana\",5169 => \"Pianopoli\",5170 => \"Pianoro\",5171 => \"Piansano\",5172 => \"Piantedo\",5173 => \"Piario\",5174 => \"Piasco\",5175 => \"Piateda\",5176 => \"Piatto\",5177 => \"Piazza al serchio\",5178 => \"Piazza armerina\",5179 => \"Piazza brembana\",5180 => \"Piazzatorre\",5181 => \"Piazzola sul brenta\",5182 => \"Piazzolo\",5183 => \"Picciano\",5184 => \"Picerno\",5185 => \"Picinisco\",5186 => \"Pico\",5187 => \"Piea\",5188 => \"Piedicavallo\",8218 => \"Piediluco\",5189 => \"Piedimonte etneo\",5190 => \"Piedimonte matese\",5191 => \"Piedimonte san germano\",5192 => \"Piedimulera\",5193 => \"Piegaro\",5194 => \"Pienza\",5195 => \"Pieranica\",5196 => \"Pietra de'giorgi\",5197 => \"Pietra ligure\",5198 => \"Pietra marazzi\",5199 => \"Pietrabbondante\",5200 => \"Pietrabruna\",5201 => \"Pietracamela\",5202 => \"Pietracatella\",5203 => \"Pietracupa\",5204 => \"Pietradefusi\",5205 => \"Pietraferrazzana\",5206 => \"Pietrafitta\",5207 => \"Pietragalla\",5208 => \"Pietralunga\",5209 => \"Pietramelara\",5210 => \"Pietramontecorvino\",5211 => \"Pietranico\",5212 => \"Pietrapaola\",5213 => \"Pietrapertosa\",5214 => \"Pietraperzia\",5215 => \"Pietraporzio\",5216 => \"Pietraroja\",5217 => \"Pietrarubbia\",5218 => \"Pietrasanta\",5219 => \"Pietrastornina\",5220 => \"Pietravairano\",5221 => \"Pietrelcina\",5222 => \"Pieve a nievole\",5223 => \"Pieve albignola\",5224 => \"Pieve d'alpago\",5225 => \"Pieve d'olmi\",5226 => \"Pieve del cairo\",5227 => \"Pieve di bono\",5228 => \"Pieve di cadore\",5229 => \"Pieve di cento\",5230 => \"Pieve di coriano\",5231 => \"Pieve di ledro\",5232 => \"Pieve di soligo\",5233 => \"Pieve di teco\",5234 => \"Pieve emanuele\",5235 => \"Pieve fissiraga\",5236 => \"Pieve fosciana\",5237 => \"Pieve ligure\",5238 => \"Pieve porto morone\",5239 => \"Pieve san giacomo\",5240 => \"Pieve santo stefano\",5241 => \"Pieve tesino\",5242 => \"Pieve torina\",5243 => \"Pieve vergonte\",5244 => \"Pievebovigliana\",5245 => \"Pievepelago\",5246 => \"Piglio\",5247 => \"Pigna\",5248 => \"Pignataro interamna\",5249 => \"Pignataro maggiore\",5250 => \"Pignola\",5251 => \"Pignone\",5252 => \"Pigra\",5253 => \"Pila\",8221 => \"Pila\",5254 => \"Pimentel\",5255 => \"Pimonte\",5256 => \"Pinarolo po\",5257 => \"Pinasca\",5258 => \"Pincara\",5259 => \"Pinerolo\",5260 => \"Pineto\",5261 => \"Pino d'asti\",5262 => \"Pino sulla sponda del lago magg.\",5263 => \"Pino torinese\",5264 => \"Pinzano al tagliamento\",5265 => \"Pinzolo\",5266 => \"Piobbico\",5267 => \"Piobesi d'alba\",5268 => \"Piobesi torinese\",5269 => \"Piode\",5270 => \"Pioltello\",5271 => \"Piombino\",5272 => \"Piombino dese\",5273 => \"Pioraco\",5274 => \"Piossasco\",5275 => \"Piova' massaia\",5276 => \"Piove di sacco\",5277 => \"Piovene rocchette\",5278 => \"Piovera\",5279 => \"Piozzano\",5280 => \"Piozzo\",5281 => \"Piraino\",5282 => \"Pisa\",8518 => \"Pisa San Giusto\",5283 => \"Pisano\",5284 => \"Piscina\",5285 => \"Piscinas\",5286 => \"Pisciotta\",5287 => \"Pisogne\",5288 => \"Pisoniano\",5289 => \"Pisticci\",5290 => \"Pistoia\",5291 => \"Piteglio\",5292 => \"Pitigliano\",5293 => \"Piubega\",5294 => \"Piuro\",5295 => \"Piverone\",5296 => \"Pizzale\",5297 => \"Pizzighettone\",5298 => \"Pizzo\",8737 => \"Pizzo Arera\",8727 => \"Pizzo Bernina\",8736 => \"Pizzo dei Tre Signori\",8739 => \"Pizzo della Presolana\",5299 => \"Pizzoferrato\",5300 => \"Pizzoli\",5301 => \"Pizzone\",5302 => \"Pizzoni\",5303 => \"Placanica\",8342 => \"Plaghera\",8685 => \"Plain Maison\",8324 => \"Plain Mason\",8337 => \"Plan\",8469 => \"Plan Boè\",8633 => \"Plan Checrouit\",8204 => \"Plan de Corones\",8576 => \"Plan in Passiria\",5304 => \"Plataci\",5305 => \"Platania\",8241 => \"Plateau Rosa\",5306 => \"Plati'\",5307 => \"Plaus\",5308 => \"Plesio\",5309 => \"Ploaghe\",5310 => \"Plodio\",8569 => \"Plose\",5311 => \"Pocapaglia\",5312 => \"Pocenia\",5313 => \"Podenzana\",5314 => \"Podenzano\",5315 => \"Pofi\",5316 => \"Poggiardo\",5317 => \"Poggibonsi\",5318 => \"Poggio a caiano\",5319 => \"Poggio berni\",5320 => \"Poggio bustone\",5321 => \"Poggio catino\",5322 => \"Poggio imperiale\",5323 => \"Poggio mirteto\",5324 => \"Poggio moiano\",5325 => \"Poggio nativo\",5326 => \"Poggio picenze\",5327 => \"Poggio renatico\",5328 => \"Poggio rusco\",5329 => \"Poggio san lorenzo\",5330 => \"Poggio san marcello\",5331 => \"Poggio san vicino\",5332 => \"Poggio sannita\",5333 => \"Poggiodomo\",5334 => \"Poggiofiorito\",5335 => \"Poggiomarino\",5336 => \"Poggioreale\",5337 => \"Poggiorsini\",5338 => \"Poggiridenti\",5339 => \"Pogliano milanese\",8339 => \"Pogliola\",5340 => \"Pognana lario\",5341 => \"Pognano\",5342 => \"Pogno\",5343 => \"Poiana maggiore\",5344 => \"Poirino\",5345 => \"Polaveno\",5346 => \"Polcenigo\",5347 => \"Polesella\",5348 => \"Polesine parmense\",5349 => \"Poli\",5350 => \"Polia\",5351 => \"Policoro\",5352 => \"Polignano a mare\",5353 => \"Polinago\",5354 => \"Polino\",5355 => \"Polistena\",5356 => \"Polizzi generosa\",5357 => \"Polla\",5358 => \"Pollein\",5359 => \"Pollena trocchia\",5360 => \"Pollenza\",5361 => \"Pollica\",5362 => \"Pollina\",5363 => \"Pollone\",5364 => \"Pollutri\",5365 => \"Polonghera\",5366 => \"Polpenazze del garda\",8650 => \"Polsa San Valentino\",5367 => \"Polverara\",5368 => \"Polverigi\",5369 => \"Pomarance\",5370 => \"Pomaretto\",8384 => \"Pomarico\",5372 => \"Pomaro monferrato\",5373 => \"Pomarolo\",5374 => \"Pombia\",5375 => \"Pomezia\",5376 => \"Pomigliano d'arco\",5377 => \"Pompei\",5378 => \"Pompeiana\",5379 => \"Pompiano\",5380 => \"Pomponesco\",5381 => \"Pompu\",5382 => \"Poncarale\",5383 => \"Ponderano\",5384 => \"Ponna\",5385 => \"Ponsacco\",5386 => \"Ponso\",8220 => \"Pont\",5389 => \"Pont canavese\",5427 => \"Pont Saint Martin\",5387 => \"Pontassieve\",5388 => \"Pontboset\",5390 => \"Ponte\",5391 => \"Ponte buggianese\",5392 => \"Ponte dell'olio\",5393 => \"Ponte di legno\",5394 => \"Ponte di piave\",5395 => \"Ponte Gardena\",5396 => \"Ponte in valtellina\",5397 => \"Ponte lambro\",5398 => \"Ponte nelle alpi\",5399 => \"Ponte nizza\",5400 => \"Ponte nossa\",5401 => \"Ponte San Nicolo'\",5402 => \"Ponte San Pietro\",5403 => \"Pontebba\",5404 => \"Pontecagnano faiano\",5405 => \"Pontecchio polesine\",5406 => \"Pontechianale\",5407 => \"Pontecorvo\",5408 => \"Pontecurone\",5409 => \"Pontedassio\",5410 => \"Pontedera\",5411 => \"Pontelandolfo\",5412 => \"Pontelatone\",5413 => \"Pontelongo\",5414 => \"Pontenure\",5415 => \"Ponteranica\",5416 => \"Pontestura\",5417 => \"Pontevico\",5418 => \"Pontey\",5419 => \"Ponti\",5420 => \"Ponti sul mincio\",5421 => \"Pontida\",5422 => \"Pontinia\",5423 => \"Pontinvrea\",5424 => \"Pontirolo nuovo\",5425 => \"Pontoglio\",5426 => \"Pontremoli\",5428 => \"Ponza\",5429 => \"Ponzano di fermo\",8462 => \"Ponzano galleria\",5430 => \"Ponzano monferrato\",5431 => \"Ponzano romano\",5432 => \"Ponzano veneto\",5433 => \"Ponzone\",5434 => \"Popoli\",5435 => \"Poppi\",8192 => \"Populonia\",5436 => \"Porano\",5437 => \"Porcari\",5438 => \"Porcia\",5439 => \"Pordenone\",5440 => \"Porlezza\",5441 => \"Pornassio\",5442 => \"Porpetto\",5443 => \"Porretta terme\",5444 => \"Portacomaro\",5445 => \"Portalbera\",5446 => \"Porte\",5447 => \"Portici\",5448 => \"Portico di caserta\",5449 => \"Portico e san benedetto\",5450 => \"Portigliola\",8294 => \"Porto Alabe\",5451 => \"Porto azzurro\",5452 => \"Porto ceresio\",8528 => \"Porto Cervo\",5453 => \"Porto cesareo\",8295 => \"Porto Conte\",8612 => \"Porto Corsini\",5454 => \"Porto empedocle\",8669 => \"Porto Ercole\",8743 => \"Porto Levante\",5455 => \"Porto mantovano\",8178 => \"Porto Pino\",5456 => \"Porto recanati\",8529 => \"Porto Rotondo\",5457 => \"Porto san giorgio\",5458 => \"Porto sant'elpidio\",8670 => \"Porto Santo Stefano\",5459 => \"Porto tolle\",5460 => \"Porto torres\",5461 => \"Porto valtravaglia\",5462 => \"Porto viro\",8172 => \"Portobello di Gallura\",5463 => \"Portobuffole'\",5464 => \"Portocannone\",5465 => \"Portoferraio\",5466 => \"Portofino\",5467 => \"Portogruaro\",5468 => \"Portomaggiore\",5469 => \"Portopalo di capo passero\",8171 => \"Portorotondo\",5470 => \"Portoscuso\",5471 => \"Portovenere\",5472 => \"Portula\",5473 => \"Posada\",5474 => \"Posina\",5475 => \"Positano\",5476 => \"Possagno\",5477 => \"Posta\",5478 => \"Posta fibreno\",5479 => \"Postal\",5480 => \"Postalesio\",5481 => \"Postiglione\",5482 => \"Postua\",5483 => \"Potenza\",5484 => \"Potenza picena\",5485 => \"Pove del grappa\",5486 => \"Povegliano\",5487 => \"Povegliano veronese\",5488 => \"Poviglio\",5489 => \"Povoletto\",5490 => \"Pozza di fassa\",5491 => \"Pozzaglia sabino\",5492 => \"Pozzaglio ed uniti\",5493 => \"Pozzallo\",5494 => \"Pozzilli\",5495 => \"Pozzo d'adda\",5496 => \"Pozzol groppo\",5497 => \"Pozzolengo\",5498 => \"Pozzoleone\",5499 => \"Pozzolo formigaro\",5500 => \"Pozzomaggiore\",5501 => \"Pozzonovo\",5502 => \"Pozzuoli\",5503 => \"Pozzuolo del friuli\",5504 => \"Pozzuolo martesana\",8693 => \"Pra Catinat\",5505 => \"Pradalunga\",5506 => \"Pradamano\",5507 => \"Pradleves\",5508 => \"Pragelato\",5509 => \"Praia a mare\",5510 => \"Praiano\",5511 => \"Pralboino\",5512 => \"Prali\",5513 => \"Pralormo\",5514 => \"Pralungo\",5515 => \"Pramaggiore\",5516 => \"Pramollo\",5517 => \"Prarolo\",5518 => \"Prarostino\",5519 => \"Prasco\",5520 => \"Prascorsano\",5521 => \"Praso\",5522 => \"Prata camportaccio\",5523 => \"Prata d'ansidonia\",5524 => \"Prata di pordenone\",5525 => \"Prata di principato ultra\",5526 => \"Prata sannita\",5527 => \"Pratella\",8102 => \"Prati di Tivo\",8694 => \"Pratica di Mare\",5528 => \"Pratiglione\",5529 => \"Prato\",5530 => \"Prato allo Stelvio\",5531 => \"Prato carnico\",8157 => \"Prato Nevoso\",5532 => \"Prato sesia\",8560 => \"Prato Spilla\",5533 => \"Pratola peligna\",5534 => \"Pratola serra\",5535 => \"Pratovecchio\",5536 => \"Pravisdomini\",5537 => \"Pray\",5538 => \"Prazzo\",5539 => \"Pre' Saint Didier\",5540 => \"Precenicco\",5541 => \"Preci\",5542 => \"Predappio\",5543 => \"Predazzo\",5544 => \"Predoi\",5545 => \"Predore\",5546 => \"Predosa\",5547 => \"Preganziol\",5548 => \"Pregnana milanese\",5549 => \"Prela'\",5550 => \"Premana\",5551 => \"Premariacco\",5552 => \"Premeno\",5553 => \"Premia\",5554 => \"Premilcuore\",5555 => \"Premolo\",5556 => \"Premosello chiovenda\",5557 => \"Preone\",5558 => \"Preore\",5559 => \"Prepotto\",8578 => \"Presanella\",5560 => \"Preseglie\",5561 => \"Presenzano\",5562 => \"Presezzo\",5563 => \"Presicce\",5564 => \"Pressana\",5565 => \"Prestine\",5566 => \"Pretoro\",5567 => \"Prevalle\",5568 => \"Prezza\",5569 => \"Prezzo\",5570 => \"Priero\",5571 => \"Prignano cilento\",5572 => \"Prignano sulla secchia\",5573 => \"Primaluna\",5574 => \"Priocca\",5575 => \"Priola\",5576 => \"Priolo gargallo\",5577 => \"Priverno\",5578 => \"Prizzi\",5579 => \"Proceno\",5580 => \"Procida\",5581 => \"Propata\",5582 => \"Proserpio\",5583 => \"Prossedi\",5584 => \"Provaglio d'iseo\",5585 => \"Provaglio val sabbia\",5586 => \"Proves\",5587 => \"Provvidenti\",8189 => \"Prunetta\",5588 => \"Prunetto\",5589 => \"Puegnago sul garda\",5590 => \"Puglianello\",5591 => \"Pula\",5592 => \"Pulfero\",5593 => \"Pulsano\",5594 => \"Pumenengo\",8584 => \"Punta Ala\",8708 => \"Punta Ban\",8564 => \"Punta Helbronner\",8306 => \"Punta Indren\",8107 => \"Punta Stilo\",5595 => \"Puos d'alpago\",5596 => \"Pusiano\",5597 => \"Putifigari\",5598 => \"Putignano\",5599 => \"Quadrelle\",5600 => \"Quadri\",5601 => \"Quagliuzzo\",5602 => \"Qualiano\",5603 => \"Quaranti\",5604 => \"Quaregna\",5605 => \"Quargnento\",5606 => \"Quarna sopra\",5607 => \"Quarna sotto\",5608 => \"Quarona\",5609 => \"Quarrata\",5610 => \"Quart\",5611 => \"Quarto\",5612 => \"Quarto d'altino\",5613 => \"Quartu sant'elena\",5614 => \"Quartucciu\",5615 => \"Quassolo\",5616 => \"Quattordio\",5617 => \"Quattro castella\",5618 => \"Quero\",5619 => \"Quiliano\",5620 => \"Quincinetto\",5621 => \"Quindici\",5622 => \"Quingentole\",5623 => \"Quintano\",5624 => \"Quinto di treviso\",5625 => \"Quinto vercellese\",5626 => \"Quinto vicentino\",5627 => \"Quinzano d'oglio\",5628 => \"Quistello\",5629 => \"Quittengo\",5630 => \"Rabbi\",5631 => \"Racale\",5632 => \"Racalmuto\",5633 => \"Racconigi\",5634 => \"Raccuja\",5635 => \"Racines\",8352 => \"Racines Giovo\",5636 => \"Radda in chianti\",5637 => \"Raddusa\",5638 => \"Radicofani\",5639 => \"Radicondoli\",5640 => \"Raffadali\",5641 => \"Ragalna\",5642 => \"Ragogna\",5643 => \"Ragoli\",5644 => \"Ragusa\",5645 => \"Raiano\",5646 => \"Ramacca\",5647 => \"Ramiseto\",5648 => \"Ramponio verna\",5649 => \"Rancio valcuvia\",5650 => \"Ranco\",5651 => \"Randazzo\",5652 => \"Ranica\",5653 => \"Ranzanico\",5654 => \"Ranzo\",5655 => \"Rapagnano\",5656 => \"Rapallo\",5657 => \"Rapino\",5658 => \"Rapolano terme\",8394 => \"Rapolla\",5660 => \"Rapone\",5661 => \"Rassa\",5662 => \"Rasun Anterselva\",5663 => \"Rasura\",5664 => \"Ravanusa\",5665 => \"Ravarino\",5666 => \"Ravascletto\",5667 => \"Ravello\",5668 => \"Ravenna\",5669 => \"Raveo\",5670 => \"Raviscanina\",5671 => \"Re\",5672 => \"Rea\",5673 => \"Realmonte\",5674 => \"Reana del roiale\",5675 => \"Reano\",5676 => \"Recale\",5677 => \"Recanati\",5678 => \"Recco\",5679 => \"Recetto\",8639 => \"Recoaro Mille\",5680 => \"Recoaro Terme\",5681 => \"Redavalle\",5682 => \"Redondesco\",5683 => \"Refrancore\",5684 => \"Refrontolo\",5685 => \"Regalbuto\",5686 => \"Reggello\",8542 => \"Reggio Aeroporto dello Stretto\",5687 => \"Reggio Calabria\",5688 => \"Reggio Emilia\",5689 => \"Reggiolo\",5690 => \"Reino\",5691 => \"Reitano\",5692 => \"Remanzacco\",5693 => \"Remedello\",5694 => \"Renate\",5695 => \"Rende\",5696 => \"Renon\",5697 => \"Resana\",5698 => \"Rescaldina\",8734 => \"Resegone\",5699 => \"Resia\",5700 => \"Resiutta\",5701 => \"Resuttano\",5702 => \"Retorbido\",5703 => \"Revello\",5704 => \"Revere\",5705 => \"Revigliasco d'asti\",5706 => \"Revine lago\",5707 => \"Revo'\",5708 => \"Rezzago\",5709 => \"Rezzato\",5710 => \"Rezzo\",5711 => \"Rezzoaglio\",5712 => \"Rhemes Notre Dame\",5713 => \"Rhemes Saint Georges\",5714 => \"Rho\",5715 => \"Riace\",8106 => \"Riace Marina\",5716 => \"Rialto\",5717 => \"Riano\",5718 => \"Riardo\",5719 => \"Ribera\",5720 => \"Ribordone\",5721 => \"Ricadi\",5722 => \"Ricaldone\",5723 => \"Riccia\",5724 => \"Riccione\",5725 => \"Ricco' del golfo di spezia\",5726 => \"Ricengo\",5727 => \"Ricigliano\",5728 => \"Riese pio x\",5729 => \"Riesi\",5730 => \"Rieti\",5731 => \"Rifiano\",5732 => \"Rifreddo\",8691 => \"Rifugio Boffalora Ticino\",8244 => \"Rifugio Calvi Laghi Gemelli\",8684 => \"Rifugio Chivasso - Colle del Nivolet\",8678 => \"Rifugio Curò\",8679 => \"Rifugio laghi Gemelli\",8731 => \"Rifugio Livio Bianco\",8681 => \"Rifugio Mezzalama\",8682 => \"Rifugio Quintino Sella\",8629 => \"Rifugio Sapienza\",8683 => \"Rifugio Torino\",8680 => \"Rifugio Viviani\",5733 => \"Rignano flaminio\",5734 => \"Rignano garganico\",5735 => \"Rignano sull'arno\",5736 => \"Rigolato\",5737 => \"Rima san giuseppe\",5738 => \"Rimasco\",5739 => \"Rimella\",5740 => \"Rimini\",8546 => \"Rimini Miramare\",5741 => \"Rio di Pusteria\",5742 => \"Rio marina\",5743 => \"Rio nell'elba\",5744 => \"Rio saliceto\",5745 => \"Riofreddo\",5746 => \"Riola sardo\",5747 => \"Riolo terme\",5748 => \"Riolunato\",5749 => \"Riomaggiore\",5750 => \"Rionero in vulture\",5751 => \"Rionero sannitico\",8503 => \"Rioveggio\",5752 => \"Ripa teatina\",5753 => \"Ripabottoni\",8404 => \"Ripacandida\",5755 => \"Ripalimosani\",5756 => \"Ripalta arpina\",5757 => \"Ripalta cremasca\",5758 => \"Ripalta guerina\",5759 => \"Riparbella\",5760 => \"Ripatransone\",5761 => \"Ripe\",5762 => \"Ripe san ginesio\",5763 => \"Ripi\",5764 => \"Riposto\",5765 => \"Rittana\",5766 => \"Riva del garda\",5767 => \"Riva di solto\",8579 => \"Riva di Tures\",5768 => \"Riva ligure\",5769 => \"Riva presso chieri\",5770 => \"Riva valdobbia\",5771 => \"Rivalba\",5772 => \"Rivalta bormida\",5773 => \"Rivalta di torino\",5774 => \"Rivamonte agordino\",5775 => \"Rivanazzano\",5776 => \"Rivara\",5777 => \"Rivarolo canavese\",5778 => \"Rivarolo del re ed uniti\",5779 => \"Rivarolo mantovano\",5780 => \"Rivarone\",5781 => \"Rivarossa\",5782 => \"Rive\",5783 => \"Rive d'arcano\",8398 => \"Rivello\",5785 => \"Rivergaro\",5786 => \"Rivignano\",5787 => \"Rivisondoli\",5788 => \"Rivodutri\",5789 => \"Rivoli\",8436 => \"Rivoli veronese\",5791 => \"Rivolta d'adda\",5792 => \"Rizziconi\",5793 => \"Ro\",5794 => \"Roana\",5795 => \"Roaschia\",5796 => \"Roascio\",5797 => \"Roasio\",5798 => \"Roatto\",5799 => \"Robassomero\",5800 => \"Robbiate\",5801 => \"Robbio\",5802 => \"Robecchetto con Induno\",5803 => \"Robecco d'oglio\",5804 => \"Robecco pavese\",5805 => \"Robecco sul naviglio\",5806 => \"Robella\",5807 => \"Robilante\",5808 => \"Roburent\",5809 => \"Rocca canavese\",5810 => \"Rocca Canterano\",5811 => \"Rocca Ciglie'\",5812 => \"Rocca d'Arazzo\",5813 => \"Rocca d'Arce\",5814 => \"Rocca d'Evandro\",5815 => \"Rocca de' Baldi\",5816 => \"Rocca de' Giorgi\",5817 => \"Rocca di Botte\",5818 => \"Rocca di Cambio\",5819 => \"Rocca di Cave\",5820 => \"Rocca di Mezzo\",5821 => \"Rocca di Neto\",5822 => \"Rocca di Papa\",5823 => \"Rocca Grimalda\",5824 => \"Rocca Imperiale\",8115 => \"Rocca Imperiale Marina\",5825 => \"Rocca Massima\",5826 => \"Rocca Pia\",5827 => \"Rocca Pietore\",5828 => \"Rocca Priora\",5829 => \"Rocca San Casciano\",5830 => \"Rocca San Felice\",5831 => \"Rocca San Giovanni\",5832 => \"Rocca Santa Maria\",5833 => \"Rocca Santo Stefano\",5834 => \"Rocca Sinibalda\",5835 => \"Rocca Susella\",5836 => \"Roccabascerana\",5837 => \"Roccabernarda\",5838 => \"Roccabianca\",5839 => \"Roccabruna\",8535 => \"Roccacaramanico\",5840 => \"Roccacasale\",5841 => \"Roccadaspide\",5842 => \"Roccafiorita\",5843 => \"Roccafluvione\",5844 => \"Roccaforte del greco\",5845 => \"Roccaforte ligure\",5846 => \"Roccaforte mondovi'\",5847 => \"Roccaforzata\",5848 => \"Roccafranca\",5849 => \"Roccagiovine\",5850 => \"Roccagloriosa\",5851 => \"Roccagorga\",5852 => \"Roccalbegna\",5853 => \"Roccalumera\",5854 => \"Roccamandolfi\",5855 => \"Roccamena\",5856 => \"Roccamonfina\",5857 => \"Roccamontepiano\",5858 => \"Roccamorice\",8418 => \"Roccanova\",5860 => \"Roccantica\",5861 => \"Roccapalumba\",5862 => \"Roccapiemonte\",5863 => \"Roccarainola\",5864 => \"Roccaraso\",5865 => \"Roccaromana\",5866 => \"Roccascalegna\",5867 => \"Roccasecca\",5868 => \"Roccasecca dei volsci\",5869 => \"Roccasicura\",5870 => \"Roccasparvera\",5871 => \"Roccaspinalveti\",5872 => \"Roccastrada\",5873 => \"Roccavaldina\",5874 => \"Roccaverano\",5875 => \"Roccavignale\",5876 => \"Roccavione\",5877 => \"Roccavivara\",5878 => \"Roccella ionica\",5879 => \"Roccella valdemone\",5880 => \"Rocchetta a volturno\",5881 => \"Rocchetta belbo\",5882 => \"Rocchetta di vara\",5883 => \"Rocchetta e croce\",5884 => \"Rocchetta ligure\",5885 => \"Rocchetta nervina\",5886 => \"Rocchetta palafea\",5887 => \"Rocchetta sant'antonio\",5888 => \"Rocchetta tanaro\",5889 => \"Rodano\",5890 => \"Roddi\",5891 => \"Roddino\",5892 => \"Rodello\",5893 => \"Rodengo\",5894 => \"Rodengo-saiano\",5895 => \"Rodero\",5896 => \"Rodi garganico\",5897 => \"Rodi' milici\",5898 => \"Rodigo\",5899 => \"Roe' volciano\",5900 => \"Rofrano\",5901 => \"Rogeno\",5902 => \"Roggiano gravina\",5903 => \"Roghudi\",5904 => \"Rogliano\",5905 => \"Rognano\",5906 => \"Rogno\",5907 => \"Rogolo\",5908 => \"Roiate\",5909 => \"Roio del sangro\",5910 => \"Roisan\",5911 => \"Roletto\",5912 => \"Rolo\",5913 => \"Roma\",8545 => \"Roma Ciampino\",8499 => \"Roma Fiumicino\",5914 => \"Romagnano al monte\",5915 => \"Romagnano sesia\",5916 => \"Romagnese\",5917 => \"Romallo\",5918 => \"Romana\",5919 => \"Romanengo\",5920 => \"Romano canavese\",5921 => \"Romano d'ezzelino\",5922 => \"Romano di lombardia\",5923 => \"Romans d'isonzo\",5924 => \"Rombiolo\",5925 => \"Romeno\",5926 => \"Romentino\",5927 => \"Rometta\",5928 => \"Ronago\",5929 => \"Ronca'\",5930 => \"Roncade\",5931 => \"Roncadelle\",5932 => \"Roncaro\",5933 => \"Roncegno\",5934 => \"Roncello\",5935 => \"Ronchi dei legionari\",5936 => \"Ronchi valsugana\",5937 => \"Ronchis\",5938 => \"Ronciglione\",5939 => \"Ronco all'adige\",8231 => \"Ronco all`Adige\",5940 => \"Ronco biellese\",5941 => \"Ronco briantino\",5942 => \"Ronco canavese\",5943 => \"Ronco scrivia\",5944 => \"Roncobello\",5945 => \"Roncoferraro\",5946 => \"Roncofreddo\",5947 => \"Roncola\",5948 => \"Roncone\",5949 => \"Rondanina\",5950 => \"Rondissone\",5951 => \"Ronsecco\",5952 => \"Ronzo chienis\",5953 => \"Ronzone\",5954 => \"Roppolo\",5955 => \"Rora'\",5956 => \"Rosa'\",5957 => \"Rosarno\",5958 => \"Rosasco\",5959 => \"Rosate\",5960 => \"Rosazza\",5961 => \"Rosciano\",5962 => \"Roscigno\",5963 => \"Rose\",5964 => \"Rosello\",5965 => \"Roseto capo spulico\",8439 => \"Roseto casello\",5966 => \"Roseto degli abruzzi\",5967 => \"Roseto valfortore\",5968 => \"Rosignano marittimo\",5969 => \"Rosignano monferrato\",8195 => \"Rosignano Solvay\",5970 => \"Rosolina\",8744 => \"Rosolina mare\",5971 => \"Rosolini\",8704 => \"Rosone\",5972 => \"Rosora\",5973 => \"Rossa\",5974 => \"Rossana\",5975 => \"Rossano\",8109 => \"Rossano Calabro Marina\",5976 => \"Rossano veneto\",8431 => \"Rossera\",5977 => \"Rossiglione\",5978 => \"Rosta\",5979 => \"Rota d'imagna\",5980 => \"Rota greca\",5981 => \"Rotella\",5982 => \"Rotello\",8429 => \"Rotonda\",5984 => \"Rotondella\",5985 => \"Rotondi\",5986 => \"Rottofreno\",5987 => \"Rotzo\",5988 => \"Roure\",5989 => \"Rovagnate\",5990 => \"Rovasenda\",5991 => \"Rovato\",5992 => \"Rovegno\",5993 => \"Rovellasca\",5994 => \"Rovello porro\",5995 => \"Roverbella\",5996 => \"Roverchiara\",5997 => \"Rovere' della luna\",5998 => \"Rovere' veronese\",5999 => \"Roveredo di gua'\",6000 => \"Roveredo in piano\",6001 => \"Rovereto\",6002 => \"Rovescala\",6003 => \"Rovetta\",6004 => \"Roviano\",6005 => \"Rovigo\",6006 => \"Rovito\",6007 => \"Rovolon\",6008 => \"Rozzano\",6009 => \"Rubano\",6010 => \"Rubiana\",6011 => \"Rubiera\",8632 => \"Rucas\",6012 => \"Ruda\",6013 => \"Rudiano\",6014 => \"Rueglio\",6015 => \"Ruffano\",6016 => \"Ruffia\",6017 => \"Ruffre'\",6018 => \"Rufina\",6019 => \"Ruinas\",6020 => \"Ruino\",6021 => \"Rumo\",8366 => \"Ruoti\",6023 => \"Russi\",6024 => \"Rutigliano\",6025 => \"Rutino\",6026 => \"Ruviano\",8393 => \"Ruvo del monte\",6028 => \"Ruvo di Puglia\",6029 => \"Sabaudia\",6030 => \"Sabbia\",6031 => \"Sabbio chiese\",6032 => \"Sabbioneta\",6033 => \"Sacco\",6034 => \"Saccolongo\",6035 => \"Sacile\",8700 => \"Sacra di San Michele\",6036 => \"Sacrofano\",6037 => \"Sadali\",6038 => \"Sagama\",6039 => \"Sagliano micca\",6040 => \"Sagrado\",6041 => \"Sagron mis\",8602 => \"Saint Barthelemy\",6042 => \"Saint Christophe\",6043 => \"Saint Denis\",8304 => \"Saint Jacques\",6044 => \"Saint Marcel\",6045 => \"Saint Nicolas\",6046 => \"Saint Oyen Flassin\",6047 => \"Saint Pierre\",6048 => \"Saint Rhemy en Bosses\",6049 => \"Saint Vincent\",6050 => \"Sala Baganza\",6051 => \"Sala Biellese\",6052 => \"Sala Bolognese\",6053 => \"Sala Comacina\",6054 => \"Sala Consilina\",6055 => \"Sala Monferrato\",8372 => \"Salandra\",6057 => \"Salaparuta\",6058 => \"Salara\",6059 => \"Salasco\",6060 => \"Salassa\",6061 => \"Salbertrand\",6062 => \"Salcedo\",6063 => \"Salcito\",6064 => \"Sale\",6065 => \"Sale delle Langhe\",6066 => \"Sale Marasino\",6067 => \"Sale San Giovanni\",6068 => \"Salemi\",6069 => \"Salento\",6070 => \"Salerano Canavese\",6071 => \"Salerano sul Lambro\",6072 => \"Salerno\",6073 => \"Saletto\",6074 => \"Salgareda\",6075 => \"Sali Vercellese\",6076 => \"Salice Salentino\",6077 => \"Saliceto\",6078 => \"Salisano\",6079 => \"Salizzole\",6080 => \"Salle\",6081 => \"Salmour\",6082 => \"Salo'\",6083 => \"Salorno\",6084 => \"Salsomaggiore Terme\",6085 => \"Saltara\",6086 => \"Saltrio\",6087 => \"Saludecio\",6088 => \"Saluggia\",6089 => \"Salussola\",6090 => \"Saluzzo\",6091 => \"Salve\",6092 => \"Salvirola\",6093 => \"Salvitelle\",6094 => \"Salza di Pinerolo\",6095 => \"Salza Irpina\",6096 => \"Salzano\",6097 => \"Samarate\",6098 => \"Samassi\",6099 => \"Samatzai\",6100 => \"Sambuca di Sicilia\",6101 => \"Sambuca Pistoiese\",6102 => \"Sambuci\",6103 => \"Sambuco\",6104 => \"Sammichele di Bari\",6105 => \"Samo\",6106 => \"Samolaco\",6107 => \"Samone\",6108 => \"Samone\",6109 => \"Sampeyre\",6110 => \"Samugheo\",6111 => \"San Bartolomeo al Mare\",6112 => \"San Bartolomeo in Galdo\",6113 => \"San Bartolomeo Val Cavargna\",6114 => \"San Basile\",6115 => \"San Basilio\",6116 => \"San Bassano\",6117 => \"San Bellino\",6118 => \"San Benedetto Belbo\",6119 => \"San Benedetto dei Marsi\",6120 => \"San Benedetto del Tronto\",8126 => \"San Benedetto in Alpe\",6121 => \"San Benedetto in Perillis\",6122 => \"San Benedetto Po\",6123 => \"San Benedetto Ullano\",6124 => \"San Benedetto val di Sambro\",6125 => \"San Benigno Canavese\",8641 => \"San Bernardino\",6126 => \"San Bernardino Verbano\",6127 => \"San Biagio della Cima\",6128 => \"San Biagio di Callalta\",6129 => \"San Biagio Platani\",6130 => \"San Biagio Saracinisco\",6131 => \"San Biase\",6132 => \"San Bonifacio\",6133 => \"San Buono\",6134 => \"San Calogero\",6135 => \"San Candido\",6136 => \"San Canzian d'Isonzo\",6137 => \"San Carlo Canavese\",6138 => \"San Casciano dei Bagni\",6139 => \"San Casciano in Val di Pesa\",6140 => \"San Cassiano\",8624 => \"San Cassiano in Badia\",6141 => \"San Cataldo\",6142 => \"San Cesareo\",6143 => \"San Cesario di Lecce\",6144 => \"San Cesario sul Panaro\",8367 => \"San Chirico Nuovo\",6146 => \"San Chirico Raparo\",6147 => \"San Cipirello\",6148 => \"San Cipriano d'Aversa\",6149 => \"San Cipriano Picentino\",6150 => \"San Cipriano Po\",6151 => \"San Clemente\",6152 => \"San Colombano al Lambro\",6153 => \"San Colombano Belmonte\",6154 => \"San Colombano Certenoli\",8622 => \"San Colombano Valdidentro\",6155 => \"San Cono\",6156 => \"San Cosmo Albanese\",8376 => \"San Costantino Albanese\",6158 => \"San Costantino Calabro\",6159 => \"San Costanzo\",6160 => \"San Cristoforo\",6161 => \"San Damiano al Colle\",6162 => \"San Damiano d'Asti\",6163 => \"San Damiano Macra\",6164 => \"San Daniele del Friuli\",6165 => \"San Daniele Po\",6166 => \"San Demetrio Corone\",6167 => \"San Demetrio ne' Vestini\",6168 => \"San Didero\",8556 => \"San Domenico di Varzo\",6169 => \"San Dona' di Piave\",6170 => \"San Donaci\",6171 => \"San Donato di Lecce\",6172 => \"San Donato di Ninea\",6173 => \"San Donato Milanese\",6174 => \"San Donato Val di Comino\",6175 => \"San Dorligo della Valle\",6176 => \"San Fedele Intelvi\",6177 => \"San Fele\",6178 => \"San Felice a Cancello\",6179 => \"San Felice Circeo\",6180 => \"San Felice del Benaco\",6181 => \"San Felice del Molise\",6182 => \"San Felice sul Panaro\",6183 => \"San Ferdinando\",6184 => \"San Ferdinando di Puglia\",6185 => \"San Fermo della Battaglia\",6186 => \"San Fili\",6187 => \"San Filippo del mela\",6188 => \"San Fior\",6189 => \"San Fiorano\",6190 => \"San Floriano del collio\",6191 => \"San Floro\",6192 => \"San Francesco al campo\",6193 => \"San Fratello\",8690 => \"San Galgano\",6194 => \"San Gavino monreale\",6195 => \"San Gemini\",6196 => \"San Genesio Atesino\",6197 => \"San Genesio ed uniti\",6198 => \"San Gennaro vesuviano\",6199 => \"San Germano chisone\",6200 => \"San Germano dei berici\",6201 => \"San Germano vercellese\",6202 => \"San Gervasio bresciano\",6203 => \"San Giacomo degli schiavoni\",6204 => \"San Giacomo delle segnate\",8620 => \"San Giacomo di Roburent\",6205 => \"San Giacomo filippo\",6206 => \"San Giacomo vercellese\",6207 => \"San Gillio\",6208 => \"San Gimignano\",6209 => \"San Ginesio\",6210 => \"San Giorgio a cremano\",6211 => \"San Giorgio a liri\",6212 => \"San Giorgio albanese\",6213 => \"San Giorgio canavese\",6214 => \"San Giorgio del sannio\",6215 => \"San Giorgio della richinvelda\",6216 => \"San Giorgio delle Pertiche\",6217 => \"San Giorgio di lomellina\",6218 => \"San Giorgio di mantova\",6219 => \"San Giorgio di nogaro\",6220 => \"San Giorgio di pesaro\",6221 => \"San Giorgio di piano\",6222 => \"San Giorgio in bosco\",6223 => \"San Giorgio ionico\",6224 => \"San Giorgio la molara\",6225 => \"San Giorgio lucano\",6226 => \"San Giorgio monferrato\",6227 => \"San Giorgio morgeto\",6228 => \"San Giorgio piacentino\",6229 => \"San Giorgio scarampi\",6230 => \"San Giorgio su Legnano\",6231 => \"San Giorio di susa\",6232 => \"San Giovanni a piro\",6233 => \"San Giovanni al natisone\",6234 => \"San Giovanni bianco\",6235 => \"San Giovanni d'asso\",6236 => \"San Giovanni del dosso\",6237 => \"San Giovanni di gerace\",6238 => \"San Giovanni gemini\",6239 => \"San Giovanni ilarione\",6240 => \"San Giovanni in croce\",6241 => \"San Giovanni in fiore\",6242 => \"San Giovanni in galdo\",6243 => \"San Giovanni in marignano\",6244 => \"San Giovanni in persiceto\",8567 => \"San Giovanni in val Aurina\",6245 => \"San Giovanni incarico\",6246 => \"San Giovanni la punta\",6247 => \"San Giovanni lipioni\",6248 => \"San Giovanni lupatoto\",6249 => \"San Giovanni rotondo\",6250 => \"San Giovanni suergiu\",6251 => \"San Giovanni teatino\",6252 => \"San Giovanni valdarno\",6253 => \"San Giuliano del sannio\",6254 => \"San Giuliano di Puglia\",6255 => \"San Giuliano milanese\",6256 => \"San Giuliano terme\",6257 => \"San Giuseppe jato\",6258 => \"San Giuseppe vesuviano\",6259 => \"San Giustino\",6260 => \"San Giusto canavese\",6261 => \"San Godenzo\",6262 => \"San Gregorio d'ippona\",6263 => \"San Gregorio da sassola\",6264 => \"San Gregorio di Catania\",6265 => \"San Gregorio Magno\",6266 => \"San Gregorio Matese\",6267 => \"San Gregorio nelle Alpi\",6268 => \"San Lazzaro di Savena\",6269 => \"San Leo\",6270 => \"San Leonardo\",6271 => \"San Leonardo in Passiria\",8580 => \"San Leone\",6272 => \"San Leucio del Sannio\",6273 => \"San Lorenzello\",6274 => \"San Lorenzo\",6275 => \"San Lorenzo al mare\",6276 => \"San Lorenzo Bellizzi\",6277 => \"San Lorenzo del vallo\",6278 => \"San Lorenzo di Sebato\",6279 => \"San Lorenzo in Banale\",6280 => \"San Lorenzo in campo\",6281 => \"San Lorenzo isontino\",6282 => \"San Lorenzo Maggiore\",6283 => \"San Lorenzo Nuovo\",6284 => \"San Luca\",6285 => \"San Lucido\",6286 => \"San Lupo\",6287 => \"San Mango d'Aquino\",6288 => \"San Mango Piemonte\",6289 => \"San Mango sul Calore\",6290 => \"San Marcellino\",6291 => \"San Marcello\",6292 => \"San Marcello pistoiese\",6293 => \"San Marco argentano\",6294 => \"San Marco d'Alunzio\",6295 => \"San Marco dei Cavoti\",6296 => \"San Marco Evangelista\",6297 => \"San Marco in Lamis\",6298 => \"San Marco la Catola\",8152 => \"San Marino\",6299 => \"San Martino al Tagliamento\",6300 => \"San Martino Alfieri\",6301 => \"San Martino Buon Albergo\",6302 => \"San Martino Canavese\",6303 => \"San Martino d'Agri\",6304 => \"San Martino dall'argine\",6305 => \"San Martino del lago\",8209 => \"San Martino di Castrozza\",6306 => \"San Martino di Finita\",6307 => \"San Martino di Lupari\",6308 => \"San Martino di venezze\",8410 => \"San Martino d`agri\",6309 => \"San Martino in Badia\",6310 => \"San Martino in Passiria\",6311 => \"San Martino in pensilis\",6312 => \"San Martino in rio\",6313 => \"San Martino in strada\",6314 => \"San Martino sannita\",6315 => \"San Martino siccomario\",6316 => \"San Martino sulla marrucina\",6317 => \"San Martino valle caudina\",6318 => \"San Marzano di San Giuseppe\",6319 => \"San Marzano oliveto\",6320 => \"San Marzano sul Sarno\",6321 => \"San Massimo\",6322 => \"San Maurizio canavese\",6323 => \"San Maurizio d'opaglio\",6324 => \"San Mauro castelverde\",6325 => \"San Mauro cilento\",6326 => \"San Mauro di saline\",8427 => \"San Mauro forte\",6328 => \"San Mauro la bruca\",6329 => \"San Mauro marchesato\",6330 => \"San Mauro Pascoli\",6331 => \"San Mauro torinese\",6332 => \"San Michele al Tagliamento\",6333 => \"San Michele all'Adige\",6334 => \"San Michele di ganzaria\",6335 => \"San Michele di serino\",6336 => \"San Michele Mondovi'\",6337 => \"San Michele salentino\",6338 => \"San Miniato\",6339 => \"San Nazario\",6340 => \"San Nazzaro\",6341 => \"San Nazzaro Sesia\",6342 => \"San Nazzaro val cavargna\",6343 => \"San Nicola arcella\",6344 => \"San Nicola baronia\",6345 => \"San Nicola da crissa\",6346 => \"San Nicola dell'alto\",6347 => \"San Nicola la strada\",6348 => \"San nicola manfredi\",6349 => \"San nicolo' d'arcidano\",6350 => \"San nicolo' di comelico\",6351 => \"San Nicolo' Gerrei\",6352 => \"San Pancrazio\",6353 => \"San Pancrazio salentino\",6354 => \"San Paolo\",8361 => \"San Paolo albanese\",6356 => \"San Paolo bel sito\",6357 => \"San Paolo cervo\",6358 => \"San Paolo d'argon\",6359 => \"San Paolo di civitate\",6360 => \"San Paolo di Jesi\",6361 => \"San Paolo solbrito\",6362 => \"San Pellegrino terme\",6363 => \"San Pier d'isonzo\",6364 => \"San Pier niceto\",6365 => \"San Piero a sieve\",6366 => \"San Piero Patti\",6367 => \"San Pietro a maida\",6368 => \"San Pietro al Natisone\",6369 => \"San Pietro al Tanagro\",6370 => \"San Pietro apostolo\",6371 => \"San Pietro avellana\",6372 => \"San Pietro clarenza\",6373 => \"San Pietro di cadore\",6374 => \"San Pietro di carida'\",6375 => \"San Pietro di feletto\",6376 => \"San Pietro di morubio\",6377 => \"San Pietro in Amantea\",6378 => \"San Pietro in cariano\",6379 => \"San Pietro in casale\",6380 => \"San Pietro in cerro\",6381 => \"San Pietro in gu\",6382 => \"San Pietro in guarano\",6383 => \"San Pietro in lama\",6384 => \"San Pietro infine\",6385 => \"San Pietro mosezzo\",6386 => \"San Pietro mussolino\",6387 => \"San Pietro val lemina\",6388 => \"San Pietro vernotico\",6389 => \"San Pietro Viminario\",6390 => \"San Pio delle camere\",6391 => \"San Polo d'enza\",6392 => \"San Polo dei cavalieri\",6393 => \"San Polo di Piave\",6394 => \"San Polo matese\",6395 => \"San Ponso\",6396 => \"San Possidonio\",6397 => \"San Potito sannitico\",6398 => \"San Potito ultra\",6399 => \"San Prisco\",6400 => \"San Procopio\",6401 => \"San Prospero\",6402 => \"San Quirico d'orcia\",8199 => \"San Quirico d`Orcia\",6403 => \"San Quirino\",6404 => \"San Raffaele cimena\",6405 => \"San Roberto\",6406 => \"San Rocco al porto\",6407 => \"San Romano in garfagnana\",6408 => \"San Rufo\",6409 => \"San Salvatore di fitalia\",6410 => \"San Salvatore Monferrato\",6411 => \"San Salvatore Telesino\",6412 => \"San Salvo\",8103 => \"San Salvo Marina\",6413 => \"San Sebastiano al Vesuvio\",6414 => \"San Sebastiano Curone\",6415 => \"San Sebastiano da Po\",6416 => \"San Secondo di Pinerolo\",6417 => \"San Secondo Parmense\",6418 => \"San Severino Lucano\",6419 => \"San Severino Marche\",6420 => \"San Severo\",8347 => \"San Sicario di Cesana\",8289 => \"San Simone\",8539 => \"San Simone Baita del Camoscio\",6421 => \"San Siro\",6422 => \"San Sossio Baronia\",6423 => \"San Sostene\",6424 => \"San Sosti\",6425 => \"San Sperate\",6426 => \"San Tammaro\",6427 => \"San Teodoro\",8170 => \"San Teodoro\",6429 => \"San Tomaso agordino\",8212 => \"San Valentino alla Muta\",6430 => \"San Valentino in abruzzo citeriore\",6431 => \"San Valentino torio\",6432 => \"San Venanzo\",6433 => \"San Vendemiano\",6434 => \"San Vero milis\",6435 => \"San Vincenzo\",6436 => \"San Vincenzo la costa\",6437 => \"San Vincenzo valle roveto\",6438 => \"San Vitaliano\",8293 => \"San Vito\",6440 => \"San Vito al tagliamento\",6441 => \"San Vito al torre\",6442 => \"San Vito chietino\",6443 => \"San Vito dei normanni\",6444 => \"San Vito di cadore\",6445 => \"San Vito di fagagna\",6446 => \"San Vito di leguzzano\",6447 => \"San Vito lo capo\",6448 => \"San Vito romano\",6449 => \"San Vito sullo ionio\",6450 => \"San Vittore del lazio\",6451 => \"San Vittore Olona\",6452 => \"San Zeno di montagna\",6453 => \"San Zeno naviglio\",6454 => \"San Zenone al lambro\",6455 => \"San Zenone al po\",6456 => \"San Zenone degli ezzelini\",6457 => \"Sanarica\",6458 => \"Sandigliano\",6459 => \"Sandrigo\",6460 => \"Sanfre'\",6461 => \"Sanfront\",6462 => \"Sangano\",6463 => \"Sangiano\",6464 => \"Sangineto\",6465 => \"Sanguinetto\",6466 => \"Sanluri\",6467 => \"Sannazzaro de' Burgondi\",6468 => \"Sannicandro di bari\",6469 => \"Sannicandro garganico\",6470 => \"Sannicola\",6471 => \"Sanremo\",6472 => \"Sansepolcro\",6473 => \"Sant'Agapito\",6474 => \"Sant'Agata bolognese\",6475 => \"Sant'Agata de' goti\",6476 => \"Sant'Agata del bianco\",6477 => \"Sant'Agata di esaro\",6478 => \"Sant'Agata di Militello\",6479 => \"Sant'Agata di Puglia\",6480 => \"Sant'Agata feltria\",6481 => \"Sant'Agata fossili\",6482 => \"Sant'Agata li battiati\",6483 => \"Sant'Agata sul Santerno\",6484 => \"Sant'Agnello\",6485 => \"Sant'Agostino\",6486 => \"Sant'Albano stura\",6487 => \"Sant'Alessio con vialone\",6488 => \"Sant'Alessio in aspromonte\",6489 => \"Sant'Alessio siculo\",6490 => \"Sant'Alfio\",6491 => \"Sant'Ambrogio di Torino\",6492 => \"Sant'Ambrogio di valpolicella\",6493 => \"Sant'Ambrogio sul garigliano\",6494 => \"Sant'Anastasia\",6495 => \"Sant'Anatolia di narco\",6496 => \"Sant'Andrea apostolo dello ionio\",6497 => \"Sant'Andrea del garigliano\",6498 => \"Sant'Andrea di conza\",6499 => \"Sant'Andrea Frius\",8763 => \"Sant'Andrea in Monte\",6500 => \"Sant'Angelo a cupolo\",6501 => \"Sant'Angelo a fasanella\",6502 => \"Sant'Angelo a scala\",6503 => \"Sant'Angelo all'esca\",6504 => \"Sant'Angelo d'alife\",6505 => \"Sant'Angelo dei lombardi\",6506 => \"Sant'Angelo del pesco\",6507 => \"Sant'Angelo di brolo\",6508 => \"Sant'Angelo di Piove di Sacco\",6509 => \"Sant'Angelo in lizzola\",6510 => \"Sant'Angelo in pontano\",6511 => \"Sant'Angelo in vado\",6512 => \"Sant'Angelo le fratte\",6513 => \"Sant'Angelo limosano\",6514 => \"Sant'Angelo lodigiano\",6515 => \"Sant'Angelo lomellina\",6516 => \"Sant'Angelo muxaro\",6517 => \"Sant'Angelo romano\",6518 => \"Sant'Anna Arresi\",6519 => \"Sant'Anna d'Alfaedo\",8730 => \"Sant'Anna di Valdieri\",8698 => \"Sant'Anna di Vinadio\",8563 => \"Sant'Anna Pelago\",6520 => \"Sant'Antimo\",6521 => \"Sant'Antioco\",6522 => \"Sant'Antonino di Susa\",6523 => \"Sant'Antonio Abate\",6524 => \"Sant'Antonio di gallura\",6525 => \"Sant'Apollinare\",6526 => \"Sant'Arcangelo\",6527 => \"Sant'Arcangelo trimonte\",6528 => \"Sant'Arpino\",6529 => \"Sant'Arsenio\",6530 => \"Sant'Egidio alla vibrata\",6531 => \"Sant'Egidio del monte Albino\",6532 => \"Sant'Elena\",6533 => \"Sant'Elena sannita\",6534 => \"Sant'Elia a pianisi\",6535 => \"Sant'Elia fiumerapido\",6536 => \"Sant'Elpidio a mare\",6537 => \"Sant'Eufemia a maiella\",6538 => \"Sant'Eufemia d'Aspromonte\",6539 => \"Sant'Eusanio del Sangro\",6540 => \"Sant'Eusanio forconese\",6541 => \"Sant'Ilario d'Enza\",6542 => \"Sant'Ilario dello Ionio\",6543 => \"Sant'Ippolito\",6544 => \"Sant'Olcese\",6545 => \"Sant'Omero\",6546 => \"Sant'Omobono imagna\",6547 => \"Sant'Onofrio\",6548 => \"Sant'Oreste\",6549 => \"Sant'Orsola terme\",6550 => \"Sant'Urbano\",6551 => \"Santa Brigida\",6552 => \"Santa Caterina albanese\",6553 => \"Santa Caterina dello ionio\",8144 => \"Santa Caterina Valfurva\",6554 => \"Santa Caterina villarmosa\",6555 => \"Santa Cesarea terme\",6556 => \"Santa Cristina d'Aspromonte\",6557 => \"Santa Cristina e Bissone\",6558 => \"Santa Cristina gela\",6559 => \"Santa Cristina Valgardena\",6560 => \"Santa Croce camerina\",6561 => \"Santa Croce del sannio\",6562 => \"Santa Croce di Magliano\",6563 => \"Santa Croce sull'Arno\",6564 => \"Santa Domenica talao\",6565 => \"Santa Domenica Vittoria\",6566 => \"Santa Elisabetta\",6567 => \"Santa Fiora\",6568 => \"Santa Flavia\",6569 => \"Santa Giuletta\",6570 => \"Santa Giusta\",6571 => \"Santa Giustina\",6572 => \"Santa Giustina in Colle\",6573 => \"Santa Luce\",6574 => \"Santa Lucia del Mela\",6575 => \"Santa Lucia di Piave\",6576 => \"Santa Lucia di serino\",6577 => \"Santa Margherita d'adige\",6578 => \"Santa Margherita di belice\",6579 => \"Santa Margherita di staffora\",8285 => \"Santa Margherita Ligure\",6581 => \"Santa Maria a monte\",6582 => \"Santa Maria a vico\",6583 => \"Santa Maria Capua Vetere\",6584 => \"Santa Maria coghinas\",6585 => \"Santa Maria del cedro\",6586 => \"Santa Maria del Molise\",6587 => \"Santa Maria della Versa\",8122 => \"Santa Maria di Castellabate\",6588 => \"Santa Maria di Licodia\",6589 => \"Santa Maria di sala\",6590 => \"Santa Maria Hoe'\",6591 => \"Santa Maria imbaro\",6592 => \"Santa Maria la carita'\",6593 => \"Santa Maria la fossa\",6594 => \"Santa Maria la longa\",6595 => \"Santa Maria Maggiore\",6596 => \"Santa Maria Nuova\",6597 => \"Santa Marina\",6598 => \"Santa Marina salina\",6599 => \"Santa Marinella\",6600 => \"Santa Ninfa\",6601 => \"Santa Paolina\",6602 => \"Santa Severina\",6603 => \"Santa Sofia\",6604 => \"Santa Sofia d'Epiro\",6605 => \"Santa Teresa di Riva\",6606 => \"Santa Teresa gallura\",6607 => \"Santa Venerina\",6608 => \"Santa Vittoria d'Alba\",6609 => \"Santa Vittoria in matenano\",6610 => \"Santadi\",6611 => \"Santarcangelo di Romagna\",6612 => \"Sante marie\",6613 => \"Santena\",6614 => \"Santeramo in colle\",6615 => \"Santhia'\",6616 => \"Santi Cosma e Damiano\",6617 => \"Santo Stefano al mare\",6618 => \"Santo Stefano Belbo\",6619 => \"Santo Stefano d'Aveto\",6620 => \"Santo Stefano del sole\",6621 => \"Santo Stefano di Cadore\",6622 => \"Santo Stefano di Camastra\",6623 => \"Santo Stefano di Magra\",6624 => \"Santo Stefano di Rogliano\",6625 => \"Santo Stefano di Sessanio\",6626 => \"Santo Stefano in Aspromonte\",6627 => \"Santo Stefano lodigiano\",6628 => \"Santo Stefano quisquina\",6629 => \"Santo Stefano roero\",6630 => \"Santo Stefano Ticino\",6631 => \"Santo Stino di Livenza\",6632 => \"Santomenna\",6633 => \"Santopadre\",6634 => \"Santorso\",6635 => \"Santu Lussurgiu\",8419 => \"Sant`Angelo le fratte\",6636 => \"Sanza\",6637 => \"Sanzeno\",6638 => \"Saonara\",6639 => \"Saponara\",6640 => \"Sappada\",6641 => \"Sapri\",6642 => \"Saracena\",6643 => \"Saracinesco\",6644 => \"Sarcedo\",8377 => \"Sarconi\",6646 => \"Sardara\",6647 => \"Sardigliano\",6648 => \"Sarego\",6649 => \"Sarentino\",6650 => \"Sarezzano\",6651 => \"Sarezzo\",6652 => \"Sarmato\",6653 => \"Sarmede\",6654 => \"Sarnano\",6655 => \"Sarnico\",6656 => \"Sarno\",6657 => \"Sarnonico\",6658 => \"Saronno\",6659 => \"Sarre\",6660 => \"Sarroch\",6661 => \"Sarsina\",6662 => \"Sarteano\",6663 => \"Sartirana lomellina\",6664 => \"Sarule\",6665 => \"Sarzana\",6666 => \"Sassano\",6667 => \"Sassari\",6668 => \"Sassello\",6669 => \"Sassetta\",6670 => \"Sassinoro\",8387 => \"Sasso di castalda\",6672 => \"Sasso marconi\",6673 => \"Sassocorvaro\",6674 => \"Sassofeltrio\",6675 => \"Sassoferrato\",8656 => \"Sassotetto\",6676 => \"Sassuolo\",6677 => \"Satriano\",8420 => \"Satriano di Lucania\",6679 => \"Sauris\",6680 => \"Sauze d'Oulx\",6681 => \"Sauze di Cesana\",6682 => \"Sava\",6683 => \"Savelli\",6684 => \"Saviano\",6685 => \"Savigliano\",6686 => \"Savignano irpino\",6687 => \"Savignano sul Panaro\",6688 => \"Savignano sul Rubicone\",6689 => \"Savigno\",6690 => \"Savignone\",6691 => \"Saviore dell'Adamello\",6692 => \"Savoca\",6693 => \"Savogna\",6694 => \"Savogna d'Isonzo\",8411 => \"Savoia di Lucania\",6696 => \"Savona\",6697 => \"Scafa\",6698 => \"Scafati\",6699 => \"Scagnello\",6700 => \"Scala\",6701 => \"Scala coeli\",6702 => \"Scaldasole\",6703 => \"Scalea\",6704 => \"Scalenghe\",6705 => \"Scaletta Zanclea\",6706 => \"Scampitella\",6707 => \"Scandale\",6708 => \"Scandiano\",6709 => \"Scandicci\",6710 => \"Scandolara ravara\",6711 => \"Scandolara ripa d'Oglio\",6712 => \"Scandriglia\",6713 => \"Scanno\",6714 => \"Scano di montiferro\",6715 => \"Scansano\",6716 => \"Scanzano jonico\",6717 => \"Scanzorosciate\",6718 => \"Scapoli\",8120 => \"Scario\",6719 => \"Scarlino\",6720 => \"Scarmagno\",6721 => \"Scarnafigi\",6722 => \"Scarperia\",8139 => \"Scauri\",6723 => \"Scena\",6724 => \"Scerni\",6725 => \"Scheggia e pascelupo\",6726 => \"Scheggino\",6727 => \"Schiavi di Abruzzo\",6728 => \"Schiavon\",8456 => \"Schiavonea di Corigliano\",6729 => \"Schignano\",6730 => \"Schilpario\",6731 => \"Schio\",6732 => \"Schivenoglia\",6733 => \"Sciacca\",6734 => \"Sciara\",6735 => \"Scicli\",6736 => \"Scido\",6737 => \"Scigliano\",6738 => \"Scilla\",6739 => \"Scillato\",6740 => \"Sciolze\",6741 => \"Scisciano\",6742 => \"Sclafani bagni\",6743 => \"Scontrone\",6744 => \"Scopa\",6745 => \"Scopello\",6746 => \"Scoppito\",6747 => \"Scordia\",6748 => \"Scorrano\",6749 => \"Scorze'\",6750 => \"Scurcola marsicana\",6751 => \"Scurelle\",6752 => \"Scurzolengo\",6753 => \"Seborga\",6754 => \"Secinaro\",6755 => \"Secli'\",8336 => \"Secondino\",6756 => \"Secugnago\",6757 => \"Sedegliano\",6758 => \"Sedico\",6759 => \"Sedilo\",6760 => \"Sedini\",6761 => \"Sedriano\",6762 => \"Sedrina\",6763 => \"Sefro\",6764 => \"Segariu\",8714 => \"Segesta\",6765 => \"Seggiano\",6766 => \"Segni\",6767 => \"Segonzano\",6768 => \"Segrate\",6769 => \"Segusino\",6770 => \"Selargius\",6771 => \"Selci\",6772 => \"Selegas\",8715 => \"Selinunte\",8130 => \"Sella Nevea\",6773 => \"Sellano\",8651 => \"Sellata Arioso\",6774 => \"Sellero\",8238 => \"Selletta\",6775 => \"Sellia\",6776 => \"Sellia marina\",6777 => \"Selva dei Molini\",6778 => \"Selva di Cadore\",6779 => \"Selva di Progno\",6780 => \"Selva di Val Gardena\",6781 => \"Selvazzano dentro\",6782 => \"Selve marcone\",6783 => \"Selvino\",6784 => \"Semestene\",6785 => \"Semiana\",6786 => \"Seminara\",6787 => \"Semproniano\",6788 => \"Senago\",6789 => \"Senale San Felice\",6790 => \"Senales\",6791 => \"Seneghe\",6792 => \"Senerchia\",6793 => \"Seniga\",6794 => \"Senigallia\",6795 => \"Senis\",6796 => \"Senise\",6797 => \"Senna comasco\",6798 => \"Senna lodigiana\",6799 => \"Sennariolo\",6800 => \"Sennori\",6801 => \"Senorbi'\",6802 => \"Sepino\",6803 => \"Seppiana\",6804 => \"Sequals\",6805 => \"Seravezza\",6806 => \"Serdiana\",6807 => \"Seregno\",6808 => \"Seren del grappa\",6809 => \"Sergnano\",6810 => \"Seriate\",6811 => \"Serina\",6812 => \"Serino\",6813 => \"Serle\",6814 => \"Sermide\",6815 => \"Sermoneta\",6816 => \"Sernaglia della Battaglia\",6817 => \"Sernio\",6818 => \"Serole\",6819 => \"Serra d'aiello\",6820 => \"Serra de'conti\",6821 => \"Serra pedace\",6822 => \"Serra ricco'\",6823 => \"Serra San Bruno\",6824 => \"Serra San Quirico\",6825 => \"Serra Sant'Abbondio\",6826 => \"Serracapriola\",6827 => \"Serradifalco\",6828 => \"Serralunga d'Alba\",6829 => \"Serralunga di Crea\",6830 => \"Serramanna\",6831 => \"Serramazzoni\",6832 => \"Serramezzana\",6833 => \"Serramonacesca\",6834 => \"Serrapetrona\",6835 => \"Serrara fontana\",6836 => \"Serrastretta\",6837 => \"Serrata\",6838 => \"Serravalle a po\",6839 => \"Serravalle di chienti\",6840 => \"Serravalle langhe\",6841 => \"Serravalle pistoiese\",6842 => \"Serravalle Scrivia\",6843 => \"Serravalle Sesia\",6844 => \"Serre\",6845 => \"Serrenti\",6846 => \"Serri\",6847 => \"Serrone\",6848 => \"Serrungarina\",6849 => \"Sersale\",6850 => \"Servigliano\",6851 => \"Sessa aurunca\",6852 => \"Sessa cilento\",6853 => \"Sessame\",6854 => \"Sessano del Molise\",6855 => \"Sesta godano\",6856 => \"Sestino\",6857 => \"Sesto\",6858 => \"Sesto al reghena\",6859 => \"Sesto calende\",8709 => \"Sesto Calende Alta\",6860 => \"Sesto campano\",6861 => \"Sesto ed Uniti\",6862 => \"Sesto fiorentino\",6863 => \"Sesto San Giovanni\",6864 => \"Sestola\",6865 => \"Sestri levante\",6866 => \"Sestriere\",6867 => \"Sestu\",6868 => \"Settala\",8316 => \"Settebagni\",6869 => \"Settefrati\",6870 => \"Settime\",6871 => \"Settimo milanese\",6872 => \"Settimo rottaro\",6873 => \"Settimo San Pietro\",6874 => \"Settimo torinese\",6875 => \"Settimo vittone\",6876 => \"Settingiano\",6877 => \"Setzu\",6878 => \"Seui\",6879 => \"Seulo\",6880 => \"Seveso\",6881 => \"Sezzadio\",6882 => \"Sezze\",6883 => \"Sfruz\",6884 => \"Sgonico\",6885 => \"Sgurgola\",6886 => \"Siamaggiore\",6887 => \"Siamanna\",6888 => \"Siano\",6889 => \"Siapiccia\",8114 => \"Sibari\",6890 => \"Sicignano degli Alburni\",6891 => \"Siculiana\",6892 => \"Siddi\",6893 => \"Siderno\",6894 => \"Siena\",6895 => \"Sigillo\",6896 => \"Signa\",8603 => \"Sigonella\",6897 => \"Silandro\",6898 => \"Silanus\",6899 => \"Silea\",6900 => \"Siligo\",6901 => \"Siliqua\",6902 => \"Silius\",6903 => \"Sillano\",6904 => \"Sillavengo\",6905 => \"Silvano d'orba\",6906 => \"Silvano pietra\",6907 => \"Silvi\",6908 => \"Simala\",6909 => \"Simaxis\",6910 => \"Simbario\",6911 => \"Simeri crichi\",6912 => \"Sinagra\",6913 => \"Sinalunga\",6914 => \"Sindia\",6915 => \"Sini\",6916 => \"Sinio\",6917 => \"Siniscola\",6918 => \"Sinnai\",6919 => \"Sinopoli\",6920 => \"Siracusa\",6921 => \"Sirignano\",6922 => \"Siris\",6923 => \"Sirmione\",8457 => \"Sirolo\",6925 => \"Sirone\",6926 => \"Siror\",6927 => \"Sirtori\",6928 => \"Sissa\",8492 => \"Sistiana\",6929 => \"Siurgus donigala\",6930 => \"Siziano\",6931 => \"Sizzano\",8258 => \"Ski center Latemar\",6932 => \"Sluderno\",6933 => \"Smarano\",6934 => \"Smerillo\",6935 => \"Soave\",8341 => \"Sobretta Vallalpe\",6936 => \"Socchieve\",6937 => \"Soddi\",6938 => \"Sogliano al rubicone\",6939 => \"Sogliano Cavour\",6940 => \"Soglio\",6941 => \"Soiano del lago\",6942 => \"Solagna\",6943 => \"Solarino\",6944 => \"Solaro\",6945 => \"Solarolo\",6946 => \"Solarolo Rainerio\",6947 => \"Solarussa\",6948 => \"Solbiate\",6949 => \"Solbiate Arno\",6950 => \"Solbiate Olona\",8307 => \"Solda\",6951 => \"Soldano\",6952 => \"Soleminis\",6953 => \"Solero\",6954 => \"Solesino\",6955 => \"Soleto\",6956 => \"Solferino\",6957 => \"Soliera\",6958 => \"Solignano\",6959 => \"Solofra\",6960 => \"Solonghello\",6961 => \"Solopaca\",6962 => \"Solto collina\",6963 => \"Solza\",6964 => \"Somaglia\",6965 => \"Somano\",6966 => \"Somma lombardo\",6967 => \"Somma vesuviana\",6968 => \"Sommacampagna\",6969 => \"Sommariva del bosco\",6970 => \"Sommariva Perno\",6971 => \"Sommatino\",6972 => \"Sommo\",6973 => \"Sona\",6974 => \"Soncino\",6975 => \"Sondalo\",6976 => \"Sondrio\",6977 => \"Songavazzo\",6978 => \"Sonico\",6979 => \"Sonnino\",6980 => \"Soprana\",6981 => \"Sora\",6982 => \"Soraga\",6983 => \"Soragna\",6984 => \"Sorano\",6985 => \"Sorbo San Basile\",6986 => \"Sorbo Serpico\",6987 => \"Sorbolo\",6988 => \"Sordevolo\",6989 => \"Sordio\",6990 => \"Soresina\",6991 => \"Sorga'\",6992 => \"Sorgono\",6993 => \"Sori\",6994 => \"Sorianello\",6995 => \"Soriano calabro\",6996 => \"Soriano nel cimino\",6997 => \"Sorico\",6998 => \"Soriso\",6999 => \"Sorisole\",7000 => \"Sormano\",7001 => \"Sorradile\",7002 => \"Sorrento\",7003 => \"Sorso\",7004 => \"Sortino\",7005 => \"Sospiro\",7006 => \"Sospirolo\",7007 => \"Sossano\",7008 => \"Sostegno\",7009 => \"Sotto il monte Giovanni XXIII\",8747 => \"Sottomarina\",7010 => \"Sover\",7011 => \"Soverato\",7012 => \"Sovere\",7013 => \"Soveria mannelli\",7014 => \"Soveria simeri\",7015 => \"Soverzene\",7016 => \"Sovicille\",7017 => \"Sovico\",7018 => \"Sovizzo\",7019 => \"Sovramonte\",7020 => \"Sozzago\",7021 => \"Spadafora\",7022 => \"Spadola\",7023 => \"Sparanise\",7024 => \"Sparone\",7025 => \"Specchia\",7026 => \"Spello\",8585 => \"Spelonga\",7027 => \"Spera\",7028 => \"Sperlinga\",7029 => \"Sperlonga\",7030 => \"Sperone\",7031 => \"Spessa\",7032 => \"Spezzano albanese\",7033 => \"Spezzano della Sila\",7034 => \"Spezzano piccolo\",7035 => \"Spiazzo\",7036 => \"Spigno monferrato\",7037 => \"Spigno saturnia\",7038 => \"Spilamberto\",7039 => \"Spilimbergo\",7040 => \"Spilinga\",7041 => \"Spinadesco\",7042 => \"Spinazzola\",7043 => \"Spinea\",7044 => \"Spineda\",7045 => \"Spinete\",7046 => \"Spineto Scrivia\",7047 => \"Spinetoli\",7048 => \"Spino d'Adda\",7049 => \"Spinone al lago\",8421 => \"Spinoso\",7051 => \"Spirano\",7052 => \"Spoleto\",7053 => \"Spoltore\",7054 => \"Spongano\",7055 => \"Spormaggiore\",7056 => \"Sporminore\",7057 => \"Spotorno\",7058 => \"Spresiano\",7059 => \"Spriana\",7060 => \"Squillace\",7061 => \"Squinzano\",8248 => \"Staffal\",7062 => \"Staffolo\",7063 => \"Stagno lombardo\",7064 => \"Staiti\",7065 => \"Staletti\",7066 => \"Stanghella\",7067 => \"Staranzano\",7068 => \"Statte\",7069 => \"Stazzano\",7070 => \"Stazzema\",7071 => \"Stazzona\",7072 => \"Stefanaconi\",7073 => \"Stella\",7074 => \"Stella cilento\",7075 => \"Stellanello\",7076 => \"Stelvio\",7077 => \"Stenico\",7078 => \"Sternatia\",7079 => \"Stezzano\",7080 => \"Stia\",7081 => \"Stienta\",7082 => \"Stigliano\",7083 => \"Stignano\",7084 => \"Stilo\",7085 => \"Stimigliano\",7086 => \"Stintino\",7087 => \"Stio\",7088 => \"Stornara\",7089 => \"Stornarella\",7090 => \"Storo\",7091 => \"Stra\",7092 => \"Stradella\",7093 => \"Strambinello\",7094 => \"Strambino\",7095 => \"Strangolagalli\",7096 => \"Stregna\",7097 => \"Strembo\",7098 => \"Stresa\",7099 => \"Strevi\",7100 => \"Striano\",7101 => \"Strigno\",8182 => \"Stromboli\",7102 => \"Strona\",7103 => \"Stroncone\",7104 => \"Strongoli\",7105 => \"Stroppiana\",7106 => \"Stroppo\",7107 => \"Strozza\",8493 => \"Stupizza\",7108 => \"Sturno\",7109 => \"Suardi\",7110 => \"Subbiano\",7111 => \"Subiaco\",7112 => \"Succivo\",7113 => \"Sueglio\",7114 => \"Suelli\",7115 => \"Suello\",7116 => \"Suisio\",7117 => \"Sulbiate\",7118 => \"Sulmona\",7119 => \"Sulzano\",7120 => \"Sumirago\",7121 => \"Summonte\",7122 => \"Suni\",7123 => \"Suno\",7124 => \"Supersano\",7125 => \"Supino\",7126 => \"Surano\",7127 => \"Surbo\",7128 => \"Susa\",7129 => \"Susegana\",7130 => \"Sustinente\",7131 => \"Sutera\",7132 => \"Sutri\",7133 => \"Sutrio\",7134 => \"Suvereto\",7135 => \"Suzzara\",7136 => \"Taceno\",7137 => \"Tadasuni\",7138 => \"Taggia\",7139 => \"Tagliacozzo\",8450 => \"Tagliacozzo casello\",7140 => \"Taglio di po\",7141 => \"Tagliolo monferrato\",7142 => \"Taibon agordino\",7143 => \"Taino\",7144 => \"Taio\",7145 => \"Taipana\",7146 => \"Talamello\",7147 => \"Talamona\",8299 => \"Talamone\",7148 => \"Talana\",7149 => \"Taleggio\",7150 => \"Talla\",7151 => \"Talmassons\",7152 => \"Tambre\",7153 => \"Taormina\",7154 => \"Tapogliano\",7155 => \"Tarano\",7156 => \"Taranta peligna\",7157 => \"Tarantasca\",7158 => \"Taranto\",8550 => \"Taranto M. A. Grottaglie\",7159 => \"Tarcento\",7160 => \"Tarquinia\",8140 => \"Tarquinia Lido\",7161 => \"Tarsia\",7162 => \"Tartano\",7163 => \"Tarvisio\",8466 => \"Tarvisio casello\",7164 => \"Tarzo\",7165 => \"Tassarolo\",7166 => \"Tassullo\",7167 => \"Taurano\",7168 => \"Taurasi\",7169 => \"Taurianova\",7170 => \"Taurisano\",7171 => \"Tavagnacco\",7172 => \"Tavagnasco\",7173 => \"Tavarnelle val di pesa\",7174 => \"Tavazzano con villavesco\",7175 => \"Tavenna\",7176 => \"Taverna\",7177 => \"Tavernerio\",7178 => \"Tavernola bergamasca\",7179 => \"Tavernole sul Mella\",7180 => \"Taviano\",7181 => \"Tavigliano\",7182 => \"Tavoleto\",7183 => \"Tavullia\",8362 => \"Teana\",7185 => \"Teano\",7186 => \"Teggiano\",7187 => \"Teglio\",7188 => \"Teglio veneto\",7189 => \"Telese terme\",7190 => \"Telgate\",7191 => \"Telti\",7192 => \"Telve\",7193 => \"Telve di sopra\",7194 => \"Tempio Pausania\",7195 => \"Temu'\",7196 => \"Tenna\",7197 => \"Tenno\",7198 => \"Teolo\",7199 => \"Teor\",7200 => \"Teora\",7201 => \"Teramo\",8449 => \"Teramo Val Vomano\",7202 => \"Terdobbiate\",7203 => \"Terelle\",7204 => \"Terento\",7205 => \"Terenzo\",7206 => \"Tergu\",7207 => \"Terlago\",7208 => \"Terlano\",7209 => \"Terlizzi\",8158 => \"Terme di Lurisia\",7210 => \"Terme vigliatore\",7211 => \"Termeno sulla strada del vino\",7212 => \"Termini imerese\",8133 => \"Terminillo\",7213 => \"Termoli\",7214 => \"Ternate\",7215 => \"Ternengo\",7216 => \"Terni\",7217 => \"Terno d'isola\",7218 => \"Terracina\",7219 => \"Terragnolo\",7220 => \"Terralba\",7221 => \"Terranova da Sibari\",7222 => \"Terranova dei passerini\",8379 => \"Terranova di Pollino\",7224 => \"Terranova Sappo Minulio\",7225 => \"Terranuova bracciolini\",7226 => \"Terrasini\",7227 => \"Terrassa padovana\",7228 => \"Terravecchia\",7229 => \"Terrazzo\",7230 => \"Terres\",7231 => \"Terricciola\",7232 => \"Terruggia\",7233 => \"Tertenia\",7234 => \"Terzigno\",7235 => \"Terzo\",7236 => \"Terzo d'Aquileia\",7237 => \"Terzolas\",7238 => \"Terzorio\",7239 => \"Tesero\",7240 => \"Tesimo\",7241 => \"Tessennano\",7242 => \"Testico\",7243 => \"Teti\",7244 => \"Teulada\",7245 => \"Teverola\",7246 => \"Tezze sul Brenta\",8716 => \"Tharros\",7247 => \"Thiene\",7248 => \"Thiesi\",7249 => \"Tiana\",7250 => \"Tiarno di sopra\",7251 => \"Tiarno di sotto\",7252 => \"Ticengo\",7253 => \"Ticineto\",7254 => \"Tiggiano\",7255 => \"Tiglieto\",7256 => \"Tigliole\",7257 => \"Tignale\",7258 => \"Tinnura\",7259 => \"Tione degli Abruzzi\",7260 => \"Tione di Trento\",7261 => \"Tirano\",7262 => \"Tires\",7263 => \"Tiriolo\",7264 => \"Tirolo\",8194 => \"Tirrenia\",8719 => \"Tiscali\",7265 => \"Tissi\",8422 => \"Tito\",7267 => \"Tivoli\",8451 => \"Tivoli casello\",7268 => \"Tizzano val Parma\",7269 => \"Toano\",7270 => \"Tocco caudio\",7271 => \"Tocco da Casauria\",7272 => \"Toceno\",7273 => \"Todi\",7274 => \"Toffia\",7275 => \"Toirano\",7276 => \"Tolentino\",7277 => \"Tolfa\",7278 => \"Tollegno\",7279 => \"Tollo\",7280 => \"Tolmezzo\",8423 => \"Tolve\",7282 => \"Tombolo\",7283 => \"Ton\",7284 => \"Tonadico\",7285 => \"Tonara\",7286 => \"Tonco\",7287 => \"Tonengo\",7288 => \"Tonezza del Cimone\",7289 => \"Tora e piccilli\",8132 => \"Torano\",7290 => \"Torano castello\",7291 => \"Torano nuovo\",7292 => \"Torbole casaglia\",7293 => \"Torcegno\",7294 => \"Torchiara\",7295 => \"Torchiarolo\",7296 => \"Torella dei lombardi\",7297 => \"Torella del sannio\",7298 => \"Torgiano\",7299 => \"Torgnon\",7300 => \"Torino\",8271 => \"Torino Caselle\",7301 => \"Torino di Sangro\",8494 => \"Torino di Sangro Marina\",7302 => \"Toritto\",7303 => \"Torlino Vimercati\",7304 => \"Tornaco\",7305 => \"Tornareccio\",7306 => \"Tornata\",7307 => \"Tornimparte\",8445 => \"Tornimparte casello\",7308 => \"Torno\",7309 => \"Tornolo\",7310 => \"Toro\",7311 => \"Torpe'\",7312 => \"Torraca\",7313 => \"Torralba\",7314 => \"Torrazza coste\",7315 => \"Torrazza Piemonte\",7316 => \"Torrazzo\",7317 => \"Torre Annunziata\",7318 => \"Torre Beretti e Castellaro\",7319 => \"Torre boldone\",7320 => \"Torre bormida\",7321 => \"Torre cajetani\",7322 => \"Torre canavese\",7323 => \"Torre d'arese\",7324 => \"Torre d'isola\",7325 => \"Torre de' passeri\",7326 => \"Torre de'busi\",7327 => \"Torre de'negri\",7328 => \"Torre de'picenardi\",7329 => \"Torre de'roveri\",7330 => \"Torre del greco\",7331 => \"Torre di mosto\",7332 => \"Torre di ruggiero\",7333 => \"Torre di Santa Maria\",7334 => \"Torre le nocelle\",7335 => \"Torre mondovi'\",7336 => \"Torre orsaia\",8592 => \"Torre Pali\",7337 => \"Torre pallavicina\",7338 => \"Torre pellice\",7339 => \"Torre San Giorgio\",8596 => \"Torre San Giovanni\",8595 => \"Torre San Gregorio\",7340 => \"Torre San Patrizio\",7341 => \"Torre Santa Susanna\",8593 => \"Torre Vado\",7342 => \"Torreano\",7343 => \"Torrebelvicino\",7344 => \"Torrebruna\",7345 => \"Torrecuso\",7346 => \"Torreglia\",7347 => \"Torregrotta\",7348 => \"Torremaggiore\",7349 => \"Torrenova\",7350 => \"Torresina\",7351 => \"Torretta\",7352 => \"Torrevecchia pia\",7353 => \"Torrevecchia teatina\",7354 => \"Torri del benaco\",7355 => \"Torri di quartesolo\",7356 => \"Torri in sabina\",7357 => \"Torriana\",7358 => \"Torrice\",7359 => \"Torricella\",7360 => \"Torricella del pizzo\",7361 => \"Torricella in sabina\",7362 => \"Torricella peligna\",7363 => \"Torricella sicura\",7364 => \"Torricella verzate\",7365 => \"Torriglia\",7366 => \"Torrile\",7367 => \"Torrioni\",7368 => \"Torrita di Siena\",7369 => \"Torrita tiberina\",7370 => \"Tortoli'\",7371 => \"Tortona\",7372 => \"Tortora\",7373 => \"Tortorella\",7374 => \"Tortoreto\",8601 => \"Tortoreto lido\",7375 => \"Tortorici\",8138 => \"Torvaianica\",7376 => \"Torviscosa\",7377 => \"Toscolano maderno\",7378 => \"Tossicia\",7379 => \"Tovo di Sant'Agata\",7380 => \"Tovo San Giacomo\",7381 => \"Trabia\",7382 => \"Tradate\",8214 => \"Trafoi\",7383 => \"Tramatza\",7384 => \"Trambileno\",7385 => \"Tramonti\",7386 => \"Tramonti di sopra\",7387 => \"Tramonti di sotto\",8412 => \"Tramutola\",7389 => \"Trana\",7390 => \"Trani\",7391 => \"Transacqua\",7392 => \"Traona\",7393 => \"Trapani\",8544 => \"Trapani Birgi\",7394 => \"Trappeto\",7395 => \"Trarego Viggiona\",7396 => \"Trasacco\",7397 => \"Trasaghis\",7398 => \"Trasquera\",7399 => \"Tratalias\",7400 => \"Trausella\",7401 => \"Travaco' siccomario\",7402 => \"Travagliato\",7403 => \"Travedona monate\",7404 => \"Traversella\",7405 => \"Traversetolo\",7406 => \"Traves\",7407 => \"Travesio\",7408 => \"Travo\",8187 => \"Tre fontane\",7409 => \"Trebaseleghe\",7410 => \"Trebisacce\",7411 => \"Trecasali\",7412 => \"Trecase\",7413 => \"Trecastagni\",7414 => \"Trecate\",7415 => \"Trecchina\",7416 => \"Trecenta\",7417 => \"Tredozio\",7418 => \"Treglio\",7419 => \"Tregnago\",7420 => \"Treia\",7421 => \"Treiso\",7422 => \"Tremenico\",7423 => \"Tremestieri etneo\",7424 => \"Tremezzo\",7425 => \"Tremosine\",7426 => \"Trenta\",7427 => \"Trentinara\",7428 => \"Trento\",7429 => \"Trentola-ducenta\",7430 => \"Trenzano\",8146 => \"Trepalle\",7431 => \"Treppo carnico\",7432 => \"Treppo grande\",7433 => \"Trepuzzi\",7434 => \"Trequanda\",7435 => \"Tres\",7436 => \"Tresana\",7437 => \"Trescore balneario\",7438 => \"Trescore cremasco\",7439 => \"Tresigallo\",7440 => \"Tresivio\",7441 => \"Tresnuraghes\",7442 => \"Trevenzuolo\",7443 => \"Trevi\",7444 => \"Trevi nel lazio\",7445 => \"Trevico\",7446 => \"Treviglio\",7447 => \"Trevignano\",7448 => \"Trevignano romano\",7449 => \"Treville\",7450 => \"Treviolo\",7451 => \"Treviso\",7452 => \"Treviso bresciano\",8543 => \"Treviso Sant'Angelo\",7453 => \"Trezzano rosa\",7454 => \"Trezzano sul Naviglio\",7455 => \"Trezzo sull'Adda\",7456 => \"Trezzo Tinella\",7457 => \"Trezzone\",7458 => \"Tribano\",7459 => \"Tribiano\",7460 => \"Tribogna\",7461 => \"Tricarico\",7462 => \"Tricase\",8597 => \"Tricase porto\",7463 => \"Tricerro\",7464 => \"Tricesimo\",7465 => \"Trichiana\",7466 => \"Triei\",7467 => \"Trieste\",8472 => \"Trieste Ronchi dei Legionari\",7468 => \"Triggiano\",7469 => \"Trigolo\",7470 => \"Trinita d'Agultu e Vignola\",7471 => \"Trinita'\",7472 => \"Trinitapoli\",7473 => \"Trino\",7474 => \"Triora\",7475 => \"Tripi\",7476 => \"Trisobbio\",7477 => \"Trissino\",7478 => \"Triuggio\",7479 => \"Trivento\",7480 => \"Trivero\",7481 => \"Trivigliano\",7482 => \"Trivignano udinese\",8413 => \"Trivigno\",7484 => \"Trivolzio\",7485 => \"Trodena\",7486 => \"Trofarello\",7487 => \"Troia\",7488 => \"Troina\",7489 => \"Tromello\",7490 => \"Trontano\",7491 => \"Tronzano lago maggiore\",7492 => \"Tronzano vercellese\",7493 => \"Tropea\",7494 => \"Trovo\",7495 => \"Truccazzano\",7496 => \"Tubre\",7497 => \"Tuenno\",7498 => \"Tufara\",7499 => \"Tufillo\",7500 => \"Tufino\",7501 => \"Tufo\",7502 => \"Tuglie\",7503 => \"Tuili\",7504 => \"Tula\",7505 => \"Tuoro sul trasimeno\",7506 => \"Turania\",7507 => \"Turano lodigiano\",7508 => \"Turate\",7509 => \"Turbigo\",7510 => \"Turi\",7511 => \"Turri\",7512 => \"Turriaco\",7513 => \"Turrivalignani\",8390 => \"Tursi\",7515 => \"Tusa\",7516 => \"Tuscania\",7517 => \"Ubiale Clanezzo\",7518 => \"Uboldo\",7519 => \"Ucria\",7520 => \"Udine\",7521 => \"Ugento\",7522 => \"Uggiano la chiesa\",7523 => \"Uggiate trevano\",7524 => \"Ula' Tirso\",7525 => \"Ulassai\",7526 => \"Ultimo\",7527 => \"Umbertide\",7528 => \"Umbriatico\",7529 => \"Urago d'Oglio\",7530 => \"Uras\",7531 => \"Urbana\",7532 => \"Urbania\",7533 => \"Urbe\",7534 => \"Urbino\",7535 => \"Urbisaglia\",7536 => \"Urgnano\",7537 => \"Uri\",7538 => \"Ururi\",7539 => \"Urzulei\",7540 => \"Uscio\",7541 => \"Usellus\",7542 => \"Usini\",7543 => \"Usmate Velate\",7544 => \"Ussana\",7545 => \"Ussaramanna\",7546 => \"Ussassai\",7547 => \"Usseaux\",7548 => \"Usseglio\",7549 => \"Ussita\",7550 => \"Ustica\",7551 => \"Uta\",7552 => \"Uzzano\",7553 => \"Vaccarizzo albanese\",7554 => \"Vacone\",7555 => \"Vacri\",7556 => \"Vadena\",7557 => \"Vado ligure\",7558 => \"Vagli sotto\",7559 => \"Vaglia\",8388 => \"Vaglio Basilicata\",7561 => \"Vaglio serra\",7562 => \"Vaiano\",7563 => \"Vaiano cremasco\",7564 => \"Vaie\",7565 => \"Vailate\",7566 => \"Vairano Patenora\",7567 => \"Vajont\",8511 => \"Val Canale\",7568 => \"Val della torre\",8243 => \"Val di Lei\",8237 => \"Val di Luce\",7569 => \"Val di nizza\",8440 => \"Val di Sangro casello\",7570 => \"Val di vizze\",8223 => \"Val Ferret\",8521 => \"Val Grauson\",7571 => \"Val Masino\",7572 => \"Val Rezzo\",8215 => \"Val Senales\",8522 => \"Val Urtier\",8224 => \"Val Veny\",7573 => \"Valbondione\",7574 => \"Valbrembo\",7575 => \"Valbrevenna\",7576 => \"Valbrona\",8311 => \"Valcava\",7577 => \"Valda\",7578 => \"Valdagno\",7579 => \"Valdaora\",7580 => \"Valdastico\",7581 => \"Valdengo\",7582 => \"Valderice\",7583 => \"Valdidentro\",7584 => \"Valdieri\",7585 => \"Valdina\",7586 => \"Valdisotto\",7587 => \"Valdobbiadene\",7588 => \"Valduggia\",7589 => \"Valeggio\",7590 => \"Valeggio sul Mincio\",7591 => \"Valentano\",7592 => \"Valenza\",7593 => \"Valenzano\",7594 => \"Valera fratta\",7595 => \"Valfabbrica\",7596 => \"Valfenera\",7597 => \"Valfloriana\",7598 => \"Valfurva\",7599 => \"Valganna\",7600 => \"Valgioie\",7601 => \"Valgoglio\",7602 => \"Valgrana\",7603 => \"Valgreghentino\",7604 => \"Valgrisenche\",7605 => \"Valguarnera caropepe\",8344 => \"Valico Citerna\",8510 => \"Valico dei Giovi\",8318 => \"Valico di Monforte\",8509 => \"Valico di Montemiletto\",8507 => \"Valico di Scampitella\",7606 => \"Vallada agordina\",7607 => \"Vallanzengo\",7608 => \"Vallarsa\",7609 => \"Vallata\",7610 => \"Valle agricola\",7611 => \"Valle Aurina\",7612 => \"Valle castellana\",8444 => \"Valle del salto\",7613 => \"Valle dell'Angelo\",7614 => \"Valle di Cadore\",7615 => \"Valle di Casies\",7616 => \"Valle di maddaloni\",7617 => \"Valle lomellina\",7618 => \"Valle mosso\",7619 => \"Valle salimbene\",7620 => \"Valle San Nicolao\",7621 => \"Vallebona\",7622 => \"Vallecorsa\",7623 => \"Vallecrosia\",7624 => \"Valledolmo\",7625 => \"Valledoria\",7626 => \"Vallefiorita\",7627 => \"Vallelonga\",7628 => \"Vallelunga pratameno\",7629 => \"Vallemaio\",7630 => \"Vallepietra\",7631 => \"Vallerano\",7632 => \"Vallermosa\",7633 => \"Vallerotonda\",7634 => \"Vallesaccarda\",8749 => \"Valletta\",7635 => \"Valleve\",7636 => \"Valli del Pasubio\",7637 => \"Vallinfreda\",7638 => \"Vallio terme\",7639 => \"Vallo della Lucania\",7640 => \"Vallo di Nera\",7641 => \"Vallo torinese\",8191 => \"Vallombrosa\",8471 => \"Vallon\",7642 => \"Valloriate\",7643 => \"Valmacca\",7644 => \"Valmadrera\",7645 => \"Valmala\",8313 => \"Valmasino\",7646 => \"Valmontone\",7647 => \"Valmorea\",7648 => \"Valmozzola\",7649 => \"Valnegra\",7650 => \"Valpelline\",7651 => \"Valperga\",7652 => \"Valprato Soana\",7653 => \"Valsavarenche\",7654 => \"Valsecca\",7655 => \"Valsinni\",7656 => \"Valsolda\",7657 => \"Valstagna\",7658 => \"Valstrona\",7659 => \"Valtopina\",7660 => \"Valtorta\",8148 => \"Valtorta impianti\",7661 => \"Valtournenche\",7662 => \"Valva\",7663 => \"Valvasone\",7664 => \"Valverde\",7665 => \"Valverde\",7666 => \"Valvestino\",7667 => \"Vandoies\",7668 => \"Vanzaghello\",7669 => \"Vanzago\",7670 => \"Vanzone con San Carlo\",7671 => \"Vaprio d'Adda\",7672 => \"Vaprio d'Agogna\",7673 => \"Varallo\",7674 => \"Varallo Pombia\",7675 => \"Varano Borghi\",7676 => \"Varano de' Melegari\",7677 => \"Varapodio\",7678 => \"Varazze\",8600 => \"Varcaturo\",7679 => \"Varco sabino\",7680 => \"Varedo\",7681 => \"Varena\",7682 => \"Varenna\",7683 => \"Varese\",7684 => \"Varese ligure\",8284 => \"Varigotti\",7685 => \"Varisella\",7686 => \"Varmo\",7687 => \"Varna\",7688 => \"Varsi\",7689 => \"Varzi\",7690 => \"Varzo\",7691 => \"Vas\",7692 => \"Vasanello\",7693 => \"Vasia\",7694 => \"Vasto\",7695 => \"Vastogirardi\",7696 => \"Vattaro\",7697 => \"Vauda canavese\",7698 => \"Vazzano\",7699 => \"Vazzola\",7700 => \"Vecchiano\",7701 => \"Vedano al Lambro\",7702 => \"Vedano Olona\",7703 => \"Veddasca\",7704 => \"Vedelago\",7705 => \"Vedeseta\",7706 => \"Veduggio con Colzano\",7707 => \"Veggiano\",7708 => \"Veglie\",7709 => \"Veglio\",7710 => \"Vejano\",7711 => \"Veleso\",7712 => \"Velezzo lomellina\",8530 => \"Vellano\",7713 => \"Velletri\",7714 => \"Vellezzo Bellini\",7715 => \"Velo d'Astico\",7716 => \"Velo veronese\",7717 => \"Velturno\",7718 => \"Venafro\",7719 => \"Venaria\",7720 => \"Venarotta\",7721 => \"Venasca\",7722 => \"Venaus\",7723 => \"Vendone\",7724 => \"Vendrogno\",7725 => \"Venegono inferiore\",7726 => \"Venegono superiore\",7727 => \"Venetico\",7728 => \"Venezia\",8502 => \"Venezia Mestre\",8268 => \"Venezia Tessera\",7729 => \"Veniano\",7730 => \"Venosa\",7731 => \"Venticano\",7732 => \"Ventimiglia\",7733 => \"Ventimiglia di Sicilia\",7734 => \"Ventotene\",7735 => \"Venzone\",7736 => \"Verano\",7737 => \"Verano brianza\",7738 => \"Verbania\",7739 => \"Verbicaro\",7740 => \"Vercana\",7741 => \"Verceia\",7742 => \"Vercelli\",7743 => \"Vercurago\",7744 => \"Verdellino\",7745 => \"Verdello\",7746 => \"Verderio inferiore\",7747 => \"Verderio superiore\",7748 => \"Verduno\",7749 => \"Vergato\",7750 => \"Vergemoli\",7751 => \"Verghereto\",7752 => \"Vergiate\",7753 => \"Vermezzo\",7754 => \"Vermiglio\",8583 => \"Vernago\",7755 => \"Vernante\",7756 => \"Vernasca\",7757 => \"Vernate\",7758 => \"Vernazza\",7759 => \"Vernio\",7760 => \"Vernole\",7761 => \"Verolanuova\",7762 => \"Verolavecchia\",7763 => \"Verolengo\",7764 => \"Veroli\",7765 => \"Verona\",8269 => \"Verona Villafranca\",7766 => \"Veronella\",7767 => \"Verrayes\",7768 => \"Verres\",7769 => \"Verretto\",7770 => \"Verrone\",7771 => \"Verrua po\",7772 => \"Verrua Savoia\",7773 => \"Vertemate con Minoprio\",7774 => \"Vertova\",7775 => \"Verucchio\",7776 => \"Veruno\",7777 => \"Vervio\",7778 => \"Vervo'\",7779 => \"Verzegnis\",7780 => \"Verzino\",7781 => \"Verzuolo\",7782 => \"Vescovana\",7783 => \"Vescovato\",7784 => \"Vesime\",7785 => \"Vespolate\",7786 => \"Vessalico\",7787 => \"Vestenanova\",7788 => \"Vestigne'\",7789 => \"Vestone\",7790 => \"Vestreno\",7791 => \"Vetralla\",7792 => \"Vetto\",7793 => \"Vezza d'Alba\",7794 => \"Vezza d'Oglio\",7795 => \"Vezzano\",7796 => \"Vezzano ligure\",7797 => \"Vezzano sul crostolo\",7798 => \"Vezzi portio\",8317 => \"Vezzo\",7799 => \"Viadana\",7800 => \"Viadanica\",7801 => \"Viagrande\",7802 => \"Viale\",7803 => \"Vialfre'\",7804 => \"Viano\",7805 => \"Viareggio\",7806 => \"Viarigi\",8674 => \"Vibo Marina\",7807 => \"Vibo Valentia\",7808 => \"Vibonati\",7809 => \"Vicalvi\",7810 => \"Vicari\",7811 => \"Vicchio\",7812 => \"Vicenza\",7813 => \"Vico canavese\",7814 => \"Vico del Gargano\",7815 => \"Vico Equense\",7816 => \"Vico nel Lazio\",7817 => \"Vicoforte\",7818 => \"Vicoli\",7819 => \"Vicolungo\",7820 => \"Vicopisano\",7821 => \"Vicovaro\",7822 => \"Viddalba\",7823 => \"Vidigulfo\",7824 => \"Vidor\",7825 => \"Vidracco\",7826 => \"Vieste\",7827 => \"Vietri di Potenza\",7828 => \"Vietri sul mare\",7829 => \"Viganella\",7830 => \"Vigano San Martino\",7831 => \"Vigano'\",7832 => \"Vigarano Mainarda\",7833 => \"Vigasio\",7834 => \"Vigevano\",7835 => \"Viggianello\",7836 => \"Viggiano\",7837 => \"Viggiu'\",7838 => \"Vighizzolo d'Este\",7839 => \"Vigliano biellese\",7840 => \"Vigliano d'Asti\",7841 => \"Vignale monferrato\",7842 => \"Vignanello\",7843 => \"Vignate\",8125 => \"Vignola\",7845 => \"Vignola Falesina\",7846 => \"Vignole Borbera\",7847 => \"Vignolo\",7848 => \"Vignone\",8514 => \"Vigo Ciampedie\",7849 => \"Vigo di Cadore\",7850 => \"Vigo di Fassa\",7851 => \"Vigo Rendena\",7852 => \"Vigodarzere\",7853 => \"Vigolo\",7854 => \"Vigolo Vattaro\",7855 => \"Vigolzone\",7856 => \"Vigone\",7857 => \"Vigonovo\",7858 => \"Vigonza\",7859 => \"Viguzzolo\",7860 => \"Villa agnedo\",7861 => \"Villa bartolomea\",7862 => \"Villa basilica\",7863 => \"Villa biscossi\",7864 => \"Villa carcina\",7865 => \"Villa castelli\",7866 => \"Villa celiera\",7867 => \"Villa collemandina\",7868 => \"Villa cortese\",7869 => \"Villa d'Adda\",7870 => \"Villa d'Alme'\",7871 => \"Villa d'Ogna\",7872 => \"Villa del bosco\",7873 => \"Villa del conte\",7874 => \"Villa di briano\",7875 => \"Villa di Chiavenna\",7876 => \"Villa di Serio\",7877 => \"Villa di Tirano\",7878 => \"Villa Estense\",7879 => \"Villa Faraldi\",7880 => \"Villa Guardia\",7881 => \"Villa Lagarina\",7882 => \"Villa Latina\",7883 => \"Villa Literno\",7884 => \"Villa minozzo\",7885 => \"Villa poma\",7886 => \"Villa rendena\",7887 => \"Villa San Giovanni\",7888 => \"Villa San Giovanni in Tuscia\",7889 => \"Villa San Pietro\",7890 => \"Villa San Secondo\",7891 => \"Villa Sant'Angelo\",7892 => \"Villa Sant'Antonio\",7893 => \"Villa Santa Lucia\",7894 => \"Villa Santa Lucia degli Abruzzi\",7895 => \"Villa Santa Maria\",7896 => \"Villa Santina\",7897 => \"Villa Santo Stefano\",7898 => \"Villa verde\",7899 => \"Villa vicentina\",7900 => \"Villabassa\",7901 => \"Villabate\",7902 => \"Villachiara\",7903 => \"Villacidro\",7904 => \"Villadeati\",7905 => \"Villadose\",7906 => \"Villadossola\",7907 => \"Villafalletto\",7908 => \"Villafranca d'Asti\",7909 => \"Villafranca di Verona\",7910 => \"Villafranca in Lunigiana\",7911 => \"Villafranca padovana\",7912 => \"Villafranca Piemonte\",7913 => \"Villafranca sicula\",7914 => \"Villafranca tirrena\",7915 => \"Villafrati\",7916 => \"Villaga\",7917 => \"Villagrande Strisaili\",7918 => \"Villalago\",7919 => \"Villalba\",7920 => \"Villalfonsina\",7921 => \"Villalvernia\",7922 => \"Villamagna\",7923 => \"Villamaina\",7924 => \"Villamar\",7925 => \"Villamarzana\",7926 => \"Villamassargia\",7927 => \"Villamiroglio\",7928 => \"Villandro\",7929 => \"Villanova biellese\",7930 => \"Villanova canavese\",7931 => \"Villanova d'Albenga\",7932 => \"Villanova d'Ardenghi\",7933 => \"Villanova d'Asti\",7934 => \"Villanova del Battista\",7935 => \"Villanova del Ghebbo\",7936 => \"Villanova del Sillaro\",7937 => \"Villanova di Camposampiero\",7938 => \"Villanova marchesana\",7939 => \"Villanova Mondovi'\",7940 => \"Villanova Monferrato\",7941 => \"Villanova Monteleone\",7942 => \"Villanova solaro\",7943 => \"Villanova sull'Arda\",7944 => \"Villanova Truschedu\",7945 => \"Villanova Tulo\",7946 => \"Villanovaforru\",7947 => \"Villanovafranca\",7948 => \"Villanterio\",7949 => \"Villanuova sul Clisi\",7950 => \"Villaperuccio\",7951 => \"Villapiana\",7952 => \"Villaputzu\",7953 => \"Villar dora\",7954 => \"Villar focchiardo\",7955 => \"Villar pellice\",7956 => \"Villar Perosa\",7957 => \"Villar San Costanzo\",7958 => \"Villarbasse\",7959 => \"Villarboit\",7960 => \"Villareggia\",7961 => \"Villaricca\",7962 => \"Villaromagnano\",7963 => \"Villarosa\",7964 => \"Villasalto\",7965 => \"Villasanta\",7966 => \"Villasimius\",7967 => \"Villasor\",7968 => \"Villaspeciosa\",7969 => \"Villastellone\",7970 => \"Villata\",7971 => \"Villaurbana\",7972 => \"Villavallelonga\",7973 => \"Villaverla\",7974 => \"Villeneuve\",7975 => \"Villesse\",7976 => \"Villetta Barrea\",7977 => \"Villette\",7978 => \"Villimpenta\",7979 => \"Villongo\",7980 => \"Villorba\",7981 => \"Vilminore di scalve\",7982 => \"Vimercate\",7983 => \"Vimodrone\",7984 => \"Vinadio\",7985 => \"Vinchiaturo\",7986 => \"Vinchio\",7987 => \"Vinci\",7988 => \"Vinovo\",7989 => \"Vinzaglio\",7990 => \"Viola\",7991 => \"Vione\",7992 => \"Vipiteno\",7993 => \"Virgilio\",7994 => \"Virle Piemonte\",7995 => \"Visano\",7996 => \"Vische\",7997 => \"Visciano\",7998 => \"Visco\",7999 => \"Visone\",8000 => \"Visso\",8001 => \"Vistarino\",8002 => \"Vistrorio\",8003 => \"Vita\",8004 => \"Viterbo\",8005 => \"Viticuso\",8006 => \"Vito d'Asio\",8007 => \"Vitorchiano\",8008 => \"Vittoria\",8009 => \"Vittorio Veneto\",8010 => \"Vittorito\",8011 => \"Vittuone\",8012 => \"Vitulano\",8013 => \"Vitulazio\",8014 => \"Viu'\",8015 => \"Vivaro\",8016 => \"Vivaro romano\",8017 => \"Viverone\",8018 => \"Vizzini\",8019 => \"Vizzola Ticino\",8020 => \"Vizzolo Predabissi\",8021 => \"Vo'\",8022 => \"Vobarno\",8023 => \"Vobbia\",8024 => \"Vocca\",8025 => \"Vodo cadore\",8026 => \"Voghera\",8027 => \"Voghiera\",8028 => \"Vogogna\",8029 => \"Volano\",8030 => \"Volla\",8031 => \"Volongo\",8032 => \"Volpago del montello\",8033 => \"Volpara\",8034 => \"Volpedo\",8035 => \"Volpeglino\",8036 => \"Volpiano\",8037 => \"Volta mantovana\",8038 => \"Voltaggio\",8039 => \"Voltago agordino\",8040 => \"Volterra\",8041 => \"Voltido\",8042 => \"Volturara Appula\",8043 => \"Volturara irpina\",8044 => \"Volturino\",8045 => \"Volvera\",8046 => \"Vottignasco\",8181 => \"Vulcano Porto\",8047 => \"Zaccanopoli\",8048 => \"Zafferana etnea\",8049 => \"Zagarise\",8050 => \"Zagarolo\",8051 => \"Zambana\",8707 => \"Zambla\",8052 => \"Zambrone\",8053 => \"Zandobbio\",8054 => \"Zane'\",8055 => \"Zanica\",8056 => \"Zapponeta\",8057 => \"Zavattarello\",8058 => \"Zeccone\",8059 => \"Zeddiani\",8060 => \"Zelbio\",8061 => \"Zelo Buon Persico\",8062 => \"Zelo Surrigone\",8063 => \"Zeme\",8064 => \"Zenevredo\",8065 => \"Zenson di Piave\",8066 => \"Zerba\",8067 => \"Zerbo\",8068 => \"Zerbolo'\",8069 => \"Zerfaliu\",8070 => \"Zeri\",8071 => \"Zermeghedo\",8072 => \"Zero Branco\",8073 => \"Zevio\",8455 => \"Ziano di Fiemme\",8075 => \"Ziano piacentino\",8076 => \"Zibello\",8077 => \"Zibido San Giacomo\",8078 => \"Zignago\",8079 => \"Zimella\",8080 => \"Zimone\",8081 => \"Zinasco\",8082 => \"Zoagli\",8083 => \"Zocca\",8084 => \"Zogno\",8085 => \"Zola Predosa\",8086 => \"Zoldo alto\",8087 => \"Zollino\",8088 => \"Zone\",8089 => \"Zoppe' di cadore\",8090 => \"Zoppola\",8091 => \"Zovencedo\",8092 => \"Zubiena\",8093 => \"Zuccarello\",8094 => \"Zuclo\",8095 => \"Zugliano\",8096 => \"Zuglio\",8097 => \"Zumaglia\",8098 => \"Zumpano\",8099 => \"Zungoli\",8100 => \"Zungri\");\n\t$return = '<br/><a href=\"https://www.3bmeteo.com'.strtolower($trebi_url_locs[$idloc]).'\" style=\"font-size:10px;\">Meteo '.$trebi_locs[$idloc].'</a>';\n\treturn $return;\n}", "public function testShowSecondTagItemfromIndex()\n {\n $client = static::createClient();\n\n $client->followRedirects(true);\n $crawler = $client->request('GET', '/tag');\n $link= $crawler->selectLink('show')\n ->eq(1)\n ->link();\n\n $this->assertEquals(\n\n $link->getUri(),'http://localhost/tag/2');\n\n }", "function centralCrawlFullAssault(){\n //look for new businesses and update the business IDs in businessAHSID table\n $this->updateAHSIDs();\n //get an array of IDs from the businessAHSID table we just updated\n $result = Data::selectAHSIDs();\n //Crawl each business in our table\n $this->crawl($result);\n }", "public function test_getToxins() {\n\t\t$this->testAction('/disease/getToxins/Acute%20tubular%20necrosis', array('method' => 'get'));\n\n\t\t$returnedArray = $this->vars['diseases'];\n\t\t$disease = $returnedArray[\"Disease\"];\n\t\t$this->assertEquals(\"620\", $disease[\"id\"]);\n\t\t$this->assertEquals(44, count($returnedArray[\"DiseaseToxin\"]));\n\t}", "function getsearch($site,$n,$from,$auth) {\n $this->auth=$auth;\n $this->sitenumber=$site;\n $this->n=$n;\n $this->home=getenv(\"DOCUMENT_ROOT\");\n $this->from=$from;\n $this->path=substr($this->from,1,4);\n if ($this->sitenumber==1) {$this->path='';}\n if ($this->sitenumber==2) {$this->path='eng/';}\n if ($this->sitenumber==3) {$this->path='cons/';}\n if ($this->sitenumber==4) {$this->path='cons/eng/';}\n }", "public function getSite();", "function getItemsByHashtag($hashTag,$itemsCount,$index = 0){\n\t\t \n\t\t// Build after prameter\n\t\tif($index === 0){\n\t\t\t\n\t\t\t$after= \"\" ;\n\t\t\t \n\t\t}else{\n\t\t \n\t\t\t$after = \"&after=\" . urlencode(trim($index)) ; \n\t\t\t \n\t\t}\n\t\t\n\t\t$url = \"https://www.instagram.com/graphql/query/?query_id=17882293912014529&tag_name=\". urlencode(trim($hashTag)) .\"&first=11\" . $after;\n\t\tcurl_setopt($this->ch, CURLOPT_URL, $url);\n\t\t\n\t\t echo '<br>URL:'.$url; \n\n\t\t$exec = curl_exec($this->ch);\n\t\t$x=curl_error($this->ch);\n\t\t\n\t\t \n\t\t// Curl error check\n\t\tif(trim($exec) == ''){\n\t\t\tthrow new Exception('Empty results from instagram call with possible curl error:'.$x);\n\t\t}\n\t\t\t\n\t\t// Verify returned result\n\t\tif(! stristr($exec, 'status\": \"ok') && ! stristr($exec, 'media\"')){\n\t\t\tthrow new Exception('Unexpected page content from instagram, Visit the plugin settings page and renew the Session ID Cookie'.$x);\n\t\t}\n\t\t\n\t\t$jsonArr = json_decode( $exec );\n\t\t\n\t\t \n\t\t\n\t\tif(isset( $jsonArr->status )){\n\t\t\t\n\t\t\t//when no new items let's get the first page\n\t\t\tif(count( $jsonArr->data->hashtag->edge_hashtag_to_media->edges) == 0 ){\n\t\t\t\t\n\t\t\t\tif($index === 0){\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t// index used let's return first page\n\t\t\t\t\treturn $this->getItemsByHashtag($hashTag,$itemsCount);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $jsonArr;\n\t\t\t\n\t\t}else{\n\t\t\tthrow new Exception('Can not get valid array from instagram'.$x);\n\t\t}\n\t\t\n\t\t\n\t}", "abstract protected function _getItems();", "public function get_sites()\n {\n }", "abstract public function sellToListManagement();", "public function trasnaction(){\n\n\t}", "public function _current();", "public function firstItem();", "abstract public function getAttack();", "function get_sitetree(&$massiv, $start, $level){\n\t\tglobal $web;\n\t\t\n\t\t$list \t= '';\n\t\t$class \t= '';\n\t\tif (!isset($massiv[$start])) return;\n\t\t\n\t\tif ($level == 1) {\n\t\t\t$class \t= 'sub';\n\t\t} elseif ($level == 2) {\n\t\t\t$class = 'subsub';\n\t\t}\n\t\t\n\t\tforeach($massiv[$start] as $key=>$value){\n\t\t\t$list .= '<a class=\"'.$class.'\" href=\"'.SmartUrlEncode(WBG::crosslink($value)).'\">'.$value['title'].'</a>';\n\t\t\t$list .= get_sitetree($massiv, $key, $level+1);\n\t }\n\t \n\t\treturn $list;\n\t}", "public function listaVisitantes(){\n \n }", "public function getInstrucoes();", "private function assertSiteListContainsTaggedSite(): void\n {\n $siteList = $this->terminusJsonResponse(\n sprintf(\"site:list --filter='tags*=%s'\", self::TEST_SITE_TAG)\n );\n $this->assertIsArray($siteList);\n $this->assertCount(1, $siteList, 'Site list filtered by tag must contain exactly one item.');\n $this->assertTrue(\n isset($siteList[$this->getSiteId()]),\n 'Site list filtered by tag must contain the tagged site.'\n );\n }", "public function testDestiny2GetItem()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function index()\n { \n $this->locate(inlink('browse'));\n }", "public function sentAt();", "final function velcom(){\n }", "public function operate()\r\n {\r\n if (false == is_null($this->next)) {\r\n $this->next->operate();\r\n\r\n echo \"ResponsibilityB is start<br>\";\r\n }\r\n }", "function redirect($stg,$position,$trial,$menu){\n \n $result = \"\";\n for($i = 0;$i<count($stg);$i++){\n if($i != 0 && ($i>=($position) && $i<=($position+$trial))){\n continue;\n }\n else{\n $result.=$stg[$i];\n \n }\n }\n // $stg =json_encode($stg);\n // return \"END $stg.$position.$trial.$result\";\n return $menu[$result];\n}", "function current(){}", "function current(){}", "function current(){}", "function current(){}", "function current(){}", "public function testProfilePrototypeFindByIdAccessTokens()\n {\n\n }", "function meditation() {\n$header = new header();\n$header->music(\"Nhạc thiền\");\n\nif(isset($_REQUEST['id'])){\n\tif($_REQUEST['id']=='nhacphat')\n\t{\n\t\t$url='http://nhacthien.net/nhacphat.htm';\n\t}\n}\n\nelse {\n$path = \"/\";\n$url=\"http://www.nhacthien.net/\";\n}\n$indexpage = \"?nhacthien\"; \n\n$trans= new web_transfer();\n$indexpage='/';\n$base='/';\n$trans->initiate_news ($url,$indexpage); \n$trans->converturl($url,$base);\n$content ='';\n$trans->start_transfer(\"www.nhacthien.net\");\n$trans->getcontent($content);\n\n//start social plugin\n$content=str_replace('<div id=\"controls\">','<div class=\"social\"><a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-lang=\"en\">Tweet</a><div data-size=\"medium\" class=\"g-plusone\"></div><div class=\"fb-like\" data-href=\"http://myweb.pro.vn/music/meditation/\" data-layout=\"button_count\" data-action=\"recommend\" data-show-faces=\"true\" data-share=\"true\"></div></div>',$content);\n//end social plugin\n\n//hide right element\n$content=str_replace('<a href=\"\" class=\"music-button\">','<a href=\"http://myweb.pro.vn/music/meditation/\" class=\"music-button\">',$content);\n$content=str_replace('<a href=\"xem-video.html\" class=\"video-button\">','<a href=\"xem-video.html\" style=\"display:none\" class=\"video-button\">',$content);\n//end\n\n$content=str_replace('<li><a href=\"http://www.cakhucbathu.com\">CA KHÚC BẤT HỦ</a></li>','<li style=\"dislay:none\" id=\"cakhucbathu\"><a href=\"http://www.cakhucbathu.com\">CA KHÚC BẤT HỦ</a></li><script>document.getElementById(\"cakhucbathu\").remove();</script>',$content);\n$content=str_replace('<li><a href=\"http://www.petalia.org\">PETALIA NETWORK</a>','<a style=\"display:none\" id=\"petalia_temp_remove\" href=\"http://www.petalia.org\">PETALIA NETWORK</a></li><script>document.getElementById(\"petalia_temp_remove\").remove();</script>',$content);\n$content=str_replace('<div id=\"social\">','<div id=\"social\" style=\"display:none\">',$content);\n$content=str_replace('style=\"width:100%;display:inline-block;\"','id=\"fb_album_remove\" style=\"display:none\"',$content);\n$content=str_replace('http://www.facebook.com/nhackhongloi','https://www.facebook.com/elearningsocialvn?ref=hl',$content);\n\n//start change the url\n$content=str_replace('<a href=\"http://www.nhacthien.net\">TRỞ LẠI NHẠC THIỀN</a>','<a href=\"http://myweb.pro.vn/music/meditation/\">TRỞ LẠI NHẠC THIỀN</a>',$content);\n$content=str_replace('<a href=\"http://www.mangamnhac.net\">MẠNG ÂM NHẠC</a>','<a href=\"http://myweb.pro.vn/music/general/\">TỔNG HỢP</a>',$content);\n$content=str_replace('Nhạc thiền trên Facebook','Học tập và giải trí',$content);\n$content=str_replace('data-href=\"http://nhacthien.net\"','data-href=\"http://myweb.pro.vn/music/meditation/\"',$content);\n$content=str_replace('www.facebook.com/nhacthien','www.facebook.com/elearningsocialvn?ref=hl',$content);\n$content=str_replace('nhackhongloi.org','myweb.pro.vn/music/nhackhongloi',$content);\n$content=str_replace('www.tinhkhucbathu.com','myweb.pro.vn/music/tinhkhucbathu',$content);\n$content=str_replace('www.nhacphap.com','myweb.pro.vn/music/nhacphap',$content);\n$content=str_replace('http://nhacthien.net/nhacphat.htm','http://myweb.pro.vn/music/meditation?id=nhacphat',$content);\n$content=str_replace('www.nhacdance.net','myweb.pro.vn/music/dance/',$content);\n//end change the url\n\n$content=str_replace('/skins','http://www.nhackhongloi.org/skins/',$content);\n$content=str_replace('</body>','<p class=\"append_footer_iframe\"><p/></body>',$content);\npreg_match_all('/<body>(.*?)<p class=\"append_footer_iframe\">/s',$content,$matches,PREG_SET_ORDER);\nforeach($matches as $key_music);\n$data['content']=$key_music[0];\n//start analytic\n$analytic = new analytic();\n$analytic->myweb('general');\n//end analytic\n$this->load->view('/music/nhacthien',$data);\n}", "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 nextAction() : object\n {\n $page = $this->di->get(\"page\");\n $enteredIp = $this->enteredIp;\n $getIpAddress = $_SERVER['REMOTE_ADDR'] ?? null;\n $geoData = $this->geoData;\n $lati = $geoData[\"latitude\"] ?? null;\n $long = $geoData[\"longitude\"] ?? null;\n $ipValidationResult = $this->ipValidationResult;\n\n $this->openWeatherMapModel->setWeatherApiNext10Days($lati, $long);\n $this->weatherUrlNext = $this->openWeatherMapModel->getWeatherApiNext();\n $weatherUrlNext = $this->weatherUrlNext;\n\n $this->getInfoNext = $this->curl->getData($weatherUrlNext);\n $getInfoNext = $this->getInfoNext;\n\n\n $arrIconNext = [];\n $tempArrayNext= [];\n $dateArrayNext = [];\n $wrStatusArrayNext = [];\n $timezoneNext = $getInfoNext[\"timezone\"] ?? null;\n $getInfoDaily = $getInfoNext[\"daily\"] ?? null;\n\n if (is_array($getInfoDaily) || is_object($getInfoDaily)) {\n foreach ($getInfoDaily as $value1) {\n $weatherStatus = $value1[\"weather\"][0][\"main\"] ?? null;\n array_push($wrStatusArrayNext, $weatherStatus);\n\n $date = date(\"d/m\", $value1[\"dt\"] ?? null);\n array_push($dateArrayNext, $date);\n\n $icon = $value1[\"weather\"][0][\"icon\"] ?? null;\n array_push($arrIconNext, $icon);\n\n array_push($tempArrayNext, round($value1[\"temp\"][\"day\"] ?? null, 0));\n }\n }\n\n $json = [\n \"tempArrayNext\" => $tempArrayNext ?? null,\n \"dateArrayNext\" => $dateArrayNext ?? null,\n \"arrIconNext\" => $arrIconNext?? null,\n \"weatherStatusArrayNext\" => $wrStatusArrayNext?? null,\n \"timezoneNext\" => $timezoneNext?? null,\n ];\n\n $this->weatherInJson = $this->openWeatherMapModel->getWeatherInJson($json);\n $weatherInJson= $this->weatherInJson;\n\n $data = [\n \"weatherInJson\" => $weatherInJson ?? null,\n \"geoData\" => $geoData ?? null,\n \"getIpAddress\" => $getIpAddress ?? null,\n \"enteredIp\" => $enteredIp ?? null,\n \"tempArrayNext\" => $tempArrayNext ?? null,\n \"dateArrayNext\" => $dateArrayNext ?? null,\n \"arrIconNext\" => $arrIconNext?? null,\n \"weatherStatusArrayNext\" => $wrStatusArrayNext?? null,\n \"timezoneNext\" => $timezoneNext?? null,\n \"ipValidationResult\" => $ipValidationResult?? null\n ];\n\n $page->add(\"WeatherView/next\", $data);\n return $page->render([\n \"title\" => \"Weather forecast\",\n ]);\n }", "private function extract_pages(){\r\n $dom = new DOMDocument();\r\n @$dom->loadHTMLFile($this->get_sitemap_url());\r\n $dOMXPath = new DOMXPath($dom);\r\n foreach ($dOMXPath->query(\"//urlset/url/loc\") as $node) {\r\n $this->add_page($node->nodeValue);\r\n }\r\n\t}", "public function search()\n {\n\n }", "public function search()\n {\n\n }", "public function silo_contents()\n\t{\n\t}", "function putAfficheSite(){\n\tglobal $translator;\n\t//$oSite = new Cms_site($_SESSION['idSite_travail']);\n\tprint(\"<br /><div class='arbo' align='left'>\".$translator->getTransByCode('sitedetravail').\": \".$_SESSION['site'].\"</div><br />\");\n}", "function hitung()\n\t{\n\t\t$this->model->hitungMhs();\n\t\t//$this->dashboardukmapendaftar(); //controller dikembalikan ke method index setelah selesai mengakses method ini.\n\t}", "function identifyPage() {\n//\t\t$req_uri = $_SERVER['REQUEST_URI'];\n//\t\tprint \"init\";\n\t\t$query = new Query();\n\t\tif($query->sql(\"SELECT id, relation, name, url FROM \" . UT_MEN . \" WHERE url LIKE '%\".$this->url.\"%'\")) {\n\t\t\t$item->id = $query->getQueryResult(0, \"id\");\n\t\t\t$item->name = $this->translate($query->getQueryResult(0, \"name\"));\n\n\t\t\t$item->url = str_replace(FRAMEWORK_PATH.\"/admin\", \"\", $this->url);\n\t\t\t$item->url = str_replace(GLOBAL_PATH.\"/admin\", \"\", $item->url);\n\t\t\t$item->url = str_replace(REGIONAL_PATH.\"/admin\", \"\", $item->url);\n\n//\t\t\t$item->url = ereg_replace(FRAMEWORK_PATH.\"/admin|\".GLOBAL_PATH.\"/admin|\".REGIONAL_PATH.\"/admin\", \"\", $query->getQueryResult(0, \"url\"));\n\t\t\tarray_unshift($this->trail, $item);\n\t\t\t$relation = $query->getQueryResult(0, \"relation\");\n\t\t\tif($relation) {\n\t\t\t\t$this->pageTrail($relation);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\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 catch_information($nodes, $index_own_nodes, $status)\n{\n $own_nodes_list = array();\n foreach ($index_own_nodes as $index) {\n $push = false;\n $node = $nodes[$index];\n $lastseen = format_date($node['lastseen']); # WICHTIG\n\n $hostname = $node['hostname']; # WICHTIG\n $node_id = $node['node_id']; # WICHTIG\n $addresses = $node['addresses'];\n\n $base = $node['firmware']['base'];\n # lösche folgende substrings in base\n $hw = array(\"gluon-\",);\n $base = str_replace($hw, '', $base);\n $release = $node['firmware']['release'];\n\n $model = $node['model'];\n # lösche folgende substrings in model\n $hw = array(\"TP-Link\", \"TP-LINK\", \"ALFA NETWORK\", \"N/ND\");\n $model = str_replace($hw, '', $model);\n\n $gateway = $node['gateway'];\n $gateway_nexthop = $node['gateway_nexthop'];\n # Uplink (Workaround, da Uplink direkt nicht mehr in der JSON steht)\n $uplink = ($gateway == $gateway_nexthop); # WICHTIG\n\n # Richtige IP wählen\n if (startsWith($addresses['0'], \"fe80:\")) {\n $ipv6 = $addresses['1']; # WICHTIG\n } else {\n $ipv6 = $addresses['0']; # WICHTIG\n }\n # Flags\n $online = $node['is_online']; # WICHTIG\n # $uplink = $flags['uplink']; # WICHTIG (kaputt)\n\n # Speichere Werter zur Übergabe\n $inf_node = array(\n \"lastseen\" => $lastseen,\n \"hostname\" => $hostname,\n \"node_id\" => $node_id,\n \"ipv6\" => $ipv6,\n \"online\" => $online,\n \"uplink\" => $uplink,\n \"release\" => $release,\n \"base\" => $base,\n \"model\" => $model,);\n\n # Hier Entscheide, ob offline, uplink oder online\n if ($status == \"offline\") {\n if (!$online) {\n $push = true;\n }\n } else {\n if ($status == \"uplink\") {\n if ($uplink and $online) {\n $push = true;\n }\n } else {\n if ($status == \"online\") {\n if ($online and !$uplink) {\n $push = true;\n }\n }\n }\n }\n if ($push) {\n array_push($own_nodes_list, $inf_node);\n }\n }\n return $own_nodes_list;\n}", "function extractByIndex($p_index)\n {\n }", "function curl_index($vs = null, $ev = null, $search = null)\n\t{\n\t\t\n\t\t$url \t = 'http://webbond.seminolesheriff.org/Search.aspx';\n\t\t$headers = array('GET /public/ArRptQuery.aspx HTTP/1.1',\n\t\t\t\t\t'Host: www.sheriffseminole.org',\n\t\t\t\t\t'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1',\n\t\t\t\t\t'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n\t\t\t\t\t'Accept-Language: en-us,en;q=0.5',\n\t\t\t\t\t'Accept-Encoding: gzip, deflate',\n\t\t\t\t\t'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7',\n\t\t\t\t\t'Keep-Alive: 115',\n\t\t\t\t\t'Connection: keep-alive',\n\t\t\t\t\t'Cookie: ASP.NET_SessionId=hhwz3u45zmuiddbhqwy2y1rw',\n\t\t\t\t\t'Cache-Control: max-age=0');\n\t\t$ch = curl_init(); \n \tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_COOKIEFILE, $this->cookies);\n\t\tcurl_setopt($ch, CURLOPT_COOKIEJAR, $this->cookies);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tif ($ev && $vs && $search)\n\t\t{\n\t\t\t$fields = '__EVENTTARGET=&__EVENTARGUMENT=&__LASTFOCUS=&__VIEWSTATE='.urlencode($vs).'&__EVENTVALIDATION='.urlencode($ev).'&ctl00%24ContentPlaceHolder1%24ddllist=Last+Name&ctl00%24ContentPlaceHolder1%24txtTST='.urlencode($search).'&ctl00%24ContentPlaceHolder1%24Button1=Search';\n\t\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $fields);\n\t\t}\n\t\t//curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n $index = curl_exec($ch);\n curl_close($ch);\n\t\treturn $index;\n\t}", "function trebi_getUrlRegione($idreg)\n{\n\tswitch ($idreg) {\n\t\tcase 1: $urlret = 'Abruzzo'; $uriret = 'abruzzo'; break;\n\t\tcase 2: $urlret = 'Basilicata'; $uriret = 'basilicata'; break;\n\t\tcase 3: $urlret = 'Calabria'; $uriret = 'calabria'; break;\n\t\tcase 4: $urlret = 'Campania'; $uriret = 'campania'; break;\n\t\tcase 5: $urlret = 'Emilia'; $uriret = 'emilia'; break;\n\t\tcase 6: $urlret = 'Friuli'; $uriret = 'friuli'; break;\n\t\tcase 7: $urlret = 'Lazio'; $uriret = 'lazio'; break;\n\t\tcase 8: $urlret = 'Liguria'; $uriret = 'liguria'; break;\n\t\tcase 9: $urlret = 'Lombardia'; $uriret = 'lombardia'; break;\n\t\tcase 10: $urlret = 'Marche'; $uriret = 'marche'; break;\n\t\tcase 11: $urlret = 'Molise'; $uriret = 'molise'; break;\n\t\tcase 12: $urlret = 'Piemonte'; $uriret = 'piemonte'; break;\n\t\tcase 13: $urlret = 'Puglia'; $uriret = 'puglia'; break;\n\t\tcase 14: $urlret = 'Sardegna'; $uriret = 'sardegna'; break;\n\t\tcase 15: $urlret = 'Sicilia'; $uriret = 'sicilia'; break;\n\t\tcase 16: $urlret = 'Toscana'; $uriret = 'toscana'; break;\n\t\tcase 17: $urlret = 'Trentino'; $uriret = 'trentino'; break;\n\t\tcase 18: $urlret = 'Umbria'; $uriret = 'umbria'; break;\n\t\tcase 19: $urlret = 'Valle d\\'aosta'; $uriret = 'valle%20aosta'; break;\n\t\tcase 20: $urlret = 'Veneto'; $uriret = 'veneto'; break;\n }\n\t$return = '<br/><a href=\"https://www.3bmeteo.com/meteo/'.strtolower($uriret).'\" style=\"font-size:10px;\">Meteo '.$urlret.'</a>';\n\treturn $return;\n}", "function cao_vip_page() {\r\n}", "protected function _getCurrent() {}", "protected function _getCurrent() {}", "public function testGetSiteMembershipForPerson()\n {\n }", "public function ogs()\r\n {\r\n }" ]
[ "0.66972196", "0.5179245", "0.50689375", "0.5052485", "0.50153905", "0.50153905", "0.50153905", "0.49853456", "0.4974089", "0.49560165", "0.49290842", "0.49076033", "0.4895498", "0.48888618", "0.48830637", "0.48725638", "0.48635268", "0.48396704", "0.48147842", "0.47905433", "0.47843722", "0.47804078", "0.4780162", "0.47796476", "0.47744635", "0.47676674", "0.4764302", "0.47626254", "0.47595078", "0.47582698", "0.47466257", "0.47466257", "0.47466257", "0.4730778", "0.4696519", "0.4694118", "0.46938208", "0.46793002", "0.46707386", "0.46670192", "0.46668214", "0.4665311", "0.46604332", "0.46576944", "0.46534184", "0.46520087", "0.46422112", "0.4642193", "0.4631375", "0.463067", "0.46301797", "0.46171802", "0.46089995", "0.46069878", "0.45944268", "0.45923954", "0.45895097", "0.4583097", "0.45749727", "0.45740885", "0.45707244", "0.4565241", "0.45647722", "0.45631844", "0.45621273", "0.45532775", "0.45489082", "0.45481488", "0.454507", "0.45432416", "0.4542014", "0.45400593", "0.45291093", "0.4519185", "0.4510973", "0.45021272", "0.45021272", "0.45021272", "0.45021272", "0.45021272", "0.44916186", "0.44909716", "0.44872773", "0.4485948", "0.44849464", "0.44836366", "0.44836366", "0.44810134", "0.44782025", "0.44714528", "0.44642618", "0.44632193", "0.44623378", "0.44615895", "0.44578", "0.44551378", "0.44545975", "0.44541007", "0.44541007", "0.44536254", "0.44478688" ]
0.0
-1
Add get/set methods for your configuration properties here. Gets the Category entity name.
public function getName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategory() {}", "public function getCategory(): string;", "public function getCategory();", "public function getCategory();", "public function getCategory()\n {\n }", "function getCategory() \n {\n return $this->instance->getCategory();\n }", "public function getCategory(){\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "function getCategory()\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t\t\r\n\t\t}", "public function getCategory()\n {\n $get_property_category =Category::get();\n return $get_property_category->tojson();\n }", "public function getCategory() {\n return $this->category;\n }", "public function config_category()\n {\n require_javascript('checking');\n\n // Load up some basic details\n $category = $this->category;\n $post_url = build_url(array('page' => '_SELF', 'type' => 'set', 'id' => $category, 'redirect' => get_param_string('redirect', null)), '_SELF');\n $category_description = do_lang_tempcode('CONFIG_CATEGORY_DESCRIPTION__' . $category);\n\n // Find all options in category\n $hooks = find_all_hooks('systems', 'config');\n $options = array();\n foreach (array_keys($hooks) as $hook) {\n require_code('hooks/systems/config/' . filter_naughty_harsh($hook));\n $ob = object_factory('Hook_config_' . filter_naughty_harsh($hook));\n $option = $ob->get_details();\n if (($GLOBALS['CURRENT_SHARE_USER'] === null) || ($option['shared_hosting_restricted'] == 0)) {\n if ($category == $option['category']) {\n if ($ob->get_default() !== null) {\n if (!isset($option['order_in_category_group'])) {\n $option['order_in_category_group'] = 100;\n }\n $option['ob'] = $ob;\n $option['name'] = $hook;\n $options[$option['group']][$hook] = $option;\n }\n }\n }\n }\n\n // Add in special ones\n if ($category == 'SITE') {\n $options['INTERNATIONALISATION']['timezone'] = array('name' => 'timezone', 'human_name' => 'TIMEZONE', 'c_value' => '', 'type' => 'special', 'category' => 'SITE', 'group' => 'INTERNATIONALISATION', 'explanation' => 'DESCRIPTION_TIMEZONE_SITE', 'shared_hosting_restricted' => 0, 'order_in_category_group' => 1);\n }\n require_code('files');\n $upload_max_filesize = (ini_get('upload_max_filesize') == '0') ? do_lang('NA') : clean_file_size(php_return_bytes(ini_get('upload_max_filesize')));\n $post_max_size = (ini_get('post_max_size') == '0') ? do_lang('NA') : clean_file_size(php_return_bytes(ini_get('post_max_size')));\n\n // Sort the groups\n $all_known_groups = array();\n foreach (array_keys($options) as $group) {\n $_group = do_lang($group);\n\n $_group = strtolower(trim(cms_preg_replace_safe('#(&.*;)|[^\\w\\s]#U', '', strip_tags($_group))));\n if ((isset($all_known_groups[$_group])) && ($all_known_groups[$_group] != $group)) {\n $_group = 'std_' . $group; // If cat names translate to same things or are in non-latin characters like Cyrillic\n }\n\n $all_known_groups[$_group] = $group;\n }\n $advanced_key = strtolower(trim(cms_preg_replace_safe('#(&.*;)|[^\\w\\s]#U', '', do_lang('ADVANCED'))));\n ksort($all_known_groups);\n if (isset($all_known_groups[$advanced_key])) { // Advanced goes last\n $temp = $all_known_groups[$advanced_key];\n unset($all_known_groups[$advanced_key]);\n $all_known_groups[$advanced_key] = $temp;\n }\n\n // Render option groups\n $groups_arr = array();\n require_code('form_templates');\n $_groups = array();\n foreach ($all_known_groups as $group_codename) {\n if (!isset($options[$group_codename])) {\n continue;\n }\n\n $options_in_group = $options[$group_codename];\n\n $all_orders_default = true;\n foreach ($options_in_group as $name => $option) {\n if ($option['order_in_category_group'] != 100) {\n $all_orders_default = false;\n }\n $options_in_group[$name]['human_name_trans'] = do_lang($option['human_name']);\n }\n if ($all_orders_default) {\n sort_maps_by($options_in_group, 'human_name_trans');\n } else {\n sort_maps_by($options_in_group, 'order_in_category_group');\n }\n\n $out = '';\n foreach ($options_in_group as $name => $option) {\n // Language strings\n $human_name = do_lang_tempcode($option['human_name']);\n $_explanation = do_lang($option['explanation'], null, null, null, null, false);\n if ($_explanation === null) {\n $_explanation = do_lang('CONFIG_GROUP_DEFAULT_DESCRIP_' . $option['group'], null, null, null, null, false);\n if ($_explanation === null) {\n // So an error shows\n $_explanation = do_lang($option['explanation']);\n $explanation = do_lang_tempcode($option['explanation']);\n } else {\n $explanation = do_lang_tempcode('CONFIG_GROUP_DEFAULT_DESCRIP_' . $option['group']);\n }\n } else {\n $explanation = do_lang_tempcode($option['explanation']);\n }\n $default = get_default_option($name);\n\n if (isset($option['required'])) {\n $required = $option['required'];\n } else {\n if ($option['type'] == 'integer') {\n $required = true;\n } elseif ($option['type'] == 'float') {\n $required = true;\n } elseif ($option['type'] == 'list') {\n $required = true;\n } else {\n $required = false;\n }\n }\n\n // Render field inputter\n switch ($option['type']) {\n case 'special':\n switch ($name) {\n case 'timezone':\n $list = '';\n $timezone = get_site_timezone();\n foreach (get_timezone_list() as $_timezone => $timezone_nice) {\n $list .= static_evaluate_tempcode(form_input_list_entry($_timezone, $_timezone == $timezone, $timezone_nice));\n }\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation, 'timezone', make_string_tempcode($list)));\n break;\n\n default:\n $ob = $option['ob'];\n $out .= static_evaluate_tempcode($ob->field_inputter($name, $option, $human_name, $explanation));\n break;\n }\n break;\n\n case 'integer':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(escape_html($default)));\n $out .= static_evaluate_tempcode(form_input_integer($human_name, $explanation_with_default, $name, intval(get_option($name)), $required));\n break;\n\n case 'float':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, escape_html(($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(float_format(floatval($default)))));\n $out .= static_evaluate_tempcode(form_input_float($human_name, $explanation_with_default, $name, floatval(get_option($name)), $required));\n break;\n\n case 'line':\n case 'transline':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(escape_html($default)));\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation_with_default, $name, get_option($name), $required, null, 100000));\n break;\n\n case 'text':\n case 'transtext':\n $out .= static_evaluate_tempcode(form_input_text($human_name, $explanation, $name, get_option($name), $required, null, true));\n break;\n\n case 'comcodeline':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : make_string_tempcode(escape_html($default)));\n $out .= static_evaluate_tempcode(form_input_line_comcode($human_name, $explanation_with_default, $name, get_option($name), $required));\n break;\n\n case 'comcodetext':\n $out .= static_evaluate_tempcode(form_input_text_comcode($human_name, $explanation, $name, get_option($name), $required, null, true));\n break;\n\n case 'list':\n $_default = make_string_tempcode(escape_html($default));\n $list = '';\n if (!$required) {\n $list .= static_evaluate_tempcode(form_input_list_entry('', false, do_lang_tempcode('NA_EM')));\n }\n $_value = get_option($name);\n $values = explode('|', $option['list_options']);\n foreach ($values as $value) {\n $__value = str_replace(' ', '__', $value);\n $_option_text = do_lang('CONFIG_OPTION_' . $name . '_VALUE_' . $__value, null, null, null, null, false);\n if ($_option_text !== null) {\n $option_text = do_lang_tempcode('CONFIG_OPTION_' . $name . '_VALUE_' . $__value);\n if ($value == $default) {\n $_default = $option_text;\n }\n } else {\n $option_text = make_string_tempcode($value);\n }\n $list .= static_evaluate_tempcode(form_input_list_entry($value, $_value == $value, $option_text));\n }\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, ($default == '') ? do_lang_tempcode('BLANK_EM') : $_default);\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation_with_default, $name, make_string_tempcode($list), null, false, false));\n break;\n\n case 'tick':\n $explanation_with_default = do_lang_tempcode('EXPLANATION_WITH_DEFAULT', $explanation, escape_html(($default == '1') ? do_lang('YES') : do_lang('NO')));\n $out .= static_evaluate_tempcode(form_input_tick($human_name, $explanation_with_default, $name, get_option($name) == '1'));\n break;\n\n case 'username':\n $out .= static_evaluate_tempcode(form_input_username($human_name, $explanation, $name, get_option($name), $required, false));\n break;\n\n case 'colour':\n $out .= static_evaluate_tempcode(form_input_colour($human_name, $explanation, $name, get_option($name), $required));\n break;\n\n case 'date':\n $out .= static_evaluate_tempcode(form_input_date($human_name, $explanation, $name, $required, false, false, intval(get_option($name)), 40, intval(date('Y')) - 20, null));\n break;\n\n case 'forum':\n if ((get_forum_type() == 'cns') && (addon_installed('cns_forum'))) {\n $current_setting = get_option($name);\n if (!is_numeric($current_setting)) {\n $_current_setting = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forums', 'id', array('f_name' => $current_setting));\n if ($_current_setting === null) {\n if ($required) {\n $current_setting = strval(db_get_first_id());\n attach_message(do_lang_tempcode('FORUM_CURRENTLY_UNSET', $human_name), 'notice');\n } else {\n $current_setting = null;\n }\n } else {\n $current_setting = strval($_current_setting);\n }\n }\n $out .= static_evaluate_tempcode(form_input_tree_list($human_name, $explanation, $name, null, 'choose_forum', array(), $required, $current_setting));\n } else {\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation, $name, get_option($name), $required));\n }\n break;\n\n case 'forum_grouping':\n if (get_forum_type() == 'cns') {\n $tmp_value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forum_groupings', 'id', array('c_title' => get_option($name)));\n\n require_code('cns_forums2');\n $_list = new Tempcode();\n if (!$required) {\n $_list->attach(form_input_list_entry('', false, do_lang_tempcode('NA_EM')));\n }\n $_list->attach(cns_create_selection_list_forum_groupings(null, $tmp_value));\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation, $name, $_list));\n } else {\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation, $name, get_option($name), $required));\n }\n break;\n\n case 'usergroup':\n case 'usergroup_not_guest':\n if (get_forum_type() == 'cns') {\n $tmp_value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_groups', 'id', array($GLOBALS['FORUM_DB']->translate_field_ref('g_name') => get_option($name)));\n\n require_code('cns_groups');\n $_list = new Tempcode();\n if (!$required) {\n $_list->attach(form_input_list_entry('', false, do_lang_tempcode('NA_EM')));\n }\n $_list->attach(cns_create_selection_list_usergroups($tmp_value, $option['type'] == 'usergroup'));\n $out .= static_evaluate_tempcode(form_input_list($human_name, $explanation, $name, $_list));\n } else {\n $out .= static_evaluate_tempcode(form_input_line($human_name, $explanation, $name, get_option($name), $required));\n }\n break;\n\n default:\n fatal_exit('Invalid config option type: ' . $option['type'] . ' (for ' . $option['name'] . ')');\n }\n }\n\n // Render group\n $group_title = do_lang_tempcode($group_codename);\n $_group_description = do_lang('CONFIG_GROUP_DESCRIP_' . $group_codename, escape_html($post_max_size), escape_html($upload_max_filesize), null, null, false);\n if ($_group_description === null) {\n $group_description = new Tempcode();\n } else {\n $group_description = do_lang_tempcode('CONFIG_GROUP_DESCRIP_' . $group_codename, escape_html($post_max_size), escape_html($upload_max_filesize));\n }\n $groups_arr[] = array('GROUP_DESCRIPTION' => $group_description, 'GROUP_NAME' => $group_codename, 'GROUP' => $out, 'GROUP_TITLE' => $group_title);\n $_groups[$group_codename] = $group_title;\n }\n\n list($warning_details, $ping_url) = handle_conflict_resolution();\n\n // Render\n return do_template('CONFIG_CATEGORY_SCREEN', array(\n '_GUID' => 'd01b28b71c38bbb52b6aaf877c7f7b0e',\n 'CATEGORY_DESCRIPTION' => $category_description,\n '_GROUPS' => $_groups,\n 'PING_URL' => $ping_url,\n 'WARNING_DETAILS' => $warning_details,\n 'TITLE' => $this->title,\n 'URL' => $post_url,\n 'GROUPS' => $groups_arr,\n 'SUBMIT_ICON' => 'buttons__save',\n 'SUBMIT_NAME' => do_lang_tempcode('SAVE'),\n ));\n }", "function get_Category()\n {\n try {\n return $this->mCategory;\n }catch(Exception $e){\n $this->error->throwException('303', 'No s`ha pogut retornar la informació', $e);\n }\n }", "public static function getCategory()\n {\n return self::$category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function get_category(){\n\t\treturn $this->category;\n\t}", "function article_category() {\n $category = Registry::get('category');\n return $category->title;\n}", "public function getCategory() {\n return $this->category;\n }", "public function getCategory()\n {\n return \"Injection Flaws\"; //See category.php for list of all the categories\n }", "public function getCategory()\n {\n\n return $this->category;\n }", "public function getCategoryNameAttribute()\n {\n return $this->category->name ?? '';\n }", "public function getIdCategory(){\n return $this->idCategory;\n }", "protected static function getFacadeAccessor()\n {\n return 'category';\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->_category;\n }", "public function categoryName(){\n \treturn $this->belongsTo('App\\Backend\\Category', 'category_id', 'category_id');\n }", "public function getCategory() {\n\t\treturn $this->category;\n\t}", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function getCategory()\n\t{\n\t\treturn $this->category;\n\t}", "public function getCategory(): string|null;", "public function __toString()\n {\n return $this->categoryName;\n }", "public function getCategory() {\n $productModel = new productModel();\n $categories = $productModel->getCategoryList();\n $this->JsonCall($categories);\n }", "public function getCategory(){\r\n return Mage::registry('current_category');\r\n }", "private function getCategory() {\n return '';\n }", "public function getCategory()\n\t{\n\t\treturn $this->data['category'];\n\t}", "function get_category() {\n return self::CATEGORY_ADMIN;\n }", "public function editableProperties()\n\t{\n\t\treturn array(\"category\",\"name\");\n\t}", "public function __toString(){\n return $this->name;\n // to show the id of the Category in the select\n // return $this->id;\n }", "public function __toString(){\n return $this->name;\n // to show the id of the Category in the select\n // return $this->id;\n }", "public function get_category() {\n $data['get_category'] = $this->Category_model->get_category();\n return $data['get_category'];\n }", "public function get_category()\n {\n return 'Information Display';\n }", "public function __toString(){\n return $this->getName();\n // to show the id of the Category in the select\n // return $this->id;\n }", "public function getCategory()\n\t\t{\n\t\t\t$this->layout = \"index\";\n\t\t\t$this->set('title', 'Category (Linnworks API)');\n\t\t}", "public function getCategory()\n {\n\t\treturn self::$categories[ $this->category ];\n }", "protected static function getFacadeAccessor() { return 'categories'; }", "public function __toString(){\n // to show the name of the Category in the select\n return $this->name;\n // to show the id of the Category in the select\n // return $this->id;\n }", "public function getCategoria()\n {\n return \"Cliente com Risco\";\n }", "private function categoriesGet()\n {\n//var_dump(__METHOD__, __LINE__, array_keys($this->confMap));\n//var_dump(__METHOD__, __LINE__, array_keys( $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'points.' ]));\n // RETURN : method is called twice at least\n if ( $this->arrCategories != null )\n {\n return $this->arrCategories;\n }\n // RETURN : method is called twice at least\n // Local array for category labels\n $catLabels = null;\n // Local array for category icons\n $catIcons = null;\n // #54548, 131221, dwildt, 2+\n // Local array for category label css classes\n $catCss = null;\n\n switch ( true )\n {\n case( $this->pObj->typoscriptVersion <= 4005004 ):\n // Get the field name of the field with the category label\n $fieldForLabel = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'category' ];\n // Get the field name of the field with the category icon\n $fieldForIcon = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'categoryIcon' ];\n break;\n case( $this->pObj->typoscriptVersion <= 4005007 ):\n default:\n // Get the field name of the field with the category label\n $fieldForLabel = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryTitle' ];\n // #54548, 131221, dwildt, 4+\n // Get the field name of the field with the category label class for a marker category\n $fieldForCssMarker = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryCssMarker' ];\n // Get the field name of the field with the category label class for a path category\n $fieldForCssPath = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryCssPath' ];\n // Get the field name of the field with the category icon\n $fieldForIcon = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryIcon' ];\n break;\n }\n // #47631, #i0007, dwildt, 10+\n // Get categories from the rows\n $categoryLabels = array();\n\n // FOREACH row\n foreach ( $this->pObj->rows as $row )\n {\n // RETURN : field for category label is missing\n // 130530, dwildt\n switch ( true )\n {\n case(!$fieldForLabel ):\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'table.field with the category is empty';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n $prompt = 'Please use the TypoScript Constant Editor and maintain map.marker.field.category ';\n t3lib_div :: devLog( '[HELP/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 1 );\n }\n // DRS\n //var_dump(__METHOD__, __LINE__, $fieldForLabel);\n $this->arrCategories = array();\n return $this->arrCategories;\n // #47602, 130911, dwildt, 1+\n case(!array_key_exists( $fieldForLabel, $row ) ):\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'current rows doesn\\'t contain the field \"' . $fieldForLabel . '\"';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n //var_dump(__METHOD__, __LINE__, $fieldForLabel, array_keys($row), $this->categoriesGetWoLatLon( $row ) );\n // #i0196, 151022, dwildt, 6+\n if ( $this->categoriesGetWoLatLon( $row ) )\n {\n $this->arrCategories = array();\n return $this->arrCategories;\n }\n $row[ $fieldForLabel ] = '';\n break;\n // #i0196, 151022, dwildt, 6+/2-\n //$this->arrCategories = array();\n //return $this->arrCategories;\n // #i0076, 140721, dwildt, +\n case($this->categoriesGetWoLatLon( $row ) ):\n continue 2;\n default:\n // follow the workflow\n }\n // RETURN : field for category label is missing\n // 4.1.7, dwildt, 1-\n //$categoryLabels = array_merge( $categoryLabels, explode( $this->catDevider, $row[ $fieldForLabel ] ) );\n // 4.1.7, dwildt, 10+\n//var_dump( __METHOD__, __LINE__, $this->catDevider, $fieldForLabel, $row[ $fieldForLabel ]);\n//die();\n $catLabelsOfCurrRow = explode( $this->catDevider, $row[ $fieldForLabel ] );\n foreach ( $catLabelsOfCurrRow as $labelKey => $labelValue )\n {\n // #47602, 130911, dwildt, 4+\n if ( empty( $labelValue ) )\n {\n $labelValue = $this->pObj->pi_getLL( 'phrase_noMapCat' );\n // #i0062, 140714, 1+\n $this->arrWoCategories[ 'rows' ][] = $row[ $this->pObj->arrLocalTable[ 'uid' ] ];\n }\n $categoryLabels[] = $labelValue;\n if ( isset( $row[ $fieldForIcon ] ) )\n {\n $catIconsOfCurrRow = explode( $this->catDevider, $row[ $fieldForIcon ] );\n $categoryIcons[ $labelValue ] = $catIconsOfCurrRow[ $labelKey ];\n }\n // #54548, 131221, dwildt, 13+\n switch ( true )\n {\n case( isset( $row[ $fieldForCssMarker ] ) ):\n $catCssOfCurrRow = explode( $this->catDevider, $row[ $fieldForCssMarker ] );\n $categoryCss[ $labelValue ] = $catCssOfCurrRow[ $labelKey ];\n break;\n case( isset( $row[ $fieldForCssPath ] ) ):\n $catCssOfCurrRow = explode( $this->catDevider, $row[ $fieldForCssPath ] );\n $categoryCss[ $labelValue ] = $catCssOfCurrRow[ $labelKey ];\n break;\n default;\n break;\n }\n }\n // 4.1.7, dwildt, 10+\n }\n // FOREACH row\n // Get categories from the rows\n // #i0120, 150101, dwildt: 4+\n if ( $this->categoriesEmpty( $categoryLabels ) )\n {\n return false;\n }\n // Remove non unique category labels\n $categoryLabels = array_unique( $categoryLabels );\n//var_dump (__METHOD__, __LINE__, $categoryLabels);\n//var_dump(__METHOD__, __LINE__);\n // Order the category labels\n $orderBy = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'orderBy' ];\n switch ( $orderBy )\n {\n case( 'SORT_REGULAR' ):\n sort( $categoryLabels, SORT_REGULAR );\n break;\n case( 'SORT_NUMERIC' ):\n sort( $categoryLabels, SORT_NUMERIC );\n break;\n case( 'SORT_STRING' ):\n sort( $categoryLabels, SORT_STRING );\n break;\n case( 'SORT_LOCALE_STRING' ):\n sort( $categoryLabels, SORT_LOCALE_STRING );\n break;\n default:\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'configuration.categories.orderBy has an unproper value: \"' . $orderBy . '\"';\n t3lib_div :: devLog( '[ERROR/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 3 );\n $prompt = 'categories will ordered by SORT_REGULAR!';\n t3lib_div :: devLog( '[WARN/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 2 );\n }\n sort( $categoryLabels, SORT_REGULAR );\n break;\n }\n // Order the category labels\n // Set the keys: keys should correspond with keys of the item colours\n $maxItem = count( $categoryLabels );\n $counter = 0;\n//var_dump(__METHOD__, __LINE__);\n//var_dump(__METHOD__, __LINE__, array_keys($this->confMap));\n foreach ( array_keys( $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'points.' ] ) as $catKey )\n {\n if ( substr( $catKey, -1 ) == '.' )\n {\n continue;\n }\n $catLabels[ $catKey ] = $categoryLabels[ $counter ];\n if ( isset( $row[ $fieldForIcon ] ) )\n {\n $catIcons[ $catKey ] = $categoryIcons[ $categoryLabels[ $counter ] ];\n }\n\n // #i0062, 140714, 4+\n if ( $catLabels[ $catKey ] == $this->pObj->pi_getLL( 'phrase_noMapCat' ) )\n {\n $this->arrWoCategories[ 'iconKey' ] = $catKey;\n }\n // #54548, 131221, dwildt, 9+\n switch ( true )\n {\n case( isset( $row[ $fieldForCssMarker ] ) ):\n case( isset( $row[ $fieldForCssPath ] ) ):\n $catCss[ $catKey ] = $categoryCss[ $categoryLabels[ $counter ] ];\n break;\n default;\n break;\n }\n $counter++;\n if ( $counter >= $maxItem )\n {\n break;\n }\n }\n // Set the keys: keys should correspond with keys of the item colours\n\n $this->arrCategories[ 'labels' ] = $catLabels;\n if ( isset( $row[ $fieldForIcon ] ) )\n {\n $this->arrCategories[ 'icons' ] = $catIcons;\n }\n // #54548, 131221, dwildt, 8+\n if ( !empty( $catCss ) )\n {\n $this->arrCategories[ 'cssClass' ] = $catCss;\n }\n//var_dump(__METHOD__, __LINE__);\n\n return $this->arrCategories;\n }", "public function getProduct_category () {\n\t$preValue = $this->preGetValue(\"product_category\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->getClass()->getFieldDefinition(\"product_category\")->preGetData($this);\n\treturn $data;\n}", "public function getCategory() {\n return $this->randomQuote->category_name;\n }", "public function __get($property)\n\t{\n\t\treturn Config::get(\"company.$property\");\n\t}", "public function getCategory($name);", "public function getName()\n {\n return $this->get(\"category_name\");\n }", "function getName() { return 'TestPostAddCategory'; }", "public function getCategory(): ?string;", "public function category() {\n\t\treturn $this->get_category();\n\t}", "public function __toString(){\n // to show the name of the Category in the select\n return $this->nombre;\n // to show the id of the Category in the select\n // return $this->id;\n }", "public function getCategory() \n {\n return $this->hasOne(Category::className(), ['id' => 'category_id']); \n }", "public function category(): string\n {\n return $this.$this->belongsTo(Category::class);\n }", "public function get_category(){\n\t\t$this->load->model('seller/product_model');\n\t\t$category = $this->product_model->get_category();\n\t\treturn $category;\n\t}", "function getCategoryNameById($cat_id) {\n $ci = & get_instance();\n $category = $ci->crud->get(ES_PRODUCT_CATEGORIES, array('id' => $cat_id));\n if (count($category) > 0) {\n return $category['name'];\n } else {\n return \"Not available\";\n }\n}", "public function getTaxCategory();", "public function getTaxCategory();", "public function getTaxCategory();", "public function getCategories();", "public function getCategories();", "public function __toString(){\n return $this->type;\n // to show the id of the Category in the select\n // return $this->id;\n }", "public function get_category()\n {\n return 'Graphical';\n }", "public function get_category()\n {\n return 'Graphical';\n }", "function article_category_slug() {\n $category = Registry::get('category');\n return $category->slug;\n}", "public function getCategoryId();", "public function getCategoryNameAttribute()\n {\n if (isset($this->category) and $this->category) {\n return $this->category->title;\n }\n\n return;\n }", "public function __toString(){\n // to show the name of the Category in the select\n return $this->libelle;\n // to show the id of the Category in the select\n // return $this->id;\n }", "public function __toString(){\n // to show the name of the Category in the select\n return $this->libelle;\n // to show the id of the Category in the select\n // return $this->id;\n }", "public function getCategory(){\n return $this->hasOne(Category::className(), ['id' => 'category_id']);\n }", "public function getCategory()\n {\n return $this->hasMany(Category::className(), ['category_id' => 'id']);\n }", "public function getCategory()\r\n{\r\n $query_string = \"SELECT categoryname, categorydescription FROM categories \";\r\n $query_string .= \"WHERE categoryid = :categoryid\";\r\n\r\n return $query_string;\r\n}", "public function getSource()\n {\n return 'category';\n }", "public function getSource()\n {\n return 'category';\n }", "public function getCategory()\n {\n return $this->hasOne(Category::className(), ['id' => 'category_id']);\n }", "public function getCategory()\n {\n return $this->hasOne(Category::className(), ['id' => 'category_id']);\n }", "public function getCategory()\n {\n return $this->hasOne(Category::className(), ['id' => 'category_id']);\n }", "public function getCategoryName()\n {\n return $this->cat->title;\n }" ]
[ "0.6762236", "0.65681976", "0.6555174", "0.6555174", "0.64589834", "0.6303466", "0.621567", "0.60881865", "0.60881865", "0.60773784", "0.606536", "0.605259", "0.5977315", "0.59579563", "0.5955398", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.5908841", "0.58863235", "0.5835607", "0.58307725", "0.5791511", "0.57683235", "0.5735936", "0.57282895", "0.5725408", "0.5720477", "0.569382", "0.5681495", "0.5680465", "0.56695056", "0.56695056", "0.56695056", "0.5666016", "0.56529665", "0.56460094", "0.5631381", "0.56299126", "0.56234473", "0.5609177", "0.5589985", "0.55876297", "0.5572858", "0.5572858", "0.5562709", "0.55480915", "0.5532659", "0.55161685", "0.5510947", "0.5502291", "0.54980904", "0.5495489", "0.5489423", "0.5481846", "0.5466681", "0.5452505", "0.54378605", "0.5433284", "0.5430016", "0.5428871", "0.5422917", "0.5414454", "0.5393432", "0.53823185", "0.53788126", "0.5376257", "0.53718185", "0.53718185", "0.53718185", "0.53615403", "0.53615403", "0.53490776", "0.53426486", "0.53426486", "0.53410316", "0.5340003", "0.5334939", "0.53314793", "0.53314793", "0.5307652", "0.5307403", "0.5305543", "0.5301382", "0.5301382", "0.52944034", "0.52944034", "0.52944034", "0.528435" ]
0.0
-1
Sets the Category entity name.
public function setName($name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_name( $new_name )\r\n\t\t{\r\n\t\t\t$this->errno = DB_OK;\r\n\r\n\t\t\tif ( $this->cat_id == -1 )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tSuch category hasn't been created\r\n\t\t\t{\r\n\t\t\t\t$this->errno = WRONG_ID;\r\n\t\t\t\treturn ;\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif( !$this->con->query( \"UPDATE category SET cat_name=\\\"$new_name\\\" WHERE cat_id=$this->cat_id;\" ) )\t\t\t\r\n\t\t\t{\r\n\t\t\t\t$this->errno = MYSQL_ERROR;\t\t\t\t\t\r\n\t\t\t\treturn ;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tFailed to query\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t$this->cat_name = $new_name;\t\t\t\r\n\t\t\t\r\n\t\t}", "protected function setTypeName() \n {\n $this->typeName = SpotTypeCategory::find($this->categoryId)->type->name;\n $this->prefix = $this->typeName . '_' . $this->categoryId . '_';\n }", "public function setCategoryName(string $categoryName): void\n {\n $this->categoryName = $categoryName;\n }", "public function setNameAttribute($cat)\n {\n \n $this->attributes['name'] = $cat;\n return $this->attributes['slug'] = Str::slug($cat);\n\n \n }", "public function getCategoryNameAttribute()\n {\n return $this->category->name ?? '';\n }", "private function SetName() {\n $where = (!empty($this->eventoID) ? \"e.id != {$this->eventoID} AND \" : '');\n\n $query = $this->createQueryBuilder('e')\n ->where(\"{$where} e.titulo = :n\")\n ->setParameter('n', $this->data->getTitulo())\n ->getQuery();\n\n $resEvento = $query->getResult();\n if ($resEvento) {\n $this->data->setName($this->data->getName() . \"-\" . count($resEvento));\n }\n }", "public function setCategory($category)\n {\n if(strlen($category) <= 25 && strlen($category) > 0 && preg_match('#^[a-zA-Z- ]*$#', $category)) {\n $this->category = $category;\n }\n }", "public function SetEntityName($strName) {\n if(!is_string($strName) || !strlen(trim($strName))) {\n $this->SetGoodToGo(false);\n $this->XaoThrow(\n \"Entity name needs to be a valid string.\"\n , debug_backtrace()\n );\n return;\n }\n $strName = trim($strName);\n if(strlen($strName) > 256) {\n $this->XaoThrow(\n \"Entity name should be short. Specified name was: \".$strName\n , debug_backtrace()\n );\n }\n $this->strName = $strName;\n }", "public function setCategoryAttribute($value)\n {\n $this->attributes['category'] = strtoupper($value);\n }", "public function setName(string $name) :ISEntity\n {\n $this->name = $name;\n return $this;\n }", "public function setName($name){\n $this->__set('name',$name);\n }", "public function getCategoryNameAttribute()\n {\n if (isset($this->category) and $this->category) {\n return $this->category->title;\n }\n\n return;\n }", "public function setName($name) {\n $this->name = $name;\n }", "public function setName($name){\n \n $this->name = $name;\n \n }", "public function set_name( $name ) {\n\t\t$this->label = $name;\n\t\t$this->slug = sanitize_title_with_dashes( $name );\n\t}", "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 $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\t\t$this->name = $name;\n\t}", "public function setName($name){\n\t\t$this->name = $name;\n\t}", "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\t\t$this->name = $name;\n\t}", "public function setName($name)\n {\n $this->_name = $name;\n }", "function setName($value) {\n $this->name = $value;\n }", "public function setName($name) \n {\n $this->_name = $name; \n }", "public function setName($name) {\n\t\t$this->_name = (string)$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 }", "function setName($value) {\n $this->name = $value;\n }", "public function setName($name)\r\n {\r\n $this->name = $name;\r\n }", "public function setName($name)\n {\n $this->_name = (string)$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)\n {\n $this->name = $name;\n }", "public function setEntityName($name)\n {\n $this->entityName = $name;\n \n return $this;\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($value)\r\n {\r\n $this->name = $value;\r\n }", "public function setName($value)\r\n {\r\n $this->name = $value;\r\n }", "public static function modifyCategory($categoryId,$categoryName)\n\t{\n\t\t\t$category = Category::find($categoryId);\n\t\t\t$category->categoryName = $categoryName;\n\t\t\t$category->save();\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 setCategory($category)\n {\n $this->category = $category;\n }", "public function setCategory($category)\n {\n $this->category = $category;\n }", "public function defaultName() { return \"Enter the category name...\"; }", "public function setName( string $name ) {\n\t\t$this->name = $name;\n\t}", "public function setName( $name)\n {\n $this->name = $name;\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }" ]
[ "0.69548196", "0.6512664", "0.6441076", "0.6060078", "0.60020614", "0.5991018", "0.5987415", "0.5931047", "0.5913806", "0.58906436", "0.587877", "0.5875581", "0.584355", "0.5839783", "0.5834835", "0.582512", "0.582358", "0.5812856", "0.5812856", "0.5812856", "0.5812856", "0.5812856", "0.5812856", "0.58111435", "0.58111435", "0.58100605", "0.58059883", "0.5781517", "0.5781517", "0.5781517", "0.5781517", "0.5781517", "0.5781517", "0.5781517", "0.5781517", "0.5773295", "0.5772893", "0.5768942", "0.57644546", "0.5763421", "0.5763421", "0.5763421", "0.5763421", "0.5758027", "0.5743411", "0.5742766", "0.57217985", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.57121396", "0.5712051", "0.5677146", "0.5677146", "0.5651591", "0.5651591", "0.5646215", "0.5642268", "0.5642268", "0.5642268", "0.5642268", "0.5642268", "0.5642268", "0.5642268", "0.56404334", "0.56404334", "0.5639605", "0.56167936", "0.5612316", "0.5611879", "0.5611879", "0.5611879", "0.5611879", "0.5611879" ]
0.0
-1
Gets the Category entity creation timestamp.
public function getCreatedTime();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCreatedAt()\n {\n return $this->sys->getCreatedAt();\n }", "public function getCreatedAt()\n {\n return $this->object->getCreatedAt();\n }", "public function getCreatedAt()\n {\n return $this->object->getCreatedAt();\n }", "public function getCreationTimestamp()\n {\n return isset($this->creation_timestamp) ? $this->creation_timestamp : '';\n }", "public function getTimestampCreated()\n {\n return $this->_getData(self::TIMESTAMP_CREATED);\n }", "public function getCreated()\n {\n return $this->entity->getCreated();\n }", "public function getCreated(): DateTime\n {\n return $this->created;\n }", "public function getCreatedAt(){\n return $this->_getData(self::CREATED_AT);\n }", "public function getCreatedTime() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n \n // Fail due to unset 'created-time' field\n assert(isset($this->parentDbFieldTable[self::CREATED_KEY]));\n \n return $this->parentDbFieldTable[self::CREATED_KEY]->getValue();\n }", "public function getCreatedAt()\n {\n return $this->getProperty(self::CREATED_AT);\n }", "public function getCreatedAt()\n {\n return $this->CreatedAt;\n }", "public function getCreatedAt()\n {\n return $this->_created_at;\n }", "public function getCreatedAtTimestamp()\n {\n $date = $this->getCreatedAt();\n if ($date) {\n return Varien_Date::toTimestamp($date);\n }\n return null;\n }", "public function getCreatedAt()\n\t{\n\t\treturn $this->createdAt;\n\t}", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getCreatedAt() \r\n {\r\n return $this->createdAt;\r\n }", "public function getCreatedAt () {\n return $this->createdAt;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function getCreatedAt()\n {\n return $this->created_at;\n }", "public function created_at()\n {\n return $this->object->created_at;\n }", "public function getCreatedAt()\n {\n return $this->createdAt;\n }", "public function getDataCreationTimestamp() {\n return $this->tree->getDataCreationTimestamp();\n }", "public function getCreatedAt() {\n return $this->item->getCreatedAt();\n }", "public function getCreationDate()\n {\n return $this->created;\n }", "public function getCreated()\n {\n\n if (!$this->createdat instanceof DateTime) {\n return new DateTime();\n }\n\n return $this->createdat;\n }", "public function getCreatedTime()\n\t{\n\t\treturn $this->createdTime; \n\n\t}", "public function getCreationTime()\n {\n return $this->creation_time;\n }", "public function getCreatedAt(){\n return $this->createdAt;\n }", "public function getCreated_at() {\n return $this->_created_at;\n }", "public function getTimeCreated(){\n return $this->TIME_CREATED;\n }", "public function getTimeCreated()\n {\n return $this->timeCreated;\n }", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();", "public function getCreatedAt();" ]
[ "0.7313317", "0.7177596", "0.7177596", "0.7131268", "0.7127489", "0.7118617", "0.7046314", "0.7011612", "0.70068103", "0.69994664", "0.69826096", "0.69667625", "0.6963883", "0.69627964", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6962166", "0.6957896", "0.69563556", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.693936", "0.6917218", "0.6911339", "0.6902673", "0.6891378", "0.68757045", "0.686312", "0.68377596", "0.6822469", "0.6802428", "0.67941314", "0.67894435", "0.67876005", "0.6780548", "0.6780548", "0.6780548", "0.6780548", "0.6780548", "0.6780548", "0.6780548", "0.6780548", "0.6780548", "0.6780548", "0.6780548" ]
0.6957784
53
Sets the Category entity creation timestamp.
public function setCreatedTime($timestamp);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCreatedAt()\n {\n $this->createdAt = new \\DateTime();\n }", "public function setCreationTimestamp(?DateTime $value): void {\n $this->getBackingStore()->set('creationTimestamp', $value);\n }", "public function setCreatedAtValue()\n {\n $this->createdAt = new \\DateTime();\n }", "public function setDateTime($value)\n {\n $this->createdAt=$value;\n }", "public function setCreatedAtAttribute($value) {}", "public function setCreated(\\DateTime $created)\n {\n $this->entity->setCreated($created);\n }", "private function _timestamp()\n \t{\n \t\t$this->updated_at = time();\n \t\tif (!$this->exists) $this->created_at = $this->updated_at;\n \t}", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}", "public function timestamp() {\n\t\t$this->updated_at = new \\DateTime;\n\n\t\tif ( ! $this->exists) $this->created_at = $this->updated_at;\n\t}", "public function setCreated(\\DateTime $created) {\n\n $this->created = $created->format('Y-m-d H:i:s');\n\n }", "public function onPrePersist()\r\n {\r\n $this->created_at = new \\DateTime(\"now\");\r\n }", "private function SetCreated(\\DateTime $value)\n\t\t{\n\t\t\t$this->created = $value;\n\t\t}", "public function beforeSave()\n {\n $this->CreatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}", "public function setCreatedAt(DateTime $date);", "public function onPrePersist()\n {\n $this->setCreatedAt(new \\DateTime());\n }", "public function beforeSave()\n {\n $this->created = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }", "public function setCreatedAtAttribute($value)\n {\n $this->attributes['created_at'] = date('Y-m-d');\n }", "public function setCreationDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('creationDateTime', $value);\n }", "public function setCreationDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('creationDateTime', $value);\n }", "public function setCreatedAtAttribute($value)\n {\n $this->attributes['created_at'] = $value;\n }", "public function setCreatedAt(\\Datetime $createdAt);", "public function setCreatedAt(DateTime $datetime): void;", "public function setCreatedAt($createdAt);", "public function setCreatedAt($createdAt);", "public function setCreatedAt($createdAt);", "public function setCreatedAt($createdAt);", "public function setCreatedAt($createdAt);", "public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }", "public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }", "public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }", "public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }", "public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }", "public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }", "public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }", "public function setCreatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('createdDateTime', $value);\n }", "public function onPrePersist(): void\n {\n $this->created = new DateTime(\"now\", new DateTimeZone(\"UTC\"));\n }", "public function created(Category $category)\n {\n $category->created_by_user_id = Auth::id();\n }", "public function onPrePersist(): void\n {\n $this->created = new DateTime(new DateTimeZone(\"UTC\"), \"now\");\n }", "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }", "public function beforeCreate()\n {\n $this->created_at = date('Y-m-d H:i:s');\n }", "public function setCreatedAt($createdAt) \r\n {\r\n $this->createdAt = $createdAt;\r\n }", "public function setCreateDates(){\n $t = date_create(date('Y-m-d H:i:s'));\n $this->created = $t;\n $this->modified = $t;\n }", "public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }", "public function setTimeStamp()\n\t{\n\t\t$this->_current_timestamp = time();\n\t}", "public function setCreatedat(\\DateTime $createdAt);", "public function setCreatedAt(\\DateTime $createdAt = null);", "public function updateCreatedAt()\n {\n $this->setCreatedAt(new \\Datetime());\n $this->updateUpdatedAt();\n }", "public function onPrePersist()\n {\n $this->created = new \\DateTime('now');\n }", "public function setValueDefault()\n {\n $this->createdAt = new \\DateTime();\n }", "public function setCreatedDate(DateTime $createdDate);", "public function setCreated($created);", "public function setCreated($created);", "public function setCreatedAtAttribute( $value ) {\n if (config('database.default') == 'mysql') {\n $this->attributes['created_at'] = (new Carbon($value))->format('Y-m-d H:i:s');\n }elseif(config('database.default') == 'sqlsrv'){\n $this->attributes['created_at'] = (new Carbon($value))->format('Ymd H:i:s');\n }else{\n $this->attributes['created_at'] = (new Carbon($value))->format('Y-m-d H:i:s');\n }\n }", "public function onPrePersist()\n {\n $this->setCreated(new \\DateTime(\"now\"));\n }", "public function setCreationDate($date) {}", "public function setCreatedAt(DateTime $createdAt): self;", "public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }", "public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }", "public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }", "public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }", "public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }", "public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }", "public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }", "public function setCreatedDateTime($val)\n {\n $this->_propDict[\"createdDateTime\"] = $val;\n return $this;\n }", "public function setCreatedAtAttribute($value)\n {\n $this->attributes['created_at'] = Carbon::parse($value);\n }", "public function setCreationDate(\\DateTime $creationDate) {\n\t\t$this->creationDate = $creationDate;\n\t}", "public function prePersist()\n {\n $this->created = new \\DateTime();\n }", "public function setCreatedAt($created_at)\n {\n $this->created_at = $created_at;\n }", "public function onPrePersist()\n {\n $this->createdAt = new Carbon();\n }", "public function setCreatedTime(\\DateTime $createdTime)\n\t{\n\t\t$this->createdTime=$createdTime; \n\t\t$this->keyModified['created_time'] = 1; \n\n\t}", "public function setCreatedAt(string $createdAt): void\n {\n $this->createdAt = $createdAt;\n }", "public function setCreatedAt($createdAt)\n {\n $this->createdAt = $createdAt;\n }", "public function setCreatedAt($createdAt)\n {\n $this->createdAt = $createdAt;\n }" ]
[ "0.66878796", "0.6649468", "0.66039145", "0.6414244", "0.6373043", "0.6308797", "0.62876683", "0.62700987", "0.62700987", "0.62635237", "0.62575763", "0.625111", "0.62457156", "0.6238966", "0.6169244", "0.61585355", "0.6154157", "0.61298937", "0.6127715", "0.6122593", "0.6122593", "0.61196315", "0.61184907", "0.61137867", "0.6094399", "0.6094399", "0.6094399", "0.6094399", "0.6094399", "0.60894924", "0.60894924", "0.60894924", "0.60894924", "0.60894924", "0.60894924", "0.60894924", "0.60894924", "0.6074244", "0.604391", "0.6039263", "0.6010863", "0.6010863", "0.6010863", "0.6010863", "0.6010863", "0.6010863", "0.6009785", "0.5997193", "0.5984851", "0.59827006", "0.59675115", "0.59546596", "0.5937357", "0.59328157", "0.59288204", "0.5926974", "0.5913338", "0.59114325", "0.59114325", "0.5877418", "0.5868905", "0.5865256", "0.58643854", "0.5860864", "0.5860864", "0.5860864", "0.5860864", "0.5860864", "0.5860864", "0.5860864", "0.5860864", "0.58479744", "0.58462787", "0.5845859", "0.58373797", "0.58267415", "0.5826425", "0.5810352", "0.58093107", "0.58093107" ]
0.664618
21
Returns the Category entity published status indicator. Unpublished Category entity are only visible to restricted users.
public function isPublished();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategoryStatus()\n\t{\n\t\treturn $this->category_status;\n\t}", "function getCategoryStatusById($cat_id) {\n $ci = & get_instance();\n $category = $ci->crud->get(ES_PRODUCT_CATEGORIES, array('id' => $cat_id));\n if (count($category) > 0) {\n return $category['status'];\n } else {\n return 0;\n }\n}", "public function published()\n {\n return $this->state(function (array $attributes) {\n return [\n 'status' => 'Published',\n ];\n });\n }", "public function isActive()\n {\n return $this->isPublished();\n }", "public function getPublishStatusAttribute()\n {\n $value = $this->content->publish_status;\n $publish_date = date('Y-m-d H:i:s', strtotime($this->content->publish_date));\n\n if ($value === Status::PUBLISHED && $publish_date > Carbon::now()) {\n return Status::SCHEDULED;\n }\n return $value;\n }", "public function isActive()\n {\n return $this->is_published;\n }", "public function status()\n {\n return $this->status->get($this->entity->status);\n }", "public function orgcategorystatus()\n {\n $id = get_post('id');\n $code = get_post('code');\n\n if ($id && $code) {\n $record = $this->mgovdb->getRowObjectWhere('OrganizationCategories', array('id' => $id, 'OrganizationCode' => $code));\n if ($record) {\n $status = get_post('status');\n if ($status == 'true' || $status == 'false') {\n $updateData = array(\n 'id' => $record->id,\n 'Status' => ($status == 'true' ? 1 : 0),\n 'LastUpdate' => date('Y-m-d H:i:s')\n );\n if ($this->mgovdb->saveData('OrganizationCategories', $updateData)) {\n $return_data = array(\n 'status' => true,\n 'message' => 'Category status has been updated.'\n );\n } else {\n $return_data = array(\n 'status' => false,\n 'message' => 'Updating category status failed.'\n );\n }\n } else {\n $return_data = array(\n 'status' => false,\n 'message' => 'Invalid category status.'\n );\n }\n } else {\n $return_data = array(\n 'status' => false,\n 'message' => 'Invalid request.'\n );\n }\n } else {\n $return_data = array(\n 'status' => false,\n 'message' => 'Invalid request.'\n );\n }\n\n response_json($return_data);\n }", "public function authorize()\n {\n return PrivateCategory::where([\n ['owner_id', '=', Auth::user()->id],\n ['id', '=', $this->category_id],\n ])->exists();\n }", "public function publishedClass()\n {\n return $this->isActive() ? 'success' : 'danger';\n }", "public static function getInactiveCategories(){}", "public static function published()\n {\n // return self::where('published',1)->get();\n return self::where('published',true);\n }", "public function isPublished()\n {\n return $this->status == static::PUBLISHED;\n }", "public function isPublished()\n {\n if(!strcmp($this->getStatus(), 'approved')) {\n return true;\n }\n\n return false;\n }", "public function select_all_published_category()\n {\n $this->db->select('*');\n $this->db->from('tbl_category');\n $this->db->where('publication_status',1);\n $query_result = $this->db->get();\n $result = $query_result->result();\n return $result;\n }", "public function publishedStatus()\n {\n if ( !$this->owner->getScheduledStatus() && !$this->owner->getExpiredStatus() ) {\n return true;\n }\n\n return false;\n }", "private function category() {\n if ($this->is_logged_in()){\n return true; //check if user had been logged in!!!\n }else{\n exit;\n }\n }", "public function getPublished() {\n\t\treturn $this->published;\n\t}", "public function isPublished()\n {\n return $this->attribute('state') == self::STATUS_PUBLISHED;\n }", "public function getIsPublished()\n\t{\n\t\treturn $this->is_published;\n\t}", "public function getContentCategory()\n {\n if ($this->_oContentCat === null) {\n // setting default status ..\n $this->_oContentCat = false;\n if (($oContent = $this->getContent()) && $oContent->oxcontents__oxtype->value == 2) {\n $this->_oContentCat = $oContent;\n }\n }\n\n return $this->_oContentCat;\n }", "public function getPublishStatusLabelAttribute()\n {\n return Status::label($this->publish_status);\n }", "public function hasCategory(): bool;", "public function getCategory() {}", "public function isPublished()\n {\n return $this->publish_status == Status::PUBLISHED;\n }", "protected function getActiveCategories()\n {\n $categories = (new \\modules\\catalog\\categories\\CatalogCategories($this->_config));\n return $categories->setSubquery(' AND `statusId` = ?d', 1);\n }", "public function getStatus()\n {\n \n return $this->_em->createQuery('SELECT s,u FROM TechCorpFrontBundle:Status s \n JOIN s.user u ORDER BY s.createdAt DESC');\n }", "function article_status() {\n return Registry::prop('article', 'status');\n}", "public function get_cat_url_indicator()\n {\n if(isset(ee()->publisher_model->current_language['cat_url_indicator']) &&\n ee()->publisher_model->current_language['cat_url_indicator'] != '')\n {\n return ee()->publisher_model->current_language['cat_url_indicator'];\n }\n\n return ee()->config->item('reserved_category_word');\n }", "function get_status( $category_id )\n\t{\n\t\t$q = \"SELECT status FROM title_dev_categories WHERE category_id = \".$category_id;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r != \"\" )\n\t\t\treturn $r['status'];\n\t\telse\n\t\t\treturn false;\n\t}", "public function statusAction()\n {\n //pobranie elemntu po polu hash\n $this->sliderCategory = SliderCategory::findOneByHash($this->_getParam('hash'));\n //sprawdzenie czy dany element istnieje\n $this->forward404Unless($this->sliderCategory, 'Slider category NOT Exists (' . $this->_getParam('hash') . ')');\n //sprawdzenie praw do elementu\n $this->forward403Unless(\n $this->getSelectedBaseUser()->hasAccess($this->sliderCategory),\n [$this->getSelectedBaseUser()->getId(), $this->sliderCategory->getId()]\n );\n\n //zmiana statusu\n $this->sliderCategory->is_active = !(bool) $this->sliderCategory->is_active;\n //zapis do bazy\n $this->sliderCategory->save();\n //przekierowanie na podstronę listy\n $this->_redirector->gotoRouteAndExit([], 'admin_slider-category');\n }", "public function category(){\n\t\t$query = $this->db->query(\"select * from `category` where status='enable'\");\n\t\treturn $query->result_array();\n\t}", "public function isVisibleInCatalog()\n {\n return in_array($this->getStatus(), $this->getVisibleInCatalogStatuses());\n }", "public function getClusterStatus()\n {\n return $this->getComponent(ComponentAwareCollectionsInterface::CLUSTERSTATUS);\n }", "public static function published()\n {\n return self::where('published', '=', true)->orderBy('published_at', 'DESC')->get();\n }", "public function isPublished(): bool\n {\n $publishedStatus = ['publish'];\n\n return in_array($this->status, $publishedStatus);\n }", "function getStatus() \n {\n return $this->instance->getStatus();\n }", "public function getStatus()\n\t{\n\t\tif ($this->archived)\n\t\t{\n\t\t\treturn static::ARCHIVED;\n\t\t}\n\t\telse if (!$this->enabled)\n\t\t{\n\t\t\treturn static::DISABLED;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn static::ENABLED;\n\t\t}\n\t}", "public function isVisible()\n {\n return $this->visible;\n }", "public function isVisible()\n {\n return $this->visible;\n }", "private function getVisibleOnFrontStatuses()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\treturn $this->_getStatuses(true);\n\t\t}\n\t}", "function feed_category_access($allow_public = FALSE, $feed_category) {\r\n global $user;\r\n \r\n if ($allow_public && $feed_category->is_public) {\r\n return TRUE;\r\n }\r\n if (isset($feed_category->uid)) {\r\n return $feed_category->uid == $user->uid;\r\n }\r\n return FALSE;\r\n}", "function get_category_info( $category_id, $status = 0 )\n\t{\n\t\t$criteria = $status == 1 ? \"status = 1 AND \" : \"\";\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE \".$criteria.\" category_id = \".$category_id;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getCategory();", "public function getCategory();", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "public function getVisible()\n {\n return $this->visible;\n }", "function get_unpublished_post_statuses() {\n $status = [ 'draft', 'pending', 'auto-draft'/*, 'future' */ ];\n\n /**\n * Filter the unpublished post statuses.\n *\n * @param array $status List of non-public post statuses.\n */\n return apply_filters( 'unpublished_post_statuses', $status );\n }", "public function status() {\n $status = $this->statuses()->orderBy('created_at','desc')->first();\n\n if(is_null($status)) {\n return new Status;\n }\n else return $status;\n }", "function status(){\n return ($this -> is_approved())?\"Approved\":\"Unapproved\";\n }", "protected function isPublished()\n\t{\n\t\tif($this->blnIsPublished !== null)\n\t\t{\n\t\t\treturn $this->blnIsPublished;\n\t\t}\n\t\t\n\t\tif($this->blnParentView)\n\t\t{\n\t\t\t$strQuery = 'SELECT published FROM ' . $GLOBALS['TL_DCA'][$this->strTable]['config']['ptable'] . ' WHERE id=' . $this->intId;\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$strQuery \t= 'SELECT published FROM ' . $GLOBALS['TL_DCA'][$this->strTable]['config']['ptable'] \n\t\t\t\t\t\t. ' WHERE id=(SELECT pid FROM ' . $this->strTable . ' WHERE id=' . $this->intId . ')';\n\t\t}\n\n\t\t$this->blnIsPublished = (bool) $this->Database->query($strQuery)->published;\n\t\treturn $this->blnIsPublished;\n\t}", "public function getActiveCategory()\n {\n return $this->_activeCategory;\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "public function getStatus()\n {\n return $this->status = $this->get()->post_status;\n }", "public function getCurrentCategory()\n {\n return $this->category;\n }", "public function isPublished()\n {\n return ($this->published == 1);\n }", "function ppo_categorized_blog() {\n if (false === ( $all_the_cool_cats = get_transient('ppo_category_count') )) {\n // Create an array of all the categories that are attached to posts\n $all_the_cool_cats = get_categories(array(\n 'hide_empty' => 1,\n ));\n\n // Count the number of categories that are attached to the posts\n $all_the_cool_cats = count($all_the_cool_cats);\n\n set_transient('ppo_category_count', $all_the_cool_cats);\n }\n\n if (1 !== (int) $all_the_cool_cats) {\n // This blog has more than 1 category so ppo_categorized_blog should return true\n return true;\n } else {\n // This blog has only 1 category so ppo_categorized_blog should return false\n return false;\n }\n}", "public function getVisibleInCatalogStatuses()\n {\n return Mage::getSingleton('catalog/product_status')->getVisibleStatusIds();\n }", "function client_portal_categorized_blog() {\n\n\t$category_count = get_transient( 'client_portal_categories' );\n\n\tif ( false === $category_count ) {\n\n\t\t$category_count_query = get_categories(\n\t\t\tarray(\n\t\t\t\t'fields' => 'count',\n\t\t\t)\n\t\t);\n\n\t\t$category_count = (int) $category_count_query[0];\n\n\t\tset_transient( 'client_portal_categories', $category_count );\n\t}\n\n\treturn $category_count > 1;\n}", "public function getVisibility()\n {\n return $this->visibility;\n }", "public function getVisibility()\n {\n return $this->visibility;\n }", "public function getVisibility()\n {\n return $this->visibility;\n }", "public function getCategory(){\n\n\t\t $this->db->where('delete_status',0);\n\t $query=$this->db->get('category'); \n\t return $query->result();\n\n\t}", "function getCategoriesCount(){\n return $this->query(\"SELECT GROUP_CONCAT(category) FROM docs WHERE visible=1\");\n }", "public function getCategory()\n {\n }", "public function getStatuses() {\n\t}", "public function getCategory() {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->readOneof(2);\n }", "private function getInvisibleOnFrontStatuses()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\treturn $this->_getStatuses(false);\n\t\t}\n\t}", "public function GetStatus()\n\t{\treturn new ProductStatus($this->details['tstatus']);\t\n\t}", "public function getStatus()\n {\n return $this->getData('status');\n }", "function isPublished(){\n\t\tif($this->isPublished == 1){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getStatus()\n {\n return $this->getEntityValue('status', '');\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "private function getCategory() {\n\n $category = Category::with('records');\n /**\n * Filter slug\n */\n $category = Category::where('slug', $this->property('categorySlug'));\n\n /**\n * Filter active only\n */\n if( $this->property('activeOnly') ) {\n $category->isActive();\n }\n\n $categoryDetail = $category->first();\n\n return $categoryDetail;\n\n }", "function getStatus() {\n\t\treturn $this->getData('status');\n\t}", "public function scopePublished($query)\n {\n return $query->where(\"status\", \"=\", \"1\");\n }", "public function getStatus()\n {\n return $this->get(self::STATUS);\n }", "public function getStatus()\n {\n return $this->withDisabled()->rolesQuery()->first()['pivot']['status'];\n }", "public function getStatusDc() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(14, $this->_result)) return (string) $this->_result[14];\n\t\t\telse parent::throwGetColException('Not set DiscussCategoriesModel::getStatusDc', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From DiscussCategoriesModel::getStatusDc', __LINE__, __FILE__);\n\t}" ]
[ "0.69204074", "0.61841977", "0.6029223", "0.5945088", "0.59334046", "0.5893149", "0.5860093", "0.58423525", "0.5810515", "0.5750711", "0.57205397", "0.5684271", "0.5679546", "0.56587076", "0.5593714", "0.5544561", "0.55217505", "0.55215955", "0.5521545", "0.55190617", "0.5498766", "0.54705447", "0.54685986", "0.5463161", "0.544597", "0.54446346", "0.5444433", "0.54218686", "0.5403817", "0.5374296", "0.5361817", "0.5353363", "0.53519243", "0.5350111", "0.5346853", "0.5335665", "0.5315923", "0.5305883", "0.5299272", "0.5299272", "0.52982014", "0.52975893", "0.5288376", "0.5280027", "0.5280027", "0.52684367", "0.52684367", "0.52684367", "0.52684367", "0.52684367", "0.52684367", "0.52623343", "0.52590656", "0.5252331", "0.52516145", "0.52456015", "0.5231593", "0.5231593", "0.5231593", "0.5231593", "0.5231125", "0.5220899", "0.5208496", "0.52014667", "0.51978445", "0.51948005", "0.518922", "0.518922", "0.518922", "0.5176346", "0.5171978", "0.51719624", "0.5170333", "0.5163848", "0.5161329", "0.5160815", "0.5155154", "0.5152807", "0.5134453", "0.51342094", "0.51326543", "0.51326543", "0.51291996", "0.51268077", "0.51181877", "0.51159716", "0.5112551", "0.5108748" ]
0.5449064
36
Sets the published status of a Category entity.
public function setPublished($published);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPublished( $published );", "public function published_category($category_id){\n \n DB::table('tbl_category')\n ->where('category_id', $category_id)\n ->update(['publication_status' => 1]); \n return Redirect::to('/manage-category');\n }", "public function setPublished($published) {\n\t\t$this->published = $published;\n\t}", "public function setIsPublished($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (boolean) $v;\n\t\t}\n\n\t\tif ($this->is_published !== $v || $this->isNew()) {\n\t\t\t$this->is_published = $v;\n\t\t\t$this->modifiedColumns[] = PostPeer::IS_PUBLISHED;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setPublished()\n\t{\n\t\t$this->published_at = $this->published_at ? $this->published_at : Carbon::now();\n\t\t$this->save();\n\t}", "public function unpublished_category($category_id){\n \n DB::table('tbl_category')\n ->where('category_id', $category_id)\n ->update(['publication_status' => 0]); \n return Redirect::to('/manage-category');\n }", "public function setPublishedAttribute($value)\n {\n $this->attributes['published'] = boolval($value);\n\n return $this;\n }", "function set_category_status( $category_id )\n\t{\n\t\t$status = $this -> get_status( $category_id );\n\t\t$status = $status == 1 ? 0 : 1;\n\t\t$q = \"UPDATE title_dev_categories SET status = \".$status.\" WHERE category_id = \".$category_id;\n\t\t$r = $this -> db -> updateRecord( $q );\n\t\tif( $r )\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public function set_publish_status( $publish_status, $banner_settings ) {\n\t\t$this->publish_status = $publish_status;\n\t\tif ( 'Published' === $publish_status ) {\n\t\t\t$this->last_published = gmdate( 'Y-m-d H:i:s' );\n\t\t} else {\n\t\t\t$this->last_published = $banner_settings['lastPublished'] ? $banner_settings['lastPublished'] : '';\n\t\t}\n\t}", "public function setPublishedAtAttribute($value)\n {\n $this->attributes['published_at'] = $value;\n\n if (empty($value) && $this->attributes['status'] == 1) {\n $this->attributes['published_at'] = Carbon::now();\n }\n }", "public function toggle_published() {\n $will_be_published = !$this->post->is_published();\n $this->post->toggle_published();\n redirect(\n '/backend/posts/edit',\n ['notice' => $will_be_published ? 'Published' : 'Unpublished'],\n ['id' => $this->post->id]\n );\n }", "function publishCategories( $categoryid=null, $cid=null, $publish=1 ) {\r\n\tglobal $database, $my;\r\n\r\n\tif (!is_array( $cid )) {\r\n\t\t$cid = array();\r\n\t}\r\n\tif ($categoryid) {\r\n\t\t$cid[] = $categoryid;\r\n\t}\r\n\r\n\tif (count( $cid ) < 1) {\r\n\t\t$action = $publish ? 'publish' : 'unpublish';\r\n\t\techo \"<script> alert('Select a category to $action'); window.history.go(-1);</script>\\n\";\r\n\t\texit;\r\n\t}\r\n\r\n\t$cids = implode( ',', $cid );\r\n\r\n\t$query = \"UPDATE #__categories SET published='$publish'\"\r\n\t. \"\\nWHERE id IN ($cids) AND (checked_out=0 OR (checked_out='$my->id'))\"\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\tif (count( $cid ) == 1) {\r\n\t\t$row = new mosCategory( $database );\r\n\t\t$row->checkin( $cid[0] );\r\n\t}\r\n}", "public function setCategory($category)\n {\n $this->category = $category;\n }", "public function setCategory($category)\n {\n $this->category = $category;\n }", "public function togglePublished()\n {\n if ($this->isActive()) {\n $this->is_published = false;\n } else {\n $this->is_published = true;\n }\n\n return $this->save();\n }", "public function setUpdateCategory($val)\n {\n $this->_propDict[\"updateCategory\"] = $val;\n return $this;\n }", "public function isPublished(): bool\n {\n $publishedStatus = ['publish'];\n\n return in_array($this->status, $publishedStatus);\n }", "function block_core_calendar_update_has_published_post_on_transition_post_status($new_status, $old_status, $post)\n {\n }", "public function setCmsCategoryId($val){\n $this->CmsCategoryId=$val;\n }", "public function updated(Category $category)\n {\n //\n // 1. Update Status\n Product::where('category_id', $category->id)->update([\n 'status' => $category->status\n ]); \n }", "public function statusAction()\n {\n //pobranie elemntu po polu hash\n $this->sliderCategory = SliderCategory::findOneByHash($this->_getParam('hash'));\n //sprawdzenie czy dany element istnieje\n $this->forward404Unless($this->sliderCategory, 'Slider category NOT Exists (' . $this->_getParam('hash') . ')');\n //sprawdzenie praw do elementu\n $this->forward403Unless(\n $this->getSelectedBaseUser()->hasAccess($this->sliderCategory),\n [$this->getSelectedBaseUser()->getId(), $this->sliderCategory->getId()]\n );\n\n //zmiana statusu\n $this->sliderCategory->is_active = !(bool) $this->sliderCategory->is_active;\n //zapis do bazy\n $this->sliderCategory->save();\n //przekierowanie na podstronę listy\n $this->_redirector->gotoRouteAndExit([], 'admin_slider-category');\n }", "public function setUpdateCategory(?UpdateCategory $value): void {\n $this->getBackingStore()->set('updateCategory', $value);\n }", "function block_core_calendar_update_has_published_post_on_transition_post_status( $new_status, $old_status, $post ) {\n\t\tif ( $new_status === $old_status ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'post' !== get_post_type( $post ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'publish' !== $new_status && 'publish' !== $old_status ) {\n\t\t\treturn;\n\t\t}\n\n\t\tblock_core_calendar_update_has_published_posts();\n\t}", "public function categoryActive($id,$status){\n $slider = Category::find($id);\n $slider->cat_status = $status;\n // $slider->slider_position = $count + 1;\n $slider->save();\n Session::flash('message', \"Category Active\");\n return redirect()->back();\n\n }", "protected function setCurrentCategory($category)\n {\n $this->current_category = $category;\n }", "public function setCategory( $category, $domain = false ) {\n\t\t$this->category = [ 'categorie' => $category,\n\t\t\t\t\t\t\t\t'domain' => $domain ];\n\t}", "public function changeCategoryToUnknown()\n {\n $sql = 'UPDATE posts SET category_id=1 WHERE category_id=:id';\n return $this->db->request($sql, ['id' => $_GET['id']], 'posts');\n }", "public function published($id) {\n $affected_row = Property::where('id', $id)\n ->update(['publication_status' => 1]);\n\n if (!empty($affected_row)) {\n return redirect('/setting/properties')->with('message', 'Published successfully.');\n }\n return redirect('/setting/properties')->with('exception', 'Operation failed !');\n }", "public function setPublish($publish)\n {\n $this->publish = (bool) $publish;\n }", "function block_core_calendar_update_has_published_posts()\n {\n }", "public function setStatus ($value) {\n\t\t$vals = array(\"Published\", \"Draft\");\n\t\tif (in_array($value, $vals)) {\n\t\t\t$this->setData(\"pageStatus\", $value);\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$this->setMessage(LANG_INVALID.\" \".LANG_STATUS);\n\t\t\treturn false;\n\t\t}\n\t}", "public function setCategory(?SubmissionCategory $value): void {\n $this->getBackingStore()->set('category', $value);\n }", "public function SetPublished(\n $in_published_search\n // The value to set. It can be:\n // - -1 Search for ONLY unpublished meetings\n // - 0 Search for published and unpublished meetings.\n // - 1 Search for ONLY published meetings.\n ) {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $this->_published_search = $in_published_search;\n }", "public function isPublished()\n {\n if(!strcmp($this->getStatus(), 'approved')) {\n return true;\n }\n\n return false;\n }", "public function setCategoryId($categoryId);", "public function updating(Category $category)\n {\n $category->teams()->update(['teams.status' => $category->status]);\n $category->activities()->update(['activities.status' => $category->status]);\n $category->events()->update(['events.status' => $category->status]);\n $category->allUsers()->update(['users.status' => $category->status]);\n $category->coaches()->update(['coahes.status' => $category->status]);\n }", "public function publishadmin(){\n $post = Products::where('id', \\request(\"id\"))->first();\n $post->published = $post->published==\"unpublished\"?\"Publish\":\"unpublished\";\n $post->save();\n return redirect(route('voyager.h-products.index'));\n }", "public function published()\n {\n return $this->state(function (array $attributes) {\n return [\n 'status' => 'Published',\n ];\n });\n }", "public function setCategoryStatus($category_status)\n\t{\n\t\t$this->category_status = $category_status;\n\n\t\treturn $this;\n\t}", "public function ajaxpublish(Request $request)\n {\n // $user = User::find($id);\n $category = Video::find($request->id);\n $category->publish = $request->publish;\n $category->save();\n echo $category->publish; die();\n }", "public function isPublished()\n {\n return $this->attribute('state') == self::STATUS_PUBLISHED;\n }", "public function updated(Category $category)\n {\n //\n }", "public function publish($id)\n\t{\n\t\t$data = array(\n\t\t\t\t\t\t'status' => 1\n\t\t\t\t\t );\n\n\t\t$result = $this->common_model->UpdateDB('blog_post',array('id' => $id),$data);\n\n\t\tif ($result) \n\t\t{\n\t\t\tset_flashdata('success','Post Status Changed to Publish');\n\t\t\tredirect('blog/posts/manage_posts','refresh');\n\t\t} \n\t}", "public function updated(Category $category)\n {\n //\n }", "function sensible_category() {\n wp_update_term(1, 'category', array(\n 'name' => 'News',\n 'slug' => 'news', \n 'description' => 'News'\n ));\n }", "public function setCategory($val)\n {\n $this->_propDict[\"category\"] = $val;\n return $this;\n }", "function setCategory($value) \n {\n return $this->instance->setcategory($value);\n }", "public function testUpdateCategoryByIdWithSuccess()\n {\n $category = new Category();\n $category->setVisibility([Category::VISIBILITY_FACEBOOK, Category::VISIBILITY_MOBILE]);\n $category->setPosition(555);\n $category->setActive(false);\n\n $i18nUS = new I18n();\n $i18nUS->setLocale('en_US');\n $i18nUS->setName('Category name here');\n $i18nUS->setDescription('Description of category here');\n\n $category->setI18n([$i18nUS]);\n\n $this->resourceAPI->updateCategoryById($this->resourceId, $category);\n\n $categoryResponse = $this->resourceAPI->getCategoryById($this->resourceId);\n $category = $categoryResponse->getData()[0];\n $this->assertEquals(555, $category->getPosition());\n $this->assertEquals(false, $category->getActive());\n }", "public function setStatus(?int $status): Topic\n {\n $this->status = $status;\n return $this;\n }", "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\n ]);\n }", "public function publish(Request $request) {\n $slide_item = SlideShowItem::findOrFail($request['id']);\n if ($slide_item) {\n if ($request['status'] == 1) {\n $slide_item->online = 0;\n $status = 0;\n } else {\n $slide_item->online = 1;\n $status = 1;\n }\n $slide_item->save();\n return response()->json(['message' => \"Slide image item's status changed successfully!\", 'status' => $status]);\n } else {\n return response()->json(['message' => \"Something went wrong!\"]);\n }\n\n }", "public function setPublishedDateTime($val)\n {\n $this->_propDict[\"publishedDateTime\"] = $val;\n return $this;\n }", "public function setPostByCategoryParams($category) {\n $this->category = $category;\n }", "public function isPublished()\n {\n return $this->status == static::PUBLISHED;\n }", "public function getPublishStatusAttribute()\n {\n $value = $this->content->publish_status;\n $publish_date = date('Y-m-d H:i:s', strtotime($this->content->publish_date));\n\n if ($value === Status::PUBLISHED && $publish_date > Carbon::now()) {\n return Status::SCHEDULED;\n }\n return $value;\n }", "private function publishToggle(Request $request){\n\t\t$class ='\\App\\\\'.$request->class;\n\t\t$data = $class::find($request->id);\n\t\t$data->published = !$data->published;\n\t\t$data->save();\n\t}", "public function setCategory($value)\n {\n $this->setItemValue('category', ['id' => (int)$value]);\n }", "public function actionCategory($slug)\n {\n $category = $this->loadCategoryModel($slug);\n \n $criteria = new CDbCriteria();\n $criteria->compare('t.status', Article::STATUS_PUBLISHED);\n $criteria->with = array(\n 'activeCategories' => array(\n 'select' => 'activeCategories.category_id',\n 'together' => true,\n 'joinType' => 'INNER JOIN',\n 'condition' => 'activeCategories.category_id = :cid',\n 'params' => array(':cid' => $category->category_id),\n )\n );\n $criteria->order = 't.article_id DESC';\n \n $count = Article::model()->count($criteria);\n \n $pages = new CPagination($count);\n $pages->pageSize = 10;\n $pages->applyLimit($criteria);\n \n $articles = Article::model()->findAll($criteria);\n\n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle . ' | ' . $category->name,\n 'pageMetaDescription' => StringHelper::truncateLength($category->description, 150),\n ));\n \n Yii::app()->clientScript->registerLinkTag('canonical', null, $this->createAbsoluteUrl($this->route, array('slug' => $slug)));\n Yii::app()->clientScript->registerLinkTag('shortlink', null, $this->createAbsoluteUrl($this->route, array('slug' => $slug)));\n \n $this->render('category', compact('category', 'articles', 'pages'));\n }", "public function isPublished()\n {\n return $this->publish_status == Status::PUBLISHED;\n }", "public function setPublishedAt($publishedAt): void\n {\n $this->_publishedAt = $publishedAt;\n }", "public function updateStatus()\n\t\t{\n\t\t\t$thingdom = $this->getThingdom();\n\n\t\t\tif(!$thingdom) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$page_count = wp_count_posts('page')->publish;\n\t\t\t$post_count = wp_count_posts()->publish;\n\t\t\t$comment_count = wp_count_comments()->approved;\n\n\t\t\t$thing = $thingdom->getThing($this->thingName, $this->thingType);\n\n\t\t\t$thing->status('page_count', $page_count);\n\t\t\t$thing->status('post_count', $post_count);\n\t\t\t$thing->status('comment_count', $comment_count);\n\t\t}", "public function setCategory($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->category !== $v) {\n $this->category = $v;\n $this->modifiedColumns[] = EventPeer::CATEGORY;\n }\n\n\n return $this;\n }", "public function setCategory($id, $category)\n {\n return false;\n }", "public function setPublishedAtAttribute($value)\n\t{\n\t\t$published_at = strtotime(str_replace('/', '-', $value));\n\t\t$published_at = Carbon::createFromTimestamp($published_at);\n\t\t$this->attributes['published_at'] = $published_at;\n\t}", "public function publishPost($POST) {\r\n\t\t$sql = 'UPDATE `posts` SET `post_status` = :post_status\r\n\t\t\t\tWHERE `ID` = :ID AND `post_author` = :post_author LIMIT 1';\r\n\t\t$sth = $this->db->prepare($sql);\r\n\r\n\t\t$ret = $sth->execute(array('ID' => $POST['id'],\r\n\t\t\t\t\t\t\t\t 'post_author' => $GLOBALS['user']['id'],\r\n\t\t\t\t\t\t\t\t 'post_status' => 'publish'));\r\n\r\n\t\tif ($ret) {\r\n\t\t\t$this->putMsg('Successfully published');\r\n\t\t}\r\n\r\n\t\treturn $ret;\r\n\t}", "public function doPublishAction()\n {\n\n $menuPublishModel = new Pbo_Model_WlMenuItems();\n $chapId = Zend_Auth::getInstance()->getIdentity()->id; \n $menuId = trim($this->_request->id);\n $status = trim($this->_request->status);\n\n //pass chap id, menu id and the status of the menu to the model to do the change status query.\n $menuPublishModel->updatePublishedState($chapId, $menuId, $status);\n\n //messages when status changed\n if($status == 1)\n {\n $this->_helper->flashMessenger->addMessage('1 menu published');\n }else{\n $this->_helper->flashMessenger->addMessage('1 menu unpublished');\n }\n\n $this->_redirect('/menu');\n }", "public function changeStatus(Request $request){\n\n $category = Category::find($request->user_id);\n $category->status = $request->status;\n $category->save();\n \n return response()->json(['success'=>'Status change successfully.']);\n }", "public function maybe_notify_new_published_post( $new_status, $old_status, $post ) {\n\t\tif ( 'publish' != $new_status ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $old_status == $new_status ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $this->is_post_notifiable( $post, 'publish' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->notify_blog_post( $post, 'new' );\n\t}", "public function orgcategorystatus()\n {\n $id = get_post('id');\n $code = get_post('code');\n\n if ($id && $code) {\n $record = $this->mgovdb->getRowObjectWhere('OrganizationCategories', array('id' => $id, 'OrganizationCode' => $code));\n if ($record) {\n $status = get_post('status');\n if ($status == 'true' || $status == 'false') {\n $updateData = array(\n 'id' => $record->id,\n 'Status' => ($status == 'true' ? 1 : 0),\n 'LastUpdate' => date('Y-m-d H:i:s')\n );\n if ($this->mgovdb->saveData('OrganizationCategories', $updateData)) {\n $return_data = array(\n 'status' => true,\n 'message' => 'Category status has been updated.'\n );\n } else {\n $return_data = array(\n 'status' => false,\n 'message' => 'Updating category status failed.'\n );\n }\n } else {\n $return_data = array(\n 'status' => false,\n 'message' => 'Invalid category status.'\n );\n }\n } else {\n $return_data = array(\n 'status' => false,\n 'message' => 'Invalid request.'\n );\n }\n } else {\n $return_data = array(\n 'status' => false,\n 'message' => 'Invalid request.'\n );\n }\n\n response_json($return_data);\n }", "public function publish(){\n $post = Products::where('id', \\request(\"id\"))->first();\n $post->active = $post->active==\"pending\"?\"Approved\":\"pending\";\n $post->save();\n return redirect(route('voyager.h-products.index'));\n }", "public function isActive()\n {\n return $this->is_published;\n }", "private function setPublishedDateTime() {\n\t\ttry {\n\t\t\t$stmt = $this->db->prepare(\"UPDATE `$this->table` SET `datetime-published` = NOW() WHERE `id` = ?\");\n\t\t\t$stmt->execute([$this->getID()]);\n\t\t} catch (PDOException $e) {\n\t\t\techo 'Post.class.php setPublishedDateTime() error: <br />';\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\n\t\t// Because we set the datetime from MySQL, we can't use PHP's datetime function to get the time as it may be slightly different\n\t\t$stmt = $this->db->prepare(\"SELECT `datetime-published` FROM `$this->table` WHERE `id` = ?\");\n\t\t$stmt->execute([$this->getID()]);\n\n\t\tforeach ($stmt as $row) {\n\t\t\t$this->datePublished = $row['datetime-published'];\n\t\t}\n\n\t\t// Also set the last modified datetime\n\t\t$this->setLastModifiedDateTime();\n\t}", "public function setCategory($userId, $category)\n {\n $User = $this->find()->select(['id' => $userId])->first();\n if (!$User) {\n throw new \\InvalidArgumentException(\n \"Can't find user with id $userId.\",\n 1420807691\n );\n }\n\n if ($category === 'all') {\n //=if show all cateogries\n $active = -1;\n } elseif (is_array($category)) {\n //=if set a custom set of categories\n $active = 0;\n\n $availableCats = $this->Entries->Categories->find('list')->toArray(\n );\n $categories = array_intersect_key($category, $availableCats);\n if (count($categories) === 0) {\n throw new \\InvalidArgumentException();\n }\n $newCats = [];\n foreach ($categories as $cat => $v) {\n $newCats[$cat] = ($v === true || $v === 1 || $v === '1');\n }\n $User->set('user_category_custom', $newCats);\n } else {\n //=if set a single category\n $category = (int)$category;\n if (\n $category > 0 && $this->Entries->Categories->exists((int)$category)\n ) {\n $active = $category;\n } else {\n throw new \\InvalidArgumentException();\n }\n }\n\n $User->set('user_category_active', $active);\n $this->save($User);\n }", "public static function updateCategory($a_obj)\n\t{\n\t\tinclude_once('./Services/Calendar/classes/class.ilCalendarCategory.php');\n\t\tinclude_once('./Services/Calendar/classes/class.ilCalendarAppointmentColors.php');\n\t\t\n\t\tif($cat = ilCalendarCategory::_getInstanceByObjId($a_obj->getId()))\n\t\t{\n\t\t\t$cat->setTitle($a_obj->getTitle());\n\t\t\t$cat->update();\n\t\t}\n\t\treturn true;\n\t}", "public function setPublishedAtAttribute($value){\n $this->attributes['published_at'] = $value ?: NULL;\n }", "public function getCategoryStatus()\n\t{\n\t\treturn $this->category_status;\n\t}", "public function publish()\n {\n $this->published = true;\n\n return $this;\n }", "public function update(CreateCategoryRequest $request, Category $category)\n {\n $category->update(request()->all());\n $category->slug = request('slug')? str_slug(request('slug')) : str_slug(request('title'));\n $category->publish = request('publish')? true : false;\n $category->update();\n\n return response()->json([\n 'category' => $category\n ]);\n }", "public function putStatus($id) {\n $post = Post::find($id);\n\n if ($post->status == 'publish') $post->status = 'unpublish';\n else $post->status = 'publish';\n\n $post->save();\n\n return response()->json([\n 'html' => view('dashboard.partials.post.show', compact('post'))->render(),\n 'message' => 'Statut de conférence modifié',\n 'id' => $post->id\n ]);\n }", "public function updatePublishedAt() {\n\t\tif (!$this->private && !$this->published_at) {\n\t\t\t$this->published_at = $this->updated_at;\n\t\t}\n\t}", "public function set_category_id($category)\n {\n parent::set_category(0);\n }", "public function setStatus(?CloudPcGalleryImageStatus $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "public function setCategory(\n TDProject_Channel_Model_Entities_Category $category)\n {\n $this->_category = $category;\n return $this;\n }", "public function setCategory($category)\n {\n if(strlen($category) <= 25 && strlen($category) > 0 && preg_match('#^[a-zA-Z- ]*$#', $category)) {\n $this->category = $category;\n }\n }", "protected function _publish_status()\n\t{\n\t\t//$fields = $this->fields();\n\t\t$fields = $fields = array_keys($this->table_info()); // used to prevent an additional query that the fields() method would create\n\n\t\tif (in_array('published', $fields))\n\t\t{\n\t\t\tif (in_array('published', $this->boolean_fields))\n\t\t\t{\n\t\t\t\t$this->db->where(array($this->table_name.'.published' => 1));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->db->where(array($this->table_name.'.published' => 'yes'));\n\t\t\t}\n\t\t}\n\n\t\tif (in_array('active', $fields))\n\t\t{\n\t\t\tif (in_array('active', $this->boolean_fields))\n\t\t\t{\n\t\t\t\t$this->db->where(array($this->table_name.'.active' => 1));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->db->where(array($this->table_name.'.active' => 'yes'));\n\t\t\t}\n\t\t}\n\n\t\tif (in_array('publish_date', $fields))\n\t\t{\n\t\t\t$this->db->where(array($this->table_name.'.publish_date <=' => datetime_now()));\n\t\t}\n\t}", "public function setPublishedAtAttribute($date)\n\t{\n\t\t$this->attributes['published_at'] = Carbon::createFromFormat('Y-m-d', $date);\n\t}", "function publish() {\n\t\tif (! $this->id) {\n\t\t\treturn false;\n\t\t}\n\t\t/* This method formerly updated the published_date, but that was removed in \n\t\t * favor of giving manual control of the published_date to the author\n\t\t * $this->saveField('published_date', date('Y-m-d', time()).' 00:00:00') */\n\t\treturn $this->saveField('is_published', 1);\n\t}", "public function changeStatus($interview_category_id = null, $status = null)\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminInterviewCategoryModel->changeStatus($interview_category_id, $status);\r\n }", "function _update_blog_date_on_post_publish( $new_status, $old_status, $post ) {\n\t$post_type_obj = get_post_type_object( $post->post_type );\n\tif ( ! $post_type_obj || ! $post_type_obj->public ) {\n\t\treturn;\n\t}\n\n\tif ( 'publish' != $new_status && 'publish' != $old_status ) {\n\t\treturn;\n\t}\n\n\t// Post was freshly published, published post was saved, or published post was unpublished.\n\n\twpmu_update_blogs_date();\n}", "public function publishedStatus()\n {\n if ( !$this->owner->getScheduledStatus() && !$this->owner->getExpiredStatus() ) {\n return true;\n }\n\n return false;\n }" ]
[ "0.6160767", "0.5978894", "0.59285855", "0.57952714", "0.5746558", "0.5521785", "0.5460158", "0.54145086", "0.5354269", "0.5325515", "0.5289965", "0.52400035", "0.52265304", "0.52265304", "0.5128848", "0.50924355", "0.50866205", "0.5081529", "0.4982834", "0.49709374", "0.49694988", "0.496065", "0.49595332", "0.49483532", "0.4945155", "0.49096435", "0.49058893", "0.4858573", "0.48585075", "0.48567605", "0.48560572", "0.48421463", "0.48389035", "0.4821539", "0.48097682", "0.4809172", "0.4787298", "0.4782237", "0.4777229", "0.47732872", "0.4759784", "0.47536492", "0.47535044", "0.47515154", "0.47494197", "0.4746521", "0.47268102", "0.472095", "0.47185594", "0.470106", "0.46952206", "0.4687583", "0.46782973", "0.4671259", "0.46692672", "0.4665897", "0.4663127", "0.46567756", "0.46550652", "0.46494913", "0.46416822", "0.46370637", "0.461223", "0.46101597", "0.4607277", "0.4592132", "0.45708153", "0.45672974", "0.45591936", "0.45415825", "0.45354617", "0.45277542", "0.4524902", "0.45247218", "0.45225665", "0.45220548", "0.45171535", "0.45096713", "0.45078912", "0.4495706", "0.44893882", "0.44844386", "0.44837952", "0.44827893", "0.44801092", "0.44791287", "0.44689602", "0.44688836", "0.4466443", "0.44658428" ]
0.6267552
10
Create a new rule instance.
public function __construct() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function rule()\n\t{\n\t\t// Return an ACL rule\n\t\treturn new ACL_Rule;\n\t}", "public function __construct($rule)\n {\n $this->rule = $rule;\n }", "protected function _rule($rule, array $options = array()) {\n\t\t$this->rule = new $rule($options);\n\t\treturn $this->rule;\n\t}", "public function initialize_rule()\n\t{\n\t\t$this->rule = array\n\t\t(\n\t\t\t'roles' => array(),\n\t\t\t'capabilities' => array(),\n\t\t\t'users' => array(),\n\t\t\t'callbacks' => array(),\n\t\t);\n\t\t\n\t\treturn $this;\n\t}", "protected function createRuleObject($rule, $key, $value): RuleInterface\n {\n if ($rule === $key) {\n return new $key($value);\n }\n\n return new $value();\n }", "public function getRule();", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function addRule(Rule $rule): Manager\n {\n $this->rules[] = $rule;\n return $this;\n }", "abstract public function addRule(ValidationRule$rule);", "public function addRule(Rule $rule)\n {\n $this->rules[] = $rule;\n return $this;\n }", "public function rule(array $rule){\n\n\t\t$this->rule = $rule;\n\n\t\treturn $this;\n\t}", "public function setCreateTNARule()\n\t{\n\t\t$this->rules = [\n\t\t\t'orderId' => 'sometimes|exists:orders,id',\n\t\t 'techpackId' => 'sometimes|exists:techpacks,id',\n\t\t 'customerId' => 'sometimes|exists:customers,id',\n\t\t 'vendorId' => 'sometimes|array|exists:vendors,id',\n\t\t 'title' => 'required',\n\t\t 'startDate' => 'required|date',\n\t\t 'targetDate' => 'required|date',\n\t\t 'representor' => 'required|email|exists:users,email',\n\t\t // 'styleCode' => 'required'\n\t\t];\n\t\treturn $this;\n\t}", "public function getDefinition(): RuleDefinition\n {\n }", "public function getDefinition(): RuleDefinition\n {\n }", "private function _makeRule($name, array $options)\n {\n static $needed_keys = array('regex', 'target');\n \n // all the needed keys are here\n foreach($needed_keys as $key)\n if(!isset($options[$key]))\n throw new Error500('Missing « '.$key.' » option for the rule « '.$name.' »');\n \n // check the existence of a rule with the same name\n if(isset($this->rules[$name]))\n throw new Error500('A rule named « '.$name.' » already exists.');\n \n // define the rule's url\n $url = isset($options['url']) ? $options['url'] : $this->guessURL($options['regex']);\n \n // try to parse the parameters to add to the rule\n $params = array();\n if(isset($options['params']))\n {\n if(!is_array($options['params']))\n throw new Error500('Rule « '.$name.' » is malformed (« params » parameter must be an array).');\n \n $params = $options['params'];\n }\n \n if(isset($options['GET']))\n {\n if(!is_array($options['GET']))\n throw new Error500('Rule « '.$name.' » is malformed (« GET » parameter must be an array).');\n \n $params['GET'] = $options['GET'];\n }\n \n $rule = new Rule($name, $options['regex'], $url, $options['target'], $params);\n \n $this->rules[$name] = $rule;\n \n return $rule;\n }", "public function getBonusRuleInstance()\n {\n return new BonusRule();\n }", "public function setRule($rule) {\n\t\t$this->rule = $rule;\n\n\t\tif (!isset($this->rules[$rule])) {\n\t\t\t$this->rules[$rule] = [\n\t\t\t\t'constraints' => [],\n\t\t\t\t'filters' => [],\n\t\t\t\t'is_valid' => true\n\t\t\t];\n\t\t}\n\n\t\treturn $this;\n\t}", "public static function createRuleFromArray(array $options)\n {\n if (!isset($options['asset_type'])) {\n throw new \\RuntimeException('Cannot create rule: missing type');\n }\n\n $className = __NAMESPACE__ . '\\\\' . ucfirst(mb_strtolower($options['asset_type']));\n if (!class_exists($className)) {\n throw new \\RuntimeException(\n sprintf('Cannot create rule of type \"%s\": does not exist', $options['asset_type'])\n );\n }\n\n $rule = new $className;\n if (!$rule instanceof RuleCompositeInterface) {\n throw new \\RuntimeException(\n sprintf('Cannot create rule of type \"%s\": is not a rule', $options['asset_type'])\n );\n }\n\n $rule->exchangeArray($options);\n return $rule;\n }", "public function __construct($parentRule = 'Parent')\n {\n $this->_parentRule = $parentRule;\n }", "public function createRule($name, $description, array $conditions)\n\t{\n\t\t$rule = new \\Watchdog\\Entities\\Rule((string)$name, (string)$description, $conditions);\n\t\t$this->rules[] = $rule;\n\t\t\n\t\treturn $rule;\n\t}", "public function creating(MActivityRule $model)\n\t{\n\t}", "public function addRule(bnfRule $rule){\n\t\t$this->rules[] = $rule;\t\t\n\t}", "private function setRules()\n {\n $this->addRule(new Rules\\CoreAccountRule());\n $this->addRule(new Rules\\CoreApplicationRule());\n $this->addRule(new Rules\\IdentityAccountRule());\n $this->addRule(new Rules\\QuestionRule());\n return $this;\n }", "public function createRules()\n {\n return [];\n }", "public function getRule(int $number): RuleInterface;", "public function addRule(RuleInterface $rule)\r\n\t{\r\n\t\t$this->rules[] = $rule;\r\n\t\t$this->dirty = true;\r\n\t\treturn $this;\r\n\t}", "public function addRule(RuleIface $rule);", "public static function createRule(\r\n $type, HTML_QuickForm2_Node $owner, $message = '', $config = null\r\n ) {\r\n $type = strtolower($type);\r\n if (!isset(self::$registeredRules[$type])) {\r\n throw new HTML_QuickForm2_InvalidArgumentException(\"Rule '$type' is not known\");\r\n }\r\n list($className, $includeFile) = self::$registeredRules[$type];\r\n HTML_QuickForm2_Loader::loadClass($className, $includeFile);\r\n if (isset(self::$registeredRules[$type][2])) {\r\n $config = call_user_func(\r\n array($className, 'mergeConfig'),\r\n $config, self::$registeredRules[$type][2]\r\n );\r\n }\r\n return new $className($owner, $message, $config);\r\n }", "protected function createValidator()\n {\n $rule = $this->rule;\n if (is_object($rule)) {\n return $this->checkValidator($rule);\n }\n\n if (is_array($rule)) {\n $rule['folderPath'] = $this->folderPath;\n // the nested cass is to\n return $this->checkValidator(Validator::createValidator(\n ArrayHelper::remove(\n $rule,\n 'class',\n FileHandlerValidator::className()\n ),\n $this->fileAttribute,\n $rule\n ));\n }\n\n throw new InvalidConfigException(\n 'Unrecognized type for `rule` property.'\n );\n }", "public static function parseFromValidation(string $name, $rule): self\n {\n $param = new self($name);\n $rule = !is_string($rule) ? $rule->__toString() : $rule; \n $parsedRules = explode('|', $rule);\n\n foreach ($parsedRules as $concreteRule) { \n try {\n $value = explode(':', $concreteRule)[1];\n } catch (Exception $e) {\n $value = null;\n }\n \n try {\n $param->{$concreteRule}($value);\n } catch (Error $e) {\n continue;\n } catch (BadMethodCallException $e) {\n continue;\n }\n }\n \n return $param;\n }", "public function __construct()\n {\n $this->pluralRules = Pluralize::all();\n $this->singularRules = Singularize::all();\n $this->aplicator = new Rules();\n \n foreach (Irregularize::all() as $rule) {\n $this->irregularSingles[$rule[0]] = $rule[1];\n $this->irregularPlurals[$rule[1]] = $rule[0];\n }\n \n foreach (Uncountable::all() as $rule) {\n $this->addUncountableRule($rule);\n }\n }", "public function rule($field, $rule, $params = null, $message = false): self\n {\n $this->rule[$field][] = [\n 'type' => $rule,\n 'params' => $params,\n 'message' => $message\n ];\n\n return $this;\n }", "public function __construct(Field $field, $rule) {\n $this->field = $field;\n\n // The specific rule that was broken.\n $this->rule = $rule;\n\n // Determine the parameter for this rule, if it has one.\n $this->parameter = $this->determineRuleParameter();\n\n\n }", "public function __construct( $rule_data ) {\n\t\tforeach ( $rule_data as $rule_key => $rule_value ) {\n\t\t\t$this->rule_data[ $rule_key ] = $rule_value;\n\t\t}\n\t}", "public function addRule($pName, $rule) {\n if (!$this->isValidPropertyName($pName)) {\n throw new Exceptions\\InvalidArgument(\"Property name can't be empty\");\n }\n if (!empty($this->propertiesNames[$pName])) {\n $pID = $this->propertiesNames[$pName];\n $property = $this->properties[$pID];\n } else {\n $property = new Target\\Property($pName);\n $pID = $property->getID();\n $this->properties[$pID] = $property;\n $this->propertiesNames[$pName] = $pID;\n }\n return $property->attachRule($rule);\n }", "function __construct($rules = array()) {\n parent::__construct($rules);\n }", "public function getRule(): RuleInterface\n {\n return $this->rule;\n }", "static function addRule(\\CharlotteDunois\\Validation\\RuleInterface $rule) {\n if(static::$rulesets === null) {\n static::initRules();\n }\n \n $class = \\get_class($rule);\n $arrname = \\explode('\\\\', $class);\n $name = \\array_pop($arrname);\n \n $rname = \\str_replace('rule', '', \\mb_strtolower($name));\n static::$rulesets[$rname] = $rule;\n \n if(\\mb_stripos($name, 'rule') !== false) {\n static::$typeRules[] = $rname;\n }\n }", "public static function createRule(string $name, array $filters, bool $traverse)\n {\n $rules = self::getRules();\n\n $ruleClass = isset($rules[$name]) ? $rules[$name] : null;\n\n if (is_null($ruleClass)) {\n throw new \\Exception(\"No Rule class to handle rule {$name}\");\n }\n\n return new $ruleClass($filters, $traverse);\n }", "public function __construct(array $rules = array())\n {\n $this->rules = $rules;\n }", "public function setCreationRules()\n {\n $this->rules = [\n 'techpackId' => 'required|exists:techpacks,id',\n ];\n return $this;\n }", "public static function addRule(\\GraphQL\\Validator\\Rules\\ValidationRule $rule)\n {\n }", "private function createCategoryRules()\n {\n // Validation rules\n $this->form_validation->set_rules('category_title', 'Category Title', 'trim|required|max_length[255]');\n }", "public function create()\n {\n if (!check_permission('assessment/rules/create')) {\n return _404('无权操作!');\n }\n return view('assessment.rule.create');\n }", "public function created(MActivityRule $model)\n\t{\n\t}", "public function getStartRule(): RuleInterface;", "public function __construct(ValidationRule $rules)\n {\n $this->rules = $rules;\n $this->rules->addObject(UserController::class, $this);\n $this->randomPassword = RandomCharGenerator::generate();\n }", "protected function addRule( phpucInputRule $rule )\n {\n $this->rules[] = $rule;\n }", "public function add_rule( WP_Autoload_Rule $rule );", "public function __construct()\n {\n parent::__construct($this->rules);\n }", "public function __construct(){\n # parent::__construct();\n $this->rule_add = ['name'=>'required|unique:group_rule', 'description'=>'required'];\n $this->rule_update = ['name'=>'required', 'description'=>'required'];\n }", "public function makeRules()\n {\n $this->rules = [];\n preg_match_all(\"/([.#a-z0-9-]*)\\s?({[^}]*})/i\", $this->contents(), $comands);\n foreach ($comands[1] as $k => $selector) {\n preg_match_all(\"/([a-z0-9-]*):([^;]*);/i\", $comands[2][$k], $declarations);\n $this->rules[$selector] = [];\n foreach ($declarations[1] as $i => $property) {\n $this->rules[$selector][$property] = $declarations[2][$i];\n }\n }\n }", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "private function addRule($type, Rule $newRule = null)\n {\n if (!$newRule) {\n return;\n }\n\n $this->rules->add($newRule, $type);\n }", "public static function create()\r\n\t{\r\n\t\t$validator = Validation::forge('callback');\r\n\t\t\r\n\t\t$validator->add('event', 'Event Name')->add_rule('trim')->add_rule('required')->add_rule(array('invalid_event_name' => function ($event_name) {\r\n\t\t\t$event = Service_Event::find_one(array('name' => $event_name));\r\n\t\t\tif (!$event) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}));\r\n\t\t\r\n\t\t$validator->add('url', 'Callback URL')->add_rule('trim')->add_rule('valid_url')->add_rule('required');\r\n\t\t\r\n\t\treturn $validator;\r\n\t}", "public function rules();", "public function rules();", "public function rules();", "public function addRule(PublicApiRuleInterface $rule)\n {\n $this->rules[$rule->getModelClass()][$rule->getModelType()] = $rule;\n return $this;\n }", "public static function add_rule(ACL_Rule $rule)\n\t{\n\t\t// Check if the rule is valid, if not throw an exception\n\t\tif ( ! $rule->valid())\n\t\t\tthrow new ACL_Exception('The ACL Rule was invalid and could not be added.');\n\n\t\t// Find the rule's key and add it to the array of rules\n\t\t$key = $rule->key();\n\t\tself::$_rules[$key] = $rule;\n\t}", "protected function _construct()\n {\n $this->_init('magento_targetrule', 'rule_id');\n }", "public function addRule(string $field, IValidationRule $rule): void;", "private function setupRules()\n {\n // Validator::extend('rule', 'App\\Support\\Rules\\Rule@validate');\n // Validator::replacer('rule', 'App\\Support\\Rules\\Rule@message');\n }", "public function getRule()\n {\n return $this -> rule;\n }", "public function makeRule(array $formats): ValidationRule\n {\n return new DateFormat(...$formats);\n }", "public function rules()\n {\n return $this->belongsTo('App\\Rule');\n }", "public function setRuleId(string $ruleId) : self\n {\n $this->initialized['ruleId'] = true;\n $this->ruleId = $ruleId;\n return $this;\n }", "public function __construct(array $pattern)\n {\n foreach ($pattern as $property => $rules) {\n if (is_array($rules)) {\n $this->rules[$property] = Rule::createRulesArray($rules);\n } elseif (is_string($rules)) {\n $this->rules[$property] = Rule::createRulesArray(explode('|', $rules));\n } else {\n throw new \\RuntimeException('Invalid pattern for validator', 500);\n }\n }\n }", "private function getRule()\n\t{\n\t\t$className = $this->className;\n\t\treturn $className::rule();\n\t}", "public function getTrueRule()\n {\n $tp = new Test\\Fixtures\\TrueProposition();\n $ruleFactory = new RuleFactory;\n return $ruleFactory->create($tp);\n }", "public function add(RuleElement\\Element $element) {\n $this->elements[] = $element;\n\n return $this;\n }", "public function buildRules(): void\n {\n }", "public function __construct(array $ruleSet)\n {\n $this->ruleSet = $ruleSet;\n }", "public static function getRule($name)\n {\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['title']));\n\n return $rules;\n }", "public function create(){}", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['title']));\n return $rules;\n }", "public function add_rule($selector)\n {\n }", "public static function createRule($name, $params = array())\n\t{\n\t\tif (!is_array($params))\n\t\t\t$params=array('defaultValue'=>$params);\n\n\t\tif(isset(self::$builtInRules[$name]))\n\t\t\t$className=Yii::import(self::$builtInRules[$name],true);\n\t\telse\n\t\t\t$className=Yii::import($name,true);\n\t\treturn Yii::createComponent(CMap::mergeArray(array('class'=>$className), $params));\n\t}", "function addRule($key, $type, $arg = null)\n {\n $this->rules[] = array(\n 'key' => $key,\n 'type' => $type,\n 'arg' => $arg\n );\n }", "public function createDefaultNotificationRule();", "protected function _generateRules()\n {\n }", "abstract public function parseRules();", "public function addRule(array $rule, $overwrite = false)\n {\n if($overwrite)\n {\n array_merge($this->rules, $rule);\n }\n else\n {\n $val = '';\n if(array_key_exists(key($rule), $this->rules))\n {\n $val = $this->rules[key($rule)].'|';\n }\n $this->rules[key($rule)] = $val.$rule[key($rule)];\n }\n \n return $this;\n }", "public function testConstructorContainer()\n {\n $rule = new AndRule(\n new TrueRule(),\n new OrRule(\n new FalseRule(),\n new TrueRule()\n ),\n new NotRule(\n new FalseRule()\n )\n );\n $this->assertTrue($rule->validate());\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['trip_id'], 'Trips'));\n $rules->add($rules->existsIn(['stop_id'], 'Stops'));\n\n return $rules;\n }", "public function setCustomRule(string $name, Validatable $rule): ValidatorInterface;", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['tel']));\n\n return $rules;\n }", "public function make(array $data, array $rules, array $messages = array(), array $customAttributes = array());", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['asset_number']));\n $rules->add($rules->existsIn(['warehouse_id'], 'Warehouses'));\n\n return $rules;\n }", "public static function create() {\n global $DB;\n\n $record = new stdClass();\n $record->useand = true;\n\n $id = $DB->insert_record('ddtaquiz_condition', $record);\n\n return new condition($id, array(), $record->useand);\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->isUnique(['title']));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }", "public function addRule(RuleIface $rule)\n {\n $this->rules[] = $rule;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['test_run_id'], 'TestRuns'));\n $rules->add($rules->existsIn(['stream_id'], 'Streams'));\n $rules->add($rules->existsIn(['parameter_id'], 'Parameters'));\n return $rules;\n }", "public function setRules(array $rules = array()){\n $this->_rules = $rules;\n \n return $this;\n }", "public function testCreateRuleGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getRule()\n\t{\n\t\treturn $this->rule;\n\t}", "protected function createRules()\n {\n return [\n 'token' => ['required', 'string'],\n ];\n }" ]
[ "0.70554173", "0.70352", "0.6951036", "0.63332736", "0.6322271", "0.61079586", "0.610166", "0.61011785", "0.60997975", "0.6096601", "0.59716463", "0.59215456", "0.5920786", "0.5920786", "0.5879104", "0.58263415", "0.5795926", "0.5794887", "0.5766469", "0.57603216", "0.57509834", "0.5689234", "0.56290513", "0.5616828", "0.5608796", "0.5596628", "0.55960304", "0.5561357", "0.553431", "0.5521237", "0.5501706", "0.5498208", "0.548473", "0.5453787", "0.5447638", "0.5378762", "0.53726155", "0.5372036", "0.5366798", "0.5366032", "0.5355957", "0.5351747", "0.5343861", "0.53316844", "0.53271633", "0.5298979", "0.52981424", "0.5278316", "0.52742505", "0.52709854", "0.52486664", "0.52381116", "0.523713", "0.523713", "0.523713", "0.523713", "0.52361065", "0.5235449", "0.5220051", "0.5220051", "0.5220051", "0.5216667", "0.5211655", "0.5206536", "0.5201047", "0.5182542", "0.5182395", "0.51626456", "0.5155416", "0.51518583", "0.5149035", "0.5148929", "0.5140176", "0.5133648", "0.51099193", "0.51067746", "0.5101962", "0.5100886", "0.5094729", "0.50931096", "0.50863516", "0.50853544", "0.50812453", "0.5079836", "0.5070466", "0.5069266", "0.50679064", "0.50638276", "0.5056228", "0.50560075", "0.5055332", "0.5052613", "0.5051899", "0.50457805", "0.5045457", "0.503988", "0.5033986", "0.5022403", "0.5020689", "0.50132066", "0.50000197" ]
0.0
-1
Determine if the validation rule passes.
public function passes($attribute, $value) { if (!is_numeric($value)) { $this->message = 'This :attribute must be integer.'; return false; } if ($value <= 0) { $this->message = 'This :attribute negative amount not allow.'; return false; } $replaceValue = str_replace('.', '', $value); if (strlen($replaceValue) > 12) { $this->message = 'This :attribute length can\'t be greater than 12 digit.'; return false; } if (!preg_match("/^\d{1,10}(\.\d{1,2})?$/", $value)) { $this->message = 'This :attribute amount provide invalid.'; return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isValidationPassed();", "public function passes()\n {\n $validator = $this->validator->make($this->data, $this->rules, $this->messages);\n \n if($validator->fails())\n {\n $this->errors = $validator->messages();\n return false;\n }\n \n return true;\n }", "public function passes()\n {\n $rules = $this->replace();\n\n $validator = Validator::make($this->data, $rules);\n\n if( $validator->passes() )\n {\n return true;\n }\n\n $this->errors = $validator->messages();\n }", "function passes() {\n return $this->startValidation();\n }", "public function validate() : bool\n {\n return $this->passes();\n }", "public function passes()\n {\n $validator = $this->validator->make($this->data, $this->rules);\n\n if($validator->passes())\n {\n return true;\n }\n\n $this->errors = $validator->errors()->all(':message');\n return false;\n }", "public function passes()\n {\n foreach ($this->rules as $attribute => $rules) {\n foreach ($rules as $rule) {\n $this->validate($attribute, $rule);\n }\n }\n\n return count($this->messages) === 0;\n }", "public function passes() {\n $this->message = new MessageBag;\n\n // We'll spin through each rule, validating the attributes attached to that\n // rule. Any error messages will be added to the containers with each of\n // the other error messages, returning true if we don't have messages.\n foreach ($this->rules as $attribute => $rules) {\n\n }\n\n return $this->message->isEmpty();\n }", "public function isValid()\r\n\t{\r\n\t\t$valid = $this->validate($this->rule, $this->control->getValue(), $this->arg);\r\n\t\tif ($this->negative)\r\n\t\t\t$valid = !$valid;\r\n\r\n\t\tif ($valid)\r\n\t\t\treturn true;\r\n\r\n\t\t$this->control->setError($this->getMessage());\r\n\t\treturn false;\r\n\t}", "public function valid(): bool {\n return false !== current($this->rules);\n }", "public function valid()\n {\n return $this->makeValidator()->passes();\n }", "public function valid()\n {\n return current($this->rules) !== false;\n }", "public function validation()\n {\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "public function validate(): bool\n {\n $result = true;\n foreach ($this->rules as $field_name => $field_rules) {\n foreach ($field_rules as $field_rule => $field_params) {\n\n if (array_key_exists($field_rule, self::$known_rules)) {\n\n if (class_exists(self::$known_rules[$field_rule]) and\n is_subclass_of(self::$known_rules[$field_rule], 'Shulha\\Framework\\Validation\\Rules\\AbstractValidationRule')) {\n\n /** @var $validation_class AbstractValidationRule */\n $validation_class = new self::$known_rules[$field_rule];\n $field_value = isset($this->request->$field_name) ? $this->request->$field_name : null;\n\n if (!$validation_class->check($field_name, $field_value, $field_params)) {\n $result = false;\n $this->errorList[$field_name][] = $validation_class->getError($field_name, $field_value, $field_params);\n }\n } else\n throw new RuleClassNotFoundException(\"Class \" . self::$known_rules[$field_rule] . \" not found or don't extends AbstractValidationRule\");\n } else\n throw new RuleNotFoundException(\"Rule \\\"$field_rule\\\" not found\");\n }\n }\n return $result;\n\n }", "public function passed(){\n \n //Loop through all the fields in the ruleset\n foreach($this->rules as $fieldName => $ruleCollection){\n foreach($ruleCollection as $rule => $rule_value){\n $this->validateField($fieldName, $rule, $rule_value); \n }\n }\n \n if($this->useValidationToken){\n if( Input::get(\"form_token\") != Session::get(\"form_token\") ){\n $this->addError(\"form_token\", \"token\", \"Could not process form form at this time. Please try again.\");\n }\n }\n \n //If we're using session flash, add a formatted list of errors to the session flash system\n if($this->useSessionFlash){\n Session::addFlash($this->formattedErrors(\"list\"), \"danger\", \"Please correct the following errors\");\n }\n \n return $this->hasPassed;\n }", "public function isValid() {\n\t\t$validation = Validator::make($this->attributes, static::$rules);\n\n\t\tif ($validation->passes()){\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->messages = $validation->messages();\n\t\treturn false;\n\t}", "function validate()\n\t{\n\t\t$result = true;\n\t\tif ($this->required && !$this->value) { $result = false; }\n\n\t\tif (!$result) { $this->error = '*'; }\n\n\t\treturn $result;\n\t}", "public function validate()\n {\n foreach ($this->aRule as $aRule) {\n if (count($aRule) < 2) { continue; }\n $sKey = array_shift($aRule);\n $sValidator = array_shift($aRule);\n $Validator = $this->createValidator(\n $sValidator,\n $sKey,\n Arr::get($this->aData, $sKey),\n $aRule,\n Arr::get($this->aMsg, $sKey, array())\n );\n if(true !== ($sValidMsg = $Validator->validator())){\n return $sValidMsg;\n }\n }\n return true;\n }", "public function fails()\n {\n return count($this->_rules->errors) > 0;\n }", "function fails() {\n return !($this->startValidation());\n }", "public function passes()\n {\n if ($this->isRemoteValidationRequest()) {\n return $this->validateJsRemoteRequest($this->data['_jsvalidation'], [$this, 'parent::passes']);\n }\n\n return parent::passes();\n }", "public function checkValidity()\n {\n if($this->validator->fails()) {\n return $this->validator->errors();\n }\n else\n return false;\n }", "public function isValid(): bool\n {\n $success = true;\n\n foreach ($this->rules->getRules() as $field => $rules) {\n foreach ($rules as $rule => $args) {\n $fieldError = $this->fieldErrors[$field] ?? null;\n\n if (key_exists($rule, $this->sets) === false) {\n // Rule doesn't exist, throw an exception\n throw new InvalidArgumentException(\"Unknown rule '$rule'\");\n }\n\n if ($this->params->has($field) === false) {\n // The field doesn't exist.\n if ($this->rules->isRequired($field)) {\n // The rule is required but doesn't exist. Set error and\n // continue to the next field\n $this->errors->add($field, $fieldError ?? \"$field is required\");\n $success = false;\n break;\n }\n\n // The rule doesn't exist but isn't required, so let's just\n // continue to the next field\n continue;\n }\n\n // Add the field value as the first argument\n array_unshift($args, $this->params->get($field));\n\n $callback = call_user_func_array($this->sets[$rule], $args);\n\n if ($callback === true) {\n // The validation rule passed, continue to next\n continue;\n }\n\n // Set success to false since the validation failed\n $success = false;\n\n if ($fieldError || is_string($callback)) {\n // We found a custom field error, let's use that\n $this->errors->add($field, $fieldError ?? $callback);\n break;\n }\n\n // No other error messages was found or returned, create a generic one\n $this->errors->add($field, \"Validation for $rule failed\");\n break;\n }\n }\n\n return $success;\n }", "public function validation() {\n $this->validate(\n new PresenceOf(\n array(\n \"field\" => \"name\",\n \"message\" => \"The name is required\"\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validationHasFailed(): bool;", "public function isValid(): bool{\n if ($this->getError() == null){return true;}\n return false;\n }", "protected final function validate()\n {\n $validator = new Validator($this);\n $validator->validate();\n\n return $this->hasErrors() ? false : true;\n }", "public function isRulesPassed()\n {\n if(!isset($this->rules_objects_list[$this->table_name]))\n return true;\n\n //current table's rules object\n $l_target = $this->rules_objects_list[$this->table_name];\n\n return ($l_target->rules_error_flag == false);\n }", "public function isFailed()\n {\n return $this->validator->fails();\n }", "public function validate()\n {\n $validator = new Validator;\n $validator->add($this->rules);\n if ($validator->validate($this->attributes)) {\n return TRUE;\n }\n\n $this->errors = $validator->getMessages();\n\n return FALSE;\n }", "public function isValid()\n {\n $this->beforeValidation();\n\n if ( ! isset($this->validationRules)) {\n throw new NoValidationRulesException('No validation rules found on class ' . get_called_class());\n }\n\n $this->validator = Validator::make($this->inputData, $this->validationRules, $this->validationMessages);\n\n return $this->validator->passes();\n }", "function isValid () {\r\n if ( count ($this->errors) > 0 ) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }", "public function isValid(): bool\n {\n return (count($this->violations) <= 0);\n }", "public function isValidated()\n {\n return $this->attribute('state') == self::STATUS_VALIDATED;\n }", "public function isValid()\n {\n return $this->validates();\n }", "public function isValidated(): bool\n {\n return $this->status != self::STATUS_ERROR;\n }", "public function validate() : bool\n {\n foreach ($this->rules() as $inputName => $rules) {\n $value = $this->{$inputName} ?? '';\n foreach ($rules as $rule) {\n if(!is_string($rule)) {\n $ruleName = $rule[0];\n } else $ruleName = $rule;\n if($ruleName === self::RULE_REQUIRED && !$value) {\n $this->addError($inputName, self::RULE_REQUIRED);\n } else if ($ruleName === self::RULE_EMAIL && !filter_var($value, FILTER_VALIDATE_EMAIL) ) {\n $this->addError($inputName, self::RULE_EMAIL);\n } else if ($ruleName === self::RULE_MAX && strlen($value) > $rule['max']) {\n $this->addError($inputName, self::RULE_MAX, $rule);\n } else if ($ruleName === self::RULE_MIN && strlen($value) < $rule['min']) {\n $this->addError($inputName, self::RULE_MIN, $rule);\n } else if ($ruleName === self::RULE_MATCH && $value !== $this->{$rule['match']}) {\n $this->addError($inputName, self::RULE_MATCH, $rule);\n } else if ($ruleName === self::RULE_UNIQUE) {\n $sql = \" SELECT uniqueID from \" . self::$tableName . \" WHERE \" . $rule['column'] . \"=?\"; \n $stmt = self::$mysqli->prepare($sql);\n $stmt->bind_param('s', $value);\n if($stmt->execute() === false) {\n $this->addError($inputName, self::RULE_UNIQUE, $rule);\n } else {\n $result = $stmt->get_result()->fetch_all(); \n if(count($result) > 0) {\n $this->addError($inputName, self::RULE_UNIQUE, $rule);\n }\n }\n }\n }\n }\n return empty($this->errors);\n }", "public function isValidated()\n {\n if (empty($this->errors)) {\n return true;\n } else {\n return false;\n }\n }", "public function isValid(): bool\n {\n return $this->getErrors()->count() === 0;\n }", "public function isValid()\n {\n return $this->isBound() ? count($this->errors)==0 : false; // TESTME\n }", "public function validate(): bool;", "public function validate(): bool;", "public function validate(): bool;", "public function validate(): bool;", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "function isValid() {\n return $this->validator ? $this->validator->isValid($this->value) : true;\n }", "public function validate(): bool\n {\n return true;\n }", "public function validate(): bool\n {\n return true;\n }", "public function validate(): bool\n {\n return true;\n }", "public function validate(): bool\n {\n return true;\n }", "public function validate(): bool\n {\n return true;\n }", "public function validation()\n {\n $this->validate(new PresenceOf(\n array(\n \"field\" => \"timestamp\",\n \"message\" => \"The field timestamp is required\"\n )\n ));\n\n $this->validate(new Regex(\n array(\n \"field\" => \"ip\",\n \"pattern\" => '/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\z/',\n \"message\" => \"The email must be unique\"\n )\n ));\n\n $this->validate(new Numericality(\n array(\n \"field\" => \"load_threshold\",\n \"message\" => \"The load threshold must be numeric\"\n )\n ));\n\n return $this->validationHasFailed() != true;\n }", "public function isValid() : bool {\n\t\t\treturn $this->error == 0;\n\t\t}", "protected function isValid()\r\n\t{\r\n\t\treturn $this->isValid;\r\n\t}", "public function valid()\n {\n\n if ($this->container['rule_id'] === null) {\n return false;\n }\n if ($this->container['rule_name'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n if ($this->container['execution_source'] === null) {\n return false;\n }\n return true;\n }", "public function isValid()\n\t{\n\t\treturn true;\n\t}", "public function isValid() {\n return $this->getValidation()->isValidField($this->getName());\n }", "public function getIsValid()\n {\n return $this->isValid;\n }", "public function isValid() {\n\t\ttry {\n\t\t\t$this->validate();\n\t\t\treturn true;\n\t\t} catch (ValidationException $e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public function passes()\n {\n if (!($this->validator instanceof \\Illuminate\\Validation\\Validator)) {\n throw new LogicException('No model was set. Nothing to validate.');\n }\n\n return $this->getValidator()->passes();\n }", "public function validate(): bool\n {\n foreach ($this->rules() as $attribute => $rules) {\n\n $value = $this->{$attribute};\n //We loop twice because some rules have array rules within them\n foreach ($rules as $rule) {\n /* If $rule is a string take the $rule and assign it to to $ruleName*/\n $ruleName = $rule;\n /* If $rule is not a string i.e an array, take the first element of the array i.e.\n *$rule[0] and assign it to to $ruleName\n */\n if(!is_string($rule))\n {\n $ruleName = $rule[0];\n }\n /*\n * If any attribute has a rule required and no value exists, add an error to the\n * errors array and pass the attribute and the rule as parameters to the addErrors function\n */\n if($ruleName === self::RULE_REQUIRED && !$value)\n {\n $this->addErrors($attribute, self::RULE_REQUIRED);\n }\n /*\n * If any attribute has a rule email and the value does not pass as valid email, add to the\n * errors array and pass the attribute and the rule as parameters to the addErrors function\n */\n\n if($ruleName === self::RULE_EMAIL && !filter_var($value, FILTER_VALIDATE_EMAIL))\n {\n $this->addErrors($attribute, self::RULE_EMAIL);\n }\n\n /*\n * If any attribute has a rule match and the value does not match with the value passed\n * in the rule array where this rule is found i.e $this->{$rule['match']} which corresponds\n * to password, so in short, $this->password, if they don't match add error to the\n * errors array and pass the attribute and the rule as parameters to the addErrors function\n */\n\n if($ruleName === self::RULE_MATCH && $value !== $this->{$rule['match']})\n {\n $this->addErrors($attribute, self::RULE_MATCH);\n }\n\n /*\n * This control structure if the user input is unique to the database. If it is not,\n * it adds an error to the errors array and pass the attribute and\n * the rule as parameters to the addErrors function\n * The model class that returns the unique set of rules also returns the tableName and the attributes\n * (column names in db) specific to that model class\n * The unique rule is rendered differently to cater for various classes, an array with the unique\n * rule passed along with the self::class that calls the active model class which extends to model\n * and attr is also passed along withe corresponding attribute (this is optional)\n *\n */\n\n if($ruleName === self::RULE_UNIQUE)\n {\n /*\n * Here, the active class is gotten along with the tablename and attribute which we\n * call uniqueAttr specific to the active model class\n */\n $className = $rule['class'];\n $tableName = $className::tableName();\n $uniqueAttr = $rule['attr'] ?? $attribute;\n\n /*\n * We prepare a statement that selects all from the tablename gotten where uniqueAttr\n * is typed param :attr (to avoid sql injection)\n * :attr is bound to $value which is the user input (remember data was loaded before\n * passing it through the validate() function) and executed and object of the result is fetched\n */\n\n $statement = Application::$app->db->prepare(\"SELECT * FROM $tableName WHERE $uniqueAttr = :attr\");\n $statement->bindValue(\":attr\", $value);\n $statement->execute();\n $record = $statement->fetchObject();\n\n /*\n * If a record exists, add an Error, if not it returns true\n */\n if($record)\n {\n $this->addErrors($uniqueAttr, self::RULE_UNIQUE);\n }\n\n }\n /*\n * Added a rule valid start date and valid end date that check if the start date is before\n * the current date and if the end date is before the start date of the project\n * If the rule name has valid_start_date and the value is before (here we use < )\n * the date of today which is passed as a corresponding value of start_date in the\n * RULE_VALID_START_DATE array that is passed. Then add an error for the corresponding\n * attribute and rule passing them as arguments in the addErrors function\n */\n\n if ($ruleName === self::RULE_VALID_START_DATE && $value < $rule['start_date'])\n {\n $this->addErrors('start_date', self::RULE_VALID_START_DATE);\n }\n\n /*\n * If the attribute has rule valid_end_date and the value is before or equal to the\n * day of the project start date. Then add an error for the corresponding\n * attribute and rule passing them as arguments in the addErrors function\n */\n\n if ($ruleName === self::RULE_VALID_END_DATE && $value <= $this->{$rule['end_date']})\n {\n $this->addErrors('end_date', self::RULE_VALID_END_DATE);\n }\n\n }\n }\n /*\n * If all the above conditions are met it means validation passed for the data that was passed\n * to the validate function. If so it means the errors array is empty\n * Then if validate passed, return if empty errors array, as true. If errors array is not empty\n * validate function returns false\n */\n return empty($this->errors);\n\n }", "function validate()\n {\n if ( $this->options['required'] && $this->value == '' )\n {\n $this->validationError = $this->label . ' is required!';\n fWarn::getInstance()->add('Validation failed for ' . $this->name . ', field is required.');\n return false;\n }\n if ( isset($this->regex) )\n {\n $return = preg_match($this->regex, $this->value);\n if ( !$return )\n $this->fDebug->add('Could not validate \"' . $this->value . '\" against \"' . $this->regex . '\"', 1);\n return $return;\n }\n return true;\n }", "private function isValid(){\r\n $this->validator->required('title', 'Image Title Is Required');\r\n $this->validator->required('slideHint', 'Slide Name Is Required');\r\n $this->validator->image('image');\r\n return $this->validator->passes();\r\n }", "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n \"field\" => \"email\",\n \"required\" => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n \"field\" => \"email\",\n \"required\" => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n \"field\" => \"email\",\n \"required\" => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "public function validation()\n {\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validation()\n {\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validation()\n {\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validation()\n {\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validation()\n {\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "public function isValid() {\r\n $this->errors->clean();\r\n $this->validate();\r\n\r\n return $this->errors->isEmpty();\r\n }", "public function validate(): bool\r\n {\r\n array_walk(\r\n $this->rules,\r\n function ($rules, $field) {\r\n // $all_rules = array_merge(array_keys($rules), array_values($rules));\r\n try {\r\n // if (!isset($this->data[$field])) {\r\n // throw new FieldDoesNotExist(\"$field is requied\");\r\n // }\r\n\r\n // if (empty($this->data($field))) {\r\n // throw new FieldEmpty(\"$field can't be empty\");\r\n // }\r\n\r\n $this->validateField($field);\r\n } catch (FieldDoesNotExist | FieldEmpty $e) {\r\n // if (in_array(\"nullable\", $all_rules)) {\r\n // unset($this->data[$field]);\r\n // return;\r\n // }\r\n $this->addError($field, str_replace(\"_\", \" \", $e->getMessage()));\r\n }\r\n }\r\n );\r\n\r\n $this->valid = !boolval(count($this->getErrors()));\r\n\r\n $this->validated = true;\r\n\r\n return $this->valid;\r\n }", "private function isRuleChecked(): bool\n {\n $res = true;\n foreach ($this->getRules() as $method => $rule) {\n if (is_array($rule)) {\n foreach ($rule as $r) {\n $res = $res && $this->checkRule($method, $r);\n }\n } else {\n $res = $res && $this->checkRule($method, $rule);\n }\n }\n return $res;\n }", "public function isValid() {\n\t\treturn $this->is_valid;\n\t}", "public function validate(): bool\n {\n $result = true;\n foreach ($this->validation_data as $rule_name => $verifiable_data) {\n if (array_key_exists($rule_name, self::$know_validated_rule)) {\n if (class_exists(self::$know_validated_rule[$rule_name])) {\n /** @var $class BaseRule */\n $class = new self::$know_validated_rule[$rule_name](array_pop($verifiable_data));\n if (!$class->check($this->object, $verifiable_data)) {\n $result = false;\n $this->errors[$rule_name] = $class->getErrors();\n }\n } else {\n throw new ValidationClassNotFoundException(\"Class \". self::$know_validated_rule[$rule_name] . \" not found!\");\n }\n } else {\n throw new ValidationRuleNotFoundException(\"Rule '$rule_name' not found!\");\n }\n }\n return $result;\n }", "public function isValid()\n\t{\n\t\treturn $this->valid;\n\t}", "public function isValid()\n\t{\n\t\treturn $this->valid;\n\t}", "public function validateRules();", "public function getIsValid(){\r\n\t\treturn $this->isValid;\r\n\t}", "public function isValid() : bool {\n\t\t\treturn $this->isValid;\n\t\t}", "public function is_valid()\n\t{\n\t\tif (!array_key_exists('errors', $this->vars)) $this->validate();\n\t\treturn (!count($this->get_var('errors', array())));\n\t}", "public function isValid() {\n return $this->isAccepted();\n }", "protected function rule()\n {\n if (!key_exists('value', $this->admittedFields['Mobile']) && !key_exists('value', $this->admittedFields['Phone'])) {\n $this->setErrorMsg('At least mobile or phone number are required');\n\n return false;\n }\n\n return true;\n }", "public function validate(){\r\n\t\t// make validation\r\n\t\t$res = Validator::validate( $this->value, $this->constraints );\r\n\t\tif ( !$res )\r\n\t\t\t$this->has_error = true;\r\n\r\n\t\treturn $res;\r\n\t}", "public function validate()\n {\n return true;\n }", "public function validate()\n {\n return true;\n }", "public function validate()\n {\n return true;\n }", "public function validate()\n {\n return true;\n }", "public function validate()\n {\n return true;\n }", "public function valid() : bool\n {\n return $this->errors() ? false : true;\n }", "public function validate()\r\n\t\t{\r\n\t\t\t\r\n\t\t\treturn true;\r\n\r\n\t\t}" ]
[ "0.8135265", "0.7998094", "0.7949586", "0.79207087", "0.7848346", "0.7822134", "0.7803216", "0.7624212", "0.7482484", "0.74785715", "0.7434167", "0.7372512", "0.7300044", "0.7276218", "0.7268265", "0.721696", "0.72142994", "0.7207063", "0.7206368", "0.7205338", "0.7192363", "0.71921784", "0.7180164", "0.715784", "0.7120054", "0.71140933", "0.7094975", "0.7079584", "0.7064947", "0.7064079", "0.7048906", "0.7040511", "0.70378214", "0.7023095", "0.6998057", "0.69895273", "0.6982949", "0.69582605", "0.6952997", "0.69371706", "0.6932453", "0.6932453", "0.6932453", "0.6932453", "0.69103324", "0.69103324", "0.6909498", "0.6909498", "0.6909498", "0.6909498", "0.6909498", "0.6909192", "0.6906191", "0.69051605", "0.69051605", "0.69051605", "0.69051605", "0.69051605", "0.68881285", "0.685342", "0.6826829", "0.68238884", "0.6818192", "0.6815093", "0.6812909", "0.6799436", "0.67952085", "0.679295", "0.6787502", "0.67847204", "0.67778784", "0.67778784", "0.67778784", "0.6777322", "0.6777322", "0.6777322", "0.6777322", "0.6777322", "0.67763066", "0.67763066", "0.677537", "0.6775199", "0.67742115", "0.6766578", "0.6763116", "0.67493236", "0.67493236", "0.6749102", "0.6742035", "0.67103934", "0.6708182", "0.6708026", "0.6707769", "0.67022556", "0.6702222", "0.6702222", "0.6702222", "0.6702222", "0.6702222", "0.66955185", "0.668894" ]
0.0
-1
Get the validation error message.
public function message() { return $this->message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error messagess.';\n }", "public function getErrorMessage()\n {\n return $this->error_message;\n }", "public function getErrorMessage()\r\n {\r\n return $this->error_message;\r\n }", "public function get_error_message() {\n\t\treturn $this->error_message;\n\t}", "public function message()\n {\n return $this->errorText;\n }", "public function getMessage()\n {\n return $this->_error;\n }", "function getErrorMessage()\n\t{\n\t\t// Ah, we have a custom message, use that.\n\t\tif ($this->errorMessage) {\n\t\t\treturn $this->errorMessage;\n\t\t}\n\t\t\n\t\t// Field is required, but empty, so return a fill in this form message.\n\t\telse if ($this->required && $this->value == false) \n\t\t\treturn sprintf($this->getTranslationString(\"Please fill in the required '%s' field.\"), $this->label);\n\t\n\t\t// Have we got an empty error message? Create a default one\n\t\telse if (!$this->errorMessage) {\n\t\t\treturn sprintf($this->getTranslationString(\"There's a problem with value for '%s'.\"), $this->label);\n\t\t} \n\t}", "public function message()\n {\n return __(\"validation.{$this->error}\", ['attribute' => 'nomor sampel']);\n }", "public function getErrorMessage()\n {\n return $this->singleValue('//i:errorMessage');\n }", "public function getMessage()\n {\n return self::getMessageForError($this->value);\n }", "public function getMessage() {\n\n // Remove the 'validate_' prefix that GUMP adds to all broken rules.\n $key = str_replace('validate_', '', $this->rule);\n\n // Get the message template for this rule.\n $template = self::$messages[$key];\n\n // Inject our field label, and if this field has a parameter, inject that too.\n $message = preg_replace(array(\"/(%s)/\", \"/(%s)/\"), array($this->field->getLabel(), $this->parameter), $template, 1);\n\n // Return the message.\n return $message;\n }", "protected function getErrorMessage(): string\n\t{\n\t\tif($this->input !== null)\n\t\t{\n\t\t\t$errorMessage = $this->input->getErrorMessage();\n\t\t}\n\n\t\treturn $errorMessage ?? $this->defaultErrorMessage;\n\t}", "public function getErrorMessage()\n {\n // then re-apply the error code:\n if(($this->error_code !== 0) && empty($this->error_msg))\n {\n $this->setError($this->error_code);\n }\n return $this->error_msg;\n }", "public function message()\n {\n return $this->getError();\n }", "function get_error_message() {\n return $this->error_msg;\n }", "public function getErrorMessage() {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n\t{\n\t\treturn $this->errorMessage;\n\t}", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function message()\n {\n if ($this->error['type'] === 'custom') {\n return $this->error['message'];\n }\n\n $messages = null;\n\n if ($this->request) {\n $messages = $this->request->messages();\n }\n\n $message = $messages[\"{$this->error['attribute']}.check_file_{$this->error['type']}\"] ??\n trans(\"validation.check_file_{$this->error['type']}\");\n\n [$keys, $values] = Arr::divide($this->error['payload'] ?? []);\n\n $keys = \\array_map(function (string $key) {\n return \":{$key}\";\n }, $keys);\n\n return \\str_replace($keys, $values, $message);\n }", "public function message()\n {\n return $this->errorMsg;\n }", "public function getMessage()\n {\n return isset($this->data->failure_msg) ? $this->data->failure_msg : '';\n }", "function getMessage()\n {\n return ($this->error_message_prefix . $this->message);\n }", "public function message()\n {\n return $this->validationFailures;\n }", "public function message()\n {\n return $this->error_message;\n }", "public function getErrorMessage() : string\n {\n return $this->errorMessage;\n }", "public function message()\n {\n return $this->errorMessage;\n }", "public function message()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n\t{\n\t\treturn $this->_errorMessage;\n\t}", "public function getErrorMessage()\n {\n return $this->applyTemplate();\n }", "public function message()\n {\n return 'Invalid message mark up.';\n }", "public function getErrorMessage()\n {\n $errorMessages = $this->getErrorMessages();\n if (empty($errorMessages)) {\n return false;\n }\n return $errorMessages[0];\n }", "public function getErrMsg() {\n return $this->get(self::ERR_MSG);\n }", "public function getErrorMessage();", "public function getErrorMessage();", "public function getErrMsg()\n {\n return $this->get(self::ERRMSG);\n }", "public function getMessage(): string\n\t{\n\t\treturn $this->err->getMessage();\n\t}", "public function getErrorMessage(): string\n {\n if ($this->getSuccess()) {\n return '';\n }\n\n return (string) $this->errorMessage;\n }", "public function message(): string\n {\n return $this->errorMessage;\n }", "public function getErrorMessage() {\n return '';\n }", "public function errorMessage()\n {\n $errorMsg = '<strong>' . $this->getMessage() . \"</strong><br />\\n\";\n return $errorMsg;\n }", "public function getErrorMessage()\n {\n return $this->validator->errors()->all();\n }", "public function getMsgError() {\r\n return $this->msg_error;\r\n }", "public function message(): string\n {\n return $this->getValidationMessage(Str::snake(class_basename($this)), __('The :attribute size cannot exceed :max_size.', ['max_size' => $this->bytesToHuman($this->max_size)]));\n }", "protected function getMessage(\\Phalcon\\Validation $validator)\n {\n // get message\n $message = $this->getOption('message');\n if (! $message) {\n $message = $this->message;\n }\n return $message;\n }", "public function getMessage()\n {\n // check if any error message available.\n if (!is_null($this->_message)) {\n // return the message\n return $this->lang->line($this->_message) ? $this->lang->line($this->_message) : $this->_message;\n }\n\n // return nothing if previous condition does not apply\n return NULL;\n }", "public function errorMessage() {\n\t\t\treturn $this->strError; \n\t\t}", "public final function getLastErrorMsg() {\n return $this->lastErrorMsg;\n }", "public function getRuleError()\n {\n if(!isset($this->rules_objects_list[$this->table_name]))\n return '';\n\n //current table rules object\n $l_target = $this->rules_objects_list[$this->table_name];\n\n if($l_target->rules_error_flag)\n return $l_target->rules_error_message;\n\n return '';\n }", "public function message()\n {\n return \"Ошибочное значение\";\n }", "public function getErrorMessage(): string\n {\n static $errors = [\n UPLOAD_ERR_OK => 'No error found.',\n UPLOAD_ERR_INI_SIZE => 'The file \"%s\" exceeds your upload_max_filesize ini directive (limit is %d kb).',\n UPLOAD_ERR_FORM_SIZE => 'The file \"%s\" exceeds the upload limit defined in your form.',\n UPLOAD_ERR_PARTIAL => 'The file \"%s\" was only partially uploaded.',\n UPLOAD_ERR_NO_FILE => 'No file was uploaded.',\n UPLOAD_ERR_CANT_WRITE => 'The file \"%s\" could not be written on disk.',\n UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.',\n UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.',\n ];\n\n $errorCode = $this->error;\n $maxFilesize = $errorCode === UPLOAD_ERR_INI_SIZE ? self::getMaxFilesize() / 1024 : 0;\n $message = $errors[$errorCode] ?? 'The file \"%s\" was not uploaded due to an unknown error.';\n\n return sprintf($message, $this->getOriginalName(), $maxFilesize);\n }", "public function getErrMsg() {\n $errMsg = 'Error on line ' . $this->getLine() . ' in ' . $this->getFile()\n . '<br><b>Message: ' . $this->getMessage()\n . '</b><br>Exception Type: NoFormsFoundException';\n return $errMsg;\n }", "public function getErrorMessage(): ?string {\n\t\t// 1. a string with an error message (e.g. `{\"error\":{\"code\":404,\"errors\":\"invalid token\"},\"success\":false}`)\n\t\t// 2. an object (e.g. `{\"error\":{\"code\":120,\"errors\":{\"name\":\"payload\",\"reason\":\"required\"}},\"success\":false}`)\n\t\t//\n\t\t// Below is an attempt to make sense of such craziness.\n\t\t$error = $this->getValue('[error][errors]');\n\t\tif ($error === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!is_array($error)) {\n\t\t\t$error = [\n\t\t\t\t'name' => 'generic',\n\t\t\t\t'reason' => $error,\n\t\t\t];\n\t\t}\n\n\t\treturn sprintf(\n\t\t\t'name=%s, reason=%s',\n\t\t\t(array_key_exists('name', $error) ? $error['name'] : 'missing'),\n\t\t\t(array_key_exists('reason', $error) ? $error['reason'] : 'missing')\n\t\t);\n\t}", "function getErrorMsg() {\n\t\treturn $this->errorMsg;\n\t}", "public function errorMessage()\n\t{\n\t\treturn $this->_source->errorMessage();\n\t}", "public function getMessage(): string\n {\n return $this->requireString('message');\n }", "public function getErrorMessage($input) {\n\t\treturn $input . ' is invalid.';\n\t}", "public function message()\n {\n return 'Invalid phone number format.';\n }", "public function getErrorMessage() {\n\t\tswitch( $this->error ) {\n\t\t\tcase TAN_NOT_FOUND : return \"Die TAN wurde nicht gefunden\";\n case REGISTRATION_USER_EXISTS : return \"Dieser Nutzer Existiert bereits\";\n\t\t}\n\t}", "public function message()\n {\n return $this->doorman->error;\n }", "public function message()\n {\n return trans('validation.custom.phone.error');\n }", "public function message()\n {\n return trans('validation.BTCValidation');\n //return trans('validation.uppercase');\n }", "public function getMessage(): string\n {\n return \"The $this->name field is not a valid date.\";\n }", "public final function last_error_message()\n {\n return isset($this->error) ? $this->error['message'] : '';\n }", "public function getError(): string\n {\n return $this->Error;\n }", "public function getErrorMessage()\n {\n $error = $this->_checkoutSession->getErrorMessage();\n return $error;\n }", "function error() {\n return $this->error_message;\n }", "public function getError(){\n if (empty($this->getErrorCode())) {\n return null;\n }\n return $this->getErrorCode().': '.$this->getErrorMessage();\n }", "public function getError(): string\n {\n return $this->error;\n }", "public function getErrorMessage():? string\n {\n return $this->errorMessage;\n }", "public function publicErrorMessage()\n\t{\n\t\t$errorMsg = $this->getMessage().' is not a valid E-Mail address.';\n\t\treturn $errorMsg;\n\t}", "public function message()\n {\n switch ($this->errorType) {\n case self::ERROR_TYPE_NUMERIC:\n $msg = 'Điện thoại phải là chữ số';\n break;\n case self::ERROR_TYPE_LENGTH:\n $msg = 'Điện thoại phải có độ dài từ 10 hoặc 11 số';\n break;\n default:\n $msg = 'Số điện thoại không đúng định dạng';\n break;\n }\n return $msg;\n }", "protected function getErrorFlashMessage() {\n\t\treturn $this->translate('tx_placements.error'.'.organization.'. $this->actionMethodName);\n\t }", "public function getFailedMessage()\n {\n if (array_key_exists(\"failedMessage\", $this->_propDict)) {\n return $this->_propDict[\"failedMessage\"];\n } else {\n return null;\n }\n }", "public function errorMessage() { return $this->errorMessage; }", "public function getErrorMessage()\n {\n return null;\n }", "public function errorMessage()\n {\n return $this->provider->errorMessage;\n }", "public function errorMessage()\n {\n return $this->error;\n }", "function errorMsg() {\r\n return \r\n $this->resultError;\r\n }", "public function message()\n {\n return 'Recaptcha validation failed.';\n }", "public function messages()\n {\n return VALIDATION_MESSAGE;\n }", "public function messages()\n {\n return VALIDATION_MESSAGE;\n }", "public function getValidationErrorMessages() {}", "public static function message()\n {\n return __('validation.translate_required');\n }", "public function getError() : string\r\n {\r\n return $this->strError;\r\n }", "public function message()\n {\n return 'The Phone Number does not match the expected format';\n }", "public function message()\n {\n return 'O Titulo de eleitor digitado é invalido';\n }", "public function getErrorText(){\n return $this->error;\n }", "public function getValidatedMessage(){\n $valid = $this->getIsValid();\n if(!is_null($valid)){\n if($valid === false) $key = 'error';\n else $key = 'success';\n return \"<p class=\\\"form_{$key}\\\">{$this->validatedMessage[$key]}</p>\";\n }\n return '';\n }", "public function message()\n {\n return 'Errores en plantilla<li>'.join('</li><li>',$this->invalid);\n }" ]
[ "0.8368853", "0.8368853", "0.8368853", "0.8368853", "0.8368853", "0.8368853", "0.8207248", "0.8094182", "0.8061137", "0.80309856", "0.8023962", "0.79981095", "0.7994271", "0.79576373", "0.7955562", "0.7948321", "0.7938317", "0.7914095", "0.78989285", "0.78862643", "0.78477675", "0.78278995", "0.7820734", "0.78084075", "0.78084075", "0.78084075", "0.78084075", "0.78084075", "0.78084075", "0.78084075", "0.78047746", "0.7791322", "0.777954", "0.77778727", "0.77716756", "0.77658075", "0.7762871", "0.7700995", "0.7700995", "0.7690562", "0.76759744", "0.7670985", "0.76627505", "0.7611973", "0.7593284", "0.7593284", "0.7588579", "0.75603616", "0.75542986", "0.75334644", "0.7519062", "0.7456365", "0.74313736", "0.7404993", "0.73731256", "0.73456687", "0.73453265", "0.7322456", "0.73109883", "0.73097974", "0.73096555", "0.7306417", "0.7298058", "0.7262625", "0.7258779", "0.7251916", "0.7245762", "0.7235462", "0.7227823", "0.7226286", "0.72256136", "0.7219457", "0.72138363", "0.72109324", "0.7205099", "0.7190278", "0.71763974", "0.7174699", "0.7172004", "0.7169085", "0.7161534", "0.71573865", "0.7155334", "0.7152703", "0.7149651", "0.71428394", "0.7142287", "0.7136937", "0.71314335", "0.71309406", "0.7130864", "0.71253085", "0.71253085", "0.71201915", "0.7118912", "0.71098405", "0.71092737", "0.71021503", "0.70993507", "0.7079352", "0.70751965" ]
0.0
-1
Creates exception for a given path
public static function fromPath(string $path, ?Throwable $previous = null): FileNotFoundException { $message = sprintf('File not found: %s', $path); return new static($message, $path, $previous); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function throwUnableToCreate()\n {\n throw new FilesystemException(\"Unable to create the file '{$this->path}'. A directory with the same path already exists.\");\n }", "public function __construct($path) {\n $this->physicalPath = realpath($path);\n \n if(!is_file($this->physicalPath)){\n throw new Exception($physicalPath.' is not a file');\n }\n \n $this->path_parts = pathinfo($this->physicalPath);\n }", "public function __construct($path)\n {\n // Check the path is valid\n if (!is_dir($path)) {\n throw new \\Exception('Path is not valid');\n }\n\n // Quick check to see if it's a Minecraft World\n if (!is_file($path.'level.dat')) {\n throw new \\Exception('Path does not point to a Minecraft world');\n }\n\n // Path is valid, so save it\n $this->path = $path;\n }", "public function __construct(string $path)\n {\n parent::__construct($path);\n\n if (!$this->validate()) {\n throw new FileNotValidException($path);\n }\n }", "public function __construct($path, \\Exception $previous = null) {\n\t\tparent::__construct('Directory ' . $path . ' does not exists', 0, $previous);\n\t}", "public function setupPath()\n {\n // if directory doesn't exist, create it\n if (!is_dir($this->path->getPath())) {\n $reporting = error_reporting();\n error_reporting(0);\n $created = mkdir($this->path->getPath(), 0755, true);\n error_reporting($reporting);\n if (!$created) {\n throw new Exception(sprintf('cant\\'t create directory: %s', $this->path->getPath()));\n }\n }\n if (!is_writable($this->path->getPath())) {\n throw new Exception(sprintf('no write permission for directory: %s', $this->path->getPath()));\n }\n }", "private function createDir($path)\n {\n if (!is_dir($path)) {\n if (!mkdir($path, self::CHMOD, true)) {\n throw new Exception('unable to create path '.$path);\n }\n }\n }", "public function create($path);", "public function __construct(string $path)\n {\n if (file_exists($path)) {\n $this->path = $path;\n $this->tmpDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid(\"\", true) . date(\"His\");\n $this->zipClass = new ZipArchive();\n $this->extract();\n } else {\n throw new Exception(\"The template \" . $path . \" was not found!\");\n }\n }", "protected static function createException($value, $message, $code, $propertyPath = null, array $constraints = array())\n {\n $exceptionClass = static::$exceptionClass;\n\n return new $exceptionClass($message, ReturnCode::INVALID_ARGUMENT, $propertyPath, $value, $constraints);\n }", "public function __construct(string $path, \\Exception $previous = null)\n {\n parent::__construct('Failed reading directory: ' . $path, 0, $previous);\n }", "private function validatePath($path)\n {\n if (!$this->isDirectory($path)) {\n throw new Exception('The view path must be a directory!');\n }\n if (!is_readable($path)) {\n throw new Exception('The view path must be a readable directory!');\n }\n }", "public function createPath(string $path): string;", "public static function createFromPath(string $path, string $open_mode = 'r', $context = null)\n {\n $args = [$path, $open_mode];\n if (null !== $context) {\n $args[] = false;\n $args[] = $context;\n }\n if (!$resource = @fopen(...$args)) {\n throw new Exception(sprintf('`%s`: failed to open stream: No such file or directory', $path));\n }\n $instance = new static($resource);\n $instance->should_close_stream = true;\n return $instance;\n }", "protected static function _createAsCannotSetValue(string $path): NestedAccessorException\n {\n return new NestedAccessorException(\n \"cannot set value by path '{$path}'\",\n NestedAccessorException::CANNOT_SET_VALUE,\n null,\n [\n 'path' => $path,\n ]\n );\n }", "public static function assertExists($path) {\n if (self::pathExists($path)) {\n return;\n }\n\n // Before we claim that the path doesn't exist, try to find a parent we\n // don't have \"+x\" on. If we find one, tailor the error message so we don't\n // say \"does not exist\" in cases where the path does exist, we just don't\n // have permission to test its existence.\n foreach (self::walkToRoot($path) as $parent) {\n if (!self::pathExists($parent)) {\n continue;\n }\n\n if (!is_dir($parent)) {\n continue;\n }\n\n if (phutil_is_windows()) {\n // Do nothing. On Windows, there's no obvious equivalent to the\n // check below because \"is_executable(...)\" always appears to return\n // \"false\" for any directory.\n } else if (!is_executable($parent)) {\n // On Linux, note that we don't need read permission (\"+r\") on parent\n // directories to determine that a path exists, only execute (\"+x\").\n throw new FilesystemException(\n $path,\n pht(\n 'Filesystem path \"%s\" can not be accessed because a parent '.\n 'directory (\"%s\") is not executable (the current process does '.\n 'not have \"+x\" permission).',\n $path,\n $parent));\n }\n }\n\n throw new FilesystemException(\n $path,\n pht(\n 'Filesystem path \"%s\" does not exist.',\n $path));\n }", "public static function pathExists($path)\n {\n if (!file_exists($path)) {\n throw new \\InvalidArgumentException(sprintf(Resources::INVALID_PATH_MSG, $path));\n }\n }", "public function __construct($file_path) {\n\t\t$file_path = self::standardizePath($file_path);\n\t\tif (!self::exists($file_path)) {\n\t\t\tthrow new \\Exception(\"File does not exist: \\\"$file_path\\\"\");\n\t\t}\n\t\t$this->path = realpath($file_path);\n\t}", "protected static function _createAsCannotAppendValue(string $path): NestedAccessorException\n {\n return new NestedAccessorException(\n \"cannot append value by path '{$path}'\",\n NestedAccessorException::CANNOT_APPEND_VALUE,\n null,\n [\n 'path' => $path,\n ]\n );\n }", "public function testExceptionConfiFileNotFound() {\r\n $this->model->create($this->post());\r\n }", "protected function createPathIfNeeded() {}", "public function __construct(string $path)\n {\n if (! is_file($path)) {\n throw new LogicException(\"No file exists at: {$path}\");\n }\n\n $this->path = $path;\n $this->content = file_get_contents($path);\n $this->parse();\n }", "public function testCreateInvalidFile()\n {\n new MaterializedResource(new GenericResource('file_not_found.txt'), '/probably/not/a/directory');\n }", "public function it_cant_create_invalid()\n {\n $this->shouldThrow('\\Aspire\\DIC\\Exception\\NotFoundException')->duringGet('SomeClassThatDoesNotExist');\n }", "public function testInvalidArgumentExceptionIsThrownIfDirectoryIsNotReadableWhenCreatingProcedureLoader()\n {\n $this->setExpectedException('\\InvalidArgumentException');\n\n $procedureFactory = $this->getProcedureFactory();\n\n $procedureLoaderFactory = $this->getProcedureLoaderFactory($procedureFactory);\n $procedureLoaderFactory->createProcedureLoader('invalid/directory');\n }", "public static function path($path)\n {\n if (!is_string($path)) {\n throw new Exception('Wrong path: ' . print_r($path, true));\n }\n $path = (string) $path;\n // If path setted like this \"someview\" then\n // We need add default folder path and extension .php\n if (!self::isHaveExtension($path)) {\n $path = self::getDefaultFolder() . $path . '.php';\n }\n return $path;\n }", "public function __construct($path)\n {\n if (!is_file($path)) {\n throw new \\Exception(\n 'Image *' . ($path) . '* is not a valid file.'\n );\n }\n $this->_path = $path;\n $this->_loadResource();\n }", "public function __construct($path)\n {\n if (!is_readable($path)) {\n throw new InvalidArgumentException(\n \"Path {$path} does not exist or is not readable\"\n );\n }\n\n $this->path = $path;\n }", "public function setFileToSignFromPath($path)\n {\n if (!file_exists($path)) {\n throw new \\Exception(\"The provided file to be signed was not found\");\n }\n\n $this->fileToSignPath = $path;\n }", "public function setFileToSignFromPath($path)\n {\n if (!file_exists($path)) {\n throw new \\Exception(\"The provided file to be signed was not found\");\n }\n\n $this->fileToSignPath = $path;\n }", "public function createPath($path)\n {\n $absolutePath = $this->getAbsolutePath($path);\n if (!file_exists($absolutePath)) {\n // FIXME Check return value.\n FileHelper::createDirectory($absolutePath);\n } elseif (!is_dir($absolutePath)) {\n throw new InvalidParamException($path.' is a file, cannot create folder with the same name.');\n }\n\n return $absolutePath;\n }", "public function __construct($path){\n\t\t$this->path = $path;\n\t\tif(!file_exists($path)){\n\t\t\t$this->createFile($path);\n\t\t}\n\t}", "private function validatePath()\n {\n $locator = new FileLocator();\n $locator->locate($this->path); // throws exception on failure\n }", "public function testException()\n {\n $file = ROOT . 'dir' . DS . 'notWritableFile';\n try {\n throw new NotWritableException(null, 0, null, $file);\n } catch (NotWritableException $e) {\n $this->assertSame('File or directory `dir/notWritableFile` is not writable', $e->getMessage());\n $this->assertSame($file, $e->getFilePath());\n }\n\n try {\n throw new NotWritableException();\n } catch (NotWritableException $e) {\n $this->assertSame('File or directory is not writable', $e->getMessage());\n $this->assertNull($e->getFilePath());\n }\n }", "public static function checkFileExistence($path , $result){\n if(!$result){\n throw new Exception('Unable to locate message file('.$path.').');\n }\n }", "public function __construct( $path )\n {\n if( !is_string( $path ) )\n {\n throw new RequestException( 'Invalid format. Failed to parse mongrel request path' );\n }\n \n $this->path = $path;\n }", "public function testCreatedException()\n {\n $this->expectException(DomainException::class);\n County::create('County One',0, 200);\n }", "public function __construct($path) {\n if ('' === $path) {\n $this->path= [];\n } else if (1 === strspn((string)$path, '/')) {\n $this->path= [];\n foreach (explode('/', substr($path, 1)) as $token) {\n $this->path[$token]= $this->address($token);\n }\n } else {\n throw new IllegalArgumentException('Malformed path '.$path.', must either be empty or start with \"/\"');\n }\n }", "public function assertExists($path);", "private function validateCachePath($path)\n {\n if (!$this->isDirectory($path)) {\n throw new Exception('The cache path must be a directory!');\n }\n if (!is_readable($path)) {\n throw new Exception('The cache path must be a readable directory!');\n }\n if (!is_writable($path)) {\n throw new Exception('The cache path must be a writable directory!');\n }\n }", "private static function load_error($path) {\n $error_code = $path[0];\n unset($path[\"path\"]);\n unset($path[0]);\n Loader::error($error_code, array_values($path));\n }", "public static function assertNotExists($path) {\n if (file_exists($path) || is_link($path)) {\n throw new FilesystemException(\n $path,\n pht(\"Path '%s' already exists!\", $path));\n }\n }", "private function createDir($path)\n {\n if (!is_dir($path)) {\n $success = mkdir($path, 0775, true);\n if (!$success) {\n throw new \\Exception(\"Cannot create folder {$path}. Check file system permissions.\");\n }\n }\n }", "function logExcepMessage($path,$message){\n\t\ttry{\n\t\n\t\t\t$dataStamp = date('Y-m-d g:i a');\n\t\t\t$file = fopen($path, \"a+\");\n\t\t\tif( $file == false ) \n\t\t\t\tdie( \"Error in opening file\" );\n\t\t\tfwrite( $file, \"$dataStamp: $message\\n\" );\n\t\t\tfclose( $file );\n\t\t}\n\t\tcatch(Exception $e){\n\t\t}\n\t}", "public function setLogPath($path){\n// if (!file_exists($path)){\n// touch($path);\n// }\n//\n// if (file_exists($path) && is_readable($path)){\n// $this->logpath = $path;\n// } else {\n// throw new Exception(\"Log file does not exist or cannot be read! ($path)\");\n// }\n }", "private function exceptionTraceArgsHelper(string $message): \\Exception\n {\n return new \\Exception($message);\n }", "protected static function _createAsCannotDeleteValue(string $path): NestedAccessorException\n {\n return new NestedAccessorException(\n \"cannot delete value by path '{$path}'\",\n NestedAccessorException::CANNOT_DELETE_VALUE,\n null,\n [\n 'path' => $path,\n ]\n );\n }", "public function testException()\n {\n throw new ThumbNotFoundException;\n }", "private function checkPath($path)\r\n {\r\n if (!file_exists($path)) {\r\n mkdir($path, 0777, true);\r\n }\r\n }", "public function testExceptionWithMessage()\n {\n throw new ThumbNotFoundException('Thumb not found!');\n }", "public static function createFile($path, $content) {\n if (is_file($path)) {\n return file_put_contents($path, $content);\n } else {\n throw new Visio\\Exception\\General('File \\'' . $path . '\\' is already exist!');\n }\n }", "public static function forRepositoryPath($path, Exception $cause = null)\n {\n return new static(sprintf(\n 'The repository path \"%s\" is not mapped.',\n $path\n ), 0, $cause);\n }", "public function test_it_should_throw_an_exception_on_invalid_url()\n {\n SourceFactory::create('unknown');\n }", "public static function createAsCannotSetValue(int $mode, string $path): NestedAccessorException\n {\n switch($mode) {\n case NestedAccessor::SET_MODE_SET:\n return static::_createAsCannotSetValue($path);\n case NestedAccessor::SET_MODE_APPEND:\n return static::_createAsCannotAppendValue($path);\n case NestedAccessor::SET_MODE_DELETE:\n return static::_createAsCannotDeleteValue($path);\n default:\n return static::_createAsUnknownSetMode($mode);\n }\n }", "public function test_SaveException_NoPath()\n {\n $this->setExpectedException('Q\\Exception', \"Unable to save setting: Path not specified.\");\n $config = new Config_Dir();\n $config->save();\n }", "function do_exception($line, $code = -1) {\n\tthrow new Exception(\"Error at line: {$line}\", $code);\n}", "public function registerModulesBadPathThrowsAnException(CliTester $I)\n {\n $I->wantToTest(\"Cli\\Console - registerModules() - bad path throws exception\");\n\n $console = new CliConsole(new DiFactoryDefault());\n\n $console->registerModules(\n [\n 'frontend' => [\n 'path' => dataDir('not-a-real-file.php'),\n 'className' => Module::class,\n ],\n ]\n );\n\n $I->expectThrowable(\n new Exception(\n \"Module definition path '\"\n . dataDir('not-a-real-file.php')\n . \"' doesn't exist\"\n ),\n function () use ($console) {\n $console->handle(\n [\n 'module' => 'frontend',\n 'task' => 'echo',\n ]\n );\n }\n );\n }", "private function make_path($path){\n\t\t\t// Test if path extist\n\t\t\tif(is_dir($path) || file_exists($path))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Create it\n\t\t\t\tmkdir($path, 0777, true);\n\t\t\t}\n\t}", "public function test_SetPathException_PathAlreadySet()\n {\n $this->setExpectedException('Q\\Exception', \"Unable to set 'a_path' to Config_Dir object: Config_Dir path '{$this->dir}' is already set.\");\n $config = new Config_Dir($this->dir);\n \n $config->setPath('a_path');\n }", "public function setSignatureFileFromPath($path)\n {\n if (!file_exists($path)) {\n throw new \\Exception(\"The provided signature file was not found\");\n }\n $this->signatureFilePath = $path;\n }", "public static function createAsCannotGetValue(string $path, int $count): NestedAccessorException\n {\n return new NestedAccessorException(\n \"cannot get value by path '{$path}'\",\n NestedAccessorException::CANNOT_GET_VALUE,\n null,\n [\n 'path' => $path,\n 'count' => $count,\n ]\n );\n }", "public static function from_path($path)\n\t\t{\n\t\t\t$model = get_called_class();\n\t\t\t$file = null;\n\n\t\t\t// If file_exists throws error, path is inaccessible\n\t\t\tif (!@file_exists($path)) {\n\t\t\t\t$path = \\System\\Composer::resolve($path);\n\t\t\t}\n\n\t\t\tif ($path) {\n\t\t\t\t$file = new $model(array(\n\t\t\t\t\t\"path\" => dirname($path),\n\t\t\t\t\t\"name\" => basename($path),\n\t\t\t\t\t\"keep\" => true\n\t\t\t\t));\n\t\t\t}\n\n\t\t\treturn $file;\n\t\t}", "public function testMigrateExceptionPathMissing() {\n $this->expectException(\\InvalidArgumentException::class);\n $this->expectExceptionMessage('You must declare the \"path\" to the source CSV file in your source settings.');\n new CSV([], $this->pluginId, $this->pluginDefinition, $this->migration);\n }", "public function testConstructNoExistingFile(): void\n {\n $this->expectException(NotReadableException::class);\n $this->getThumbCreatorInstance('noExistingFile.gif');\n }", "public function __construct ($file_path) {\n if (is_file($file_path)) {\n if ($this->valid_csv($file_path)) {\n try {\n if (!$this->file = fopen($file_path, \"r\")) {\n throw new Exception ('Failed to open file.');\n }\n } catch (Exception $e) {\n die (Utility::log ('ERROR', $e->getMessage()));\n }\n } else {\n die (Utility::log ('ERROR', 'Invalid file. Please specify a valid CSV file.'));\n }\n\n } else {\n die (Utility::log ('ERROR', 'File does not exist. Please specify a valid CSV file.'));\n }\n }", "public static function checkMessageExistence($message, $path ,$result){\n if(is_null($result[$message])){\n throw new Exception(\n 'Unable to locate message ('.$message.') in file('.$path.').');\n }\n }", "public function __construct($localPath)\n {\n if (!file_exists($localPath)) {\n throw new FilesystemException(sprintf(\n 'The file \"%s\" does not exist.',\n $localPath\n ));\n }\n\n $this->localPath = $localPath;\n }", "public function expectedErrorPath( string $path ) {\n\t\t$type = 'ERROR_PATH';\n\t\treturn compact( 'type', 'path' );\n\t}", "public function makeException()\n {\n $this->thrownException = ResponseException::create($this);\n }", "public function getException();", "public static function findFile($path)\n {\n if (file_exists($path)) {\n return $path;\n } else if (file_exists(Settings::get(\"TEMPLATE_DIR\") . \"/\" . $path)) {\n return Settings::get(\"TEMPLATE_DIR\") . \"/\" . $path;\n } else {\n throw new Exception(\"Il file $path non puo essere trovato\");\n }\n }", "public function __construct($pathToSourceFile = '', $mime = null)\n {\n if(!file_exists($pathToSourceFile))\n {\n throw new Exception(\"$pathToSourceFile does not exist\");\n }\n \n if(!$mime)\n {\n throw new Exception(\"Mime type '$mime' is not valid\");\n }\n\n $this->pathToSourceFile = $pathToSourceFile;\n $this->type = $mime;\n \n $this->createWorkingImageResource($pathToSourceFile);\n }", "public static function getInvalidFile()\n {\n return 'some/non/existing/file.txt';\n }", "public static function missinglogic($message)\n {\n return new static(\"Error exception:\\t\".$message);\n }", "public function __construct($path) {\n\t\tif (is_array($path)) {\n\t\t\tif (empty($path['tmp_name'])) {\n\t\t\t\tthrow new IoException('Passing via array must use $_FILES data');\n\t\t\t}\n\n\t\t\t$this->_data = $path;\n\t\t\t$path = $path['tmp_name'];\n\t\t}\n\n\t\tif (!file_exists($path)) {\n\t\t\tthrow new IoException(sprintf('%s does not exist', $path));\n\t\t}\n\n\t\t$this->_path = $path;\n\t}", "public function createExceptionLog($functionName,$msg,$shopName = 'common')\n {\n $dir = \\Yii::getAlias('@webroot').'/var/tophatter/exceptions/'.$functionName.'/'.$shopName;\n if (!file_exists($dir)){\n mkdir($dir,0775, true);\n }\n try\n {\n throw new \\Exception($msg);\n }catch(\\yii\\db\\Exception $e){\n $filenameOrig = $dir.'/'.time().'.txt';\n $handle = fopen($filenameOrig,'a');\n $msg = date('d-m-Y H:i:s').\"\\n\".$msg.\"\\n\".$e->getTraceAsString();\n fwrite($handle,$msg);\n fclose($handle);\n //$this->sendEmail($filenameOrig,$msg); \n }\n }", "public function exists(string $message = ''): self {\n if (file_exists(filename: $this->path)) {\n return $this;\n }\n\n throw new \\InvalidArgumentException(\n message: $message ?: \"Path '{$this->path}' does not belong to an existing file or directory.\",\n );\n }", "public function test_it_should_throw_an_exception_on_invalid_mapping()\n {\n SourceFactory::create('unknown://www.google.com');\n }", "public function checkPathExists($path);", "function my_assert_handler($file, $line, $code, $msg = '')\n{\n throw new Exception($msg, (int) $code);\n}", "public static function getInvalidFile(): string\n {\n return \"some/non/existing/file.txt\";\n }", "public function test_mod_lti_create_tool_type_nonexistant_file() {\n $this->expectException('moodle_exception');\n $type = mod_lti_external::create_tool_type($this->getExternalTestFileUrl('/doesntexist.xml'), '', '');\n }", "public static function factory($path)\r\n {\r\n /**\r\n * Zend_Path_Item\r\n */\r\n require_once 'Zend/Path/Item.php';\r\n return new Zend_Path_Item($path);\r\n }", "public function testThrowException()\n {\n throw new ImageNotReadableException();\n }", "public function testFileExceptions() {\n $xsl_service = new ExcelFileProcessorService();\n\n try {\n $xsl_service->processFile('foo');\n $this->fail();\n } catch (\\Exception $e) {\n $this->assertEquals($e->getMessage(), 'The file does not exists');\n }\n }", "public function testInvalidFileException() {\n\t\t$this->expectException('/Could not read file/');\n\t\tFixture::load('Foobar');\n\t}", "public function throwError();", "public function __construct($path);", "public function setPath($path) {\n /*** check if path is a directory ***/\n if (!is_dir($path)) {\n throw new Exception ('Invalid controller path: `' . $path . '`');\n }\n /*** set the path ***/\n $this->path = $path;\n }", "public function testRouteThrowsExecptionWithInvalidCallable()\n {\n $this->setExpectedException('InvalidArgumentException');\n $route = new \\Slim\\Route('/foo/bar', 'fnDoesNotExist');\n }", "function create_file($file_path, $content=''){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }", "public function testEmptyFactoryPathsException(): void\n {\n $this->expectException(InvalidArgumentException::class);\n\n new EntityFactoryManager($this->getEntityManager(), []);\n }", "public function create()\n {\n throw new Exception('Not yet implemented');\n }", "public function pathToUrl($path): string\n {\n $fullpath = $this->rootDir . $path;\n if (!file_exists($fullpath)) {\n throw new \\Exception(\"$fullpath does not exist\");\n }\n if (is_dir($fullpath)) {\n $path .= DIRECTORY_SEPARATOR;\n }\n return $this->rootUrl . str_replace($this->rootDir, '', $fullpath);\n }", "public function __construct($path, $checkPath = true, $fileSystemEncoding = null) {\n if (is_null($fileSystemEncoding)) {\n $fileSystemEncoding = Environment::getInstance()->getFileSystemEncoding();\n }\n $this->enc = $fileSystemEncoding;\n if ($checkPath && !is_file(iconv('utf-8', $fileSystemEncoding, $path))) {\n throw new FileNotFoundException($path);\n }\n $this->path_str = $path;\n parent::__construct(iconv('utf-8', $fileSystemEncoding, $path));\n }", "public function __construct($path)\n {\n parent::__construct(\"Ths file with the path $path wasn't found.\");\n }", "public function setDataFileFromPath($path)\n {\n if (!file_exists($path)) {\n throw new \\Exception(\"The provided data file was not found\");\n }\n\n $this->dataFilePath = $path;\n }", "public function testGenerateThrowsException()\n {\n $data = [];\n $generator = new PatternGenerator('Signifyd Case %1 has been created for order.', ['caseId']);\n $generator->generate($data);\n }", "public function should_throw_if_trying_to_build_on_non_existing_directory(): void\n {\n $this->expectException(\\InvalidArgumentException::class);\n new DirectorySnapshot(__DIR__ . '/not-existing');\n }", "public function testOfMethodThrowsException()\n {\n $this->expectException('InvalidArgumentException');\n\n $stub = new Grid($this->getContainer(), []);\n $stub->of('id');\n }" ]
[ "0.63827115", "0.6284773", "0.59956706", "0.5930216", "0.59106606", "0.5905774", "0.5880474", "0.5860604", "0.5848839", "0.57633686", "0.5693772", "0.55746543", "0.55712414", "0.55466336", "0.5541377", "0.55033475", "0.5492243", "0.5480359", "0.54693073", "0.5462967", "0.54628575", "0.5449861", "0.5446171", "0.5442626", "0.54402953", "0.54388326", "0.5437987", "0.543651", "0.5426162", "0.5426162", "0.5422713", "0.54199857", "0.54092145", "0.5403854", "0.5400017", "0.5396693", "0.5371273", "0.53636837", "0.5362756", "0.535809", "0.5345081", "0.52971107", "0.52964866", "0.5285909", "0.52784234", "0.5274227", "0.5255803", "0.5249169", "0.52485", "0.52380884", "0.5220962", "0.52046984", "0.51950383", "0.5183915", "0.5182969", "0.5148757", "0.5137912", "0.51238877", "0.5103351", "0.50880224", "0.5079254", "0.5079002", "0.50738937", "0.5073132", "0.506942", "0.5042863", "0.50412166", "0.5021195", "0.4995928", "0.49922347", "0.49873582", "0.49709892", "0.49671146", "0.49652943", "0.4959967", "0.49552888", "0.49499264", "0.49482548", "0.49463704", "0.49344411", "0.4932484", "0.4925984", "0.4917908", "0.49155903", "0.49134704", "0.49074677", "0.49032283", "0.48961726", "0.48936698", "0.489261", "0.4889823", "0.48853397", "0.48829332", "0.48719373", "0.48664305", "0.486053", "0.48568496", "0.48518735", "0.4850618", "0.48475203" ]
0.5294398
43
Gets the action of user workflow request. There are four actions: activate, register_activate, deactivate and delete
public function getRequestAction() { return $this->requestAction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function action()\n {\n return $this->reqaction;\n }", "public static function get_action() {\n\t\t$user_id = get_current_user_id();\n\t\treturn wpcom_vip_cache_get( \"action_${user_id}\", self::CACHE_GROUP );\n\t}", "public function getUserAction()\n\t{\n\t\treturn $this->userAction;\n\t}", "private function get_action() {\n\t\treturn $this->action;\n\t}", "private function get_action() {\n\t\treturn $this->action;\n\t}", "private function get_action() {\n\t\treturn $this->action;\n\t}", "public function get_action() {\r\n\t\treturn $this->action;\r\n\t}", "public function getUserAction(){\r\n\t\treturn $this->userAction;\r\n\t}", "public function get_action() {\n return $this->_action;\n }", "public function getAction()\n {\n return $this->m_action;\n }", "public function getCurrentAction() {\n\t\treturn $this->request->get('action','undefined');\n\t}", "public function get_action()\n {\n return $this->_action;\n }", "public function getAction() {\n \n return $this->action;\n \n }", "public function get_action() {\n\t\t$action\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t= (isset($_GET['action']))? preg_replace('@[^a-zA-Z0-9_]@', '', $_GET['action']) : $this->conf('default_action');\n\t\t\n\t\t# Return the Action\n\t\treturn $action;\n\t}", "function getAction () {return $this->getFieldValue ('action');}", "public function getAction() {\n\t\treturn $this->action;\n\t}", "public function getAction()\n {\n return $this->_action;\n }", "public function getAction()\n {\n return $this->_action;\n }", "public function getAction()\n\t{\n\t\treturn $this->_action;\n\t}", "public function action() {\n return $this->action;\n }", "public function getAction()\n\t{\n\t\treturn $this->action;\n\t}", "public function getAction()\n\t{\n\t\treturn $this->action;\n\t}", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "public function getAction() {\n return $this->action;\n }", "public function getAction() {\n return $this->action;\n }", "public function getAction() {\n return $this->action;\n }", "public function getAction() {\n return $this->action;\n }", "public function getAction() {\n return $this->action;\n }", "public function getAction()\n {\n return $this->action;\n }", "function getAction() {\r\n\t\t\r\n\t\treturn $this->mAction;\r\n\t}", "public function action(){\n return $this->action;\n }", "public function action()\n {\n return $this->getAttribute('action');\n }", "protected function getAction()\n {\n return self::ACTION_TYPE;\n }", "public function action()\n {\n if (!$this->action) {\n return null;\n }\n return $this->action->getValue();\n }", "public function getAction()\n {\n return $this->sAction;\n }", "public static function getAction() {\n\t return self::getPathParams()['action'];\n\t}", "public function getAction(): string\n {\n return $this->action;\n }", "public function getAction(): string\n {\n return $this->action;\n }", "public function getAction(){\r\n return $this->sAction;\r\n }", "public function Action()\n {\n return $this->action;\n }", "function ced_get_action($is) {\n\t\tif (isset($this->ced_actions[$is])) {\n\t\t\treturn $this->ced_actions[$is];\n\t\t}\n\t\treturn false;\n\t}", "protected function getAction(): string\n\t{\n\t\treturn $this->getActionInput() ?: $this->getDefaultAction($this->getNameInput());\n\t}", "public function getActionforACL() {\n\t \t$action = strtolower($this->getRequest()->getActionName()); \n\t\tif($action == \"add\" || $action == \"other\" || $action == \"processother\" || $action == \"processadd\" ) {\n\t\t\treturn ACTION_CREATE; \n\t\t}\n\t\tif($action == \"resetpassword\" || $action == \"inviteuser\"){\n\t\t\treturn ACTION_EDIT; \n\t\t}\n\t\tif($action == \"view\" || $action == \"picture\" || $action == \"processpicture\" || $action == \"uploadpicture\" || $action == \"croppicture\" || $action == \"changepassword\" || $action == \"processchangepassword\" || $action == \"changeusername\" || \n\t\t\t$action == \"processchangeusername\" || $action == \"changeemail\" || $action == \"processchangeemail\"){\n\t\t\treturn ACTION_VIEW;\n\t\t}\n\t\treturn parent::getActionforACL();\n }", "public function getAction() {\n return $this->_actionData;\n }", "public function getAction()\n {\n return $this->joUrl['ACTION'];\n }", "public function getAction()\n {\n if (array_key_exists(\"action\", $this->_propDict)) {\n if (is_a($this->_propDict[\"action\"], \"\\Beta\\Microsoft\\Graph\\Model\\RemoteAction\") || is_null($this->_propDict[\"action\"])) {\n return $this->_propDict[\"action\"];\n } else {\n $this->_propDict[\"action\"] = new RemoteAction($this->_propDict[\"action\"]);\n return $this->_propDict[\"action\"];\n }\n }\n return null;\n }", "public function getAction() : string{\n return $this->action;\n }", "protected function getAction()\n {\n return $this->actionFactory->create(\"wait_condition\");\n }", "public function getAction()\n {\n $value = $this->get(self::ACTION);\n return $value === null ? (integer)$value : $value;\n }", "public function getActionName() {\n\t\treturn $this->action;\n\t}", "function getAction()\n {\n if (isset($_GET['_px_action'])) {\n return $_GET['_px_action'];\n }\n return $_SERVER['QUERY_STRING'];\n }", "public function action()\n {\n return $this->_actions;\n }", "public function getActionName() {\n\n\t\treturn $this->_action;\n\t}", "public function getActionName()\n {\n return $this->_action;\n }", "public function action()\n {\n return isset($this->action) ? $this->action : false;\n }", "public function action()\n {\n return $this->action ?: self::ACTION_CAPTURE;\n }", "public function get_action() {\n\t\treturn $this->action ? $this->action : 'import';\n\t}", "public static final function getAction(\\phpbb\\request\\request $request) {\n\t\t$action = $request->variable(\"action\", AController::DEFAULT_ACTION);\n\t\treturn str_replace(\"-\", \"_\", strtolower($action));\n\t}", "public function getActionName(){\n\t\tif ( !isset($_GET['action'])){\n\t\t\treturn 'defaultAction';\n\t\t}\n\t\telse{\n\t\t\treturn $_GET['action'];\n\t\t}\n\t}", "public function getAction()\n\t{\n\t\t$action = strtolower($this->getParam(self::ACTION_PARAM));\n\t\tif ($action === '' or ! preg_match('/^[a-z0-9_-]+$/', $action)) {\n\t\t\treturn Controller::DEFAULT_ACTION;\n\t\t}\n\n\t\treturn $action;\n\t}", "private static function getAction() {\n $action = \"index\";\n if (isset($_GET['action']) && trim($_GET['action']) != \"\") $action = $_GET['action'];\n return $action;\n }", "public function getAction()\n {\n $match = $this->_getMatch();\n return $match[1];\n }", "public function get_action() {\n $this->process($this->urls);\n \n if (!empty($this->actionPath)) {\n return $this->actionPath;\n }\n return false;\n }", "public function get_actions() {\n $actions = parent::get_actions();\n $unassignaction = new deepsight_action_usersetuser_unassign($this->DB, 'usersetuserunassign');\n $unassignaction->endpoint = (strpos($this->endpoint, '?') !== false)\n ? $this->endpoint.'&m=action' : $this->endpoint.'?m=action';\n $unassignaction->condition = 'function(rowdata) { return (rowdata.canunassign == \\'0\\') ? false : true; }';\n array_unshift($actions, $unassignaction);\n return $actions;\n }", "public function getActionName()\n {\n return $this->__get(\"action_name\");\n }", "function determine_action() {\n\t\t$is_email = is_email( $this->email );\n\n\t\tif ( is_email( $this->new_email) && $is_email && $this->key_type == 'change_email' )\n\t\t\t$this->action = 'change_email';\n\t\telseif ( $this->key_type == 'opt_in' && $is_email )\n\t\t\t$this->action = 'opt_in';\n\t\telseif ( isset( $_POST['removesubscrips'] ) && $is_email )\n\t\t\t$this->action = 'remove_subscriptions';\n\t\telseif ( isset( $_POST['removeBlock'] ) && $is_email && current_user_can( 'manage_options' ) )\n\t\t\t$this->action = 'remove_block';\n\t\telseif ( isset( $_POST['changeemailrequest'] ) && $is_email && is_email( $this->new_email ) )\n\t\t\t$this->action = 'email_change_request';\n\t\telseif ( $is_email && isset( $_POST['blockemail'] ) )\n\t\t\t$this->action = 'block_request';\n\t\telseif ( isset( $_GET['subscribeid'] ) )\n\t\t\t$this->action = 'solo_subscribe';\n\t\telseif ( $is_email && isset( $_GET['blockemailconfirm'] ) && $this->key == $this->generate_key( $this->email . 'blockrequest' ) )\n\t\t\t$this->action = 'block';\n\t\telse\n\t\t\t$this->action = 'none';\n\t}", "public function getRemarketingAction()\n {\n return $this->readOneof(4);\n }", "public function action(): ?string\n {\n $action = $this->parameters()[2] ?? null;\n\n return in_array($action, Belich::getAllowedActions())\n ? $action\n : null;\n }", "public function getAction()\n\t{\n\t\t\n\t\t$parsed = (array)$this->getAsArray();\n\t\t\n\t\tforeach(array('getPrefix', 'getController') as $method)\n\t\t{\n\t\t\tif( $this->{$method}() )\n\t\t\t{\n\t\t\t\tarray_shift($parsed);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( empty($parsed) )\n\t\t{\n\t\t\t$action = $this->default_action;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$action = $parsed[0];\n\t\t}\n\t\t\n\t\t$prefix = $this->getPrefix();\n\t\t\n\t\tif( $prefix )\n\t\t{\n\t\t\t$action = $prefix . '_' . $action;\n\t\t}\n\t\t\n\t\treturn $action;\n\t\t\n\t}", "public function getAct()\n {\n return isset($this->act) ? $this->act : null;\n }", "public static function workflowActions();", "function getAction() {\n if ($this->_action & CRM_Core_Action::PREVIEW) {\n return CRM_Core_Action::VIEW | CRM_Core_Action::PREVIEW;\n }\n else {\n return CRM_Core_Action::VIEW;\n }\n }", "static function get_action_parameter()\r\n {\r\n return self :: PARAM_ACTION;\r\n }", "public function get_action(): ?string {\n\t\treturn $this->action;\n\t}", "public function getAction()\n {\n if (is_null($this->_action)) {\n $action = $this->getConfiguration()\n ->get('router.action', 'index');\n if (isset($this->_params['action'])) {\n $action = $this->_params['action'];\n }\n $this->_action = $action;\n }\n return $this->_action;\n }", "public function get_actions() {\n $actions = parent::get_actions();\n $assignaction = new deepsight_action_usersetuser_assign($this->DB, 'usersetuserassign');\n $assignaction->endpoint = (strpos($this->endpoint, '?') !== false)\n ? $this->endpoint.'&m=action' : $this->endpoint.'?m=action';\n array_unshift($actions, $assignaction);\n return $actions;\n }", "function get_action() {\n \t\tglobal $argv;\n\t\treturn strtolower(trim($argv['1']));\n\t}", "public function getPaymentAction()\n {\n return $this->getConfig()->getConfigData('payment_action');\n }", "function _get_action()\n {\n $retval = preg_quote($this->object->param('action'), '/');\n $retval = strtolower(preg_replace(\"/[^\\\\w]/\", '_', $retval));\n return preg_replace(\"/_{2,}/\", \"_\", $retval) . '_action';\n }", "static function get_action_parameter()\r\n {\r\n return self :: PARAM_USER_RIGHT_ACTION;\r\n }", "function getAction($account){\n\t\tglobal $db;\n\t\t$statement = $db->prepare('SELECT action FROM bot_action WHERE accountID=:account LIMIT 1');\n\t\t$statement->execute(array(':account'=>$account));\n\t\treturn $statement->fetch()['action'];\n\t}", "public function getSuggestedAction()\n {\n return $this->singleValue('//i:suggestedAction');\n }", "public function getLoginAction() {\n\t\treturn $this->_loginAction;\n\t}", "public function getAction(): string;", "public function getAction(): string;", "public function getRequestedActivation()\n {\n return $this->requested_activation;\n }" ]
[ "0.7367156", "0.7166886", "0.70758754", "0.6934864", "0.6934864", "0.6934864", "0.69183004", "0.6879272", "0.68244517", "0.6814059", "0.6806594", "0.6800659", "0.6777793", "0.6774168", "0.67700285", "0.6757642", "0.67562854", "0.67562854", "0.67541325", "0.6750132", "0.6744481", "0.6744481", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.67128956", "0.6695767", "0.6695767", "0.6695767", "0.6695767", "0.6695767", "0.66821146", "0.6675746", "0.6664441", "0.66297424", "0.6624535", "0.6606089", "0.66051936", "0.65783864", "0.6450962", "0.6450962", "0.64327216", "0.6424335", "0.6405781", "0.6393746", "0.63915396", "0.6363397", "0.63416725", "0.6314732", "0.6272688", "0.62676454", "0.62508136", "0.62209064", "0.62140584", "0.62077177", "0.61959505", "0.6195559", "0.6191553", "0.61870056", "0.61790794", "0.6174826", "0.61410236", "0.61366904", "0.6118545", "0.6094846", "0.6086264", "0.60833055", "0.60771495", "0.60391945", "0.6034627", "0.60301226", "0.6026855", "0.60215664", "0.6014361", "0.60000646", "0.5985392", "0.59835863", "0.5961269", "0.5957629", "0.5939439", "0.5937746", "0.5934048", "0.5932553", "0.5928955", "0.59088284", "0.58992124", "0.58909816", "0.58909816", "0.5876573" ]
0.69164383
7
Override the runTask method in order to launch the cancel function correctly (to trigger user deletion for instance)
public function runTask($task, WorkflowProgress $wp) { $wpr = parent::runTask($task, $wp); if (!is_object($wpr) && method_exists($this, $task)) { if ($task == 'cancel') { // we check to see if any other outstanding workflowprogress requests have this id // if they don't we proceed $db = Loader::db(); $num = $db->GetOne('select count(wpID) as total from WorkflowProgress where wpID <> ? and wrID = ? and wpIsCompleted = 0', array( $wp->getWorkflowProgressID(), $this->getWorkflowRequestID() )); if ($num == 0) { $wpr = call_user_func_array(array($this, $task), array($wp)); return $wpr; } } } return $wpr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function stopTask() {}", "protected function deleteTask() {}", "protected function _cancelOperation() {}", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\tif (!User::authorise('core.delete', $this->_option))\n\t\t{\n\t\t\tApp::abort(403, Lang::txt('JERROR_CORE_DELETE_NOT_PERMITTED'));\n\t\t}\n\n\t\t$ids = Request::getArray('cid', array());\n\t\t\\Hubzero\\Utility\\Arr::toInteger($ids, array());\n\n\t\t$success = 0;\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$model = Extension::oneOrFail($id);\n\n\t\t\tif (!$model->remove())\n\t\t\t{\n\t\t\t\tNotify::error($model->getError());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$success++;\n\t\t}\n\n\t\tif ($success)\n\t\t{\n\t\t\tNotify::success(Lang::txt('COM_INSTALLER_UNINSTALL_SUCCESS', $success));\n\t\t}\n\n\t\t$this->cancelTask();\n\t}", "protected function cancel(): void\n {\n }", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\tif (!User::authorise('core.manage', $this->_option)\n\t\t && !User::authorise('core.admin', $this->_option)\n\t\t && !User::authorise('core.delete', $this->_option))\n\t\t{\n\t\t\tApp::abort(403, Lang::txt('JERROR_ALERTNOAUTHOR'));\n\t\t}\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('id', array());\n\t\t$ids = (!is_array($ids) ? array($ids) : $ids);\n\n\t\t$i = 0;\n\n\t\t// Do we have any IDs?\n\t\tif (!empty($ids))\n\t\t{\n\t\t\t// Loop through each ID and delete the necessary items\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$id = intval($id);\n\n\t\t\t\t// Remove the record\n\t\t\t\t$row = Blacklist::oneOrFail($id);\n\n\t\t\t\tif (!$row->destroy())\n\t\t\t\t{\n\t\t\t\t\tNotify::error($row->getError());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\telse // no rows were selected\n\t\t{\n\t\t\tNotify::warning(Lang::txt('COM_MEMBERS_PASSWORD_BLACKLIST_DELETE_NO_ROW_SELECTED'));\n\t\t}\n\n\t\t// Output messsage and redirect\n\t\tif ($i)\n\t\t{\n\t\t\tNotify::success(Lang::txt('COM_MEMBERS_PASSWORD_BLACKLIST_DELETE_SUCCESS'));\n\t\t}\n\n\t\t$this->cancelTask();\n\t}", "public function cancel(): void;", "public function cancel();", "public function cancel()\n {\n }", "public function cancel()\n {\n }", "function cancel()\n\t{\n\t\t// Initialize some variables\n\t\t$db = & JFactory::getDBO();\n\t\t$user = & JFactory::getUser();\n\n\t\t// Get an article table object and bind post variabes to it [We don't need a full model here]\n\t\t$article = & JTable::getInstance( 'content' );\n\t\t$article->bind( JRequest::get( 'post' ) );\n\n\t\tif ( $user->authorize( 'com_content', 'edit', 'content', 'all' ) || ($user->authorize( 'com_content', 'edit', 'content', 'own' ) && $article->created_by == $user->get( 'id' )) )\n\t\t{\n\t\t\t$article->checkin();\n\t\t}\n\n\t\t// If the task was edit or cancel, we go back to the content item\n\t\t$referer = JRequest::getString( 'ret', base64_encode( JURI::base() ), 'get' );\n\t\t$referer = base64_decode( $referer );\n\t\tif ( !JURI::isInternal( $referer ) )\n\t\t{\n\t\t\t$referer = '';\n\t\t}\n\t\t$this->setRedirect( $referer );\n\n\t}", "public function cancelUserDeletion(): void\n {\n $this->dispatch('close-modal', id: 'confirmingUserDeletion');\n }", "public function abortDuel(){\n $this->plugin->getScheduler()->cancelTask($this->countdownTaskHandler->getTaskId());\n }", "public function deleteTask()\n {\n if (User::isGuest())\n {\n $rtrn = Request::getVar('REQUEST_URI', Route::url('index.php?option=' . $this->_option, false, true), 'server');\n App::redirect(\n Route::url('index.php?option=com_users&view=login&return=' . base64_encode($rtrn)),\n Lang::txt('COM_RADIAM_LOGIN_NOTICE'),\n 'warning'\n );\n return;\n }\n\n if (!$this->config->get('access-delete-entry')\n && !$this->config->get('access-manage-entry'))\n {\n App::abort(403, Lang::txt('COM_RADIAM_NOT_AUTH'));\n }\n\n // Incoming\n $id = Request::getInt('entry', 0);\n\n if (!$id)\n {\n return $this->displayTask();\n }\n\n $process = Request::getVar('process', '');\n $confirmdel = Request::getVar('confirmdel', '');\n\n // Initiate a blog entry object\n $entry = Entry::oneOrFail($id);\n\n // Did they confirm delete?\n if (!$process || !$confirmdel)\n {\n if ($process && !$confirmdel)\n {\n $this->setError(Lang::txt('COM_RADIAM_ERROR_CONFIRM_DELETION'));\n }\n\n foreach ($this->getErrors() as $error)\n {\n $this->view->setError($error);\n }\n\n $this->view\n ->set('config', $this->config)\n ->set('entry', $entry)\n ->display();\n return;\n }\n\n // Check for request forgeries\n Request::checkToken();\n\n // Delete the entry itself\n $entry->set('state', 2);\n\n if (!$entry->save())\n {\n Notify::error($entry->getError());\n }\n\n // Log the activity\n Event::trigger('system.logActivity', [\n 'activity' => [\n 'action' => 'deleted',\n 'scope' => 'radiam.entry',\n 'scope_id' => $id,\n 'description' => Lang::txt('COM_RADIAM_ACTIVITY_ENTRY_DELETED', '<a href=\"' . Route::url($entry->link()) . '\">' . $entry->get('title') . '</a>'),\n 'details' => array(\n 'title' => $entry->get('title'),\n 'url' => Route::url($entry->link())\n )\n ],\n 'recipients' => [\n $entry->get('created_by')\n ]\n ]);\n\n // Return the entries lsit\n App::redirect(\n Route::url('index.php?option=' . $this->_option)\n );\n }", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('cid', array());\n\t\t$ids = (!is_array($ids) ? array($ids) : $ids);\n\n\t\t$i = 0;\n\n\t\t// Do we have any IDs?\n\t\tif (!empty($ids))\n\t\t{\n\t\t\t$groups = Access::getGroupsByUser(User::get('id'));\n\n\t\t\t// Check if I am a Super Admin\n\t\t\t$iAmSuperAdmin = User::authorise('core.admin');\n\n\t\t\t// Loop through each ID and delete the necessary items\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$id = intval($id);\n\n\t\t\t\t// do not allow to delete groups to which the current user belongs\n\t\t\t\tif (in_array($id, $groups))\n\t\t\t\t{\n\t\t\t\t\tNotify::warning(Lang::txt('COM_MEMBERS_DELETE_ERROR_INVALID_GROUP'));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Access checks.\n\t\t\t\t$allow = User::authorise('core.edit.state', 'com_members');\n\n\t\t\t\t// Don't allow non-super-admin to delete a super admin\n\t\t\t\t$allow = (!$iAmSuperAdmin && Access::checkGroup($id, 'core.admin')) ? false : $allow;\n\n\t\t\t\tif (!$allow)\n\t\t\t\t{\n\t\t\t\t\tNotify::warning(Lang::txt('JERROR_CORE_DELETE_NOT_PERMITTED'));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$row = Accessgroup::oneOrFail($id);\n\n\t\t\t\t$data = $row->toArray();\n\n\t\t\t\t// Fire the onUserBeforeDeleteGroup event.\n\t\t\t\tEvent::trigger('user.onUserBeforeDeleteGroup', array($data));\n\n\t\t\t\t// Remove the record\n\t\t\t\tif (!$row->destroy())\n\t\t\t\t{\n\t\t\t\t\tNotify::error($row->getError());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Trigger the onUserAfterDeleteGroup event.\n\t\t\t\tEvent::trigger('user.onUserAfterDeleteGroup', array($data, true, $this->getError()));\n\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\telse // no rows were selected\n\t\t{\n\t\t\tNotify::warning(Lang::txt('COM_MEMBERS_ACCESSGROUP_DELETE_NO_ROW_SELECTED'));\n\t\t}\n\n\t\t// Output messsage and redirect\n\t\tif ($i)\n\t\t{\n\t\t\tNotify::success(Lang::txt('COM_MEMBERS_ACCESSGROUP_DELETE_SUCCESS'));\n\t\t}\n\n\t\t$this->cancelTask();\n\t}", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\tif (!User::authorise('core.delete', $this->_option))\n\t\t{\n\t\t\tApp::abort(403, Lang::txt('JERROR_ALERTNOAUTHOR'));\n\t\t}\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('rid', array());\n\t\t$ids = (!is_array($ids) ? array($ids) : $ids);\n\n\t\t$removed = 0;\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$entry = Respondent::oneOrFail(intval($id));\n\n\t\t\t// Delete the entry\n\t\t\tif (!$entry->destroy())\n\t\t\t{\n\t\t\t\tNotify::error($entry->getError());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Trigger before delete event\n\t\t\t\\Event::trigger('onEventsAfterDeleteRespondent', array($id));\n\n\t\t\t$removed++;\n\t\t}\n\n\t\tif ($removed)\n\t\t{\n\t\t\tNotify::success(Lang::txt('COM_EVENTS_RESPONDENT_REMOVED'));\n\t\t}\n\n\t\t// Output messsage and redirect\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&id[]=' . Request::getInt('event', 0), false)\n\t\t);\n\t}", "public function taskDelete(): void\n {\n $directory = $this->getDirectory();\n if (!$directory) {\n throw new RuntimeException('Not Found', 404);\n }\n\n $object = null;\n try {\n $object = $this->getObject();\n if ($object && $object->exists()) {\n $authorized = $object instanceof FlexAuthorizeInterface\n ? $object->isAuthorized('delete', 'admin', $this->user)\n : $directory->isAuthorized('delete', 'admin', $this->user);\n\n if (!$authorized) {\n throw new RuntimeException($this->admin::translate('PLUGIN_ADMIN.INSUFFICIENT_PERMISSIONS_FOR_TASK') . ' delete.', 403);\n }\n\n $object->delete();\n\n $this->admin->setMessage($this->admin::translate('PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_DELETE_SUCCESS'));\n if ($this->currentRoute->withoutGravParams()->getRoute() === $this->referrerRoute->getRoute()) {\n $redirect = dirname($this->currentRoute->withoutGravParams()->toString(true));\n } else {\n $redirect = $this->referrerRoute->toString(true);\n }\n\n $this->setRedirect($redirect);\n\n $this->grav->fireEvent('onFlexAfterDelete', new Event(['type' => 'flex', 'object' => $object]));\n }\n } catch (RuntimeException $e) {\n $this->admin->setMessage($this->admin::translate(['PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_DELETE_FAILURE', $e->getMessage()]), 'error');\n\n $this->setRedirect($this->referrerRoute->toString(true), 302);\n }\n }", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken(['get', 'post']);\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('id', array());\n\n\t\tif (count($ids) > 0)\n\t\t{\n\t\t\t// Loop through each ID\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$row = new Middleware\\Location(intval($id));\n\n\t\t\t\tif (!$row->delete())\n\t\t\t\t{\n\t\t\t\t\tthrow new \\Exception($row->getError(), 500);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false),\n\t\t\tLang::txt('COM_TOOLS_ITEM_DELETED'),\n\t\t\t'message'\n\t\t);\n\t}", "public function cancelAction()\n\t{\n\t\t$this->processToken = null;\n\t\t$this->isNewProcess = true;\n\n\t\t$this->dropTempFile();\n\n\t\t$this->instanceBucket();\n\n\t\tif ($this->bucket instanceof \\CCloudStorageBucket)\n\t\t{\n\t\t\tif ($this->bucket->FileExists($this->uploadPath))\n\t\t\t{\n\t\t\t\tif (!$this->bucket->DeleteFile($this->uploadPath))\n\t\t\t\t{\n\t\t\t\t\t$this->addError(new Error('Cloud drop error.'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->clearProgressParameters();\n\n\t\t$result = $this->preformAnswer(self::ACTION_CANCEL);\n\n\t\t$result['STATUS'] = self::STATUS_COMPLETED;\n\n\t\treturn $result;\n\t}", "public function cancelOperation() {\n printf(\"Cancelling...\\n\");\n $this->_cancelled = true;\n posix_kill($this->_pid, SIGKILL);\n pcntl_signal_dispatch();\n }", "public function removeTask()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_task]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_task]);\n\t\t}\n\t}", "public function applyTask()\n\t{\n\t\t$this->saveTask(false);\n\t}", "protected function executeTasks() {}", "public function cancel(): int;", "protected function saveTask() {}", "function eve_api_subtask_cancel(&$form_state) {\n // Clear our ctools cache object. It's good housekeeping.\n eve_api_clear_page_cache('signup');\n}", "public function testForget()\n\t{\n\t\t$c = get_c();\n\n\t\t$result = $c->PostTask('tasks.add', array(2,2));\n $result->forget();\n\t\t$result->revoke();\n\t}", "public function execute()\n {\n $this->_authorize();\n $this->_authorize('entry');\n $this->_authorize('comment');\n\n $this->registerTask('new', 'edit');\n $this->registerTask('login', 'login');\n\n $this->registerTask('groups', 'groups');\n $this->registerTask('locations', 'locations');\n $this->registerTask('projects', 'projects');\n $this->registerTask('users', 'users');\n\n parent::execute();\n }", "public function refreshTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\t$ids = Request::getArray('cid', array());\n\t\t\\Hubzero\\Utility\\Arr::toInteger($ids, array());\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$model = Extension::oneOrFail($id);\n\n\t\t\tif (!$model->refreshManifestCache())\n\t\t\t{\n\t\t\t\tNotify::error($model->getError());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t$this->cancelTask();\n\t}", "public function handleCancellation($request, $context) { }", "public function testThrottledTaskCancelledWhenWrappedTaskCancelled() {\n $wrapped = new TaskStub();\n \n $throttled = new \\Async\\Task\\ThrottledTask($wrapped, 0.5);\n \n // Check that the task is not complete\n $this->assertFalse($throttled->isComplete());\n \n // Cancel the wrapped task and check that the the throttled task is cancelled\n $wrapped->cancel();\n $this->assertTrue($throttled->isComplete());\n $this->assertTrue($throttled->isCancelled());\n }", "public function testWrappedTaskCancelledWhenThrottledTaskCancelled() {\n // Create a wrapped task that expects cancel to be called once\n $wrapped = $this->getMock(\\Async\\Task\\Task::class);\n $wrapped->expects($this->once())->method('cancel');\n \n $throttled = new \\Async\\Task\\ThrottledTask($wrapped, 0.5);\n \n $throttled->cancel();\n }", "public function delete($task);", "public function cancelable()\n {\n $this->status = self::STATUS_CANCELABLE;\n $this->save();\n\t\t\n $this->fireModelEvent('cancelable');\n }", "function cancel() {\n if($this->request->isAsyncCall()) {\n if($this->active_invoice->isLoaded()) {\n if($this->active_invoice->canCancel($this->logged_user)) {\n if($this->request->isSubmitted()) {\n try {\n $this->active_invoice->markAsCanceled($this->logged_user);\n \n $issued_to_user = $this->active_invoice->getIssuedTo();\n if ($issued_to_user instanceof User && Invoices::getNotifyClientAboutCanceledInvoice()) {\n $notify_users = array($issued_to_user);\n \t if ($issued_to_user->getId() != $this->logged_user->getId()) {\n \t $notify_users[] = $this->logged_user;\n \t } // if\n\n AngieApplication::notifications()\n ->notifyAbout('invoicing/invoice_canceled', $this->active_invoice, $this->logged_user)\n ->sendToUsers($notify_users);\n } // if\n \n \t\t\t\t\t\t$this->response->respondWithData($this->active_invoice, array(\n \t \t'as' => 'invoice', \n \t 'detailed' => true,\n \t ));\n } catch (Error $e) {\n \t$this->response->exception($e);\n } // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n } else {\n $this->response->badRequest();\n } // if\n }", "function call_delete() {\n parent::call_delete();\n }", "protected function cancel()\n\t{\n\t\t$this->executeTask('Rollback');\n\n\t\treturn false;\n\t}", "protected function editTaskAction() {}", "public function actionCancel()\n {\n }", "public function cancel()\n {\n $this->confirmationArchived = false;\n }", "public function setTaskDone()\n {\n // Simply unlink our task file.\n unlink($this->taskFilePath);\n }", "public function cancel(Progress $wp)\n {\n $ui = UserInfo::getByID($this->getRequestedUserID());\n $wpr = parent::cancel($wp);\n $wpr->message = t(\"User deletion request has been cancelled.\");\n\n return $wpr;\n }", "public static function cancellingCallback($params) {\n\t\t$params[Filesystem::signal_param_run] = false;\n\t}", "public function cancelAction() \n {\n \t\t$tblVote = Facebook_Vote::Table();\n\t\t$objSession = new App_Session_Namespace( 'facebook' );\n\t\t\n\t\tif ( is_object( $objSession )) {\n\t\t\t$nUserId = $objSession->user->fbu_id;\n\t\t\t$nVoteId = $this->_getIntParam( 'fbv_vote_id', 1 );\n\t\t\t\n\t\t\t$objVote = $tblVote->findVote( $nUserId, $nVoteId );\n\t\t\tif ( is_object( $objVote ) ) {\n \t\t\t\t$objVote->delete();\n\t\t\t}\n\t\t}\n\t\t$this->view->return = $this->_getParam( 'return' );\n }", "function cancel(){\n\t\t//echo \"In Cancel\";\n\t\t\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ';\n\t\t//echo JFactory::getDate('now', JFactory::getApplication()->getCfg('offset'))->toFormat() . \"\\n<br/><br/>\";\n\t\t\n\t\t//$date = JFactory::getDate();\n\t\t//$date->setOffset(JFactory::getApplication()->getCfg('offset'));\n\t \n\t \t//echo \"Offset: \" . JFactory::getApplication()->getCfg('offset');\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ' . $date->toFormat() . \"\\n\";\n\t\t$date =& JFactory::getDate($time= 'now', $tzOffset=0);\n\n\t\t//$date->setOffset($mainframe->getCfg('offset'));\n\t\t//echo 'Das aktuelle Datum und die aktuelle Zeit ist: ' . $date->toFormat();\n\t\t\n\t\t//echo \"New date: \" . date('Y-m-d H:i:s');\n\n\t\t//return false;\n\t\t\n\t\t$insData =new stdClass();\n\t\t$insData->idt_drivin_event_apply = $_POST['appCanId'];\n\n\t\t//$date = new DateTime();\n\t\t$insData->dt_cancel = date('Y-m-d H:i:s'); //'CURRENT_TIMESTAMP';//$date->getTimestamp();\n\t\t\n\t\t$db = JFactory::getDBO();\n\t\tif(!$db->updateObject( '#__jevent_events_apply', $insData, 'idt_drivin_event_apply' )){\n\t\t\techo $database->stderr();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;//resendCancelEmailById($insData->idt_drivin_event_apply);\n\t}", "protected abstract function run();", "public function delete(){\n $this->delete_from('task');\n }", "public function cancel() {\n\t\t$this->workflowActivitySpecification->setState(WorkflowActivityStateEnum::CANCELLED);\n\n\t\tif ($this->runtimeContext)\n\t\t\t$this->workflowActivity->onCancel($this->runtimeContext);\n\t}", "public function cancel()\n {\n $this->resetInput();\n $this->updateMode = false;\n }", "public function run($executed)\n {\n UserActivities::deleteOld();\n }", "public function deleteTask(){\n //checks to see if the request method is a post\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n\n //Sanitize POST data\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n //Grabs and trims the delete Id\n $taskId = trim($_POST['deleteId']);\n //Deletes the task\n if($this->taskHistoryModel->deleteTask($taskId)){\n\n if($_SESSION['current_page'] == \"TaskHistory\"){\n redirect('TaskHistoryController/taskHistory');\n\n }elseif($_SESSION['current_page'] == \"IndividualProject\"){\n $link = 'IndividualProjectController/individualProject?projectId='. $_SESSION['current_project'];\n\n redirect($link);\n\n }else{\n $link = 'IndividualGroupController/individualGroup?groupId='. $_SESSION['current_group'];\n\n redirect($link);\n }\n\n \n \n }else{\n //For testing\n die('something went wrong');\n }\n\n }else{\n //redirects\n redirect('TaskHistoryController/taskHistory');\n }\n\n \n }", "abstract public function delete__do_process ();", "public function cancel()\n {\n $this->canceled = true;\n\n $this->save();\n\n $this->user->notify(new OrderCanceled($this));\n\n }", "function run()\r\n {\r\n \t\r\n \t$context_registration_id = Request :: get(self :: PARAM_CONTEXT_REGISTRATION_ID);\r\n \t$ids = Request :: get(self :: PARAM_CONTEXT_REL_USER_ID);\r\n \r\n $failures = 0;\r\n \r\n if (! empty($ids))\r\n {\r\n if (! is_array($ids))\r\n {\r\n $ids = array($ids);\r\n }\r\n \r\n foreach ($ids as $id)\r\n {\r\n \r\n $context_rel_user_ids = explode('|', $id);\r\n \r\n $context_id = $context_rel_user_ids[0];\r\n \r\n if (SurveyContextManagerRights :: is_allowed_in_survey_context_manager_subtree(SurveyContextManagerRights :: SUBSCRIBE_USER_RIGHT, $context_id, SurveyContextManagerRights :: TYPE_CONTEXT_REGISTRATION))\r\n {\r\n $context_rel_user = SurveyContextDataManager :: get_instance()->retrieve_survey_context_rel_user($context_rel_user_ids[0], $context_rel_user_ids[1]);\r\n if (! $context_rel_user->delete())\r\n {\r\n $failures ++;\r\n }\r\n else\r\n {\r\n \r\n // Event :: trigger('delete', 'context', array('target_context_id' => $context->get_id(), 'action_user_id' => $user->get_id()));\r\n }\r\n }\r\n \r\n }\r\n \r\n if ($failures)\r\n {\r\n if (count($ids) == 1)\r\n {\r\n $message = 'ObjectNotDeleted';\r\n }\r\n else\r\n {\r\n $message = 'ObjectsNotDeleted';\r\n }\r\n }\r\n else\r\n {\r\n if (count($ids) == 1)\r\n {\r\n $message = 'ObjectDeleted';\r\n }\r\n else\r\n {\r\n $message = 'ObjectsDeleted';\r\n }\r\n }\r\n $this->redirect(Translation :: get($message, array('OBJECT' => Translation::get('SelectedSurveyContextRelUser'), 'OBJECTS' => Translation::get('SelectedSurveyContextRelUsers')), Utilities::COMMON_LIBRARIES), ($failures ? true : false), array(self :: PARAM_ACTION => self :: ACTION_VIEW_CONTEXT, self :: PARAM_CONTEXT_ID => $context_rel_user_ids[0], self :: PARAM_CONTEXT_REGISTRATION_ID => $context_registration_id, DynamicTabsRenderer :: PARAM_SELECTED_TAB => SurveyContextManagerContextViewerComponent :: TAB_USERS));\r\n }\r\n else\r\n {\r\n $this->display_error_page(htmlentities(Translation :: get('NoSurveyContextRelUsersSelected')));\r\n }\r\n }", "public function applyTask()\n\t{\n\t\t$this->saveTask();\n\t}", "public function cancel() {\n # cleanup code before cancellng job\n $ret = array('message'=>'You cancelled this job at '.date('H:i:s'));\n return $ret;\n }", "function getTask() ;", "public function getTask() {}", "public function getTask() {}", "public function getTask() {}", "public function run() {\n\t\tif ($this->schedule->isRun()) {\n\t\t\t$this->excuteHandle->excute();\n\t\t}\n\t}", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken(['get', 'post']);\n\n\t\t// Incoming member ID\n\t\t$id = Request::getInt('id', 0);\n\t\tif (!$id)\n\t\t{\n\t\t\t$this->setError(Lang::txt('COM_MEMBERS_NO_ID'));\n\t\t\treturn $this->displayTask($id);\n\t\t}\n\n\t\tif (!User::authorise('core.admin', 'com_groups')\n\t\t && !User::authorise('core.manage', 'com_groups'))\n\t\t{\n\t\t\treturn $this->displayTask($id);\n\t\t}\n\n\t\t// Incoming group ID\n\t\t$gid = Request::getString('gid', '');\n\t\tif (!$gid)\n\t\t{\n\t\t\t$this->setError(Lang::txt('COM_MEMBERS_GROUPS_NO_ID'));\n\t\t\treturn $this->displayTask($id);\n\t\t}\n\n\t\t// Load the group\n\t\t$group = Group::getInstance($gid);\n\n\t\t// Remove the user from any other lists they may be apart of\n\t\t$group->remove('invitees', array($id));\n\t\t$group->remove('applicants', array($id));\n\t\t$group->remove('members', array($id));\n\t\t$group->remove('managers', array($id));\n\n\t\t// Save changes\n\t\t$group->update();\n\n\t\t// Push through to the groups view\n\t\t$this->displayTask($id);\n\t}", "public static function handle_tasks()\n {\n\t $granularity = (int)get_site_preference('pseudocron_granularity',60);\n\t $last_check = get_site_preference('pseudocron_lastrun',0);\n\t if( (time() - $granularity * 60) >= $last_check )\n\t\t {\n\t\t\t // 1. Get Task objects.\n\t\t\t self::get_tasks();\n\t\n\t\t\t // 2. Evaluate Tasks\n\t\t\t self::execute();\n\t\n\t\t\t // 3. Cleanup to minimize memory usage\n\t\t\t self::cleanup();\n\n\t\t\t // 4. Say we've done a check\n\t\t\t set_site_preference('pseudocron_lastrun',time());\n\t\t }\n }", "public function confirmTask()\n\t{\n\t\t// Incoming, some versions of the code used 'code' some use 'confirm'\n\t\t$code = Request::getString('confirm', false);\n\t\tif (!$code)\n\t\t{\n\t\t\t$code = Request::getString('code', false);\n\t\t}\n\n\t\t// Get the return value if it was requested\n\t\t$return = Request::getString('return', false);\n\n\t\t// Check if the user is logged in\n\t\tif (User::isGuest())\n\t\t{\n\t\t\t// See if they've provided an email address as well\n\t\t\t// perhaps we can log them in with that and their token\n\t\t\t$email = Request::getString('email', false);\n\n\t\t\tif ($email != false && Plugin::isEnabled('authentication', 'emailtoken'))\n\t\t\t{\n\t\t\t\t// An email was provided\n\t\t\t\t// Get the Users controller\n\t\t\t\trequire_once Component::path('com_login') . '/site/controllers/auth.php';\n\t\t\t\t$authController = new \\Components\\Login\\Site\\Controllers\\Auth();\n\n\t\t\t\t// Return back here while resetting the return to here\n\t\t\t\t$return = base64_encode(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=' . $this->_task . '&confirm=' . $code . '&return=' . $return, false, true));\n\n\t\t\t\t// Set up a request to send to the login method\n\t\t\t\tRequest::setVar('return', $return);\n\t\t\t\tRequest::setVar('authenticator', 'emailtoken');\n\t\t\t\tRequest::setVar('email', $email);\n\t\t\t\tRequest::setVar('task', 'login');\n\t\t\t\tRequest::setVar('option', 'com_login');\n\n\t\t\t\t$authController->login();\n\t\t\t\t// $authController->login() always redirects, should never make it here\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Didn't provide enough information, warn about it\n\t\t\t\t// and let them log in to confirm their email address\n\t\t\t\t$return = base64_encode(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=' . $this->_task . '&confirm=' . $code . '&return=' . $return, false, true));\n\t\t\t\tApp::redirect(\n\t\t\t\t\tRoute::url('index.php?option=com_users&view=login&return=' . $return, false),\n\t\t\t\t\tLang::txt('Please login in to confirm your email address.'),\n\t\t\t\t\t'warning'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Grab the authenticator cookie, the user is logged in\n\t\t// Continue confirming the email address\n\t\t$cookie = \\Hubzero\\Utility\\Cookie::eat('authenticator');\n\n\t\t// @FIXME The session is overriding the activation code\n\t\t$xprofile = User::oneByActivationToken(-$code);\n\t\t$user = User::getInstance();\n\n\t\tif ($xprofile->get('id') != $user->get('id'))\n\t\t{\n\t\t\t// Redirect to member dashboard if email is already confirmed\n\t\t\tif ($xprofile->get('id') === 0) {\n\t\t\t\tApp::redirect(\"/members/myaccount\", \"Email is already confirmed. No need to do it again!\", \"warning\");\n\t\t\t}\n\n\t\t\t// Profile and logged in user does not match\n\t\t\t$this->setError('login mismatch');\n\n\t\t\t// Build logout/login/confirm redirect flow\n\t\t\t$login_return = base64_encode(Route::url('index.php?option=' . $this->option . '&controller=' . $this->_controller . '&task=' . $this->_task . '&confirm=' . $code));\n\t\t\t$logout_return = base64_encode(Route::url('index.php?option=com_users&view=login&return=' . $login_return));\n\n\t\t\t$redirect = Route::url('index.php?option=com_users&view=login&task=logout&return=' . $logout_return);\n\t\t}\n\n\n\t\t$email_confirmed = $xprofile->get('activation');\n\n\t\tif ($email_confirmed == 1 || $email_confirmed == 3)\n\t\t{\n\t\t\t// The current user is confirmed - check to see if the incoming code is valid at all\n\t\t\tif (\\Components\\Members\\Helpers\\Utility::isActiveCode($code))\n\t\t\t{\n\t\t\t\t$this->setError('login mismatch');\n\n\t\t\t\t// Build logout/login/confirm redirect flow\n\t\t\t\t$login_return = base64_encode(Route::url('index.php?option=' . $this->option . '&controller=' . $this->_controller . '&task=' . $this->_task . '&confirm=' . $code));\n\t\t\t\t$logout_return = base64_encode(Route::url('index.php?option=com_users&view=login&return=' . $login_return));\n\n\t\t\t\t$redirect = Route::url('index.php?option=com_users&view=login&task=logout&return=' . $logout_return);\n\t\t\t}\n\t\t}\n\t\telseif ($email_confirmed < 0 && $email_confirmed == -$code)\n\t\t{\n\t\t\t//var to hold return path\n\t\t\t$return = '';\n\n\t\t\t// get return path\n\t\t\t$cReturn = $this->config->get('ConfirmationReturn');\n\t\t\tif ($cReturn)\n\t\t\t{\n\t\t\t\t$return = $cReturn;\n\t\t\t}\n\n\t\t\t//check to see if we have a return param\n\t\t\t$pReturn = base64_decode(urldecode($xprofile->getParam('return')));\n\t\t\tif ($pReturn)\n\t\t\t{\n\t\t\t\t$return = $pReturn;\n\t\t\t\t$xprofile->setParam('return', '');\n\t\t\t}\n\n\t\t\t// make as confirmed\n\t\t\t$xprofile->set('activation', 1);\n\n\t\t\t// set public setting\n\t\t\t$xprofile->set('access', $this->config->get('privacy', 1));\n\n\t\t\t// update profile\n\t\t\tif (!$xprofile->save())\n\t\t\t{\n\t\t\t\t$this->setError(Lang::txt('COM_MEMBERS_REGISTER_ERROR_CONFIRMING'));\n\t\t\t}\n\n\t\t\t// if the user just changed their email & confirmed\n\t\t\t// reset 'userchangedemail' key\n\t\t\tif (Session::get('userchangedemail', 0) == 1)\n\t\t\t{\n\t\t\t\tSession::set('userchangedemail', 0);\n\t\t\t}\n\n\t\t\tEvent::trigger('onUserAfterConfirmEmail', array($xprofile->toArray()));\n\n\t\t\t// Redirect\n\t\t\tif (empty($return))\n\t\t\t{\n\t\t\t\t$r = $this->config->get('ConfirmationReturn');\n\t\t\t\t$return = ($r) ? $r : Route::url('index.php?option=com_members&task=myaccount');\n\n\t\t\t\t// consume cookie (yum) if available to return to whatever action prompted registration\n\t\t\t\tif (isset($_COOKIE['return']))\n\t\t\t\t{\n\t\t\t\t\t$return = $_COOKIE['return'];\n\t\t\t\t\tsetcookie('return', '', time() - 3600);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tApp::redirect($return, '', 'message', true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setError(Lang::txt('COM_MEMBERS_REGISTER_ERROR_INVALID_CONFIRMATION'));\n\t\t}\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Set the page title\n\t\t$this->_buildTitle();\n\n\t\t// Instantiate a new view\n\t\t$this->view\n\t\t\t->set('title', Lang::txt('COM_MEMBERS_REGISTER_CONFIRM'))\n\t\t\t->set('login', $xprofile->get('username'))\n\t\t\t->set('email', $xprofile->get('email'))\n\t\t\t->set('code', $code)\n\t\t\t->set('redirect', (isset($return) ? $return : ''))\n\t\t\t->set('sitename', Config::get('sitename'))\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->display();\n\t}", "public function cancelUpload() {\n $this->callMethod( 'cancelUpload' );\n }", "public function cancelUpload() {\n $this->callMethod( 'cancelUpload' );\n }", "public function cancelUpload() {\n $this->callMethod( 'cancelUpload' );\n }", "public function execute()\n {\n // There is no file ctime on windows, so this task disables itself if OS = win\n if (TYPO3_OS === 'WIN') {\n throw new \\BadMethodCallException('This task is not reliable for Windows OS', 1308270454);\n }\n $seconds = 60 * 60 * 24 * (int)$this->numberOfDays;\n $timestamp = $GLOBALS['EXEC_TIME'] - $seconds;\n // Get fileadmin directory\n $directory = PATH_site . 'fileadmin/';\n if (!empty($GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'])) {\n $directory = PATH_site . trim($GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir']);\n }\n // Execute cleanup\n return $this->cleanupRecycledFiles($directory, $timestamp);\n }", "public function deleteWithTasks() {\n \t$this->tasks()->delete();\n \t$this->delete();\n }", "public static function cancella()\n {\n $delete_id = $_SESSION['current_user']->getId();\n UtenteFactory::cancellaAzienda($delete_id);\n }", "public function cancelDownload() {\n $this->callMethod('cancelDownload');\n }", "public function run()\n {\n $this->createPermission();\n// $this->removePermission();\n }", "public function cancelClassByStudent_post()\n {\n /* code goes here */\n }", "abstract protected function _run();", "abstract protected function _run();", "public function cancelled()\n {\n \n $this->alert('info', 'Understood');\n }", "public function cancelled()\n {\n \n $this->alert('info', 'Understood');\n }", "function addCronTaskRemove()\n{\n // Get auto like schedules\n require_once __DIR__.\"/models/LogsModel.php\";\n $Logs = new LogsModel;\n $Logs->where(\"is_removable\", 1)\n ->where(\"status\", \"success\")\n ->where(\"remove_scheduled\", \"<=\", date(\"Y-m-d H:i:s\"))\n ->setPageSize(5) // required to prevent server overload\n ->setPage(1)\n ->orderBy(\"id\", \"ASC\")\n ->fetchData();\n\n if ($Logs->getTotalCount() < 1) {\n // There is not any active schedule\n return false;\n }\n\n $as = [__DIR__.\"/models/LogModel.php\", __NAMESPACE__.\"\\LogModel\"];\n foreach ($Logs->getDataAs($as) as $Log) {\n $Account = \\Controller::model(\"Account\", $Log->get(\"account_id\"));\n $User = \\Controller::model(\"User\", $Log->get(\"user_id\"));\n\n if (!$Account->isAvailable() || !$User->isAvailable()) {\n // Account is either removed (unexected, external factors)\n // Remove the log\n $Log->remove();\n continue;\n } \n\n if ($User->get(\"id\") != $Account->get(\"user_id\")) {\n // Unexpected, data modified by external factors\n // Remove remove-schedule\n $Log->remove();\n continue;\n }\n\n // Defautls\n $Log->set(\"remove_date\", date(\"Y-m-d H:i:s\")); // Last action date for the remove action (success or fail)\n\n if ($Account->get(\"login_required\")) {\n // Login required for this account\n $Log->set(\"is_deleted\", 0)\n ->set(\"is_removable\", 0)\n ->set(\"data.remove.status\", \"error\")\n ->set(\"data.remove.error.msg\", \"Re-login required for the account!\")\n ->save();\n continue;\n }\n\n if (!$User->get(\"is_active\")) {\n $Log->set(\"is_deleted\", 0)\n ->set(\"is_removable\", 0)\n ->set(\"data.remove.status\", \"error\")\n ->set(\"data.remove.error.msg\", __(\"User account was not active.\"))\n ->save();\n continue;\n }\n\n if ($User->isExpired()) {\n $Log->set(\"is_deleted\", 0)\n ->set(\"is_removable\", 0)\n ->set(\"data.remove.status\", \"error\")\n ->set(\"data.remove.error.msg\", __(\"User account was expired.\"))\n ->save();\n continue;\n }\n\n\n // Login into the account\n try {\n $Instagram = \\InstagramController::login($Account);\n } catch (\\Exception $e) {\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"is_deleted\", 0)\n ->set(\"is_removable\", 0)\n ->set(\"data.remove.status\", \"error\")\n ->set(\"data.remove.error.msg\", __(\"Couldn't login into the account.\"))\n ->set(\"data.remove.error.details\", $msg)\n ->save();\n\n continue;\n }\n\n\n // Get media info\n try {\n $mediainfo = $Instagram->media->getInfo($Log->get(\"data.reposted.media_id\"));\n } catch (\\Exception $e) {\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"is_deleted\", 0)\n ->set(\"is_removable\", 0)\n ->set(\"data.remove.status\", \"error\")\n ->set(\"data.remove.error.msg\", __(\"Couldn't get media info.\"))\n ->set(\"data.remove.error.details\", $msg)\n ->save();\n\n continue;\n }\n\n if (!$mediainfo->isOk()) {\n $Log->set(\"is_deleted\", 0)\n ->set(\"is_removable\", 0)\n ->set(\"data.remove.status\", \"error\")\n ->set(\"data.remove.error.msg\", __(\"Couldn't get media info.\"))\n ->save();\n\n continue;\n }\n\n\n $media_type_id = $mediainfo->getItems()[0]->getMediaType();\n if ($media_type_id == \"2\") {\n $media_type = \"VIDEO\";\n } else if ($media_type_id == \"8\") {\n $media_type = \"ALBUM\";\n } else {\n $media_type = \"PHOTO\";\n }\n\n\n try {\n $res = $Instagram->media->delete($Log->get(\"data.reposted.media_id\"), $media_type);\n } catch (\\Exception $e) {\n $msg = $e->getMessage();\n $msg = explode(\":\", $msg, 2);\n $msg = isset($msg[1]) ? $msg[1] : $msg[0];\n\n $Log->set(\"is_deleted\", 0)\n ->set(\"is_removable\", 0)\n ->set(\"data.remove.status\", \"error\")\n ->set(\"data.remove.error.msg\", __(\"Couldn't remove the post.\"))\n ->set(\"data.remove.error.details\", $msg)\n ->save();\n\n continue;\n }\n\n if (!$res->isOk() || !$res->getDidDelete()) {\n $Log->set(\"is_deleted\", 0)\n ->set(\"is_removable\", 0)\n ->set(\"data.remove.status\", \"error\")\n ->set(\"data.remove.error.msg\", __(\"Couldn't remove the post.\"))\n ->save();\n\n continue;\n } \n\n\n // Post removed successfully, log data\n $Log->set(\"is_deleted\", 1)\n ->set(\"is_removable\", 0)\n ->set(\"data.remove.status\", \"success\")\n ->save();\n }\n}", "public function testDeleteTask()\n {\n }", "public function cancelClassByInstructor_post()\n {\n /* code goes here */\n }", "public function run(){\n parent::run();\n //Do stuff...\n }", "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "public function execute() {\n $taskstable = Engine_Api::_()->getDbtable('tasks', 'core');\n $rtasksName = $taskstable->info('name');\n $taskstable_result = $taskstable->select()\n\t\t\t\t ->from($rtasksName, array('started_last'))\n\t\t\t\t ->where('title = ?', \"Background Automatically Delete Site's Files' Backups\")\n\t\t\t\t ->where('plugin = ?', 'Dbbackup_Plugin_Task_Dbbackfilesdelete')\n\t\t\t\t ->limit(1);\n\t\t\t\t \n $value = $taskstable->fetchRow($taskstable_result);\n $old_started_last = Engine_Api::_()->getApi('settings', 'core')->getSetting('dbbackupdeletefiles.startedlast', 0);\n \n\t\t$coremodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('core');\n $coreversion = $coremodule->version;\n if(!($coreversion < '4.1.0')) {\n\t\t\tif(!Engine_Api::_()->dbbackup()->canRunTask(\"dbbackup\",\"Dbbackup_Plugin_Task_Dbbackfilesdelete\", $old_started_last)){\n\t\t\t\treturn;\n\t\t\t}\n \t}\n \tEngine_Api::_()->getApi('settings', 'core')->setSetting('dbbackupdeletefiles_startedlast', $value['started_last']);\n\t\t\n\t\tif(Engine_Api::_()->getApi('settings', 'core')->dbbackup_deletecodeoptions) {\n\t\t\t$deletefiles = Engine_Api::_()->dbbackup()->deletebackupfiles();\n\t\t}\n }", "public function cancel_request() {\n\n $pending_request_exists = $this->micro_relation_exists($this->from, $this->to, \"P\");\n\n if($pending_request_exists) {\n $this->delete_relation(\"P\");\n }\n }", "public function cancellationRequested() : bool;", "protected abstract function onExecute();", "function execute(Task $task);", "public function cancelDownload() {\n $this->callMethod( 'cancelDownload' );\n }", "public function cancelDownload() {\n $this->callMethod( 'cancelDownload' );\n }", "public function cancelDownload() {\n $this->callMethod( 'cancelDownload' );\n }", "public function testUpdateTask()\n {\n }", "public function doExecute() {\n $node = $this->getContextValue('node');\n $config = \\Drupal::config('scheduler.settings');\n if ($node->type->entity->getThirdPartySetting('scheduler', 'unpublish_enable', $config->get('default_unpublish_enable'))) {\n $node->set('unpublish_on', NULL);\n scheduler_node_presave($node);\n scheduler_node_update($node);\n }\n else {\n $type_name = node_get_type_label($node);\n $arguments = [\n '%type' => $type_name,\n 'link' => \\Drupal::l($this->t('@type settings', ['@type' => $type_name]), new Url('entity.node_type.edit_form', ['node_type' => $node->getType()])),\n ];\n \\Drupal::logger('scheduler')->warning('Scheduler rules action \"Remove unpublishing date\" - Scheduled unpublishing is not enabled for %type content. To prevent this message add the condition \"Scheduled unpublishing is enabled\" to your Rule, or enable the Scheduler options via the %type content type settings.', $arguments);\n }\n }", "public function execute() {\n global $DB;\n\n // Automatic creation of deletion requests must be enabled.\n if (get_config('tool_dataprivacy', 'automaticdeletionrequests')) {\n // Select all deleted users that do not have any delete data requests created for them.\n $sql = \"SELECT DISTINCT(u.id)\n FROM {user} u\n LEFT JOIN {tool_dataprivacy_request} r\n ON u.id = r.userid\n WHERE u.deleted = ?\n AND (r.id IS NULL\n OR r.type != ?)\";\n\n $params = [\n 1,\n api::DATAREQUEST_TYPE_DELETE\n ];\n\n $deletedusers = $DB->get_records_sql($sql, $params);\n $createdrequests = 0;\n\n foreach ($deletedusers as $user) {\n api::create_data_request($user->id, api::DATAREQUEST_TYPE_DELETE,\n get_string('datarequestcreatedfromscheduledtask', 'tool_dataprivacy'),\n data_request::DATAREQUEST_CREATION_AUTO);\n $createdrequests++;\n }\n\n if ($createdrequests > 0) {\n mtrace($createdrequests . ' delete data request(s) created for existing deleted users');\n }\n }\n }", "public function cancel()\n\t{\n\t\t// Initialize variables.\n\t\t$app = &JFactory::getApplication();\n\n\t\t// Clear the user edit information from the session.\n\t\t$app->setUserState('com_users.edit.user.id', null);\n\t\t$app->setUserState('com_users.edit.user.data', null);\n\n\t\t// Redirect to the list screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users&view=users', false));\n\t}", "public\n function destroy(\n Task $task\n ) {\n //\n }", "public function getTask();", "public function getTask();", "public function onRsformFrontendSwitchTasks(): void\n\t{\n\t\t$plugin_task = $this->app->input->get('plugin_task');\n\n\t\tswitch ($plugin_task)\n\t\t{\n\t\t\tcase 'jdideal.notify':\n\t\t\t\t$this->rsfp_f_jdidealNotify();\n\t\t\t\tbreak;\n\t\t\tcase 'jdideal.return':\n\t\t\t\t$formId = $this->app->input->getInt('formId');\n\t\t\t\t$this->jdidealReturn($formId);\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function __construct()\n {\n $this->task = new Task();\n unset($_SESSION['error']);\n }" ]
[ "0.7275147", "0.7098665", "0.68029386", "0.64808536", "0.62757814", "0.6162137", "0.6122347", "0.6098125", "0.6019996", "0.6019996", "0.5970343", "0.58760846", "0.58550453", "0.57677287", "0.5720493", "0.5686428", "0.56649715", "0.5651311", "0.5640629", "0.5624257", "0.55335784", "0.54981846", "0.5493278", "0.5484713", "0.5482099", "0.54560816", "0.5393871", "0.5391499", "0.5390919", "0.53817624", "0.53562254", "0.5338239", "0.5314093", "0.5287972", "0.5284144", "0.5242623", "0.5234367", "0.5208214", "0.5202955", "0.5188204", "0.5183864", "0.5166997", "0.51661414", "0.516423", "0.51381946", "0.5135508", "0.51331806", "0.5119339", "0.51053196", "0.5102429", "0.50881505", "0.5080583", "0.5079922", "0.5074198", "0.5065837", "0.5058862", "0.50507843", "0.5045955", "0.5045955", "0.5045124", "0.50429606", "0.50391006", "0.50365233", "0.5034961", "0.5029059", "0.5029059", "0.5029059", "0.5027772", "0.501639", "0.5012766", "0.50104594", "0.501022", "0.5008524", "0.500501", "0.500501", "0.50025535", "0.50025535", "0.500176", "0.50017023", "0.5000734", "0.49922916", "0.49904174", "0.49904174", "0.4989961", "0.4971644", "0.49703297", "0.49550867", "0.49549365", "0.49542555", "0.49542555", "0.49542555", "0.49542063", "0.49182108", "0.49161786", "0.49097374", "0.48996177", "0.4883585", "0.4883585", "0.4883471", "0.48783112" ]
0.51495177
44
Will store the service to self.
public function testWillStoreTheServiceToSelf() { $this->controller = new Controller($this->service, $this->factory); static::assertSame( $this->service, \PHPUnit_Framework_Assert::readAttribute($this->controller, "service") ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saved(Service $Service)\n {\n //code...\n }", "public function saving(Service $Service)\n {\n //code...\n }", "public function setService(){\n if($this->getRecord()->getRecordType() === \"yt\"){\n $this->service = new YoutubeService();\n }\n if($this->getRecord()->getRecordType() === \"gm\"){\n $this->service = new GoogleMapService();\n }\n }", "public function setService($service) {\r\n\t\t$this->service = $service;\r\n\t}", "public function save()\n\t{\n\t\t$this->container->save($this);\n\t}", "public function giveService($key, $Service);", "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 __construct()\n {\n $this->services = [];\n }", "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 }", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "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 setServiceService (ServiceService $serviceService) {\n $this->serviceService = $serviceService;\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function storeSelf() {\n trace('[METHOD] '.__METHOD__);\n\t\t$dataArray = $this->getDataArray();\n $this->set_uid(tx_ptgsaaccounting_orderCreditBalanceAccessor::getInstance()->storeOrderCreditBalanceData($dataArray));\n \n\n\t}", "public function persist()\n {\n $this->eventManager->dispatchEvent(['persist_before'], [get_class($this)]);\n if (!empty($this->handlerInterface)) {\n $result = $this->handlerFactory->create($this->handlerInterface)->persist($this);\n if (!empty($result)) {\n foreach ($result as $key => $value) {\n $this->data[$key] = $value;\n }\n }\n }\n $this->eventManager->dispatchEvent(['persist_after'], [get_class($this)]);\n }", "public function store()\n\t {\n\t //\n\t }", "public function setService(BaseService $service)\n {\n $this->_service = $service;\n }", "public function registerService($service)\n {\n $this->services[] = $service;\n }", "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 __construct($service) {\n $this->service = $service;\n }", "public function store() {\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\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.6565794", "0.62807906", "0.62687933", "0.615442", "0.6130171", "0.6113248", "0.6109353", "0.5979915", "0.59739697", "0.5964481", "0.5964481", "0.5964481", "0.5945875", "0.5910184", "0.5910047", "0.58650005", "0.5858709", "0.58484536", "0.58457196", "0.5829787", "0.5819255", "0.5819255", "0.5819255", "0.579137", "0.5790921", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847", "0.5770847" ]
0.5956099
12
Will store the factory to self.
public function testWillStoreTheFactoryToSelf() { $this->controller = new Controller($this->service, $this->factory); static::assertSame( $this->factory, \PHPUnit_Framework_Assert::readAttribute($this->controller, "factory") ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final protected function setFactory($factory){\n\t\t\t$this->factory = $factory;\n\t\t}", "public function getFactory()\n {\n return $this->_factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function add_factory() {\n $this->factorycount++;\n }", "public function getFactory() {}", "public static function setFactory(/*ECash_Factory*/ $factory)\n\t{\n\t\tself::$factory = $factory;\n\t}", "private function registerFactoryInRepository(): FactoryInterface\n {\n if (!empty($this->statedClassName)) {\n $this->factoryRepository[$this->statedClassName] = $this;\n }\n\n return $this;\n }", "protected static function newFactory()\n {\n //\n }", "protected function saveFactoryState()\n\t{\n\t\t$this->savedFactoryState['application'] = JFactory :: $application;\n\t\t$this->savedFactoryState['config'] = JFactory :: $config;\n\t\t$this->savedFactoryState['session'] = JFactory :: $session;\n\t\t$this->savedFactoryState['language'] = JFactory :: $language;\n\t\t$this->savedFactoryState['document'] = JFactory :: $document;\n\t\t$this->savedFactoryState['acl'] = JFactory :: $acl;\n\t\t$this->savedFactoryState['database'] = JFactory::$database;\n\t\t$this->savedFactoryState['mailer'] = JFactory :: $mailer;\n\t\t$this->savedFactoryState['shconfig'] = SHFactory::$config;\n\t\t$this->savedFactoryState['shdispatcher'] = SHFactory::$dispatcher;\n\t}", "public function getFactory(): Factory;", "public function loadFactory()\n {\n $this->di = new Di\\FactoryDefault;\n\n return $this;\n }", "public function make($factory);", "public function __construct()\n {\n $this->factories = [];\n }", "public static function getFactory()\r\n\t{\r\n\t\treturn self::$factory;\r\n\t}", "public function setFactory($factory)\n\t{\n\t\t$this->factory = $factory;\n\t\t\n\t\treturn $this;\n\t}", "public function getFactory()\n {\n return new Factory();\n }", "public static function setFactoryFunction( $factory ) \n\t{\n\t\tself::$factory = $factory;\n\t}", "public function store()\n {\n return $this->create();\n }", "function storeAndNew() {\n $this->store();\n }", "public function testFactoryReturnsAnIndividualInstance()\n\t{\n\t\t$instance = Dispatcher::instance();\n\n\t\t$factory = Dispatcher::factory();\n\n\t\t$this->assertNotSame($factory, $instance);\n\t}", "protected function registerFactory()\n {\n $this->app->singleton('freshdesk.factory', function () {\n return new FreshdeskFactory();\n });\n $this->app->alias('freshdesk.factory', FreshdeskFactory::class);\n }", "protected static function newFactory()\n {\n return PostFactory::new();\n }", "function getFactory(){\n\treturn $_SESSION[ SESSION_NAME_SPACE ][ 'factory' ];\n}", "public function __construct()\n {\n parent::__construct();\n $this->factory = null;\n }", "protected function save_instance() {\n\t\twponion_callback( 'wponion_' . $this->module . '_registry', array( &$this ) );\n\t}", "private function create_storage(callable $factory): Storage\n\t{\n\t\tassert($this instanceof Application);\n\n\t\treturn $factory($this);\n\t}", "protected static function newFactory()\n {\n return StateFactory::new();\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "protected function factory()\n {\n $this->request = $this->request();\n $this->response = $this->response();\n $this->route = $this->route();\n\n return $this;\n }", "protected function getFactory()\n {\n if (! isset($this->factory)) {\n $this->factory = new \\MphpMusicBrainz\\Adapter\\Xml\\XmlFactory();\n }\n return $this->factory;\n }", "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 __construct(Factory $factory)\n {\n $this->factory = $factory;\n }", "public function store()\n\t {\n\t //\n\t }", "public function store() {\n \n }", "public function getActiveFactory()\n {\n return $this->getFactory($this->getActiveFactoryName());\n }", "protected function restoreFactoryState()\n\t{\n\t\tJFactory :: $application = $this->savedFactoryState['application'];\n\t\tJFactory :: $config = $this->savedFactoryState['config'];\n\t\tJFactory :: $session = $this->savedFactoryState['session'];\n\t\tJFactory :: $language = $this->savedFactoryState['language'];\n\t\tJFactory :: $document = $this->savedFactoryState['document'];\n\t\tJFactory :: $acl = $this->savedFactoryState['acl'];\n\t\tJFactory::$database = $this->savedFactoryState['database'];\n\t\tJFactory :: $mailer = $this->savedFactoryState['mailer'];\n\t\tSHFactory::$config = $this->savedFactoryState['shconfig'];\n\t\tSHFactory::$dispatcher = $this->savedFactoryState['shdispatcher'];\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\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.653443", "0.6402632", "0.6351246", "0.6351246", "0.6351246", "0.6351246", "0.6351246", "0.6351246", "0.6351246", "0.6351246", "0.6341162", "0.6333475", "0.63283134", "0.6220093", "0.62157875", "0.6135545", "0.6079454", "0.6043304", "0.6030623", "0.5974056", "0.58680505", "0.58402085", "0.5805309", "0.5716975", "0.5706775", "0.5683173", "0.5678356", "0.5664196", "0.56301284", "0.5611327", "0.5606346", "0.5596418", "0.559616", "0.5590912", "0.55902356", "0.5579644", "0.5579644", "0.5579644", "0.5554309", "0.5529158", "0.55243593", "0.55243593", "0.55243593", "0.5521586", "0.5501936", "0.54772115", "0.5466028", "0.5463161", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814", "0.54558814" ]
0.65878534
0
Remove the specified resource from storage.
public function destroy($id) { $comment = Comment::findOrFail($id); $image_id = $comment->image->id; if(auth()->user()->id == $comment->user->id || $comment->image->user->id == auth()->user()->id){ $comment->delete(); return redirect()->route('image.show',$image_id); }else{ return redirect()->route('image.show',$image_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
/ Return plugin informations for acl handling
static function plInfo() { return array( 'plShortName' => _('Services'), 'plDescription' => _('Server services'), 'plSelfModify' => FALSE, 'plObjectType' => array('server'), 'plPrority' => 5, 'plProvidedAcls' => array() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function pluginDetails();", "function getPluginInfo() {\n return [\n 'name' => $this->getPluginName(),\n 'description' => 'Adds JSON support for CardDAV',\n 'link' => 'http://sabre.io/dav/carddav/',\n ];\n }", "function adrotate_get_plugin_information($false, $action, $args) {\n\tif($action !== 'plugin_information') {\n\t\treturn false;\n\t}\n\n\tif(!isset($args->slug) OR $args->slug != \"adrotate-pro\") {\n\t\treturn $false;\n\t}\n\t\n\t$plugin_version = get_plugins()['adrotate-pro/adrotate-pro.php']['Version']; \n\t$license = get_option('adrotate_activate');\n\t\n\t$request_args = array(\n\t\t'slug' => \"adrotate-pro\", \n\t\t'version' => $plugin_version, \n\t\t'instance' => $license['instance'], \n\t\t'email' => $license['email'], \n\t\t'platform' => get_option('siteurl')\n\t);\n\t$request = wp_remote_post('https://ajdg.solutions/api/updates/7/', adrotate_prepare_request($action, $request_args));\n \t\n\tif(!is_wp_error($request) AND wp_remote_retrieve_response_code($request) === 200) {\n\t\t$request = json_decode($request['body'], 1);\n\n\t\t$res = new stdClass();\n\t\t$res->name = $request['name'];\n\t\t$res->slug = \"adrotate-pro\";\n\t\t$res->last_updated = $request['release_date'];\n\n\t\t$res->version = $request['version'];\n\t\t$res->tested = $request['tested'];\n\t\t$res->requires = $request['requires_wp'];\n\t\t$res->requires_php = $request['requires_php'];\n\n\t\t$res->author = $request['author'];\n\t\t$res->donate_link = $request['donate_link'];\n\n\t\t$res->homepage = $request['plugin_url'];\n\t\t$res->download_link = $request['download_url'];\n\t\t$res->active_installs = $request['active_installs'];\n\n\t\t$res->sections = array(\n\t\t\t'description' => $request['sections']['description'],\n\t\t\t'changelog' => $request['sections']['changelog'],\n\t\t); \n\t\tif(isset($request['sections']['debug'])) {\n\t\t\t$res->sections['debug'] = $request['sections']['debug'];\n\t\t}\n\n\t\t$res->banners = array(\n\t\t\t'low' => $request['banners']['low'],\n \t'high' => $request['banners']['high']\n\t\t);\n \t} else {\n\t\t$response_code = wp_remote_retrieve_response_code($request);\n\t\t$response_message = wp_remote_retrieve_response_message($request);\n\t\t$res = new WP_Error('plugins_api_failed', 'An Error occurred: [ERROR '.$response_code.'] '.$response_message.'. Try again in a few minutes or contact support if the error persists.');\n\t}\n\n\treturn $res;\n}", "function getPluginInfo() {\n\n return [\n 'name' => $this->getPluginName(),\n 'description' => 'This plugin implements WebDAV resource sharing',\n 'link' => 'https://github.com/evert/webdav-sharing'\n ];\n\n }", "static function plInfo()\n {\n return array(\n \"plShortName\" => _(\"Argonaut Mirror settings\"),\n \"plDescription\" => _(\"Argonaut Mirror settings\").\" (\"._(\"Services\").\")\",\n \"plIcon\" => \"plugins/argonaut/images/iconMiniMirrorConfig.png\",\n\n \"plProvidedAcls\" => parent::generatePlProvidedAcls(self::getAttributesInfo())\n );\n }", "function getPluginInfo() {\n return [\n 'name' => $this->getPluginName(),\n 'description' => 'Adds Text support for CalDAV',\n 'link' => 'http://sabre.io/dav/caldav/',\n ];\n }", "function _gizra_access_ctools_plugin_api() {\n $args = func_get_args();\n $module = array_shift($args);\n $api = array_shift($args);\n if ($module == \"context\" && $api == \"context\") {\n return array(\"version\" => 3);\n }\n else if ($module == \"system\" && $api == \"strongarm\") {\n return array(\"version\" => 1);\n }\n}", "abstract protected function getAcl();", "public function pluginDetails(): array\n {\n return [\n 'name' => 'RoutesBrowser',\n 'description' => 'Plugin for browse routes',\n 'author' => 'GromIT',\n 'icon' => 'icon-question'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Menu Item Session Check',\n 'description' => 'Hide menu item(s) by checking RainLab Session component on referenced CMS layout or page',\n 'author' => 'Ryan Showers',\n 'icon' => 'icon-sitemap'\n ];\n }", "public function pluginDetails(): array\n {\n return [\n 'name' => 'definer.jivosite::lang.plugin.name',\n 'description' => 'definer.jivosite::lang.plugin.description',\n 'author' => 'Definer',\n 'icon' => 'icon-comments'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'general',\n 'description' => 'General configuration',\n 'author' => 'kironuniversity',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'sasUtilities',\n 'description' => 'Some useful tools for other plugins.',\n 'author' => 'Silver Arrow Software',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'hon.honcuratoruser::lang.plugin.name',\n 'description' => 'hon.honcuratoruser::lang.plugin.description',\n 'author' => 'HON',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'acgp.flyingsite::lang.plugin.name',\n 'description' => 'acgp.flyingsite::lang.plugin.description',\n 'author' => 'Air Cadet Gliding Program',\n 'icon' => 'icon-plane',\n 'homepage' => 'https://cadetflying.site',\n ];\n }", "public function info() {\n $plugin = $this->viewVars['vv_authenticator']['Authenticator']['plugin'];\n $this->Authenticator->$plugin->setConfig($this->viewVars['vv_authenticator']); \n \n $this->set('vv_status', $this->Authenticator->$plugin->status($this->request->params['named']['copersonid']));\n \n $this->set('title_for_layout', $this->viewVars['vv_authenticator']['Authenticator']['description']);\n }", "public function plugin_info()\n {\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'SimpleCatalog',\n 'description' => 'This is a simple back-end plugin for managing displayable products.',\n 'author' => 'Wboyz',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Iklan',\n 'description' => 'Pengaturan Iklan',\n 'author' => 'PanatauSolusindo',\n 'icon' => 'icon-diamond'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'tattler',\n 'description' => 'No description provided yet...',\n 'author' => 'Grohman',\n 'icon' => 'icon-leaf'\n ];\n }", "public function listPlugin()\n\t{\n\t\t\n\t}", "public function pluginDetails()\n {\n return [\n 'name' => 'Service Me',\n 'description' => 'Service Me Components',\n 'author' => 'Darren Miller',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'xitara.nexus::lang.plugin.name',\n 'description' => 'xitara.nexus::lang.plugin.description',\n 'author' => 'xitara.nexus::lang.plugin.author',\n 'homepage' => 'xitara.nexus::lang.plugin.homepage',\n 'icon' => '',\n 'iconSvg' => 'plugins/xitara/nexus/assets/images/icon-nexus.svg',\n ];\n }", "public function pluginDetails()\r\n {\r\n return [\r\n 'name' => 'Leads',\r\n 'description' => 'No description provided yet...',\r\n 'author' => 'Appsauces',\r\n 'icon' => 'icon-book'\r\n ];\r\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Core',\n 'description' => 'No description provided yet...',\n 'author' => 'Ams',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails() {\n return [\n 'name' => 'elearning',\n 'description' => 'No description provided yet...',\n 'author' => 'hung.do',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'rainlab.location::lang.plugin.name',\n 'description' => 'rainlab.location::lang.plugin.description',\n 'author' => 'Alexey Bobkov, Samuel Georges',\n 'icon' => 'icon-globe',\n 'homepage' => 'https://github.com/rainlab/location-plugin'\n ];\n }", "public function pluginDetails() {\n return [\n 'name' => 'janvince.smallextensions::lang.plugin.name',\n 'description' => 'janvince.smallextensions::lang.plugin.description',\n 'author' => 'Jan Vince',\n 'icon' => 'icon-universal-access'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'kodermax.gallery::lang.plugin.name',\n 'description' => 'kodermax.gallery::lang.plugin.description',\n 'author' => 'Maksim Karpychev',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Todo',\n 'description' => 'Just a simple todo widget',\n 'author' => 'Hartviglarsen',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Food',\n 'description' => 'create a Food Menu with ease.',\n 'author' => 'Milo',\n 'icon' => 'icon-cutlery'\n ];\n }", "public function getPluginInfo()\n {\n return [\n 'name' => $this->getPluginName(),\n 'description' => 'HTML Email delivery (rfc6047) for CalDAV scheduling',\n 'link' => 'http://github.com/tchapi/davis',\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'luketowers.pwnedpasswords::lang.plugin.name',\n 'description' => 'luketowers.pwnedpasswords::lang.plugin.description',\n 'author' => 'Luke Towers',\n 'icon' => 'icon-check',\n 'homepage' => 'https://github.com/LukeTowers/oc-pwnedpasswords-plugin',\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Import',\n 'description' => 'Import datas from csv files',\n 'author' => 'Tiipiik',\n 'icon' => 'icon-magic'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Cloudflare',\n 'description' => 'Puts October in HTTPS protocol correctly when behind the cloudflare reverse proxy.',\n 'author' => 'TheDMSGrp',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Klyp Page Builder',\n 'description' => 'Easily order component on pages.',\n 'author' => 'Klyp',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'userprofile',\n 'description' => 'No description provided yet...',\n 'author' => 'stepanozhigov',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Тинькофф Банк',\n 'description' => 'Проведение платежей через Tinkoff EACQ.',\n 'author' => 'Sozonov Alexey',\n 'icon' => 'icon-shopping-cart',\n 'homepage' => 'https://sozonov-alexey.ru'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'depcore.portfolio::lang.plugin.name',\n 'description' => 'depcore.portfolio::lang.plugin.description',\n 'author' => 'depcore',\n 'icon' => 'icon-portfolio'\n ];\n }", "function getPlugins();", "public function pluginDetails()\n {\n return [\n 'name' => 'EaxOctober',\n 'description' => 'Стандартное расширение Quadrowin',\n 'author' => 'quadrowin',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Newsletter',\n 'description' => 'Newsletter contact',\n 'author' => 'Cifq',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'fenncs.newspageviews::lang.plugin.name',\n 'description' => 'fenncs.newspageviews::lang.plugin.description',\n 'author' => 'Fon E. Noel NFEBE',\n 'icon' => 'oc-icon-eye',\n 'homepage' => 'https://github.com/fenn-cs/newspageviews'\n ];\n }", "function getInfo(){\n return array(\n 'author' => 'seism',\n 'email' => '[email protected]',\n 'date' => '2011-5-1',\n 'name' => 'Embed GitHub Plugin',\n 'desc' => 'Show a GitHUb widget in your wiki',\n 'url' => 'http://www.dokuwiki.org/wiki:plugins',\n );\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'feegleweb.changelog::lang.plugin.name',\n 'description' => 'feegleweb.changelog::lang.plugin.description',\n 'author' => 'Dave Shoreman',\n 'icon' => 'icon-list-alt',\n 'homepage' => 'https://github.com/feegleweb/oc-changelog-plugin',\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'cptmeatball.pricetables::lang.plugin.name',\n 'description' => 'cptmeatball.pricetables::lang.plugin.description',\n 'author' => 'cptmeatball',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'portfolio',\n 'description' => 'Simple portfolio plugin',\n 'author' => 'AngryGantz',\n 'icon' => 'icon-briefcase'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'StaffPages',\n 'description' => 'Adds the ability to add staff and have page update dynamically when new entries added',\n 'author' => 'Stone',\n 'icon' => 'icon-venus-double'\n ];\n }", "public function component_info() {\n return array(\n 'name' => 'Accessibility Content Utility',\n 'description' => 'Add utility functions to Content for Accessibility',\n 'category' => 'accessibility',\n );\n }", "public function acl()\n {\n return array(\n 'view' => array('index', 'view', 'get', 'indexAction', 'viewAction', 'getMethod'),\n 'edit' => array('new', 'edit', 'editlist', 'delete', 'post', 'put', 'newAction', 'editAction', 'editlistAction', 'deleteAction', 'postMethod', 'putMethod', 'deleteMethod')\n );\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Menus',\n 'description' => 'Provides Foundation 5 menu components.',\n 'author' => 'stone',\n 'icon' => 'icon-bars'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'music',\n 'description' => 'No description provided yet...',\n 'author' => 'jc91715',\n 'icon' => 'icon-leaf'\n ];\n }", "function getInfo(){\n return array(\n 'author' => 'Oleg Lavrovsky',\n 'email' => '[email protected]',\n 'date' => '2013-2-1',\n 'name' => 'New Page Button Plugin',\n 'desc' => 'Simplifies page creation for users',\n 'url' => 'http://oleg.utou.ch',\n );\n }", "function og_views_extra_views_plugins() {\n return array(\n 'access' => array(\n 'group_member' => array(\n 'title' => t('Group Membership'),\n 'help' => t('Member of the current organic group'),\n 'handler' => 'og_views_extra_plugin_access_group_member',\n 'help topic' => 'access-none',\n 'uses options' => TRUE,\n ),\n )\n );\n}", "public function pluginDetails()\n {\n return [\n 'name' => 'pkleindienst.githubprojects::lang.plugin.name',\n 'description' => 'pkleindienst.githubprojects::lang.plugin.description',\n 'author' => 'Pascal Kleindienst',\n 'icon' => 'icon-github',\n 'homepage' => 'https://github.com/PascalKleindienst/octobercms-github-projects'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'FloUsps',\n 'description' => 'FloCommerce USPS Shipping Plugin',\n 'author' => 'Radiantweb',\n 'icon' => 'icon-shopping-cart'\n ];\n }", "function _mn_slingshot_ctools_plugin_api() {\n $args = func_get_args();\n $module = array_shift($args);\n $api = array_shift($args);\n if ($module == \"feeds\" && $api == \"feeds_importer_default\") {\n return array(\"version\" => 1);\n }\n else if ($module == \"keyauth\" && $api == \"keyauth_key_default\") {\n return array(\"version\" => 1);\n }\n else if ($module == \"strongarm\" && $api == \"strongarm\") {\n return array(\"version\" => 1);\n }\n}", "public function pluginDetails()\n\t{\n\t\treturn [\n\t\t\t'name'\t\t\t\t=> 'Framework',\n\t\t\t'description'\t=> trans('axc.framework::lang.plugin.description'),\n\t\t\t'author'\t\t\t=> 'Alex Carrega',\n\t\t\t'icon'\t\t\t\t=> 'icon-cubes'\n\t\t];\n\t}", "protected function _registerPlugins()\n\t{\n\t\t//$aclPlugin = new AclPlugins($adminAclController);\n\t\t//$logPlugin = new LogPlugins();\n\t\t\n\t\t//Daophp::getInstance() -> registerPlugin('acl', $aclPlugin);\n\t\t//Daophp::getInstance() -> registerPlugin('log', $logPlugin);\n\t}", "function install_plugin_information()\n {\n }", "public function providePermissions() {\n return array(\n 'CMS_ACCESS_KapostBridgeLogViewer'=>array(\n 'name'=>_t(\n 'CMSMain.ACCESS',\n \"Access to '{title}' section\",\n \"Item in permission selection identifying the admin section. Example: Access to 'Files & Images'\",\n array('title'=>_t('KapostBridgeLogViewer.MENUTITLE', 'Kapost Bridge Logs'))\n ),\n 'category'=>_t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access')\n )\n );\n }", "function _ec_partners_ctools_plugin_api() {\n $args = func_get_args();\n $module = array_shift($args);\n $api = array_shift($args);\n if ($module == \"feeds\" && $api == \"feeds_importer_default\") {\n return array(\"version\" => 1);\n }\n else if ($module == \"strongarm\" && $api == \"strongarm\") {\n return array(\"version\" => 1);\n }\n}", "public function getPlugin();", "public function getPlugin();", "public function getAcl() {\n\n //throw new \\Exception(\"something\");\n\n\n\n $acl = new AclList();\n\n $acl->setDefaultAction(Acl::DENY);\n\n //Register roles\n $roles = array(\n 'users' => new Role('Users'),\n 'guests' => new Role('Guests'),\n 'operators' => new Role('Operators')\n );\n foreach ($roles as $role) {\n $acl->addRole($role);\n }\n\n //Private area resources\n $privateResources = array(\n 'report' => array('index', 'main', 'operator', 'mjump', 'network', 'statistics', 'getavgdata', 'payoutreport', 'aggSummary', 'reportbyhour', 'notworking', 'getCarrier', 'getCarrier2', 'statisticsNew', 'index2', 'statistics2', 'lpreport'),\n 'reportmb' => array('index', 'main', 'operator', 'mjump', 'network', 'statistics', 'getavgdata', 'payoutreport', 'aggSummary', 'reportbyhour', 'getCarrier', 'getCarrier2', 'statisticsNew', 'index2', 'statistics2'),\n 'operation' => array('index', 'mainstreamsourcenewname', 'getClientInfo', 'jump', 'updateCampaign', 'getCampaignLink', 'createSource', 'createAggregator', 'getAggInfo', 'link_checker', 'campaign_url', 'createCategory', 'findLatestConv', 'copySource'),\n 'slink' => array('index', 'ajaxtable', 'ajaxinsertgroup', 'ajaxgroupcombo', 'ajaxname', 'ajaxclone', 'ajaxdelete', 'ajaxupdatecell', 'ajaxdeleterow', 'ajaxclonerow', 'ajaxinsertmgroup', 'set_country', 'unset_country'),\n 'smlink' => array('index', 'ajaxtable', 'ajaxinsertgroup', 'ajaxgroupcombo', 'ajaxname', 'ajaxclone', 'ajaxdelete', 'ajaxupdatecell', 'ajaxdeleterow', 'ajaxclonerow', 'ajaxinsertmgroup'),\n 'affiliate' => array('index', 'removeAffiliation', 'updatePayout', 'newAffiliation'),\n 'isp' => array('index', 'get_groups', 'get_group', 'create_group', 'create_isp', 'delete_isp'),\n 'mainstream' => array('index', 'main', 'getCountriesWithDomainid', 'getAllCategories', 'getNjumps', 'getMainstreamHistory', 'saveNewRow'),\n 'mainstreambulk' => array('index', 'gallery', 'updateBannerId', 'insertbanners', 'editbanner', 'searchbanners', 'createBulk', 'editBulk', 'cloneBulk', 'downloadZip', 'tableBulk', 'getNjump', 'getCountry', 'getSources', 'getBulk', 'getBanners', 'downloadXlsx'),\n 'alert' => array('index', 'getSourcesAlerts', 'getClientsAlerts', 'getCountriesAlerts', 'getTablesAlerts', 'newAlert', 'editAlert', 'editTables', 'removeAlert', 'newCountryAlert', 'newAggAlert', 'newSrcAlert', 'getSourceTypeAlerts', 'newSourceTypeAlert'),\n 'invest' => array('index', 'upload', 'report', 'setfilter', 'campaigns', 'getReportExcel', 'totalsRow'),\n 'security' => array('index', 'deletei'),\n 'google' => array('index', 'downloadreport', 'addgooglesource'),\n 'vuclipsreport' => array('index', 'addOne', 'removeOne', 'editOne'),\n 'integration' => array('index', 'save_agregator', 'save_source', 'get_excel', 'report_conversion', 'save_user', 'save_domain', 'delete_domain', 'new_domain', 'get_clicksInfo', 'setEditClicks', 'reverse_multiclick', 'save_risqiq', 'delete_risqiq'),\n 'dashboard' => array('index', 'last7Days', 'percentageShift'),\n 'ticketing' => array('index', 'createTicket', 'editTicket'),\n 'jump' => array('index', 'uploadCsv'),\n 'crm' => array('index', 'getClient', 'createClient', 'editClient', 'getClients', 'last7Days'),\n 'autobid' => array('index', 'addcampaign', 'editcampaign', 'deletecampaign', 'refreshTable', 'downloadReport', 'addAccount', 'resetpass'),\n 'ip' => array('index', 'getIps', 'getCustomIPs', 'getcarriers', 'getclientips', 'testphalconshit', 'addNewCarrier', 'addNewCountry'),\n 'freporting' => array('index', 'upload', 'setFilter', 'updateComment', 'downloadCsv', 'getChart', 'uploadMultiAgg', 'getAffs', 'getAggs'),\n 'sourcesapi' => array('index', 'downloadReport'),\n 'permission' => array('index', 'countries', 'srcagr', 'updatecountry', 'updateAgregators', 'updateSources'),\n 'customreport' => array('index', 'getAttributes', 'savecustomreport', 'createcustom', 'getMyCustomReports', 'echoReport', 'deleteSavedReport', 'downloadReport'),\n 'campaignblocker' => array('index', 'getAffected', 'executeblock', 'executerestore', 'getcampaigns', 'executetemprestore', 'blockbyname'),\n 'rates' => array('index', 'getRateThreeMonths'),\n 'offerpack' => array('index', 'getDims', 'getCarriers', 'newOfferpack', 'newOfferpack2', 'offerpackedit', 'getCarriersMultiple', 'getCampaignJumpName', 'setFilter', 'updateCpa', 'addOffersExcel', 'disableOffer', 'getScreenshot', 'getBanners', 'getCM', 'getAccount', 'deletebanner', 'deletescreenshot', 'getofferinfo', 'updateStatus', 'index2', 'offerpackedit2', 'setFilter2'),\n 'ticketsystem' => array('index', 'editTicket', 'createTicket', 'getUsersMultiple', 'create_ticket', 'sendMessage', 'refreshChat', 'downloadFile', 'uploadFile', 'edit_ticket', 'pickTicket', 'closeTicket', 'reopenTicket', 'setFilter', 'downloadExcel'),\n 'ticketsystem2' => array('index', 'editTicket', 'createTicket', 'getUsersMultiple', 'create_ticket', 'sendMessage', 'refreshChat', 'downloadFile', 'uploadFile', 'edit_ticket', 'pickTicket', 'closeTicket', 'reopenTicket', 'setFilter', 'downloadExcel', 'editticket_itsdes', 'editTicket', 'sendToValidation', 'putOnHold', 'putInProgress', 'refuse', 'request', 'assign', 'ticketok', 'ticketnotok', 'closeticket', 'infosent', 'reopenticket', 'changeDeadline'),\n 'njump' => array('index', 'changeGlobalName', 'getStatistics', 'favoriteNjump', 'getNjumps', 'getnjump', 'newnjump', 'njumpedit', 'njumpclone', 'njumpdelete', 'njumpdeleterow', 'njumpnewrow', 'updatecell', 'njumpsortby', 'indexm', 'njumpeditm', 'mreset', 'getnjumpsbycountry', 'njumpclonemultiplelines', 'njumpdeletemultiplerow'),\n 'landingmanager' => array('index', 'createeditlp', 'getDims', 'setFilter', 'getlpinfo', 'newEditLp', 'getFilters', 'getOfferByGeo', 'insertNewLp', 'newlp', 'getLpInformation', 'saveLp', 'deleteLp', 'viewlp', 'getLpInformationView'),\n 'admin' => array('index', 'displayAgregators', 'removeAgregators', 'removeCountries', 'addAgregators', 'getAllAgregatorsUsers', 'displayCountries', 'getAllCountriesUsers', 'addCountries'),\n 'client' => array('index', 'searchAll', 'getData', 'searchData', 'createClient', 'saveClient', 'updateClient', 'getClientUpdated', 'getTotalRows', 'hideClient', 'getGraphData', 'chatSave', 'getHistoryInfo', 'getIssueInfo'),\n 'sales' => array('index', 'getData', 'createExcel', 'getCarriers')\n );\n foreach ($privateResources as $resource => $actions) {\n $acl->addResource(new Resource($resource), $actions);\n }\n //operation area resources\n $operationResources = array(\n 'operation' => array('index', 'jump', 'updateCampaign', 'getCampaignLink', 'createSource', 'createAggregator', 'getAggInfo', 'link_checker', 'campaign_url', 'createCategory', 'findLatestConv', 'copySource'),\n 'report' => array('index', 'statistics', 'getavgdata', 'aggSummary', 'getCarrier', 'index2', 'statistics2', 'getCarrier2'),\n 'reportmb' => array('index', 'statistics', 'getavgdata', 'aggSummary', 'getCarrier', 'index2', 'statistics2', 'getCarrier2'),\n 'security' => array('index', 'deletei'),\n 'mainstream' => array('index', 'main', 'getCountriesWithDomainid', 'getAllCategories', 'getNjumps', 'getMainstreamHistory', 'saveNewRow'),\n 'mainstreambulk' => array('index'),\n 'vuclipsreport' => array('index', 'addOne', 'removeOne', 'editOne'),\n 'integration' => array('index', 'save_agregator', 'save_source', 'get_excel', 'report_conversion', 'save_user', 'save_domain', 'delete_domain', 'new_domain', 'get_clicksInfo', 'setEditClicks', 'reverse_multiclick', 'save_risqiq', 'delete_risqiq'),\n 'dashboard' => array('index', 'chartinfo', 'reportbyhour', 'percentageShift', 'last7Days', 'getRateThreeMonths'),\n 'ticketing' => array('index', 'createTicket', 'editTicket'),\n 'jump' => array('index', 'uploadCsv'),\n 'crm' => array('index', 'getClient', 'createClient', 'editClient', 'getClients', 'last7Days'),\n 'autobid' => array('index', 'addcampaign', 'editcampaign', 'deletecampaign', 'refreshTable', 'downloadReport', 'addAccount', 'resetpass'),\n 'ip' => array('index', 'getIps', 'getCustomIPs', 'getcarriers', 'getclientips', 'addNewCarrier', 'addNewCountry'),\n 'freporting' => array('index', 'upload', 'setFilter', 'updateComment', 'downloadCsv', 'getChart', 'uploadMultiAgg', 'getAffs', 'getAggs'),\n 'sourcesapi' => array('index', 'downloadReport'),\n 'rates' => array('index', 'getRateThreeMonths'),\n 'offerpack' => array('index', 'getDims', 'getCarriers', 'newOfferpack', 'offerpackedit', 'getCarriersMultiple', 'getCampaignJumpName', 'setFilter', 'updateCpa', 'addOffersExcel', 'disableOffer', 'getScreenshot', 'getBanners', 'getCM', 'getAccount', 'deletebanner', 'deletescreenshot', 'getofferinfo', 'updateStatus', 'index2', 'offerpackedit2', 'setFilter2'),\n 'ticketsystem' => array('index', 'editTicket', 'createTicket', 'getUsersMultiple', 'create_ticket', 'sendMessage', 'refreshChat', 'downloadFile', 'uploadFile', 'edit_ticket', 'pickTicket', 'closeTicket', 'reopenTicket', 'setFilter', 'downloadExcel'),\n 'ticketsystem2' => array('index', 'editTicket', 'createTicket', 'getUsersMultiple', 'create_ticket', 'sendMessage', 'refreshChat', 'downloadFile', 'uploadFile', 'edit_ticket', 'pickTicket', 'closeTicket', 'reopenTicket', 'setFilter', 'downloadExcel', 'editticket_itsdes', 'editTicket', 'sendToValidation', 'putOnHold', 'putInProgress', 'refuse', 'request', 'assign', 'ticketok', 'ticketnotok', 'closeticket', 'infosent', 'reopenticket', 'changeDeadline'),\n 'njump' => array('index'),\n 'campaignblocker' => array('index', 'getAffected', 'executeblock', 'executerestore', 'getcampaigns'),\n 'landingmanager' => array('index', 'createeditlp', 'getDims', 'setFilter', 'getlpinfo', 'newEditLp', 'getFilters', 'getOfferByGeo', 'insertNewLp', 'newlp', 'getLpInformation', 'saveLp', 'deleteLp', 'viewlp', 'getLpInformationView'),\n 'admin' => array('index', 'displayAgregators', 'removeAgregators', 'removeCountries', 'addAgregators', 'getAllAgregatorsUsers', 'displayCountries', 'getAllCountriesUsers', 'addCountries'),\n 'client' => array('index', 'searchAll', 'getData', 'searchData', 'createClient', 'saveClient', 'updateClient', 'getClientUpdated', 'getTotalRows', 'hideClient', 'getGraphData', 'chatSave', 'getHistoryInfo', 'getIssueInfo'),\n 'sales' => array('index', 'getData', 'createExcel', 'getCarriers')\n );\n foreach ($operationResources as $resource => $actions) {\n $acl->addResource(new Resource($resource), $actions);\n }\n\n //Public area resources\n $publicResources = array(\n 'index' => array('index'),\n 'errors' => array('show404', 'show500'),\n 'session' => array('index', 'register', 'start', 'end'),\n 'offerpack' => array('getzip')\n );\n foreach ($publicResources as $resource => $actions) {\n $acl->addResource(new Resource($resource), $actions);\n }\n\n //Grant access to public areas to both users and guests\n foreach ($roles as $role) {\n foreach ($publicResources as $resource => $actions) {\n $acl->allow($role->getName(), $resource, '*');\n }\n }\n\n //Grant acess to private area to role Users\n foreach ($privateResources as $resource => $actions) {\n foreach ($actions as $action) {\n $acl->allow('Users', $resource, $action);\n }\n }\n //Grant acess to operations area to role Operations\n foreach ($operationResources as $resource => $actions) {\n foreach ($actions as $action) {\n $acl->allow('Operators', $resource, $action);\n }\n }\n\n //The acl is stored in session, APC would be useful here too\n $this->persistent->acl = $acl;\n\n\n return $this->persistent->acl;\n }", "function xanthia_admin_config()\n{\n\n\t/** Security check - important to do this as early as possible to avoid\n\t * potential security holes or just too much wasted processing. For the\n\t * main function we want to check that the user has at least edit privilege\n\t * for some item within this component, or else they won't be able to do\n\t * anything and so we refuse access altogether. The lowest level of access\n\t * for administration depends on the particular module, but it is generally\n\t * either 'edit' or 'delete'\n\t */\n\tif (!pnSecAuthAction(0, 'Xanthia::', '::', ACCESS_EDIT)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n \t}\n\n\t// Load user API\n\tif (!pnModAPILoad('Xanthia','user')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\n // Load admin API\n\tif (!pnModAPILoad('Xanthia', 'admin')) {\n pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_XA_APILOADFAILED));\n pnRedirect(pnModURL('Xanthia', 'admin', 'view'));\n return true;\n\t}\n\n\t// Create output object - this object will store all of our output so that\n\t// we can return it easily when required\n\t$pnRender =& new pnRender('Xanthia');\n\n\t// As Admin output changes often, we do not want caching.\n\t$pnRender->caching = false;\n\n // Visual Block Editor\n $pnRender->assign('vba', pnModGetVar('Xanthia', 'vba'));\n \n if (file_exists(\".htaccess\")){ \n\t $pnRender->assign('htaccess', 1); \n } else {\n \t$pnRender->assign('htaccess', 0); \n } \n\n\t// Short urls\n $pnRender->assign('shorturls', pnModGetVar('Xanthia', 'shorturls'));\n\n\t// Short urls\n $pnRender->assign('shorturlsextension', pnModGetVar('Xanthia', 'shorturlsextension'));\n\n // Enable Cache\n $pnRender->assign('enablecache', pnModGetVar('Xanthia', 'enablecache'));\n\n\t// modules not to cache for\n\t$pnRender->assign('modulesnocache', pnModGetVar('Xanthia', 'modulesnocache'));\n\n // Cache templates to Database\n $pnRender->assign('db_cache', pnModGetVar('Xanthia', 'db_cache'));\n \n // Compile Templates to Database (not active yet)\n $pnRender->assign('db_compile', pnModGetVar('Xanthia', 'db_compile'));\n\n // Check for new version of template\n $pnRender->assign('compile_check', pnModGetVar('Xanthia', 'compile_check'));\n\n // Force Check for new version of template\n $pnRender->assign('force_compile', pnModGetVar('Xanthia', 'force_compile'));\n \n // Cache Time\n $pnRender->assign('cache_lifetime', pnModGetVar('Xanthia', 'cache_lifetime'));\n\n // Base Caching on Database Updates\n $pnRender->assign('use_db', pnModGetVar('Xanthia', 'use_db'));\n\n // Use Database for Templates\n $pnRender->assign('db_templates', pnModGetVar('Xanthia', 'db_templates'));\n\n // use of whitespace output filter\n\t$pnRender->assign('trimwhitespace', pnModGetVar('Xanthia', 'trimwhitespace'));\n\n // Return the output that has been generated by this function\n if (ereg('0.8', _PN_VERSION_NUM)) {\n return $pnRender->fetch('xanthiaadminconfig.htm');\n\t} else {\n return $pnRender->fetch('xanthiaadmin726config.htm');\n\t}\n}", "public function pluginDetails()\n {\n return [\n 'name' => 'Blossom',\n 'description' => 'Plug-in used to develop views for displaying grade information',\n 'author' => 'Jacob Reid',\n 'icon' => 'icon-asterisk'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Podcast',\n 'description' => 'Add a podcast list to your website.',\n 'author' => 'Paul Lovato',\n 'icon' => 'icon-microphone'\n ];\n }", "function getEnabledPlugins();", "static function plInfo()\n {\n return (array(\n \"plShortName\" => _(\"Spamassassin\"),\n \"plDescription\" => _(\"Spamassassin\").\" (\"._(\"Services\").\")\",\n \"plSelfModify\" => FALSE,\n \"plDepends\" => array(),\n \"plPriority\" => 89,\n \"plSection\" => array(\"administration\"),\n \"plCategory\" => array(\"server\"),\n \"plRequirements\"=> array(\n 'ldapSchema' => array('goSpamServer' => '>=2.7'),\n 'onFailureDisablePlugin' => array(get_class())\n ),\n \"plProvidedAcls\"=> array(\n\n \"saRewriteHeader\" => _(\"Rewrite header\"),\n \"saTrustedNetworks\" => _(\"Trusted networks\"),\n \"saRequiredScore\" => _(\"Required score\"),\n \"saRule\" => _(\"Rules\"),\n\n\n \"start\" => _(\"Start\"),\n \"stop\" => _(\"Stop\"),\n \"restart\" => _(\"Restart\"),\n\n \"saFlagsB\" => _(\"Enable use of Bayes filtering\"),\n \"saFlagsb\" => _(\"Enabled Bayes auto learning\"),\n \"saFlagsC\" => _(\"Enable RBL checks\"),\n \"saFlagsR\" => _(\"Enable use of Razor\"),\n \"saFlagsD\" => _(\"Enable use of DDC\"),\n \"saFlagsP\" => _(\"Enable use of Pyzor\"))\n ));\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'mediumBlog',\n 'description' => 'No description provided yet...',\n 'author' => 'octobro',\n 'icon' => 'icon-leaf'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Mighty Seo Plus',\n 'description' => 'Addon for Mighty SEO plugin for more advanced SEO settings.',\n 'author' => 'Media1',\n 'icon' => 'icon-leaf',\n 'iconSvg' => 'plugins/media1/mightyseoplus/assets/images/icon.svg'\n ];\n }", "public function getAccessRulesInfo();", "public function pluginDetails()\n {\n return [\n 'name' => 'Debugbar',\n 'description' => 'Debugbar integration for OctoberCMS.',\n 'author' => 'Bedard',\n 'icon' => 'icon-cog',\n 'homepage' => 'https://github.com/scottbedard/oc-debugbar-plugin'\n ];\n }", "public function plugins(){\r\n\t\t//first check for permission\r\n\t\tif($this->users->is_logedin() && $this->users->has_permission('administrator_admin_panel')\t){\r\n\t\t\treturn $this->module_plugins();\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//access denied\r\n\t\t\treturn $this->module_no_permission();\r\n\t\t}\r\n\t\t\r\n\t}", "function _get_permissions_list_from_app() {\r\n\r\n $this->_ignored_methods = am($this->_ignored_methods, get_class_methods('AppController'));\r\n\r\n //get plugin list\r\n $pluginsList = App::objects('plugin');\r\n\r\n //get routing prefixes\r\n $prefixes = Configure::read('Routing.prefixes');\r\n\r\n //declare all controllers container\r\n $controllersTree = array();\r\n\r\n //get controller list from app\r\n $controllersTree[] = App::objects('Controller'); //, NULL, false\r\n //iterate over all plugins\r\n foreach ($pluginsList AS $plugin) {\r\n //get controller list from plugin\r\n $controllersTree[$plugin] = App::objects($plugin . '.Controller'); //, $plugin_path.$plugin.DS.'controllers', false);\r\n }\r\n\r\n $controllers = array();\r\n\r\n foreach ($controllersTree AS $plugin => $controllerList) {\r\n foreach ($controllerList AS $controllerName) {\r\n if (in_array($controllerName, $this->_ignored_controllers)) {\r\n continue;\r\n }\r\n $prefix = empty($plugin) ? '' : $plugin . '.';\r\n App::uses($controllerName, $prefix . 'Controller');\r\n $actionsList = get_class_methods($controllerName);\r\n if (!is_array($actionsList)) {\r\n continue;\r\n }\r\n foreach ($actionsList AS &$actionName) {\r\n if (in_array($actionName, $this->_ignored_methods) or substr_compare($actionName, '_', 0, 1) === 0) {\r\n continue;\r\n }\r\n\r\n $action = explode('_', $actionName);\r\n\r\n $controller_name = Inflector::underscore(substr($controllerName, 0, -10));\r\n\r\n if (in_array($action[0], $prefixes)) {\r\n $prefix = $action[0];\r\n unset($action[0]);\r\n $actionName = implode('_', $action);\r\n $controllers[$plugin][$prefix][$controller_name][] = strtolower($actionName);\r\n } else {\r\n $controllers[$plugin][0][$controller_name][] = strtolower($actionName);\r\n }\r\n }\r\n }\r\n }\r\n\r\n $permissionsNames = array('*');\r\n\r\n foreach ($controllers AS $plugin => $routes) {\r\n $plugin = empty($plugin) ? '' : $plugin;\r\n $permissionsNames[] = $plugin . ':*';\r\n foreach ($routes AS $route => $controllersNames) {\r\n $route = empty($route) ? '' : $route;\r\n $permissionsNames[] = $plugin . ':' . $route . ':*';\r\n foreach ($controllersNames AS $controllerName => $controllerActions) {\r\n $permissionsNames[] = $plugin . ':' . $route . ':' . $controllerName . ':*';\r\n foreach ($controllerActions AS &$action) {\r\n $permissionsNames[] = $plugin . ':' . $route . ':' . $controllerName . ':' . $action;\r\n $permissionsNames[] = $plugin . ':' . $route . ':' . $controllerName . ':' . $action . ':own';\r\n }\r\n }\r\n }\r\n }\r\n\r\n return $permissionsNames;\r\n }", "public function getPluginManager();", "public function pluginDetails()\n {\n return [\n 'name' => 'ScaffoldTranslation',\n 'description' => 'Overrides default OctoberCMS scaffold commands to generate translation aware source files ',\n 'author' => 'B&B Web Expertise',\n 'icon' => 'icon-leaf'\n ];\n }", "function autoriser_fast_plugin_acces_dist($faire, $type, $exec){\r\n\t\r\n\t// les infos sur l'auteur\r\n\t$statut_auteur = $GLOBALS['connect_statut'];\r\n\t$statut_type = $GLOBALS['connect_toutes_rubriques']; \r\n\t$id = $GLOBALS['auteur_session']['id_auteur'];\r\n\t\r\n\t\r\n\t$pages = get_fast_plugin();\r\n\t$droit = $pages[$exec][\"statut\"];\r\n\t$allowed = $pages[$exec][\"allowed\"];\r\n\tif ($allowed) $allowed = explode(',',$allowed);\r\n\t\r\n\t// si les droits ne sont pas renseigne on bloque le processus \r\n\tif (!$droit) return false;\r\n\t\r\n\t// si allowed on test les droits de l'auteur\r\n\tif ($allowed && in_array($id,$allowed))return true;\r\n\t\r\n\t// pour les admin restreint \r\n\tif ($statut_type != 1 && $statut_auteur==\"0minirezo\") $statut_auteur = 'admin_restreint';\r\n\r\n\t$acces = array(\t\"tous\" => 0,\"admin_restreint\" => 1,\"admin\" => 2 ,\"aucun\" => 4);\r\n\t$type_acces = array(\"1comite\" => 0,\"admin_restreint\" => 1,\"0minirezo\" => 2 );\r\n\t\r\n\t\r\n\tif($type_acces[$statut_auteur] >= $acces[$droit]) return true;\r\n\t\r\n\treturn false;\r\n\t\r\n}", "function modify_plugin_details($result, $action = \\null, $args = \\null)\n {\n }", "function get_acl()\n{\n try {\n return Zend_Registry::get('bootstrap')->getResource('Acl');\n } catch (Zend_Exception $e) {\n return null;\n }\n}", "function wp_get_active_and_valid_plugins()\n {\n }", "function plugin_permissions( $plugins )\n{\n // Config\n $plugin_credentials = array(\n '<admin>' => \"ALL\",\n '<user>' => array(\n 'nginx-helper',\n 'user-switching',\n 'wp-migrate-db-pro',\n 'limit-plugins',\n 'stream'\n ),\n );\n\n // Current user\n global $current_user;\n $username = $current_user->user_login;\n\n // Super admin, return everything\n if ( \"ALL\" == $plugin_credentials[ $username ] )\n return $plugins;\n\n // Filter the plugins of the user\n foreach ( $plugins as $key => $value ) \n { \n // Get the file name minus extension\n $plugin_slug = basename( $key, '.php' );\n\n // If not in the list of allowed plugins, remove from array\n if( in_array( $plugin_slug, $plugin_credentials[ $username ] ) )\n unset( $plugins[ $key ] );\n }\n\n return $plugins;\n}", "function suipcontrol_getmoduleinfo(){\n\t$block3IP = substr($_SERVER['REMOTE_ADDR'],0,strrpos($_SERVER['REMOTE_ADDR'],\".\"));\n\t$info = array(\n\t\t\"name\"=>\"Superuser IP Access Control\",\n\t\t\"version\"=>\"1.0\",\n\t\t\"author\"=>\"Eric Stevens\",\n\t\t\"category\"=>\"Administrative\",\n\t\t\"download\"=>\"core_module\",\n\t\t\"prefs\"=>array(\n\t\t\t\"SuperUser IP Control User Preferences,title\",\n\t\t\tarray(\"IP from which you might sign on. Enter partial IP's for a subnet and separate ranges with commas; semicolons; or spaces. `nFor example; if you wanted to allow aaa.bbb.ccc.1 through aaa.bbb.ccc.255; enter aaa.bbb.ccc. and the entire subnet will match.`n`n You're on %s now; recommend using %s if this is you.`n `bCaution`b: entering bad data here might block you out of most superuser activities!,note\", $_SERVER['REMOTE_ADDR'], $block3IP), //default to XXX.XXX.XXX. for the current user's IP address.\n\t\t\t\"ips\"=>\"IPs|$block3IP\",\n\t\t\t\"tempauthorize\"=>\"Temporary authorization code,viewonly|\",\n\t\t\t\"tempip\"=>\"Temporarily authorized IP|\",\n\t\t\t\"authemail\"=>\"Temp authorization email address,|\",\n\t\t),\n\t);\n\treturn $info;\n}", "public function getGrPluginDetailsList()\n\t{\n\t\techo \"Getresponse-integration details:\\n\";\n\t\t$details = $this->getGrPluginDetails();\n\t\tif ( ! empty($details))\n\t\t{\n\t\t\tforeach ($details as $detail)\n\t\t\t{\n\t\t\t\techo str_replace('GrIntegrationOptions_', '', $detail->option_name) . \" : \" . $detail->option_value . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "public function pluginDetails()\n {\n return [\n 'name' => 'Contact',\n 'description' => 'Messages from the frontend contact form.',\n 'author' => 'Be Easy',\n 'icon' => 'icon-envelope-o'\n ];\n }", "function _photo_gallery_ctools_plugin_api() {\n $args = func_get_args();\n $module = array_shift($args);\n $api = array_shift($args);\n if ($module == \"page_manager\" && $api == \"pages_default\") {\n return array(\"version\" => 1);\n }\n else if ($module == \"strongarm\" && $api == \"strongarm\") {\n return array(\"version\" => 1);\n }\n}", "public function pluginDetails()\n {\n return [\n 'name' => 'Rating',\n 'description' => 'Add Rating Stars to Blog Post',\n 'author' => 'Sw33t',\n 'icon' => 'icon-star'\n ];\n }", "public function getInfoLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info'),\n 'text' => $this->__('Status'),\n 'class' => 'z-icon-es-confi');\n }\n\t\t\n return $links;\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Slack',\n 'description' => 'No description provided yet...',\n 'author' => 'Gency',\n 'icon' => 'icon-slack'\n ];\n }", "public function pluginDetails() {\n return [\n 'name' => 'Twitch Bot',\n 'description' => 'Run a Twitch/Discord Bot from your site',\n 'author' => 'Joshua Webb',\n 'icon' => 'icon-users'\n ];\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'FeedbackSlack',\n 'description' => 'The Slack method for Feedback plugin',\n 'author' => 'eBussola',\n 'icon' => 'icon-slack'\n ];\n }", "function _hippel_discussions_ctools_plugin_api() {\n $args = func_get_args();\n $module = array_shift($args);\n $api = array_shift($args);\n if ($module == \"strongarm\" && $api == \"strongarm\") {\n return array(\"version\" => 1);\n }\n}", "public function manage()\n {\n global $template;\n\n $template->set_filename('plugin_admin_content', dirname($this->getFileLocation()).\"/admin/amm_admin.tpl\");\n\n $pluginInfo=array(\n 'AMM_VERSION' => \"<i>\".$this->getPluginName().\"</i> \".l10n('gmaps_release').AMM_VERSION,\n 'PATH' => AMM_PATH\n );\n\n $template->assign('plugin', $pluginInfo);\n $template->assign('AMM_BODY_PAGE', '<p class=\"warnings\">'.sprintf(l10n('g002_gpc_not_up_to_date'),AMM_GPC_NEEDED, GPC_VERSION).'</p>');\n $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');\n }", "public function pluginDetails()\n {\n return [\n 'name' => 'Reminder',\n 'description' => 'Remind for new posts and comments',\n 'author' => 'mnv',\n 'icon' => 'icon-bell'\n ];\n }", "public function getAcl()\n {\n require_once \"AmfAcl.php\";\n return AmfAcl::staticInstance();\n }", "function initPlugin()\n {\n $this->getAdminOptions();\n }", "public function getAcl()\n\t{\n\t\t//throw new \\Exception(\"something\");\n\n\t\tif (!isset($this->persistent->acl)) {\n\n\t\t\t$acl = new AclList();\n\n\t\t\t$acl->setDefaultAction(Acl::DENY);\n\n\t\t\t//Register roles\n\t\t\t$roles = array(\n\t\t\t\t'guests' => new Role('Guests'),\n\t\t\t\t'users' => new Role('Users'),\n\t\t\t\t'admins' => new Role('Admins'),\n\t\t\t);\n\t\t\tforeach ($roles as $role) {\n\t\t\t\t$acl->addRole($role);\n\t\t\t}\n\n\t\t\t//Паблик но ложим куку\n\n\t\t\t$publicResources = array(\n\t\t\t\t'login' => array('*'),\n\t\t\t\t'index' => array('*'),\n\t\t\t\t'error' => array('*'),\n\t\t\t\t'auth' => array('*'),\n\t\t\t\t'admin' => ['login']\n\t\t\t);\n\n\n\t\t\t//закрытые\n\t\t\t$privateResources = array(\n\t\t\t\t'index' => array('planing','focus'),\n\t\t\t);\n\n\t\t\t// TODO:пройтись и прописать отдельно права для каждого модуля/контроллера\n\n\t\t\t//закрытые админские\n\t\t\t$adminResources = [\n\t\t\t\t'admin' => [\n\t\t\t\t\t'index'\n\t\t\t\t]\n\t\t\t];\n\t\t\t/*$adminResources = array(\n\t\t\t\t'admin' => array('*'),\n\t\t\t);*/\n\n\t\t\tforeach ($publicResources as $resource => $actions) {\n\t\t\t\t$acl->addResource(new Resource($resource), $actions);\n\t\t\t}\n\n\t\t\tforeach ($privateResources as $resource => $actions) {\n\t\t\t\t$acl->addResource(new Resource($resource), $actions);\n\t\t\t}\n\n\t\t\tforeach ($adminResources as $resource => $actions) {\n\t\t\t\t$acl->addResource(new Resource($resource), $actions);\n\t\t\t}\n\n\t\t\t//по умолчанию всем даем \n\t\t\tforeach ($roles as $role) {\n\t\t\t\tforeach ($publicResources as $resource => $actions) {\n\t\t\t\t\tforeach ($actions as $action){\n\t\t\t\t\t\t//echo 'Role \"' . $role->getName() . '\"' . ' allow to \"' . $resource . '/' . $action . '\";<br />';\n\t\t\t\t\t\t$acl->allow($role->getName(), $resource, $action);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//die();\n\n\t\t\t//Grant acess to private area to role Users\n\t\t\tforeach ($privateResources as $resource => $actions) {\n\t\t\t\tforeach ($actions as $action){\n\t\t\t\t\t$acl->allow('Users', $resource, $action);\n\t\t\t\t\t$acl->allow('Admins', $resource, $action);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($adminResources as $resource => $actions) {\n\t\t\t\tforeach ($actions as $action){\n\t\t\t\t\t$acl->allow('Admins', $resource, $action);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->persistent->acl = $acl;\n\n\t\t\t/*echo '<pre>';\n\t\t\techo 'new ACL created: <br />';\n\t\t\tvar_dump($this->persistent->acl);\n\t\t\techo '</pre>';\n\t\t\tdie();*/\n\n\t\t\n\t\t} else {\n\t\t\t/*echo '<pre>';\n\t\t\techo 'ACL already exists: <br />';\n\t\t\tvar_dump($this->persistent->acl);\n\t\t\techo '</pre>';\n\t\t\tdie();*/\n\t\t}\n\n\t\treturn $this->persistent->acl;\n\t}", "protected function _setAclAdapter() {\n\t\tlist($plugin, $name) = pluginSplit(Configure::read('Visualisation.Acl.classname'));\n\t\t$this->Acl->adapter($name);\n\t}", "abstract protected function get_plugin_components();", "static function plInfo()\n {\n return (array(\n \"plShortName\" => _(\"Kopano\"),\n \"plDescription\" => _(\"kopano service\").\" (\"._(\"Services\").\")\",\n \"plSelfModify\" => FALSE,\n \"plDepends\" => array(),\n \"plPriority\" => 100,\n \"plSection\" => array(\"administration\"),\n \"plCategory\" => array(\"server\"),\n\n \"plProvidedAcls\"=> array(\n \"start\" => _(\"Start\"),\n \"stop\" => _(\"Stop\"),\n \"restart\" => _(\"Restart\"),\n \"kopanoAccount\" => _(\"Kopano server\"),\n \"kopanoHidden\" => _(\"Kopano hidden\"),\n \"kopanoHttpPort\" => _(\"Kopano HTTP port\"),\n \"kopanoSslPort\" => _(\"Kopano SSL port\"),\n \"kopanoConatinsPublic\" => _(\"Kopano node contains public store\"),\n \"kopanoFilePath\" => _(\"Kopano file path\"),\n \"goKopanoArchiveServer\" => _(\"Kopano Archvie Server\"),\n )\n ));\n }" ]
[ "0.6778189", "0.66539776", "0.6393091", "0.6328871", "0.6286463", "0.62391514", "0.6200255", "0.6192556", "0.6160631", "0.6128366", "0.60916764", "0.6082887", "0.6081448", "0.6049386", "0.60413253", "0.60372186", "0.6023972", "0.60216385", "0.59932286", "0.5980369", "0.5951071", "0.5949135", "0.59432423", "0.5937145", "0.59282994", "0.58992994", "0.58922696", "0.5869678", "0.5856402", "0.58275557", "0.5826743", "0.5825479", "0.5819815", "0.5808463", "0.579145", "0.577736", "0.57770896", "0.577659", "0.5776156", "0.5760567", "0.5756168", "0.5748113", "0.57404894", "0.5733271", "0.57311255", "0.57212925", "0.57206434", "0.57088", "0.56875587", "0.56836087", "0.56800467", "0.56799203", "0.56721616", "0.5668858", "0.5650222", "0.5643665", "0.5622745", "0.56177586", "0.56127626", "0.5603314", "0.5596485", "0.5586915", "0.55864763", "0.55864763", "0.5568198", "0.5567915", "0.55621743", "0.5556807", "0.5556486", "0.55434054", "0.55382615", "0.55363363", "0.5531547", "0.55205154", "0.5520415", "0.55044967", "0.5496916", "0.5482311", "0.54767376", "0.54636025", "0.5461404", "0.5458979", "0.5452887", "0.5452231", "0.5450166", "0.54395914", "0.5436527", "0.5436413", "0.5428012", "0.54150546", "0.54048467", "0.5402675", "0.54021436", "0.5400324", "0.5399419", "0.53677404", "0.5364461", "0.53619635", "0.5361096", "0.53588176", "0.5354675" ]
0.0
-1
/! \brief Filter extra POST and GET variables for this plugin.
function detectPostActions() { $action = management::detectPostActions(); if (isset($_POST['SaveServiceAdd'])) { $action['action'] = "newServiceSelected"; } elseif (isset($_POST['CancelServiceAdd'])) { $action['action'] = "newServiceCancel"; } elseif (isset($_POST['SaveService'])) { $action['action'] = "saveService"; } elseif (isset($_POST['CancelService'])) { $action['action'] = "cancelService"; } return $action; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function global_filtering()\n {\n // filtering $_GET\n if (is_array(ctx()->getRequest()->get()) && ! empty(ctx()->getRequest()->get()))\n {\n foreach (ctx()->getRequest()->get() as $key => $val)\n ctx()->getRequest()->get($this->_clean_input_keys($key) , $this->_clean_input_data($val));\n }\n\n // filtering $_POST\n if (is_array(ctx()->getRequest()->post()) && ! empty(ctx()->getRequest()->post()))\n {\n foreach (ctx()->getRequest()->post() as $key => $val){\n ctx()->getRequest()->post($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n }\n\n\n // filtering $_COOKIE\n if (is_array(ctx()->getRequest()->cookie()) && ! empty(ctx()->getRequest()->cookie()))\n {\n foreach (ctx()->getRequest()->cookie() as $key => $val)\n ctx()->getRequest()->cookie($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n\n // filtering $_REQUEST\n if (is_array(ctx()->getRequest()->request()) && ! empty(ctx()->getRequest()->request()))\n {\n foreach (ctx()->getRequest()->request() as $key => $val){\n ctx()->getRequest()->request($this->_clean_input_keys($key), $this->_clean_input_data($val));\n }\n }\n }", "public function global_filter_field_expr()\n {\n\n // filtering $_GET\n if (is_array(ctx()->getRequest()->get()) && ! empty(ctx()->getRequest()->get()))\n {\n foreach (ctx()->getRequest()->get() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->get($key, $this->_clean_input_field_expr($val));\n }\n }\n\n }\n\n // filtering $_POST\n if (is_array(ctx()->getRequest()->post()) && ! empty(ctx()->getRequest()->post()))\n {\n foreach (ctx()->getRequest()->post() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->post($key, $this->_clean_input_field_expr($val));\n }\n }\n }\n\n // filtering $_COOKIE\n if (is_array(ctx()->getRequest()->cookie()) && ! empty(ctx()->getRequest()->cookie()))\n {\n foreach (ctx()->getRequest()->cookie() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->cookie($key, $this->_clean_input_field_expr($val));\n }\n\n }\n }\n\n\n // filtering $_REQUEST\n if (is_array(ctx()->getRequest()->request()) && ! empty(ctx()->getRequest()->request()))\n {\n foreach (ctx()->getRequest()->request() as $key => $val){\n $key=$this->_clean_input_keys($key);\n if($key){\n ctx()->getRequest()->request($key, $this->_clean_input_field_expr($val));\n }\n }\n }\n\n }", "function extract_vars($method = INPUT_GET) {\n\n if (isset($_REQUEST[\"id\"])) {\n $in[\"id\"] = trim(filter_input($method,\"id\", FILTER_SANITIZE_STRING));\n }\n\n if (isset($_REQUEST[\"url\"])) {\n $in[\"url\"] = filter_input($method,\"url\", FILTER_SANITIZE_URL);\n }\n\n $in[\"category\"] = sanitize(\"category\", FILTER_SANITIZE_STRING, $method);\n $in[\"caption\"] = sanitize(\"caption\", FILTER_SANITIZE_STRING, $method);\n\n return $in;\n}", "protected function filterParams()\n {\n }", "public function parse_request($extra_query_vars = '')\n {\n }", "public static function filter_request( $vars ) {\n if( isset( $vars['orderby'] ) && $vars['orderby'] == 'expiration' ) {\n $vars['orderby'] = 'meta_value';\n $vars['meta_key'] = 'expiration';\n }\n if( isset( $vars['orderby'] ) && $vars['orderby'] == 'registrar' ) {\n $vars['orderby'] = 'meta_value';\n $vars['meta_key'] = 'registrar';\n }\n return $vars;\n }", "function add_query_vars_filter( $vars ){\n\n\t$vars[] = \"targetCat\";\n\n\treturn $vars;\n\n}", "function add_query_vars_filter( $vars ){\n $vars[] = 'campaign';\n $vars[] = 'container';\n $vars[] = 'type';\n $vars[] = 'launchUrls';\n $vars[] = 'playUrls';\n $vars[] = 'countUrls';\n return $vars;\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}", "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}", "function add_query_vars_filter($vars) {\n $vars[] = \"sddsref-id\";\n $vars[] = \"src\";\n return $vars;\n}", "function wheels_request_filter( $query_vars ) {\n\tif ( isset( $_GET['s'] ) && empty( $_GET['s'] ) && ! is_admin() ) {\n\t\t$query_vars['s'] = ' ';\n\t}\n\n\treturn $query_vars;\n}", "public function posts()\n {\n $post = filter_input_array(INPUT_POST);\n array_walk_recursive($post, function(&$value) {\n $value = JORequest::setAntiInjection($value);\n });\n return $post;\n }", "public function parse_query_vars()\n {\n }", "function _prepare_filter_data () {\n\t\t// Filter session array name\n\t\t$this->_filter_name\t= $_GET[\"object\"].\"_filter\";\n\t\t// Connect common used arrays\n\t\tif (file_exists(INCLUDE_PATH.\"common_code.php\")) {\n\t\t\tinclude (INCLUDE_PATH.\"common_code.php\");\n\t\t}\n\t\t// Fields in the filter\n\t\t$this->_fields_in_filter = array(\n\t\t\t\"engine\",\n\t\t\t\"text\",\n\t\t);\n\t}", "function fs_request_filter( $query_vars ) {\r\n\tif ( isset( $_GET['s'] ) && empty( $_GET['s'] ) ) {\r\n\t\t$query_vars['s'] = ' ';\r\n\t}\r\n\r\n\treturn $query_vars;\r\n}", "function get_current_filters () \n{\n if (count($_GET) < 1) \n return array();\n \n foreach ($_GET as $field_name => $value) {\n if (strlen($value) < 1) continue;\n $filters[$field_name] = addslashes($value);\n }\n \n unset($filters[w]);\n \n return $filters;\n}", "function parse_incoming()\n {\n\t\t//-----------------------------------------\n\t\t// Attempt to switch off magic quotes\n\t\t//-----------------------------------------\n\n\t\t@set_magic_quotes_runtime(0);\n\n\t\t$this->get_magic_quotes = @get_magic_quotes_gpc();\n\t\t\n \t//-----------------------------------------\n \t// Clean globals, first.\n \t//-----------------------------------------\n \t\n\t\t$this->clean_globals( $_GET );\n\t\t$this->clean_globals( $_POST );\n\t\t$this->clean_globals( $_COOKIE );\n\t\t$this->clean_globals( $_REQUEST );\n \t\n\t\t# GET first\n\t\t$input = $this->parse_incoming_recursively( $_GET, array() );\n\t\t\n\t\t# Then overwrite with POST\n\t\t$input = $this->parse_incoming_recursively( $_POST, $input );\n\t\t\n\t\t$this->input = $input;\n\t\t\n\t\t$this->define_indexes();\n\n\t\tunset( $input );\n\t\t\n\t\t# Assign request method\n\t\t$this->input['request_method'] = strtolower($this->my_getenv('REQUEST_METHOD'));\n\t}", "function filterGlobalArrays()\r\n{\r\n ### clean global namespace from register globals ###\r\n if (@ini_get('register_globals')) {\r\n foreach ($_REQUEST as $key => $value) {\r\n unset($GLOBALS[$key]);\r\n }\r\n }\r\n\r\n clearRequestVars();\r\n addRequestVars($_GET);\r\n addRequestVars($_POST);\r\n addRequestVars($_COOKIE);\r\n\r\n $_COOKIE= $_GET= $_POST=array();\r\n}", "protected function setRequestArgumentsFromGetPost() {\n\t\t$validArguments = array('vendorName', 'extensionName', 'pluginName', 'controllerName', 'actionName', 'formatName', 'arguments');\n\t\tforeach ($validArguments as $argument) {\n\t\t\tif (GeneralUtility::_GP($argument)) {\n\t\t\t\t$this->requestArguments[$argument] = GeneralUtility::_GP($argument);\n\t\t\t} else if (GeneralUtility::_GP('amp;' . $argument)) {\n\t\t\t\t// Something went wrong...\n\t\t\t\t$this->requestArguments[$argument] = GeneralUtility::_GP('amp;' . $argument);\n\t\t\t}\n\t\t}\n\t}", "public function getUnfilteredParameters()\n {\n return array_merge($this->get('postData'), $this->get('getData'));\n }", "function fix_request(){\n\t$var=array();\n\tforeach($_GET as $k=>$v){\n//\t\tif(!is_array($v)){\n//\t\t\tforeach($filtros as $filtro){\n//\t\t\t\t$v=str_replace(trim($filtro),'',$v);\n//\t\t\t}\n//\t\t\t$_GET[$k]=$v;\n\t\t\t$var[$k]=$v;\n//\t\t}\n\t}\n\tforeach($_POST as $k=>$v){\n//\t\tif(!is_array($v)){\n//\t\t\tforeach($filtros as $filtro){\n//\t\t\t\t$v=str_replace(trim($filtro),'',$v);\n//\t\t\t}\n//\t\t\t$_POST[$k]=$v;\n\t\t\t$var[$k]=$v;\n//\t\t}\n\t}\n\t$_REQUEST=$var;\n}", "function search_request_filter($query_vars) {\n if (isset($_GET['s']) && empty($_GET['s'])) {\n $query_vars['s'] = ' ';\n }\n\n return $query_vars;\n}", "public function apply_filters_in_request() {\n\n\t\t\t$args = jet_smart_filters()->query->get_query_args();\n\n\t\t\tif ( ! $args ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tadd_filter( 'jet-engine/listing/grid/posts-query-args', array( $this, 'add_query_args' ), 10, 2 );\n\n\t\t}", "function getVars() {\r\n return !empty($_POST) ? $_POST : (!empty($_GET) ? $_GET : NULL);\r\n }", "function processRequest(){\n\tglobal $muse; // App settings & database\n\tglobal $HTTP_RAW_POST_DATA;\n\t\n\t// Get the user's posted action\n\t$muse['actionRequestRaw'] = $HTTP_RAW_POST_DATA;\n\t$muse['actionRequest'] = $muse['db']->real_escape_string(trim($HTTP_RAW_POST_DATA));\n\t// First word of action request will be the action keyword.\n\t$muse['actionKeyword'] = strtolower(substr( $muse['actionRequest'], 0, strpos( $muse['actionRequest'], \" \" ) ) );\n\t\n\t// If it's only one word, through it back in. Capatlization issues?\n\tif ($muse['actionKeyword']==false) {\n\t\t$muse['actionKeyword'] = $muse['actionRequest'];\n\t}\n}", "protected function _sanitize_globals()\n {\n // Is $_GET data allowed? If not we'll set the $_GET to an empty array\n if ($this->_allow_get_array === FALSE)\n {\n $_GET = array();\n }\n elseif (is_array($_GET) && count($_GET) > 0)\n {\n foreach ($_GET as $key => $val)\n {\n $_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);\n }\n }\n\n // Clean $_POST Data\n if (is_array($_POST) && count($_POST) > 0)\n {\n foreach ($_POST as $key => $val)\n {\n $_POST[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);\n }\n }\n\n // Clean $_COOKIE Data\n if (is_array($_COOKIE) && count($_COOKIE) > 0)\n {\n // Also get rid of specially treated cookies that might be set by a server\n // or silly application, that are of no use to a CI application anyway\n // but that when present will trip our 'Disallowed Key Characters' alarm\n // http://www.ietf.org/rfc/rfc2109.txt\n // note that the key names below are single quoted strings, and are not PHP variables\n unset(\n $_COOKIE['$Version'],\n $_COOKIE['$Path'],\n $_COOKIE['$Domain']\n );\n\n foreach ($_COOKIE as $key => $val)\n {\n if (($cookie_key = $this->_clean_input_keys($key)) !== FALSE)\n {\n $_COOKIE[$cookie_key] = $this->_clean_input_data($val);\n }\n else\n {\n unset($_COOKIE[$key]);\n }\n }\n }\n\n // Sanitize PHP_SELF\n $_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);\n\n // CSRF Protection check\n if ($this->_enable_csrf === TRUE && ! is_cli())\n {\n $this->security->csrf_verify();\n }\n }", "function get_filtered_input($form) {\n $filter_parameters = [];\n foreach ($form['fields'] as $id => $value) {\n if (isset($value['filter'])) {\n $filter_parameters[$id] = $value['filter'];\n } else {\n $filter_parameters[$id] = FILTER_SANITIZE_SPECIAL_CHARS;\n }\n }\n return filter_input_array(INPUT_POST, $filter_parameters);\n}", "public function collectExtraData($prefix = '') {\n // logit('REST: ' . print_r($this->getRequest()->getPost(), true));\n $vars = $this->getRequest()->getPost();\n $lprefix = strlen($prefix);\n $out = array();\n foreach($vars as $n => $v) {\n if (substr($n, 0, $lprefix) == $prefix) {\n // logit(\"MATCH: {$n} => {$v}\");\n $out[$n] = $v;\n }\n }\n $this->extra = $out;\n }", "function _dotgo_filter_prepare() {\n\n}", "function prototyper_profile_filter_form_vars($hook, $type, $return, $params) {\n\n\t$action_name = elgg_extract('action_name', $return);\n\tif ($action_name == 'profile/edit') {\n\t\t$return['validate'] = true;\n\t}\n\n\treturn $return;\n}", "function EV_posts_modify_query_vars($query_vars) {\n\t\tif( ( preg_match('/edit.php/i', $_SERVER['REQUEST_URI']) ) && !isset($_GET['page']) ) {\n\t\t\treturn array_merge( $query_vars, array('showpostsoverride') );\n\t\t} else {\n\t\t\treturn $query_vars;\n\t\t}\n\t}", "private function filterFields() {\n\n // Initialize an associate array of our field name and value pairs.\n $values = array();\n\n // Initialize an associate array of our field name and filters pairs.\n $filters = array();\n\n // Populate the arrays.\n foreach ($this->fields as $field) {\n if ($field->getFilters()) {\n $values[$field->getName()] = $field->getValue();\n $filters[$field->getName()] = $field->getFilters();\n }\n }\n\n // Load an instance of GUMP to use to sanitize and filter our field values.\n $gump = new \\GUMP();\n\n // Sanitize the field values.\n $values = $gump->sanitize($values);\n\n // Pass the arrays to GUMP and let it do the heavy-lifting.\n $values = $gump->filter($values, $filters);\n\n // Set the values of all fields to their filtered values.\n foreach ($values as $name => $value) {\n $this->passValue($name, $value);\n }\n }", "function filters(){\n add_filter( 'oauth_authorization_parameters', array( $this, 'authorization_parameters'), 1, 1 );\n // add_filter( 'oauth_token_parameters', array( $this, 'token_parameters'), 1, 1 );\n add_filter( 'oauth_token_response', array( $this, 'token_response'), 1, 1 );\n // add_filter( 'oauth_identity_parameters', array( $this, 'identity_parameters'), 1, 1 );\n \tadd_filter( 'oauth_identity_response', array( $this, 'identity_response'), 1, 1 );\n }", "public function cleanseFields() {\n $this->dictionary->remove('nospam');\n $this->dictionary->remove('blank');\n $submitVar = $this->controller->getProperty('submitVar');\n if (!empty($submitVar)) {\n $this->dictionary->remove($submitVar);\n }\n }", "public function getPostVariables();", "public function register_filters() {\n\t\tadd_filter( 'json_endpoints', array( $this, 'register_routes' ) );\n\t\tadd_filter( 'json_post_type_data', array( $this, 'type_archive_link' ), 10, 2 );\n\t}", "protected function __getPostRemoveEmpty(){\r\n if($this->request->isPost()){\r\n foreach($this->request->getPost() as $key => $value){\r\n if(empty($value) || is_null($value)){\r\n unset($_POST[$key]);\r\n }\r\n }\r\n }\r\n else{\r\n foreach($this->request->getQuery() as $key => $value){\r\n if(empty($value) || is_null($value)){\r\n unset($_GET[$key]);\r\n }\r\n }\r\n }\r\n }", "function extraVars() {\n\t\tif (func_num_args()) {\n\t\t\tif (is_array(func_get_arg(0))) {\n\t\t\t\t$this->_extraVars = func_get_arg(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_extraVars = array(func_get_arg(0)=>'');\n\t\t\t}\t\t\t\n\t\t}\n\t\telse return $this->_extraVars;\n\t}", "public function unsafeAllPost()\n {\n return $this->postvars;\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 }", "public function _post_filter()\n {\n }", "function apply_json_filter( $_post, $post, $context )\n{\n $_post['meta'] = array_merge($_post['meta'],get_fields($post['ID']));\n return $_post;\n}", "public function getActionParams() { return array_merge($_GET, $_POST); }", "function filter_input($type, $variable_name, $filter = /* .constant 'FILTER_DEFAULT' */, $options = /* .constant 'FILTER_FLAG_NONE' */) {\r\n if(is_array($options)) {\r\n \t$flags = 0;\r\n \t\r\n foreach((array) $options['flags'] as $option)\r\n $flags |= $option;\r\n } else\r\n $flags = $options;\r\n \r\n // Get variable\r\n switch($type) {\r\n case /* .constant 'INPUT_GET' */:\r\n $GET = Pancake\\vars::$Pancake_request->getGETParams(); \r\n if(!array_key_exists($variable_name, $GET))\r\n return $flags & /* .constant 'FILTER_NULL_ON_FAILURE' */ ? false : null;\r\n $var = $GET[$variable_name];\r\n break;\r\n case /* .constant 'INPUT_POST' */:\r\n $POST = Pancake\\vars::$Pancake_request->getPOSTParams(); \r\n if(!array_key_exists($variable_name, $POST))\r\n return $flags & /* .constant 'FILTER_NULL_ON_FAILURE' */ ? false : null;\r\n $var = $POST[$variable_name];\r\n break;\r\n case /* .constant 'INPUT_COOKIE' */:\r\n $COOKIE = Pancake\\vars::$Pancake_request->getCookies(); \r\n if(!array_key_exists($variable_name, $COOKIE))\r\n return $flags & /* .constant 'FILTER_NULL_ON_FAILURE' */ ? false : null;\r\n $var = $COOKIE[$variable_name];\r\n break;\r\n case /* .constant 'INPUT_SERVER' */:\r\n $SERVER = Pancake\\vars::$Pancake_request->createSERVER(); \r\n if(!array_key_exists($variable_name, $SERVER))\r\n return $flags & /* .constant 'FILTER_NULL_ON_FAILURE' */ ? false : null;\r\n $var = $SERVER[$variable_name];\r\n break;\r\n case /* .constant 'INPUT_ENV' */:\r\n if(!array_key_exists($variable_name, $_ENV))\r\n return $flags & /* .constant 'FILTER_NULL_ON_FAILURE' */ ? false : null;\r\n $var = $_ENV[$variable_name];\r\n break;\r\n }\r\n \r\n return filter_var($var, $filter, $options); \r\n }", "function acf_filter_attrs($attrs)\n{\n}", "function ds_whitelist_new_search_parameter( $allowed_query_vars ) {\n $allowed_query_vars[] = 'q';\n return $allowed_query_vars;\n}", "function rest_filter_response_fields($response, $server, $request)\n {\n }", "function parseIncoming(){\r\n\t\t# THIS NEEDS TO BE HERE!\r\n\t\t$this->get_magic_quotes = @get_magic_quotes_gpc();\r\n\r\n \t\tif(is_array($_GET)){\r\n\t\t\twhile(list($k, $v) = each($_GET)){\r\n\t\t\t\tif(is_array($_GET[$k])){\r\n\t\t\t\t\twhile(list($k2, $v2) = each($_GET[$k])){\r\n\t\t\t\t\t\t$this->input[$this->parseCleanKey($k)][$this->parseCleanKey($k2)] = $this->parseCleanValue($v2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$this->input[$this->parseCleanKey($k)] = $this->parseCleanValue($v);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Overwrite GET data with post data\r\n\t\tif(is_array($_POST)){\r\n\t\t\twhile(list($k, $v) = each($_POST)){\r\n\t\t\t\tif(is_array($_POST[$k])){\r\n\t\t\t\t\twhile(list($k2, $v2) = each($_POST[$k])){\r\n\t\t\t\t\t\t$this->input[$this->parseCleanKey($k)][$this->parseCleanKey($k2)] = $this->parseCleanValue($v2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$this->input[$this->parseCleanKey($k)] = $this->parseCleanValue($v);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->input['requestMethod'] = strtolower($_SERVER['REQUEST_METHOD']);\r\n//\t\techo '<pre>'.print_r($this->input, 1).'</pre>';exit;\r\n\t}", "protected function getPreserveGetVars() {}", "function dacig_allow_filters( $query ) {\n\t$query->query_vars['suppress_filters'] = false;\n\n\treturn $query;\n}", "public function addFilters() {\n\t\t// $this->subscriber->addFilter( 'mdm_syndication_post_fields', [$this, 'addCustomFields'] );\n\t}", "public function sanitize() {\n\n\t\t// load the tool that we want to use in the xss filtering process\n\t\t$this->loadTool();\n\n\t\tif (is_array($_GET) AND count($_GET) > 0) {\n\n\t\t\t$_GET = $this->clean_input_data($_GET);\n\t\t}\n\t\tif (is_array($_POST) AND count($_POST) > 0) {\n\n\t\t\t$_POST = $this->clean_input_data($_POST);\n\t\t}\n\t\tif (is_array($_COOKIE) AND count($_COOKIE) > 0) {\n\n\t\t\t$_COOKIE = $this->clean_input_data($_COOKIE);\n\t\t}\n\t\tif (is_array($_FILES) AND count($_FILES) > 0) {\n\n\t\t\t//$_FILES = $this->clean_input_data($_FILES, true);\n\t\t}\n\n\t}", "function add_filters()\n {\n }", "public static function query_vars($vars) {\n $vars[] = 'callback';\n $vars[] = 'feed';\n $vars[] = 'pretty';\n\n return $vars;\n }", "protected function alterQueryArgs() {\n\n $this->get = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);\n $this->post = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n $this->request = VTCore_Wordpress_Utility::arrayMergeRecursiveDistinct($this->post, $this->get);\n\n $this->request = array_unique(array_filter((array) $this->request));\n\n // Processing ajax callback\n if (isset($this->request['value'])\n && $this->request['value'] == 'userloop'\n && isset($this->request['data'])) {\n\n $this->request['data'] = VTCore_Wordpress_Utility::wpParseLargeArgs($this->request['data']);\n\n }\n\n\n // Make WP_User_Query behaves like WP_Query\n if ($this->query['number']) {\n\n // Pagination with paged as WP_Query does\n if (!isset($this->query['paged'])) {\n $this->query['paged'] = 1;\n }\n\n // WpPager needs this for sane pagination\n $this->set('paged', $this->query['paged']);\n\n // Build the offset based on page and number per page\n $this->query['offset'] = $this->query['number'] * max(0, ($this->query['paged'] - 1));\n }\n\n do_action('vtcore_wordpress_user_query_args_alter', $this);\n\n }", "protected function processFilters()\n {\n $this->filters = [];\n foreach ($this->params as $key => $value) {\n $this->parser->setAlias('_' . $this->contentType);\n $filter = $this->parser->getFilter($key, $value);\n if ($filter) {\n $this->addFilter($filter);\n }\n }\n }", "function searchRequestFilter( $query_vars ) {\n if( isset( $_GET['s']) && $_GET['s'] == '' ) {\n wp_redirect( site_url() );\n exit;\n }\n return $query_vars;\n}", "function minorite_exposed_filters($variables) {\n return drupal_render_children($variables['form']);\n}", "public function cleanGet($filter='string'){\n return $this->purify($_GET,$filter);\n }", "static function cleanup() {\n\t\tforeach ($_REQUEST as $p) {\n\t\t\tunset($p);\n\t\t}\n\t}", "public function __construct(){\n $this->get_parameters = get_magic_quotes_gpc() ? myTools::stripslashes_deep($_GET) : $_GET;\n $this->post_parameters = get_magic_quotes_gpc() ? myTools::stripslashes_deep($_POST) : $_POST; \n }", "protected function setPostData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}", "function set_query_args($query)\n {\n if ($query->get('datamapper')) {\n $query->query_vars = $this->object->_query_args;\n }\n $filter = isset($query->query_vars['suppress_filters']) ? $query->query_vars['suppress_filters'] : FALSE;\n $query->query_vars['suppress_filters'] = apply_filters('wpml_suppress_filters', $filter);\n }", "public function getActionParams()\n\t{\n\t\t$args = parent::getActionParams();\n\n\t\t// Add in the $_POST array, giving it precedence\n\t\treturn array_merge($args, $_POST);\n\t}", "private function loadPostParams()\n {\n if(isset($_POST)) {\n $this->postParams = $_POST;\n }\n }", "public function beforeFilter()\r\n {\r\n\t\t$this->Security->csrfCheck = true;\r\n $this->Security->disabledFields = array(\r\n\t\t\t'Hall.user_id',\r\n );\r\n\t\tif ((!empty($this->request->params['action']) and ($this->request->params['action'] == 'index'))) {\r\n $this->Security->validatePost = false;\r\n }\r\n parent::beforeFilter();\r\n }", "private function filters() {\n\n\n\t}", "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\tif ($this->Components->enabled('Auth')) {\n\t\t\t$this->Auth->allow('process');\n\t\t}\n\t\tif (isset($this->Security) && $this->action === 'process') {\n\t\t\t$this->Security->validatePost = false;\n\t\t}\n\t}", "private function parseGET()\n {\n if (isset($_GET['method'])) {\n $this->method = $_GET['method'];\n unset($_GET['method']);\n }\n\n if (isset($_GET['output'])) {\n $this->output = $_GET['output'];\n unset($_GET['output']);\n }\n\n $testDN = Get_User_Principle_PI();\n if (empty($testDN) == false) {\n $this->identifier = $testDN;\n }\n\n if (count($_GET) > 0) {\n $this->params = $_GET;\n }\n }", "private function _setParams()\n\t{\n\t\tforeach ($_GET as $key => $value) {\n\t\t\t$this->_params[$key] = $this->_sanitize($value);\n\t\t}\n\n\t\tforeach ($_POST as $key => $value) {\n\t\t\t$_POST[$key] = $this->_sanitize($value);\n\t\t}\n\n\t\t$nbElements = count($this->_requestVars);\n\t\tif ($nbElements > 3) {\n\t\t\t$i = 2;\n\t\t\twhile ($i < $nbElements and $i + 1 < $nbElements) {\n\t\t\t\tif (ctype_digit($this->_requestVars[$i])) {\n\t\t\t\t\t$i += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$this->_params[$this->_requestVars[$i]] = $this->_sanitize($this->_requestVars[$i + 1]);\n\t\t\t\t$i += 2;\n\t\t\t}\n\t\t}\n\n\t\tif ($nbElements > 2) {\n\t\t\t$i = 2;\n\t\t\twhile ($i < $nbElements) {\n\t\t\t\t$this->_params[$i - 2] = $this->_sanitize($this->_requestVars[$i]);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "private function _getRequestParams()\n {\n return array_merge(\n $this->CI->input->post(),\n $this->CI->input->get()\n );\n }", "function wp_filter_post_kses($data)\n {\n }", "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 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 getVars()\n\t{\n\t\treturn $this->requestVars;\n\t}", "function add_json_filter()\n{\n add_filter( 'json_prepare_post', 'apply_json_filter', 10, 3 );\n}", "function sanitize_form_input_values(array $fields): array\n{\n $filter_params = [];\n\n foreach ($fields['fields'] as $field_key => $field) {\n $filter_params[$field_key] = $field['filter'] ?? FILTER_SANITIZE_SPECIAL_CHARS;\n }\n\n return filter_input_array(INPUT_POST, $filter_params);\n}", "public static function getRequestVariables()\n {\n $vars = $_REQUEST;\n unset($vars['appId']);\n unset($vars['appSecret']);\n unset($vars['clientId']);\n unset($vars['clientSecret']);\n unset($vars['itemid']);\n unset($vars['identifier']);\n unset($vars['emailPreview']);\n unset($vars['telPreview']);\n unset($vars['fetchURL']);\n unset($vars['version']);\n\n //Try to remove the random variable added for get requests to break cache\n foreach ($vars as $key => $var) {\n if ($var === '' && preg_match('/^[a-z0-9]{8}/', $key)) {\n unset ($vars[$key]);\n }\n }\n\n return $vars;\n }", "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}", "private function loadFiltersFromAttributes(): void\n {\n $request = RequestUtil::getMainRequest($this->requestStack) ?? Request::createFromGlobals();\n foreach ($request->attributes->getIterator() as $key => $value) {\n $key = (string) $key;\n if ($this->getFilterByName($key) === null) {\n continue;\n }\n\n $filterField = new FilterField();\n $filterField->setName($key)\n ->setValue($value)\n ->setComparison(Api\\Filter::COMPARISON_EQUALS)\n ->setFilter($this->getFilterByName($key));\n\n $this->filterFields[] = $filterField;\n }\n }", "protected function before_filter() {\n\t}", "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "public function filters()\n {\n $filters = array(\n 'postOnly + delete',\n );\n\n return CMap::mergeArray($filters, parent::filters());\n }", "public function filters()\n\t{\n\t\t// Force all methods to be called as ajax\n\t\treturn array(\n\t\t\t'ajaxOnly',\n\t\t);\n\t}", "public function unsafeAllGet()\n {\n return $this->getvars;\n }", "function before_filter(&$action, &$args) {\n }", "function _enable_sitepress_query_filters( $args ) {\n\t\tif ( isset( $args->_default_query ) ) {\n\t\t\t$args->_default_query['suppress_filters'] = false;\n\t\t}\n\t\treturn $args;\n\t}", "function formFilter()\r\n\t{\r\n\t\tglobal $langs;\r\n\r\n\t\t$s='';\r\n\t\t$s.='<input type=\"text\" name=\"xinputuser\" class=\"flat minwidth300\" value=\"'.GETPOST(\"xinputuser\").'\">';\r\n\t\treturn $s;\r\n\t}", "public function default_filters() {\n\t\tadd_filter( 'upload_mimes', array( $this, 'more_mimes' ) );\n\n\t\t// Live update when add new layouts (also their sidebars)\n\t\t// or add new positions into existed layouts\n\t\tadd_filter( 'kopa_get_option_layout_manager', array( $this, 'live_update_layout_manager' ), 10, 2 );\n\n\t\t/**\n\t\t * Disable help tab by default, determine its content later\n\t\t *\n\t\t * @see admin/class-kopa-admin.php\n\t\t * @since 1.0.0\n\t\t */\n\t\tadd_filter( 'kopa_enable_admin_help_tab', '__return_false' );\n\t}", "function processGetVars()\n {\n //assignGetIfExists ( $fullList, NULL, 'full' );\n //$this->fullList = (bool) $fullList;\n self::dumpThis();\n }", "function queryVars($vars) {\n $vars[] = 'xauth';\n $vars[] = 'redirect_to';\n\n return $vars;\n }", "private function getInput() : void {\n\t\t$input = @file_get_contents('php://input');\n\n\t\t// Check if input is json encoded\n\t\t$decode = json_decode($input, true);\n\t\tif (json_last_error() == JSON_ERROR_NONE) {\n\t\t\t$input = $decode;\n\t\t}\n\n\t\tif (!is_array($input)) {\n\t\t\t$input = (array) $input;\n\t\t}\n\n\t\t$get = $_SERVER['QUERY_STRING'] ?? '';\n\t\t$get = explode('&', $get);\n\t\tforeach ($get as $item) {\n\t\t\t$item = explode('=', $item);\n\t\t\tif (count($item) !== 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$this->input[$item[0]] = $item[1];\n\t\t}\n\n\t\t$this->input = array_merge($this->input, $input);\n\t}", "public function add_query_vars($vars) {\r\n $vars[] = '__api';\r\n $vars[] = 'films';\r\n return $vars;\r\n }", "public function getParams()\n {\n $shift = array('CONTROLLER', 'ROUTE_CONTROLLER', 'ACTION', 'ROUTE_ACTION');\n $values = array();\n foreach ($this->joUrl as $key => $value) {\n if (!in_array($key, $shift)) {\n $values[] = self::setAntiInjection($value);\n }\n }\n return $values;\n }", "public static function getRequestVars() {\n return self::$_request_vars;\n }", "private static function getPostParams()\n\t{\n\t\treturn (count($_POST) > 0) ? $_POST : json_decode(file_get_contents('php://input'), true);\n\t}", "public function test_aptivate_request_extracts_parameter_subsets()\n\t{\n\t\t$_GET = array('hello' => array('bonk' => 'whee!'));\n\t\t$req = new Aptivate_Request('GET', '/fake-test-script.php',\n\t\t\t'/fake-test-url');\n\t\t$this->assertEquals('whee!', $req['hello']->param('bonk'));\n\t\t$this->assertEquals('whee!', $req['hello']->param('bonk'));\n\t\t\n\t\t$_POST = $_GET;\n\t\t$_GET = array();\n\t\t$req = new Aptivate_Request('GET', '/fake-test-script.php',\n\t\t\t'/fake-test-url');\n\t\t$this->assertEquals('whee!', $req['hello']->param('bonk'));\n\t\t$this->assertEquals('whee!', $req['hello']->param('bonk'));\n\t}", "private function setup_filters() {\n\n\t\tadd_filter( 'pre_option_posts_per_page', array( $this, 'filter_posts_per_page' ) );\n\n\t\tadd_filter( 'plugins_url', array( $this, 'filter_plugins_url' ) );\n\n\t}", "public function sanitize_input_fields()\n {\n }", "function wpse45436_posts_filter( $query ){\n global $pagenow;\n $type = 'policy';\n if (isset($_GET['post_type'])) {\n $type = $_GET['post_type'];\n }\n if ( 'policy' == $type && is_admin() && $pagenow=='edit.php' && isset($_GET['ADMIN_FILTER_FIELD_VALUE']) && $_GET['ADMIN_FILTER_FIELD_VALUE'] != '') {\n $query->query_vars['meta_key'] = 'responsible_office';\n $query->query_vars['meta_value'] = $_GET['ADMIN_FILTER_FIELD_VALUE'];\n }\n}" ]
[ "0.6966898", "0.67622375", "0.6582671", "0.633355", "0.6317785", "0.62287277", "0.6184066", "0.616311", "0.61058164", "0.60712695", "0.606712", "0.6045182", "0.5973167", "0.5972564", "0.59385014", "0.5919267", "0.5907319", "0.5882442", "0.5859561", "0.58304626", "0.5814966", "0.5808624", "0.5804051", "0.57918644", "0.5767654", "0.57587606", "0.57507056", "0.5718451", "0.57162094", "0.5665972", "0.56586766", "0.56410265", "0.56335765", "0.56193846", "0.56168395", "0.5614513", "0.5610218", "0.56091297", "0.55921906", "0.5587976", "0.55612963", "0.55480814", "0.5544696", "0.5535839", "0.5519563", "0.5516149", "0.5514975", "0.5506211", "0.54963017", "0.54962075", "0.54844946", "0.5478974", "0.5459083", "0.54534537", "0.5451529", "0.5449653", "0.5436944", "0.5421654", "0.54186696", "0.541362", "0.5409877", "0.5408372", "0.5407196", "0.54035664", "0.5403346", "0.5401", "0.53771174", "0.536535", "0.53635937", "0.53397083", "0.53325117", "0.53313893", "0.5326898", "0.5324105", "0.5322843", "0.5322571", "0.53195596", "0.5319142", "0.5317831", "0.5316817", "0.5313299", "0.5313023", "0.5309557", "0.5309557", "0.530772", "0.53050774", "0.53039235", "0.53027177", "0.52973723", "0.5295839", "0.52908987", "0.52873385", "0.5286307", "0.5285977", "0.52830637", "0.5281933", "0.527391", "0.5267387", "0.5263203", "0.5258399", "0.5253867" ]
0.0
-1
/! \brief Edit an existing service here. Somebody clicked on the paper and pencil icon.
function editEntry($action = "", $target = array(), $all = array(), $altTabClass = "", $altTabType = "", $altAclCategory = "") { $this->dialog = TRUE; $s_entry = array_pop($target); if ($this->plugins[$s_entry]->acl_is_readable("")) { $this->backup = get_object_vars($this->plugins[$s_entry]); $this->dialogObject = $this->plugins[$s_entry]; $this->current = $s_entry; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Service $service)\n {\n //\n }", "public function edit(Service $service)\n {\n //\n }", "public function edit(Service $service)\n {\n //\n }", "public function edit(Service $service)\n {\n //\n }", "public function edit($service, $data)\n {\n }", "public function edit(ServiceCode $serviceCode)\n {\n //\n }", "public function edit(Services $services)\n {\n //\n }", "public function edit(Services $services)\n {\n //\n }", "public function edit(Services $services)\n {\n //\n }", "public static function editService($service, $id){\r\n Client::Update()\r\n ->set('service',$service)\r\n ->where('id', $id)\r\n ->execute();\r\n }", "public function edit(Service $partner)\n {\n //\n }", "public function edit(Service $Service)\n {\n\n return view('pagesystem.Service.edit', compact('Service'));\n }", "public function edit(ServiceSuggestion $serviceSuggestion)\n {\n //\n }", "public function edit(Service $service)\n {\n //\n return view('spravochnik.edit')\n ->with('pageStructure', $this->createPageStructure())\n ->with('pageParams', $this->createPageParams($service->id))\n ->with('modalParams', $this->createListModalParams())\n ->with('pageTitle', 'сервис')\n ->with('pageHref', 'service');\n }", "public function edit(Service $service)\n {\n $icons = Icon::all();\n return view('site.services-edit', compact('service', 'icons'));\n }", "public function edit(Service $service)\n {\n $icons = Icon::all();\n $services = Service::all();\n return view('back.service.editService', compact('service', 'services', 'icons'));\n }", "public function edit(ServiceReport $serviceReport)\n {\n //\n }", "public function edit(TeamService $teamService)\n {\n //\n }", "public function testUpdateService()\n {\n\n $this->browse(function (Browser $browser) {\n $user = User::factory()->create();\n $service = Service::factory()->create();\n $serviceUpdate = Service::factory()->make();\n $browser->visit('/login')\n ->pause(3000)\n ->type('email', $user->email)\n ->type('password', 'password')\n ->press('Login')\n ->pause(2000)\n ->assertPathIs('/service')\n ->visit('/service/update/'.$service->id)\n ->pause(1000)\n ->type('descricao', $serviceUpdate->descricao)\n ->type('valor', $serviceUpdate->valor)\n ->press('Editar')\n ->pause(1000)\n ->assertSee(Constantes::SUCESSO_UPDATE_SERVICE)\n ->press('OK')\n ->pause(1000);\n\n });\n }", "public function edit(Service $service)\n {\n return view(\"admin.services.edit\", compact('service'));\n }", "public function edit(Service $service)\n {\n return view('adminlte.services.edit', compact('service'));\n }", "public function edit(Service $service)\n {\n return view('services.edit', compact('service'));\n }", "public function edit(Service $service)\n {\n return view('dashboard.service.edit', compact('service'));\n }", "public function edit(Service $service)\n {\n return view('services.edit', ['service' => $service]);\n }", "public function edit(Service $service)\n {\n return view('admin.services.edit', compact('service'));\n }", "public function edit(Service $service)\n {\n return view('admin.services.edit', compact('service'));\n }", "public function edit(Service $service)\n {\n return view('services.index', compact('service'));\n }", "function editServiceForm ($pid, $msg = '', $new_name = '', $new_site_url = '', $new_ping_url = '', $new_method = '', $new_enabled = -1)\n{\n global $_CONF, $_TABLES, $LANG_TRB, $LANG_ADMIN, $MESSAGE;\n\n $retval = '';\n\n if ($pid > 0) {\n $result = DB_query (\"SELECT * FROM {$_TABLES['pingservice']} WHERE pid = '$pid'\");\n $A = DB_fetchArray ($result);\n } else {\n $A['is_enabled'] = 1;\n $A['method'] = 'weblogUpdates.ping';\n }\n\n if (!empty ($new_name)) {\n $A['name'] = $new_name;\n }\n if (!empty ($new_site_url)) {\n $A['site_url'] = $new_site_url;\n }\n if (!empty ($new_ping_url)) {\n $A['ping_url'] = $new_ping_url;\n }\n if (!empty ($new_method)) {\n $A['method'] = $new_method;\n }\n if ($new_enabled >= 0) {\n $A['is_enabled'] = $new_enabled;\n }\n\n $retval .= COM_siteHeader ('menu', $LANG_TRB['edit_service']);\n\n if (!empty ($msg)) {\n $retval .= showTrackbackMessage ('Error', $msg);\n }\n\n $token = SEC_createToken();\n\n $retval .= COM_startBlock($LANG_TRB['edit_service'], getHelpUrl() . '#ping',\n COM_getBlockTemplate('_admin_block', 'header'));\n $retval .= SEC_getTokenExpiryNotice($token);\n\n $template = new Template ($_CONF['path_layout'] . 'admin/trackback');\n $template->set_file (array ('editor' => 'serviceeditor.thtml'));\n $template->set_var('xhtml', XHTML);\n $template->set_var('site_url', $_CONF['site_url']);\n $template->set_var('site_admin_url', $_CONF['site_admin_url']);\n $template->set_var('layout_url', $_CONF['layout_url']);\n $template->set_var('max_url_length', 255);\n $template->set_var('method_ping', 'weblogUpdates.ping');\n $template->set_var('method_ping_extended', 'weblogUpdates.extendedPing');\n\n $template->set_var('lang_name', $LANG_TRB['service']);\n $template->set_var('lang_site_url', $LANG_TRB['service_website']);\n $template->set_var('lang_ping_url', $LANG_TRB['service_ping_url']);\n $template->set_var('lang_enabled', $LANG_ADMIN['enabled']);\n $template->set_var('lang_method', $LANG_TRB['ping_method']);\n $template->set_var('lang_method_standard', $LANG_TRB['ping_standard']);\n $template->set_var('lang_method_extended', $LANG_TRB['ping_extended']);\n $template->set_var('lang_save', $LANG_ADMIN['save']);\n $template->set_var('lang_cancel', $LANG_ADMIN['cancel']);\n\n if ($pid > 0) {\n $delbutton = '<input type=\"submit\" value=\"' . $LANG_ADMIN['delete']\n . '\" name=\"servicemode[2]\"%s' . XHTML . '>';\n $jsconfirm = ' onclick=\"return confirm(\\'' . $MESSAGE[76] . '\\');\"';\n $template->set_var('delete_option',\n sprintf ($delbutton, $jsconfirm));\n $template->set_var('delete_option_no_confirmation',\n sprintf ($delbutton, ''));\n } else {\n $template->set_var('delete_option', '');\n }\n\n if (isset ($A['pid'])) {\n $template->set_var('service_id', $A['pid']);\n } else {\n $template->set_var('service_id', '');\n }\n if (isset ($A['name'])) {\n $template->set_var('service_name', $A['name']);\n } else {\n $template->set_var('service_name', '');\n }\n if (isset ($A['site_url'])) {\n $template->set_var('service_site_url', $A['site_url']);\n } else {\n $template->set_var('service_site_url', '');\n }\n if (isset ($A['ping_url'])) {\n $template->set_var('service_ping_url', $A['ping_url']);\n } else {\n $template->set_var('service_ping_url', '');\n }\n if ($A['is_enabled'] == 1) {\n $template->set_var('is_enabled', 'checked=\"checked\"');\n } else {\n $template->set_var('is_enabled', '');\n }\n if ($A['method'] == 'weblogUpdates.ping') {\n $template->set_var('standard_is_checked', 'checked=\"checked\"');\n $template->set_var('extended_is_checked', '');\n } else {\n $template->set_var('standard_is_checked', '');\n $template->set_var('extended_is_checked', 'checked=\"checked\"');\n }\n $template->set_var('gltoken_name', CSRF_TOKEN);\n $template->set_var('gltoken', $token);\n\n $template->parse ('output', 'editor');\n $retval .= $template->finish ($template->get_var ('output'));\n\n $retval .= COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'));\n $retval .= COM_siteFooter ();\n\n return $retval;\n}", "public function update(StoreService $request, Service $service)\n {\n $service->title=$request->title;\n $service->description=$request->description;\n $service->icon_id=$request->icon_id;\n $service->save();\n $icon = Icon::all();\n $services = Service::all();\n return view('site.services', compact('services','icon'));\n }", "public function edit($id)\n {\n $service = Service::find($id);\n $this->data[\"service\"] = $service;\n $this->data[\"form\"] = \"edit\";\n return view(\"admin.pages.services\",$this->data);\n }", "function editItem() {\n\t\tglobal $HTML;\n\t\t$HTML->details(1);\n\t\t$name = stringOr($this->vars[\"name\"], $this->getQueryResult(0, \"name\"));\n\n\t\t$_ = '';\n\t\t$_ .= $HTML->head($this->translate(\"Edit point name\"));\n\t\t$_ .= $HTML->block($this->translate(\"Point\").\":\", $this->getQueryResult(0, \"file\"));\n\t\t$_ .= $HTML->input($this->varnames[\"name\"], \"name\", $name);\n\n\t\treturn $_;\n\t}", "public function updating(Service $Service)\n {\n //code...\n }", "public function editService(string $title, string $content, string $file_name, int $id):bool\n {\n\n $editService = $this->pdo->prepare('UPDATE services SET title = :title, content = :content, file_name = :file_name WHERE id = :id');\n\n return $editService->execute(array(\n ':title' => $title,\n ':content'=> $content,\n ':file_name' => $file_name,\n ':id'=> $id\n ));\n }", "public function edit(Service $service)\n {\n return view('admin/service/service_edit',compact('service'));\n }", "public function update(Request $request, Service $service)\n {\n request()->validate([\n \"icon_id\"=>[\"required\"],\n \"title\"=>[\"required\"],\n \"text\"=>[\"required\"],\n ]);\n\n $service->icon_id = $request->icon_id;\n $service->title = $request->title;\n $service->text = $request->text;\n $service->save();\n return redirect()->route('back.service')->with('success', 'Modifications enregistrées');\n }", "public function edit(Service $service)\n {\n return view('servicios.edit', compact('service'));\n }", "public function edit(Service $service)\n {\n $subservices = $this->subservice->lists('title', 'id');\n return view('admin.service.edit', compact('subservices', 'service'));\n }", "public function edit($id)\r\n\t{\r\n\t\t$service = Service::find($id);\r\n\t\treturn View::make('services.edit')\r\n\t\t\t->with('service', $service);\r\n\t}", "public function edit($id)\n {\n $service = Service::findOrFail($id);\n return view('back_end.pages_backend.services_backend.edit',compact('service'));\n\n }", "public function edit($id, Request $request)\n {\n $services = Services::where('id', $id)->first();\n\n \n }", "public function update(ServicesFormRequest $request)\n {\n $id = $request->input('id');\n $service = \\App\\Services::find($id);\n $service->title = $request->input('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 updated.<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/' . $id)->withMessage($message);\n }", "public function editService($package, $service, array $vars = array(), $parent_package = null, $parent_service = null)\n {\n // Perform manual renewals\n $renew = isset($vars[\"renew\"]) ? (int)$vars[\"renew\"] : 0;\n if ($renew > 0 && $vars[\"use_module\"] == 'true') {\n // Call to renewService() to perform manual renewals\n $this->renewService($package, $service, $parent_package, $parent_service, $renew);\n unset($vars['renew']);\n }\n return null; // All this handled by admin/client tabs instead\n }", "public function edit(Shelf $shelf)\n {\n //\n }", "public function update(Service $request, Services $services, $id)\n {\n \n \n $service = Services::find($id);\n \n if($request->hasFile('image')){\n $image = $request->image;\n $image_new_name = time().$image->getClientOriginalName();\n $image->move('admin/img/', $image_new_name);\n $service->image = 'admin/img/'. $image_new_name; \n }\n $service->name = $request->name;\n \n $service->order = $request->order;\n $service->save();\n \n return redirect()->route('Service.index');\n \n }", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit(AdminService $adminService)\n {\n $data_user = Auth::user();\n $merchants = Merchant::all();\n $service_points = ServicePoint::all();\n $admin_services = AdminService::find('id');\n $nama_merchant = Merchant::whereId($adminService['merchant_id'])->get();\n $nama_service_point = ServicePoint::whereId($adminService['service_point_id'])->get();\n // print($nama_merchant[0]['id']);exit;\n // print_r(json_decode(json_encode($nama_service_point[0]['nama'])));exit;\n return view('service_admin.edit_admin_service',compact('adminService','data_user','merchants','service_points','nama_merchant','nama_service_point'));\n }", "public function edit($id)\n {\n $data['service']=Service::find($id);\n return view('admin.services.edit',$data);\n }", "public function update(serviceRequest $request,Service $id)\n {\n $id->title = $request->title;\n\n if($request->hasFile('icon')) {\n if($request->file('icon')->isValid()){\n $file = $request->file('icon');\n $filename = str_random(25).'_'.$file->getClientOriginalName();\n\n $icon_path = public_path().'/uploads/images/services/icon/';\n $icon = Image::make($file);\n $icon->fit(72)->save($icon_path.$filename);\n\n if(file_exists($icon_path.$id->icons)){\n @unlink($icon_path.$id->icons);\n }\n $id->icons = $filename;\n }\n }\n\n $id->caption = $request->caption;\n\n if($request->hasFile('image')) {\n if($request->file('image')->isValid()) {\n $file =$request->file('image');\n $filename = str_random(25).'_'.$file->getClientOriginalName();\n $path = public_path().'/uploads/images/services/image/';\n $image = Image::make($file);\n $image->resize(1170, null, function ($constraints){\n $constraints->aspectRatio();\n $constraints->upsize();\n })->save($path.$filename);\n\n if(file_exists($path.$id->image)){\n @unlink($path.$id->image);\n }\n\n $id->image = $filename;\n\n $thumbnail_name = str_random(25).'_thumb_'.$file->getClientOriginalName();\n $thumb = Image::make($file);\n $thumb->resize(250, null, function ($constraints){\n $constraints->aspectRatio();\n $constraints->upsize();\n })->save($path.'thumbnail/'.$thumbnail_name, 100);\n\n if(file_exists($path.'thumbnail/'.$id->thumbnail)){\n @unlink($path.'thumbnail/'.$id->thumbnail);\n }\n\n $id->thumbnail = $thumbnail_name;\n }\n }\n\n $id->description = $request->service_description;\n $id->status = $request->status;\n $id->slug = str_slug($request->title, '-');\n $id->save();\n\n return redirect()->route('services')->with('status', 'Service edited successfully');\n }", "public function edit(Service $service)\n {\n $categories = Category::all();\n return view('editService', compact(['service', 'categories']));\n }", "public function editAction($id = 0)\n {\n $this->require_login('ROLE_ADMIN', 'service/edit/' . $id);\n\n // Get or create service\n if ($id) {\n $service = Admin::getService($id);\n } else {\n $service = Admin::createService();\n $id = 0;\n }\n\n // ETicket options\n $etoptions = array(\n 0 => 'Disabled',\n 1 => 'Enabled - optional',\n 2 => 'Enabled - forced',\n );\n\n // ETicket selected\n if ($service->eticketenabled) {\n $etselected = $service->eticketforce ? 2 : 1;\n } else {\n $etselected = 0;\n }\n\n // Create form\n $form = new \\stdClass;\n $form->code = Form::text('code', 'Code', $service->code, FORM_REQUIRED );\n $form->name = Form::text('name', 'Name', $service->name, FORM_REQUIRED );\n $form->description = Form::textarea('description', 'Description', $service->description, false, [\n 'v-model' => 'description'\n ]);\n $form->visible = Form::yesno('visible', 'Visible', $service->visible);\n $form->date = Form::date('date', 'Date', $service->date, FORM_REQUIRED);\n $form->singlesupplement = Form::text('singlesupplement', 'Single supplement', $service->singlesupplement);\n $form->commentbox = Form::yesno('commentbox', 'Comment box', $service->commentbox);\n $form->eticket = Form::select('eticket', 'ETicket mode', $service->eticket, $etoptions);\n $form->mealsinfirst = Form::yesno('mealsinfirst', 'Meals available in First', $service->mealsinfirst);\n $form->mealsinstandard = Form::yesno('mealsinstandard', 'Meals available in Standard', $service->mealsinstandard);\n $form->mealaname = Form::text('mealaname', '', $service->mealaname, FORM_REQUIRED);\n $form->mealavisible = Form::yesno('mealavisible', '', $service->mealavisible);\n $form->mealaprice = Form::text('mealaprice', '', $service->mealaprice);\n $form->mealbname = Form::text('mealbname', '', $service->mealbname, FORM_REQUIRED);\n $form->mealbvisible = Form::yesno('mealbvisible', '', $service->mealbvisible);\n $form->mealbprice = Form::text('mealbprice', '', $service->mealbprice);\n $form->mealcname = Form::text('mealcname', '', $service->mealcname, FORM_REQUIRED);\n $form->mealcvisible = Form::yesno('mealcvisible', '', $service->mealcvisible);\n $form->mealcprice = Form::text('mealcprice', '', $service->mealcprice);\n $form->mealdname = Form::text('mealdname', '', $service->mealdname, FORM_REQUIRED);\n $form->mealdvisible = Form::yesno('mealdvisible', '', $service->mealdvisible);\n $form->mealdprice = Form::text('mealdprice', '', $service->mealdprice);\n\n // hopefully no errors\n $errors = null;\n\n // anything submitted?\n if ($data = $this->getRequest()) {\n\n // Cancel?\n if (!empty($data['cancel'])) {\n if ($id) {\n $this->redirect('service/show/' . $id);\n } else {\n $this->redirect('service/index');\n }\n }\n\n // Validate\n $this->gump->validation_rules(array(\n 'code' => 'required',\n 'name' => 'required',\n 'description' => 'required',\n 'visible' => 'required|integer',\n 'date' => 'required',\n 'eticket' => 'required|integer',\n 'mealsinfirst' => 'required|integer',\n 'mealsinstandard' => 'required|integer',\n 'commentbox' => 'required|integer',\n 'mealaname' => 'required',\n 'mealavisible' => 'required|integer',\n 'mealaprice' => 'required|numeric',\n 'mealbname' => 'required',\n 'mealbvisible' => 'required|integer',\n 'mealbprice' => 'required|numeric',\n 'mealcname' => 'required',\n 'mealcvisible' => 'required|integer',\n 'mealcprice' => 'required|numeric',\n 'mealdname' => 'required',\n 'mealdvisible' => 'required|integer',\n 'mealdprice' => 'required|numeric',\n ));\n\n if ($data = $this->gump->run($data)) {\n $service->code = $data['code'];\n $service->name = $data['name'];\n $service->description = $data['description'];\n $service->visible = $data['visible'];\n $dp = date_parse_from_format('Y-m-d', $data['date']);\n $service->date = $dp['year'] . '-' . $dp['month'] . '-' . $dp['day'];\n $service->commentbox = $data['commentbox'];\n $service->mealsinfirst = $data['mealsinfirst'];\n $service->mealsinstandard = $data['mealsinstandard'];\n $service->mealaname = $data['mealaname'];\n $service->mealavisible = $data['mealavisible'];\n $service->mealaprice = $data['mealaprice'];\n $service->mealbname = $data['mealbname'];\n $service->mealbvisible = $data['mealbvisible'];\n $service->mealbprice = $data['mealbprice'];\n $service->mealcname = $data['mealcname'];\n $service->mealcvisible = $data['mealcvisible'];\n $service->mealcprice = $data['mealcprice'];\n $service->mealdname = $data['mealdname'];\n $service->mealdvisible = $data['mealdvisible'];\n $service->mealdprice = $data['mealdprice'];\n\n // eticket\n if ($data['eticket'] == 0) {\n $service->eticketenabled = 0;\n $service->eticketforce = 0;\n } else {\n $service->eticketenabled = 1;\n $service->eticketforce = $data['eticket'] == 1 ? 0 : 1;\n }\n\n $service->save();\n Session::writeFlash('saved_service', 1);\n\n $id = $service->id();\n $this->redirect('service/show/' . $id);\n } else {\n $errors = $this->gump->get_readable_errors(false);\n }\n }\n\n $this->View('service/edit', array(\n 'service' => $service,\n 'serviceid' => $id,\n 'form' => $form,\n 'etoptions' => $etoptions,\n 'etselected' => $etselected,\n 'errors' => $errors,\n 'apicall' => $this->Url('/service/jsonservice/' . $id),\n ));\n }", "public function edit($id)\n {\n $ships = Collection::make();\n $service = Service::findOrFail($id);\n if($service->ship_id == null){\n $service->ship_id = 0;\n }\n $ships_data = Ship::all();\n\n $ships->push([\n \"id\" => 0 , \n \"type\" => \"General\",\n ]);\n\n foreach($ships_data as $ship){\n $ships->push([\n \"id\" => $ship->id , \n \"type\" => $ship->type,\n ]);\n }\n return view('service.edit', compact('service','ships'));\n }", "public function edit(ApertureLuoghiInteresse $apertureLuoghiInteresse)\n {\n //\n }", "public function actionEditService() {\r\n if (Yii::$app->request->isAjax) {\r\n $id = $_POST['id'];\r\n $name = $_POST['name'];\r\n $value = $_POST['valuee'];\r\n $service = AppointmentService::find()->where(['id' => $id])->one();\r\n $appointment = Appointment::find()->where(['id' => $service->appointment_id])->one();\r\n if ($value != '') {\r\n $service->$name = $value;\r\n $service->UB = Yii::$app->user->identity->id;\r\n if ($name == 'amount') {\r\n $tax_amount = 0;\r\n if ($service->amount != '' && $service->amount > 0) {\r\n $tax_val = $service->tax != '' ? \\common\\models\\Tax::findOne($service->tax)->value : '';\r\n if ($tax_val != '' && $tax_val > 0) {\r\n $tax_amount = ($service->amount * $tax_val) / 100;\r\n }\r\n $service->tax_amount = $tax_amount;\r\n $service->tax_percentage = $tax_val;\r\n $tot = $service->amount + $tax_amount;\r\n $service->total = $tot;\r\n }\r\n }\r\n if ($service->save()) {\r\n if ($appointment->sub_status > 0) {\r\n $this->RemoveAccountsData($appointment);\r\n }\r\n Yii::$app->SetValues->updateAppointment($appointment->id);\r\n Yii::$app->session->set('account_step1', '1');\r\n return $service->total;\r\n }\r\n }\r\n }\r\n }", "public function edit( )\r\n {\r\n //\r\n }", "function editServiceInput($id, $data) {\n return $this->db->update('insumos', $data, array('id' => $id));\n }", "public function edit(Service $id)\n {\n return view('backend.services.edit', ['service' => $id]);\n }", "public function edit() {\n }", "public function edit($id)\n {\n $title = 'Services';\n $module = $this->module;\n $route = route($this->module.'.update', $id);\n $formulario = 'modules.'.$this->module.'.form';\n $service = Service::find($id);\n\n return view('create', compact('title', 'module', 'route', 'formulario', 'service'));\n }", "public function edit(Office $office)\n {\n //\n }", "public function edit($sp_id)\n {\n //\n }", "public function update_about_us_services_info($data){\r\n $query = \"UPDATE tbl_aboutus_service SET service_icon='$data[service_icon]', service_title='$data[service_title]', service_desc='$data[service_desc]', \r\n publication_status='$data[publication_status]' WHERE service_id='$data[service_id]'\";\r\n if (mysqli_query($this->db_connect, $query)) {\r\n session_start();\r\n $_SESSION['message'] = \"About Us Services Updated Successfully!\";\r\n header('Location: manage_services.php');\r\n } else {\r\n die(\"Query Problem! \" . mysqli_error($this->db_connect));\r\n }\r\n\r\n }", "public function edit($id)\n {\n $service= DB::table('services')->where('id',$id)->first();\n return view('admin.activitie.edit', compact('service'));\n }", "public function edit(Services $service)\n {\n $category_types = CategoryType::get();\n return view('services.edit')->with(['service' => $service, 'category_types' => $category_types]);\n }", "public function edit(ScrapeData $scrapeData)\n {\n //\n }", "public function edit(ProductosServicio $productosServicio)\n {\n //\n }", "public function updated(Service $service)\n {\n //\n }", "public function edit($id)\n {\n $Slider = Service::find($id);\n return view('admin.services.edit',['info'=> $Slider]);\n }", "public function edit($id)\n {\n $service= Services::findorfail($id);\n $data= array(\n 'service' => $service,\n\n );\n return view('admin.services.edit')->with($data);\n \n }", "public function edit() {\n\t\t\t\n\t\t}", "public function edit($id)\n {\n if(Auth::check()){\n $user = Auth::user();\n $company_controller = new CompanyController;\n $company_validate = $company_controller->validate_company($user->id_company);\n $services = Service::where('id_company', $user->id_company)->paginate(30);\n $service = DB::table('services')->find($id);\n if($service === null){\n return view ('pt.home.pages.service.service', $user, ['services' => $services,\n 'logo' => $company_validate['company_logo'],\n 'company_type' => $company_validate['company_type'],\n 'service' => $service,\n 'is_edit' => false,\n 'is_index' => true,\n 'is_destroy' => false]);\n }\n return view ('pt.home.pages.service.service', $user, ['services' => $services,\n 'logo' => $company_validate['company_logo'],\n 'company_type' => $company_validate['company_type'],\n 'selected_service' => $service,\n 'is_edit' => true,\n 'is_index' => true,\n 'is_destroy' => false]);\n }\n return redirect()->route('root');\n }", "public function edit()\n {\n \n }", "public function edit()\n\t{\n\t\t\n\t}", "public function edit($id)\n {\n $data = [];\n $data[\"data\"] = Service::findOrFail($id);\n\n return view(\"pages.service.edit\", $data);\n }", "public function edit(Python $python)\n {\n //\n }", "public function updated(Service $Service)\n {\n //code...\n }", "public function saving(Service $Service)\n {\n //code...\n }", "public function edit($id)\n {\n $service = Service::where('id',$id)->first();\n $client = Client::where('id',$service->client_id)->first();\n \n $data = array('service'=>$service,'client'=>$client);\n return view('EditarServices',$data);\n }", "public function edit($id)\n {\n $service = \\App\\Services::where('id', $id)->first();\n return view('admin.services.edit')->with('service', $service);\n }", "public function saved(Service $Service)\n {\n //code...\n }", "public function edit($id)\n {\n $service = Service::find($id);\n return view('dashboard.services.edit', compact('service'));\n }", "public function edit($id)\n\t{\n\t\t$service = $this->service->find($id);\n\n\t\tif (is_null($service))\n\t\t{\n\t\t\treturn Redirect::route('services.index');\n\t\t}\n\n\t\treturn View::make('services.edit', compact('service'));\n\t}", "public function update(ServiceRequest $request, $id)\n {\n $service = Service::find($id);\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 updated service with id \".$service->id,$request->url(),$request->method(),$request->ip(),$request->userAgent(),session(\"user\")->id);\n return redirect()->back()->with(\"editServiceSuccess\",\"Service successfully updated!\");\n }catch (\\Exception $e){\n \\Log::error($e->getMessage());\n $this->log(\"Error on admin updating service with id \".$service->id,$request->url(),$request->method(),$request->ip(),$request->userAgent(),session(\"user\")->id);\n return redirect()->back()->with(\"editServiceError\" , \"Server error on editing service, try again later.\")->withInput();\n }\n }", "public function actionUpdate()\n {\n $model = new UpdateService();\n\n $serviceId = BaseRequest::getParamOnUrl('id');\n $service = $this->viewOne('service');\n\n if($this->update($model,$service)){\n $this->setFlash('update_service','Service content update success');\n return $this->goHome();\n }\n return $this->render('update',['model' => $model,'service' => $service]);\n }", "public function edit(PetitionTool $petitionTool)\n {\n //\n }", "public function edit($id)\n {\n $service = Service::findOrFail($id);\n\n return view('admin/services.service.edit', compact('service'));\n }", "public function edit(Stipend $stipend)\n {\n //\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fj_Service_Goods::getGoods(intval($id));\n $this->assign('dir', \"goods\");\n $this->assign('ueditor', true);\n\t\t$this->assign('info', $info);\n\t}", "public function edit()\n {\n \n \n }", "public function edit(Feature $feature)\n {\n //\n }", "public function edit(Sick $sick)\n {\n //\n }", "public function testUpdateService()\n {\n\n }", "public function edit(Routine $routine)\n {\n //\n }", "public function edit($id)\n {\n try {\n\t\t $service = ServiceType::findOrFail($id);\n\t\t\t\n return view('admin.service.edit',compact('service'));\n } catch (ModelNotFoundException $e) {\n return back()->with('flash_error', 'Service Type Not Found');\n }\n }", "public function edit()\n {\n //\n\t\treturn 'ini halaman edit';\n }", "public function edit(StudentPoint $student_point)\n {\n //\n }", "public function edit(Slide $slide)\n {\n //\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }" ]
[ "0.80158275", "0.80158275", "0.80158275", "0.80158275", "0.75682026", "0.7260954", "0.7196861", "0.7196861", "0.7196861", "0.7044824", "0.7026524", "0.6975456", "0.6965657", "0.69144696", "0.6877808", "0.6759059", "0.66151303", "0.65672535", "0.6557392", "0.64584553", "0.6442334", "0.64158857", "0.6409254", "0.6385546", "0.63568336", "0.63568336", "0.63304484", "0.628689", "0.62757087", "0.62681645", "0.62641716", "0.6258029", "0.62298936", "0.6182517", "0.6169155", "0.6155439", "0.61501926", "0.6149553", "0.6142182", "0.6093273", "0.60775626", "0.60632986", "0.6055151", "0.6044518", "0.6043315", "0.60384184", "0.6031523", "0.6031102", "0.6030267", "0.6026885", "0.6025296", "0.6018543", "0.6014689", "0.6010986", "0.6008578", "0.60063", "0.60016584", "0.5997014", "0.59903866", "0.59689665", "0.5966341", "0.59542197", "0.59520406", "0.5946273", "0.594335", "0.59430426", "0.5935145", "0.59189", "0.591153", "0.5909359", "0.5900534", "0.589909", "0.5896647", "0.5896556", "0.589566", "0.588986", "0.5884922", "0.5867925", "0.5867479", "0.5855341", "0.5852066", "0.58509856", "0.58486384", "0.58483356", "0.5840035", "0.58388674", "0.5833786", "0.5833786", "0.5833786", "0.583364", "0.5831291", "0.5827977", "0.5823051", "0.582187", "0.5821607", "0.5820868", "0.5817094", "0.5810624", "0.5806023", "0.58054096", "0.58054096" ]
0.0
-1
/! \brief Editing an object was caneled. Close dialogs/tabs and remove locks.
protected function cancelEdit() { if ($this->backup == NULL && $this->current) { $this->plugins[$this->current] = new $this->current($this->dn, $this); $this->plugins[$this->current]->set_acl_base($this->acl_base); $this->plugins[$this->current]->set_acl_category(preg_replace("/\/$/", "", $this->acl_category)); } elseif (is_array($this->backup)) { foreach ($this->backup as $name => $value) { $this->plugins[$this->current]->$name = $value; } } $this->backup = NULL; $this->current = ""; $this->closeDialogs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit($obj) {\n\t}", "function _editobject($obj){\r\n\t\r\n\t# IF USER = Y and STATE = other than create or rejected (1,4) than this should be READ ONLY\r\n\t\r\n\tglobal $usertoken,$dbi;\r\n\techo setPageTitle('Antrag Bearbeiten Benutzer: '.$usertoken['uname']);\r\n\t\r\n\techo '<div class=\\'child\\'>';\r\n\techo include('forms/request.php');\r\n\techo '</div>';\r\n\t#debug($obj);\r\n\tswitch($obj['wfobject']){\r\n\tcase 'wflineup':\r\n\t\t\r\n\t\t// step 1 collect and SHOW the teams for this verein\r\n\t\techo '<h3>Team w&auml;hlen</h3><div class=\\'child\\'><p>* Das Team w&auml;hlen zu dem ein Spieler hinzugef&uuml;gt werden soll. Die aktuelle Aufstellung wird dann unterhalb abgezeigt. F&uuml;r <b>jeden</b> Spieler ist ein eigener Antrag auszuf&uuml;llen.</p>';\r\n\t\t$RS=DB_listTeams($dbi,0,0,'',1,'',$usertoken['verein_id']);\r\n\t\techo RecordsetToSelectOptionList($RS,array(4,2,5),'teamid',$obj['team_id'],'getlineup(this.value)');\r\n\t\techo '</div>';\r\n\t\t\r\n\t\techo '<h3>Aktuelle Aufstellung</h3><div class=\\'child\\'><div id=\\'lineUp\\'></div></div>';\r\n\t\t\r\n\t\techo '<h3>Aufstellung erweitern</h3><div class=\\'child\\'>';\r\n\t\techo _input(0,'wflineupid',$obj['wflineup_id']);\r\n\t\techo '<p>Hier kannst einen existierenden Spieler aus der Datenbank suchen und diesen in das Formular &uuml;bernehmen. Kann der Spieler nicht gefunden werden so muss das Formular ausgef&uuml;llt werden.</p>';\r\n\r\n\t\techo form_SearchPlayer('searchplayer(\"loadplayer\")');\r\n\t\techo '<div id=\\'qry\\'></div>';\r\n\t\t\r\n\t\t// Only show the LOAD Button if the wfplayer record does not exists\r\n\t\tif (!($obj['wfplayer_id']+$obj['player_id'])>0) echo '<p>Ein neues, leeres Spieler Melde Formular laden: '._button('Spieler neu','loadplayer(this)').'</p>';\r\n\t\techo '</div>';\r\n\t\techo '<h3>Spieler Bearbeiten</h3><div class=\"child\">';\r\n\t\techo '<div id=\"requestdata\">';\r\n\t\t// only show the form if there is a saved wfplayer record - else show LOAD Button ?\r\n\t\tif (($obj['wfplayer_id']+$obj['player_id'])>0) {\r\n\t\t\techo include('forms/wfplayer.php');\r\n\t\t} else {\r\n\t\t\techo '<div id=\"check\"></div>';\r\n\t\t}\r\n\t\techo '</div>';\r\n\t\techo '</div>';\r\n\t\techo '<h3>Prozess</h3><div class=\"child\">';\r\n\t\techo _show_process_buttons('lineup',$obj);\r\n\t\techo '</div>';\r\n\t\tbreak;\r\n\t\t\r\n\tcase 'wfplayer':\r\n\t\t\r\n\t\techo '<h3>Suchen</h3><div class=\\'child\\'>';\r\n\t\techo '<p id=\\'explain\\'>1. Einen existierenden Spieler in der aktuellen Datenbank nach Passnummer suchen und die Suchergebnisse anzeigen.</p>';\r\n\t\techo form_SearchPlayer('searchplayer(\"loadplayer\")');\r\n\t\techo '<p id=\\'explain\\'>2. Hast du richtigen Spieler gefunden, so kannst du mit dem Load Button die bekannten Daten dieses Spielers aus der Datenbank in das Formular &uuml;bernehmen. Die Daten k&ouml;nnen nun ge&auml;ndert bzw erg&auml;nzt werden.<br>Konnte der betreffende Spieler nicht gefunden werden oder es handelt sich um einen neuen Spieler so sind alle mit (*) gekennzeichneten Felder auszuf&uuml;llen.</p>';\r\n\t\techo '<div id=\\'qry\\'></div></div>';\r\n\t\techo '<h3>Bearbeiten</h3><div class=\\'child\\'>';\r\n\t\techo '<div id=\\'requestdata\\'>';\r\n\t\techo include('forms/wfplayer.php');\r\n\t\techo '</div></div>';\r\n\t\techo '<h3>Prozess</h3><div class=\\'child\\'>';\r\n\t\techo _show_process_buttons('player',$obj);\r\n\t\techo '</div>';\r\n\t\tbreak;\r\n\t\t\r\n\tcase 'wfteam':\r\n\t\t\r\n\t\t#debug($obj);\r\n\t\techo \"<h3>Team</h3><div class=\\\"child\\\">\";\r\n\t\techo \"<div id=\\\"requestdata\\\">\";\r\n\t\techo include('forms/wfteam.php');\r\n\t\techo '</div></div>';\r\n\t\techo '<h3>Aufstellung</h3><div class=\\'child\\'><div id=\\'lineUp\\'></div></div>';\r\n\t\techo '<h3>Aufstellung erweitern</h3><div class=\\'child\\'>';\r\n\t\techo form_SearchPlayer('searchplayer(\"addwflineup\")');\r\n\t\techo '<div id=\\'qry\\'></div><div id=\"check\"></div></div>';\r\n\t\techo '<script>getwflineup('.$obj['wfteam_id'].')</script>';\r\n\t\t\r\n\t\techo '<h3>Prozess</h3><div class=\\'child\\'>';\r\n\t\techo _show_process_buttons('team',$obj);\r\n\t\techo '</div>';\r\n\t\tbreak;\r\n\t\t\r\n\tcase 'wfmessage':\r\n\t\t\r\n\t\t#debug($obj);\r\n\t\techo '<h3>Unstrukturierte freie Meldung</h3><div class=\\'child\\'>';\r\n\t\techo '<div id=\\'requestdata\\'>';\r\n\t\techo include('forms/wfmessage.php');\r\n\t\techo '</div></div>';\r\n\t\t\r\n\t\techo '<h3>Prozess</h3><div class=\\'child\\'>';\r\n\t\techo _show_process_buttons('message',$obj);\r\n\t\techo '</div>';\r\n\t\tbreak;\r\n\t\r\n\tdefault:\r\n\t\techo '<div class=\\'child\\'>E:WF23:UnknownRequestType</div>';\r\n\t}\r\n\t\r\n}", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit()\n\t{\n\t\t\n\t}", "public function edit() {\n\t\t\t\n\t\t}", "public function edit( )\r\n {\r\n //\r\n }", "protected function actionEdit() {\r\n\r\n //try 1: get the object type and names based on the current object\r\n $objInstance = class_objectfactory::getInstance()->getObject($this->getSystemid());\r\n if($objInstance != null) {\r\n $strObjectTypeName = uniSubstr($this->getActionNameForClass(\"edit\", $objInstance), 4);\r\n if($strObjectTypeName != \"\") {\r\n $strType = get_class($objInstance);\r\n $this->setCurObjectClassName($strType);\r\n $this->setStrCurObjectTypeName($strObjectTypeName);\r\n }\r\n }\r\n\r\n //try 2: regular, oldschool resolving based on the current action-params\r\n $strType = $this->getCurObjectClassName();\r\n\r\n if(!is_null($strType)) {\r\n\r\n $objEdit = new $strType($this->getSystemid());\r\n $objForm = $this->getAdminForm($objEdit);\r\n $objForm->addField(new class_formentry_hidden(\"\", \"mode\"))->setStrValue(\"edit\");\r\n\r\n return $objForm->renderForm(getLinkAdminHref($this->getArrModule(\"modul\"), \"save\".$this->getStrCurObjectTypeName()));\r\n }\r\n else\r\n throw new class_exception(\"error editing current object type not known \", class_exception::$level_ERROR);\r\n }", "function editObject($o) {\n\t\t$str = '<h2 class=\"title is-2\">'.ucfirst(get_class($o)).'</h2><form id=\"save-form\">';\n\t\tforeach($o->fields as $name => $value) {\n\t\t\tif(in_array($name,$o->pk)){ continue; }\t// don't allowing editing of any primary key fields\n\t\t\t$str .= $this->field($name, $value);\n\t\t}\n\t\t\n\t\tforeach($o->pk as $k) {\n\t\t\t$str .= '<input type=\"hidden\" name=\"'.$k.'\" value=\"'.$o->fields[$k].'\">';\n\t\t}\n\t\t$str .= '</form><a class=\"button save-button is-primary is-pulled-right\">Save</a>';\n\t\t$str .= '<a class=\"button\" href=\"?view='.get_class($o).'\">Cancel</a>';\n\t\t$str .= '<script>\n\n\t\tfunction saveObject(event) {\n\t\t\t$.post(\"/rest.php?do=update&o='.get_class($o).'&pks='.implode(',', $o->getPKValues()).'\", $(\"#save-form\").serialize());\n\t\t\t$(\".save-button\").toggleClass(\"is-success\");\n\t\t}\n\n\t\t$(\".save-button\").click(saveObject);\n\t\t</script>';\n\t\treturn $str;\n\t}", "public function edit_toko(){\n\t}", "function run()\n\t{\n $html = array();\n $success = true;\n $allow_new_version = false;\n\n\n $handbook_publication_id = Request :: get(HandbookManager::PARAM_HANDBOOK_PUBLICATION_ID);\n $handbook_id = Request :: get(HandbookManager::PARAM_HANDBOOK_ID);\n $selected_object_id = Request :: get(HandbookManager::PARAM_HANDBOOK_SELECTION_ID);\n\n\n //selection_to_edit\n $selection_to_edit = Request::get(HandbookManager::PARAM_SELECTION_TO_EDIT);\n \n $rdm = RepositoryDataManager::get_instance();\n $selected_object = $rdm->retrieve_content_object($selection_to_edit);\n\n \n\n $params = array();\n $params['action'] = 'edit';\n $params[HandbookManager::PARAM_TOP_HANDBOOK_ID] = Request::get(HandbookManager::PARAM_TOP_HANDBOOK_ID);\n $params[HandbookManager::PARAM_HANDBOOK_SELECTION_ID] = Request::get(HandbookManager::PARAM_HANDBOOK_SELECTION_ID);\n $params[HandbookManager::PARAM_HANDBOOK_PUBLICATION] = Request::get(HandbookManager::PARAM_HANDBOOK_PUBLICATION);\n $params[HandbookManager::PARAM_COMPLEX_OBJECT_ID] = Request::get(HandbookManager::PARAM_COMPLEX_OBJECT_ID);\n $params[HandbookManager::PARAM_HANDBOOK_ID] = Request::get(HandbookManager::PARAM_HANDBOOK_ID);\n $params[HandbookManager::PARAM_SELECTION_TO_EDIT] = Request::get(HandbookManager::PARAM_SELECTION_TO_EDIT);\n\n \n $url = $this->get_url($params);\n\n $form = ContentObjectForm :: factory(ContentObjectForm :: TYPE_EDIT, $selected_object, 'content_object_form', 'post', $url, null, null, $allow_new_version);\n\n if ($form->validate())\n { \n $success &= $form->update_content_object();\n \n $redirect_params = array();\n $redirect_params[HandbookManager :: PARAM_ACTION] = HandbookManager::ACTION_VIEW_HANDBOOK;\n $redirect_params[HandbookManager ::PARAM_HANDBOOK_SELECTION_ID] = $selected_object_id;\n $redirect_params[HandbookManager ::PARAM_HANDBOOK_PUBLICATION_ID] = $handbook_publication_id;\n $redirect_params[HandbookManager::PARAM_SELECTION_TO_EDIT] = Request::get(HandbookManager::PARAM_SELECTION_TO_EDIT);\n $this->redirect($success ? Translation :: get('HandbookUpdated') : Translation :: get('HandbookNotUpdated'), ! $success, $redirect_params);\n }\n else\n {\n $html[] = $form->toHtml();\n }\n\n $this->display_header();\n echo implode(\"\\n\", $html);\n $this->display_footer();\n\t}", "public function Edit()\n\t{\n\t\t\n\t}", "public function edit()\n {\n \n }", "public function edit()\n { }", "public function edit(JavaScriptMaker $jsmaker, Object $object)\n {\n $this->checkUser();\n if($this->user->cant('update', $object)) {\n return back()->with(array('error' => 'Доступ запрещен'));\n }\n $obj_param = view(config('settings.theme').'.admin.objectParam')->with(array('category' => $object->category, 'deal' => $object->deal, 'type' => $object->type));\n $cities = $this->city_rep->get();\n $obj_city = array();\n foreach ($cities as $city) {\n $obj_city = array_add($obj_city, $city->id, $city->name );\n $obj_area = array();\n foreach ($city->areas as $area) {\n $obj_area = array_add($obj_area, $area->id, $area->name );\n }\n $this->inputs = array_add($this->inputs, \"obj_area\".$city->id, $obj_area);\n }\n $this->inputs = array_add($this->inputs, \"obj_city\", $obj_city);\n $comforts = $this->com_rep->get();\n $jsmaker->setJs(\"obj-edit\", $object, true, csrf_token(), $this->randStr);\n $object->client = json_decode($object->client);\n if ($object->client->phone[0] == \"8\") {\n $object->client->phone = substr( $object->client->phone, 1);\n }\n if(isset($object->phones)) $object->phones = explode(\";\", $object->phones);\n $this->content = view(config('settings.theme').'.admin.objectCreate')->with(array(\"object\" => $object,'cities' => $cities, \"obj_id\" => $object->id, \"comforts\" => $comforts, \"inputs\" => $this->inputs, 'obj_param' => $obj_param, 'category' => '', 'deal' => $object->deal, 'type' => ''))->render();\n $this->title = 'Редактирование объекта';\n return $this->renderOutput();\n }", "public function edit() {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "public function edit()\n {\n }", "protected function editar()\n {\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\n { \n }", "public function edit(Bacheo $bacheo)\n {\n //\n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit(Bracelet $bracelet)\n {\n //\n }", "abstract function allowEditAction();", "public function edit(stdClass $stdClass)\n {\n //\n }", "public static function BackDisplayEdit()\n\t{\n\t\t$Object = Object::getById(\n\t\t\t$options = array(\n\t\t\t\t'object_id'\t => Util::getvalue('id'),\n\t\t\t\t'model' => 'ArticleModel',\n\t\t\t\t'table' => ArticleModel::$table,\n\t\t\t\t'state'\t\t => false, \n\t\t\t\t'relations'\t => true,\n\t\t\t\t'multimedas' => true,\n\t\t\t\t'categories' => true\n\t\t\t)\n\t\t);\n\n\t\tif(!$Object) Application::Route(array('modulename'=>'article'));\n\t\t\n\t\t$Locations = Location::getList($parent=0);\n\n\t\tparent::loadAdminInterface();\n\t\tself::$template->setcontent($Object, null, 'object');\n\t\tself::$template->setcontext($Locations, null, 'locations');\n\t\tself::$template->add(\"article.templates.xsl\");\n\t\tself::$template->add(\"article.edit.xsl\");\n\t\tself::$template->display();\n\t}", "public function editar()\n {\n }", "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\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 edit()\n {\n \n \n }", "function doEditorLine(&$o) {\n\tglobal $isEditor,$isOwner;\n\t$class = get_class($o);\n\t$bgColor = getBgColor($class,\"normal\");\n\t$bgColorL = getBgColor($class,\"locked\");\n\t$bgColorV = getBgColor($class,\"view\");\n\t$indent = getIndent($class);\n\t$textSize = getTextSize($class);\n\tif ($class == \"story\") {\n/* \t\tif ($o->getField(\"title\") !=\"\") $extra = $o->getField(\"title\"); */\n/* \t\telse $extra = $o->getFirst(25);\t\t */\n\t\tif ($o->getField(\"title\") == \"\") $extra = $o->getFirst(25);\n\t\telse $extra = '';\n\t} else $extra = \"\";\n\n\tprint \"\\n\\t\\t<tr>\";\n\tprint \"\\n\\t\\t\\t<td style='background-color: $bgColor; padding-left: \".$indent.\"px; font-size: $textSize'>\".$o->getField(\"title\").$extra.\"</td>\";\n\t// reference $args = \"'scope',site,section,page,story\";\n\tif ($class == 'site') \n\t\t$args = \"'$class','\".$o->name.\"',0,0,0\";\n\tif ($class == 'section')\n\t\t$args = \"'$class','\".$o->owning_site.\"',\".$o->id.\",0,0\";\n\tif ($class == 'page')\n\t\t$args = \"'$class','\".$o->owning_site.\"',\".$o->owning_section.\",\".$o->id.\",0\";\n\tif ($class == 'story')\n\t\t$args = \"'$class','\".$o->owning_site.\"',\".$o->owning_section.\",\".$o->owning_page.\",\".$o->id;\n\tprint \"\\n\\t\\t\\t<td align='center' class='lockedcol' style='background-color: $bgColorL' width='18'>\".(($class!='site')?\"<input type='checkbox'\".(($o->getField(\"locked\"))?\" checked='checked'\":\"\").\" onclick=\\\"doFieldChange('',$args,'locked',\".(($o->getField(\"locked\"))?\"0\":\"1\").\");\\\" \".((!$isOwner)?\"disabled='disabled'\":\"\").\" />\":\"&nbsp;\").\"</td>\";\n\t\n\t$type = $o->getField(\"type\");\n\t\n\t$o->buildPermissionsArray();\n\t$p = $o->getPermissions();\n\t\n\t$_a = array(\"view\"=>3,\"add\"=>0,\"edit\"=>1,\"delete\"=>2);\n\tforeach ($_SESSION[editors] as $e) {\n\t\t$args1 = \"'$e',\".$args;\n\t\tforeach ($_a as $v=>$i) {\n//\t\t\tprint \"l-$e$v\";\n\t\t\t$skip = 0;\n\t\t\tif (($e == 'everyone' || $e == 'institute') && $i<3) $skip = 1;\n\t\t\tif ($class=='story' && $v == 'add') $skip = 1;\n\t\t\tif ($type != 'story' && $type != 'page' && $type != 'section' && $class != 'site' && $v == 'add') $skip=1;\n\t\t\tif ($skip) {\n\t\t\t\tprint \"\\n\\t\\t\\t<td width='18' align='center'\".(($i==3)?\" class='viewcol' style='background-color: $bgColorV'\":\" style='background-color: $bgColor'\").\">&nbsp;</td>\";\n\t\t\t} else {\n\t\t\t\tprint \"\\n\\t\\t\\t<td width='18' align='center'\".(($i==3)?\" class='viewcol' style='background-color: $bgColorV'\":\" style='background-color: $bgColor'\").\"><input type='checkbox'\".(($p[$e][$i])?\" checked='checked'\":\"\").\" onclick=\\\"doFieldChange($args1,'perms-$v',\".(($p[$e][$i])?\"0\":\"1\").\");\\\" \".(($o->getField(\"l%$e%$v\") || !$isOwner)?\"disabled='disabled'\":\"\").\" /></td>\";\n\t\t\t}\n\t\t}\n\t}\n\tprint \"\\n\\t\\t</tr>\";\n}", "public function edit(libros $libros)\n {\n \n }", "public function __viewEdit()\n {\n $this->_context[2] = 'single';\n $this->addStylesheetToHead(self::$assets_base_url . 'editor.css');\n $this->addScriptToHead(self::$assets_base_url . 'editor.js');\n $filepath = EXTENSIONS . '/workspace_manager_b/assets/highlighters/';\n $entries = scandir($filepath);\n foreach ($entries as $entry) {\n if (is_file($filepath . $entry)) {\n $info = pathinfo($filepath . $entry);\n if ($info['extension'] == 'css' and $info['filename'] != '') {\n $this->addStylesheetToHead(self::$assets_base_url . 'highlighters/' . $info['basename'], 'screen');\n } elseif ($info['extension'] == 'js' and $info['filename'] != '') {\n Administration::instance()->Page->addScriptToHead(self::$assets_base_url . 'highlighters/' . $info['basename']);\n }\n }\t\t\n }\n\n $path = $this->_context[1];\n if ($path) {\n $path_abs = WORKSPACE . '/' . $path;\n if (is_file($path_abs)) {\n $filename = basename($path);\n $this->_existing_file = $filename;\n $title = $filename;\n if (dirname($path_abs) !== WORKSPACE) {\n $path_obj = new PathObject(dirname($path));\n }\n } else {\n $path_obj = new PathObject($path);\n }\t\t\n } else {\n $path_abs = WORKSPACE;\n }\n\n if (!$filename) {\n $title = 'Untitled';\n }\n\n $this->setTitle(__(('%1$s &ndash; %2$s &ndash; %3$s'), array($title, __('Workspace'), __('Symphony'))));\n\n //$this->setPageType('table');\n $this->Body->setAttribute('spellcheck', 'false');\n $this->appendSubheading($title);\n\n $workspace_url = SYMPHONY_URL . '/workspace/manager/';\n $editor_url = SYMPHONY_URL . '/workspace/editor/';\n\n $path_string = SYMPHONY_URL . '/workspace/manager/';\n $breadcrumbs = array(Widget::Anchor(__('Workspace'), $path_string));\n if (isset($path_obj)) {\n $dir_path = $path_obj->getPath() . '/';\n $dir_path_encoded = $path_obj->getPathEncoded() . '/';\n $workspace_url .= $dir_path_encoded;\n $editor_url .= $dir_path_encoded;\n $path_parts = $path_obj->getPathParts();\n $parts_encoded = $path_obj->getPathPartsEncoded();\n foreach ($path_parts as $path_part) {\n $path_string .= current($parts_encoded) . '/';\n array_push($breadcrumbs, Widget::Anchor(__(Helpers::capitalizeWords($path_part)), $path_string));\n next($parts_encoded);\n }\n }\n $this->insertBreadcrumbs($breadcrumbs);\n\n $this->Form->setAttribute('class', 'two columns');\n $this->Form->setAttribute('action', $editor_url . $path_encoded . (isset($filename) ? rawurlencode($filename) . '/' : ''));\n\n $fieldset = new XMLElement('fieldset');\n //$fieldset->setAttribute('class', 'primary column');\n $fieldset->appendChild(\n Widget::Input('fields[existing_file]', $filename, 'hidden', array('id' => 'existing_file'))\n );\n $fieldset->appendChild(\n Widget::Input('fields[dir_path]', $dir_path, 'hidden', array('id' => 'dir_path'))\n );\n $fieldset->appendChild(\n Widget::Input('fields[dir_path_encoded]', $dir_path_encoded, 'hidden', array('id' => 'dir_path_encoded'))\n );\n\n $label = Widget::Label(__('Name'));\n $label->appendChild(Widget::Input('fields[name]', $filename));\n $fieldset->appendChild($label);\n //$fieldset->appendChild((isset($this->_errors['name']) ? Widget::Error($label, $this->_errors['name']) : $label));\n\n $label = Widget::Label(__('Body'));\n $label->appendChild(\n Widget::Textarea(\n 'fields[body]',\n 30,\n 100,\n //$this->_existing_file ? @file_get_contents($path_abs, ENT_COMPAT, 'UTF-8') : '',\n $filename ? htmlentities(file_get_contents($path_abs), ENT_COMPAT, 'UTF-8') : '',\n array('id' => 'text-area', 'class' => 'code hidden')\n )\n );\n //$label->appendChild();\n //$fieldset->appendChild((isset($this->_errors['body']) ? Widget::Error($label, $this->_errors['body']) : $label));\n\n $fieldset->appendChild($label);\n $this->Form->appendChild($fieldset);\n\n if (!$this->_existing_file) {\n $actions = new XMLElement('div', NULL, array('class' => 'actions'));\n // Add 'create' button\n $actions->appendChild(\n Widget::Input(\n 'action[save]',\n __('Create File'),\n 'submit',\n array('class' =>'button', 'accesskey' => 's')\n )\n );\n $this->Form->appendChild($actions);\n }\n\n $actions = new XMLElement('div', NULL, array('class' => 'actions'));\n if (!$this->_existing_file) {\n $actions->setAttribute('data-replacement-actions', '1');\n }\n\n $actions->appendChild(\n Widget::Input(\n 'action[save]',\n __('Save Changes'),\n 'submit',\n array('class' => 'button', 'accesskey' => 's')\n )\n );\n $actions->appendChild(\n new XMLELement(\n 'button',\n __('Delete'),\n array(\n 'name' => 'action[delete]',\n 'type' => 'submit',\n 'class' => 'button confirm delete',\n 'title' => 'Delete this file',\n 'accesskey' => 'd',\n 'data-message' => 'Are you sure you want to delete this file?'\n )\n )\n );\n\n $this->Form->appendChild($actions);\n\n $text = new XMLElement('p', __('Saving'));\n $this->Form->appendChild(new XMLElement('div', $text, array('id' => 'saving-popup')));\n }", "public function edit()\n\t {\n\t\t $app = JFactory::getApplication();\n \n\t\t // Get the previous edit id (if any) and the current edit id.\n\t\t $previousId = (int) $app->getUserState('com_gm_ceiling.edit.project.id');\n\t\t $editId = $app->input->getInt('id', 0);\n \n\t\t // Set the user id for the user to edit in the session.\n\t\t $app->setUserState('com_gm_ceiling.edit.project.id', $editId);\n \n\t\t // Get the model.\n\t\t $model = $this->getModel('Project', 'Gm_ceilingModel');\n \n\t\t /*// Check out the item\n\t\t if ($editId)\n\t\t {\n\t\t\t $model->checkout($editId);\n\t\t }\n \n\t\t // Check in the previous user.\n\t\t if ($previousId && $previousId !== $editId)\n\t\t {\n\t\t\t $model->checkin($previousId);\n\t\t }*/\n \n\t\t // Redirect to the edit screen.\n\t\t $this->setRedirect(JRoute::_('index.php?option=com_gm_ceiling&view=projectform&layout=edit', false));\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 }", "public function hook_after_edit($id) {\n\n }", "function procEdit($ar=NULL){\n $this->getComposedFullnam($ar);\n return parent::procEdit($ar);\n }", "function doedit(){\r\n\t\tif(!isset($this->post['editsubmit'])){\r\n\t\t\t$did=isset($this->get[2])?$this->get[2]:'';\r\n\t\t\tif(!is_numeric($did)){\r\n\t\t\t\t$this->message($this->view->lang['docIdMustNum'],'BACK');\r\n\t\t\t}\r\n\t\t\t$focus=$this->db->fetch_by_field('focus','did',$did);\r\n\t\t\t$focus['time']=$this->date($focus['time']);\r\n\t\t\t$this->view->assign(\"focus\",$focus);\r\n\t\t\t$this->view->display(\"admin_focus_content\");\r\n\t\t}else{\r\n\t\t\t$did=isset($this->post['did'])?$this->post['did']:'';\r\n\t\t\tif(!is_numeric($did)){\r\n\t\t\t\t$this->message($this->view->lang['docIdMustNum'],'BACK');\r\n\t\t\t}\r\n\t\t\t$summary=_string::hiconv($this->post['summary']);\r\n\t\t\t$image=_string::hiconv($this->post['image']);\r\n\t\t\t$order=$this->post['displayorder'];\r\n\t\t\t$type=$this->post['doctype'];\r\n\t\t\tif(is_numeric($order)&&$_ENV['doc']->save_focus_content($did,$summary,$image,$order,$type)){\r\n\t\t\t\t$this->cache->removecache('data_'.$GLOBALS['theme'].'_index');\r\n\t\t\t\t$this->message($this->view->lang['docEditSuccess'],\"index.php?admin_focus-edit-$did\");\r\n\t\t\t}else{\r\n\t\t\t\t$this->message($this->view->lang['docEditFail'],'BACK');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function hook_after_edit($id) {\n\t //Your code here \n\n\t }", "public function hook_after_edit($id) {\n\t //Your code here \n\n\t }", "abstract protected function renderEdit();", "abstract public function admin_edit($object, $uri, Page $page);", "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(Box $box)\n {\n //\n }", "public function isSwitchToEditEnabled();", "function OnDoEditItem(){\n if (! $this->error) {\n $this->_data = $this->GetFieldsData();\n $this->_data[$this->key_field] = $this->item_id;\n\n $this->ValidateBeforeAdd();\n\n $item = $this->Storage->{$this->GetItemMethod}(array(\n $this->key_field => $this->item_id));\n //set system fields\n $this->setItemSystemFields($this->_data, $item);\n\n //check for unique fields\n if ($this->listSettings->HasItem(\"MAIN\", \"UNIQUE_FIELDS\")) {\n $this->checkForDuplicateUnique();\n }\n\n if ($this->disabled_edit) {\n if (strlen($this->host_library_ID)) {\n $this->library_ID = $this->host_library_ID;\n }\n $this->AfterSubmitRedirect(\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&MESSAGE[]=LIBRARY_DISABLED_EDIT\" . \"&\" . $this->restore);\n }\n if (empty($this->validator->formerr_arr) && ! $this->child_error) {\n if (strlen($this->host_library_ID)) {\n $this->library_ID = $this->host_library_ID;\n $this->parent_id = $this->Request->ToNumber(\"custom_val\", 0);\n }\n //before edit event handler call\n $this->OnBeforeEdit();\n $this->UpdateRadioFields();\n $_result = $this->Storage->Update($this->_data);\n if ($_result){\n $this->InsertNotOrdinaryFields($this->_data);\n //after edit event handler call\n $this->OnAfterEdit();\n if ($this->is_context_frame)\n \t$url = \"?package=context&page=contextframe&event=refresh&MESSAGE[]=EDIT_ITEM_SAVED\";\n else\n \t$url = \"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&MESSAGE[]=EDIT_ITEM_SAVED\" . \"&\" . $this->restore;\n\n $this->AfterSubmitRedirect($url);\n }\n }\n else {\n $this->event = \"EditItem\";\n }\n $this->OnBeforeCreateEditControl();\n $this->InitItemsEditControl();\n }\n }", "public function edit() {\n\n }", "public function edit()\n {\n //\n }", "public function edit(Turn $turn)\n {\n //\n }", "public function hook_after_edit($id)\n\t{\n\t\t//Your code here \n\n\t}", "public function edit(Python $python)\n {\n //\n }", "public function edit(Riesgo_evento $riesgo_evento)\n {\n //\n }", "public function edit ( $id )\n {\n // NO-OP\n }", "public function edit($id)\n {\n $obj= Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n if($obj)\n return view('appl.'.$this->app.'.'.$this->module.'.createedit')\n ->with('stub','Update')\n ->with('obj',$obj)\n ->with('editor',true)\n ->with('app',$this);\n else\n abort(404);\n }", "public function edit(Run $run)\n {\n //\n }", "public function edit(Run $run)\n {\n //\n }", "public function editAction(){\n\t\t$id = $this->getInput('id');\n\t\t$info = Ola_Service_Area::get(intval($id)); \n\t\t$this->assign('roots', $this->roots);\n\t\t$this->assign('parents', $this->parents);\n\t $this->assign('info', $info);\t\n\t}", "public function showEdit()\n {\n\n }", "public function edit(Matoleo $matoleo)\n {\n //\n }", "public function edit(Part $part)\n {\n //\n }", "function save_object()\n {\n if ($this->dialog && is_object($this->dialogObject)) {\n if (method_exists($this->dialogObject, 'save_object')) {\n $this->dialogObject->save_object();\n }\n }\n }", "public function edit_action() {\n Utils\\verifyPermission($this->edit_permission);\n $this->actionHeader();\n $this->addScript('jquery.autosize-min.js');\n $this->addScript('vendor/jquery.ui.widget.js');\n $this->addScript('jquery.iframe-transport.js');\n $this->addScript('jquery.fileupload.js');\n $this->addScript('ckeditor/ckeditor.js');\n $this->renderBodyTemplate('edit');\n }", "public function edit(Thread $thread)\n {\n }", "public function editAction() {}", "function tab_update_instance($tab) {\n global $CFG, $DB;\n\n require_once(\"$CFG->libdir/resourcelib.php\");\n\n $cmid = $tab->coursemodule;\n\n $tab->timemodified = time();\n $tab->id = $tab->instance;\n\n foreach ($tab->tabname as $key => $value) {\n\n // we need to use context now, so we need to make sure all needed info is already in db\n $DB->set_field('course_modules', 'instance', $tab->id, array('id' => $cmid));\n $context = context_module::instance($cmid);\n $editoroptions = array('subdirs' => 1, 'maxbytes' => $CFG->maxbytes, 'maxfiles' => -1, 'changeformat' => 1, 'context' => $context, 'noclean' => 1, 'trusttext' => true);\n\n\n $value = trim($value);\n $option = new stdClass();\n $option->tabname = $value;\n $option->tabcontentorder = $tab->tabcontentorder[$key];\n $option->externalurl = $tab->externalurl[$key];\n //tab content is now an array due to the new editor\n $draftitemid = $tab->content[$key]['itemid'];\n\n if ($draftitemid) {\n $option->tabcontent = file_save_draft_area_files($draftitemid, $context->id, 'mod_tab', 'content', $tab->optionid[$key], $editoroptions, $tab->content[$key]['text']);\n }\n $option->contentformat = $tab->content[$key]['format'];\n $option->tabid = $tab->id;\n $option->timemodified = time();\n\n if (isset($tab->optionid[$key]) && !empty($tab->optionid[$key])) {//existing tab record\n $option->id = $tab->optionid[$key];\n if (isset($value) && $value <> '') {\n $DB->update_record(\"tab_content\", $option);\n } else { //empty old option - needs to be deleted.\n $DB->delete_records(\"tab_content\", array(\"id\" => $option->id));\n }\n } else {\n if (isset($value) && $value <> '') {\n $newtab_content_id = $DB->insert_record(\"tab_content\", $option);\n //tab content is now an array due to the new editor\n //In order to enter file information from the editor\n //We must now update the record once it has been created\n\n if (isset($tab->content[$key]['text'])) {\n $draftitemid = $tab->content[$key]['itemid'];\n if ($draftitemid) {\n $tabcontentupdate = new stdClass();\n $tabcontentupdate->id = $newtab_content_id;\n $tabcontentupdate->tabcontent = file_save_draft_area_files($draftitemid, $context->id, 'mod_tab', 'content', $newtab_content_id, $editoroptions, $tab->content[$key]['text']);\n $DB->update_record('tab_content', $tabcontentupdate);\n }\n }\n }\n }\n }\n return $DB->update_record(\"tab\", $tab);\n}", "public function edit($id) //Hämta redan bokad boking\n\t{\n\t\t//\n\t}", "public function edit(Lot $lot)\n {\n //\n }", "public function edit(Carrinho $carrinho)\n {\n //\n }", "public function edit(Laboratoire $laboratoire)\n {\n //\n }", "public function edit(Thread $thread)\n {\n //\n }", "public function edit(Thread $thread)\n {\n //\n }", "public function edit(Thread $thread)\n {\n //\n }", "function edit(){\n $this->connect(); // open connection\n $this->disconnect(); // close connection\n }", "public function edit(Faltas_Obra $faltas_Obra)\n {\n //\n }", "function a_edit() {\n\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t$u=new Gestionnaire($id);\n\t\textract($u->data);\t\n\t\trequire $this->gabarit;\n\t}", "public function edit(UtilityBill $utilityBill)\n {\n //\n }", "public function edit( $id ) {\n\t\t//\n\t}", "public function edit( $id ) {\n\t\t//\n\t}", "public function canBeEdited()\n {\n return false;\n }", "public function edit(ApertureLuoghiInteresse $apertureLuoghiInteresse)\n {\n //\n }", "function fileEdit($file=NULL)\r\n{\r\n global $PH;\r\n\r\n if(!$file) {\r\n $id= getOnePassedId('file','files_*'); # WARNS if multiple; ABORTS if no id found\r\n if(!$file= File::getEditableById($id)) {\r\n $PH->abortWarning(\"ERROR: could not get File\");\r\n return;\r\n }\r\n }\r\n\r\n if(!$project=Project::getVisibleById($file->project)) {\r\n $PH->abortWarning(\"ERROR: could not get Project\",ERROR_BUG);\r\n }\r\n\r\n ### set up page and write header ####\r\n {\r\n\r\n\r\n $page= new Page(array('use_jscalendar'=>true, 'autofocus_field'=>'file_name'));\r\n initPageForFile($page, $file, $project);\r\n\r\n if($file->id) {\r\n $page->title=__('Edit File','page title');\r\n }\r\n else {\r\n $page->title=__('New file','page title');\r\n }\r\n\r\n #$page->title_minor= sprintf(__('On project %s','page title add on'),$project->name);\r\n\r\n\r\n echo(new PageHeader);\r\n }\r\n echo (new PageContentOpen);\r\n\r\n $block=new PageBlock(array(\r\n 'id' =>'edit',\r\n 'reduced_header' => true,\r\n ));\r\n $block->render_blockStart();\r\n\r\n ### write form #####\r\n {\r\n require_once(confGet('DIR_STREBER') . 'render/render_form.inc.php');\r\n\r\n $form=new PageForm();\r\n $form->button_cancel=true;\r\n\r\n $form->add($file->fields['name']->getFormElement(&$file));\r\n\r\n $form->add($file->fields['description']->getFormElement(&$file));\r\n\r\n /**\r\n * until new file is added to database keep details in hiddenfields\r\n */\r\n if($file->id == 0) {\r\n $form->add(new Form_HiddenField('file_mimetype', '',urlencode($file->mimetype)));\r\n $form->add(new Form_HiddenField('file_filesize', '',intval($file->filesize)));\r\n $form->add(new Form_HiddenField('file_org_filename', '',urlencode($file->org_filename)));\r\n $form->add(new Form_HiddenField('file_tmp_filename', '',urlencode($file->tmp_filename)));\r\n $form->add(new Form_HiddenField('file_tmp_dir', '',$file->tmp_dir));\r\n $form->add(new Form_HiddenField('file_is_image', '',$file->is_image));\r\n $form->add(new Form_HiddenField('file_version', '',$file->version));\r\n $form->add(new Form_HiddenField('file_parent_item', '',$file->parent_item));\r\n $form->add(new Form_HiddenField('file_org_file', '',$file->org_file));\r\n }\r\n $form->add(new Form_HiddenField('file', '',$file->id));\r\n $form->add(new Form_HiddenField('file_project', '',$file->project));\r\n\r\n\r\n\r\n ### status ###\r\n {\r\n $st=array();\r\n global $g_status_names;\r\n foreach($g_status_names as $s=>$n) {\r\n if($s >= STATUS_NEW) {\r\n $st[$s]=$n;\r\n }\r\n }\r\n $form->add(new Form_Dropdown('file_status',\"Status\",array_flip($st), $file->status));\r\n }\r\n\r\n ### public-level ###\r\n if(($pub_levels= $file->getValidUserSetPublevel())\r\n && count($pub_levels)>1) {\r\n $form->add(new Form_Dropdown('file_pub_level', __(\"Publish to\"),$pub_levels,$file->pub_level));\r\n }\r\n\r\n echo ($form);\r\n\r\n $PH->go_submit='fileEditSubmit';\r\n }\r\n $block->render_blockEnd();\r\n\r\n echo (new PageContentClose);\r\n echo (new PageHtmlEnd);\r\n}", "public function edit($id)\t{\n\t\t//\n\t}", "public function edit(TimeSlot $timeSlot)\n {\n //\n }" ]
[ "0.6690225", "0.63047373", "0.6203381", "0.61794305", "0.616271", "0.6097699", "0.609169", "0.60374725", "0.6006645", "0.5993997", "0.594419", "0.5890992", "0.5854245", "0.5805769", "0.57933", "0.5793124", "0.5793124", "0.5793124", "0.5786224", "0.57832605", "0.57832605", "0.5766382", "0.57623756", "0.57273644", "0.57273644", "0.57273644", "0.57249326", "0.5708868", "0.57040054", "0.5700265", "0.5685942", "0.5680972", "0.56805575", "0.5675652", "0.56645507", "0.566089", "0.5660835", "0.56515914", "0.56515914", "0.56515914", "0.56515914", "0.56515914", "0.56515914", "0.56515914", "0.56515914", "0.56515914", "0.56515914", "0.56515914", "0.56515914", "0.564678", "0.5645745", "0.5644799", "0.563842", "0.563842", "0.56363636", "0.56306523", "0.5625208", "0.5625208", "0.5625208", "0.5625208", "0.5621947", "0.5619923", "0.56187344", "0.5605954", "0.5604758", "0.55921876", "0.5588143", "0.5585433", "0.55711454", "0.5558686", "0.55548096", "0.5549029", "0.5549029", "0.5548858", "0.5530804", "0.55228394", "0.549736", "0.54954267", "0.5491592", "0.5491058", "0.54851663", "0.547495", "0.54663074", "0.54660314", "0.54597294", "0.5457873", "0.54489124", "0.54489124", "0.54489124", "0.5445816", "0.54435784", "0.54343903", "0.5422951", "0.5422379", "0.5422379", "0.54166514", "0.54162824", "0.5413093", "0.54095507", "0.5409414" ]
0.5811326
13
/! \brief Let the user choose the new service to create.
function newService($action = "") { $this->closeDialogs(); $serv = preg_replace('/^new_/', '', $action); $this->plugins[$serv]->is_account = TRUE; $this->dialogObject = $this->plugins[$serv]; $this->current = $serv; $this->dialog = TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function creating(Service $Service)\n {\n //code...\n }", "public function addService()\n {\n $option = 'submitnewservice';\n return view('cmsServicesAdd', ['title'=>'Add Service','option'=>$option]);\n }", "public function create()\n {\n if (Gate::denies('service.create')) {\n session()->flash('warning', 'You do not have permission to create a service');\n return redirect()->back();\n }\n return view('pages.settings.services-type.create');\n }", "public function create(){\n return view('admin/service/service_create');\n }", "public function create()\n {\n return view(\"admin.services.create\");\n }", "public function create()\n {\n $services = Service::all();\n return view('back.service.addService', compact('services'));\n }", "public function create()\n {\n //\n\t\treturn view('services.create');\n }", "function _wsdl_docs_service_create($data) {\n // Confirm service name is unique\n $service_id = _wsdl_docs_get_service_id($data['name']);\n if ($service_id) {\n return 'Service with this name already exists';\n }\n // Create new WSDL service.\n $service = entity_create('wsclient_service', array('type' => 'soap'));\n $service->label = $data['name'];\n $service->name = strtolower(str_replace('-', '_', str_replace(' ', '_', $data['name'])));\n $service->save();\n $name = $data['name'];\n $id = $service->id;\n return \"WSDL service $name, ID: $id added.\";\n}", "public function create()\n {\n return view('admin/services.service.create');\n }", "public function creating(Service $service)\n {\n $service->slug = Str::slug($service->name);\n }", "public function listsServicesPost()\r\n {\r\n $input = Request::all();\r\n $new_serivce = Services::create($input);\r\n if($new_serivce){\r\n return response()->json(['msg'=> 'Created a new service'],200);\r\n }else{\r\n return response('Oops, seems like something went wrong while trying to create a new service');\r\n }\r\n }", "public function create()\n {\n return view('widegts::services.create');\n }", "public function create()\n\t{\n\t $services = Services::pluck(\"name\", \"id\")->prepend('Please select', 0);\n\n\t \n\t return view('admin.photoservices.create', compact(\"services\"));\n\t}", "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 create()\n {\n return view('admin.services.create');\n \n }", "public function create()\n {\n $subservices = $this->subservice->lists('title', 'id');\n return view('admin.service.create', compact('subservices'));\n }", "public function created(Service $service)\n {\n //\n }", "public function create()\n {\n $this->data[\"form\"] = \"add\";\n return view(\"admin.pages.services\",$this->data);\n }", "public function create()\n {\n return view('backend.services.add');\n }", "public function create()\n {\n $service = Service::pluck('libelle','direction')->all();\n return view('services.create',compact('service'));\n }", "public function create()\n {\n return view('admin.services.add');\n }", "public function actionCreate()\n {\n $model = new Service();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n $cities = Yii::$app->getRequest()->post('cities');\n\n $model->attachCities($cities);\n\n $requestTypes = Yii::$app->getRequest()->post('request_types');\n\n $model->attachRequestTypes($requestTypes);\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\r\n\t{\r\n\t\treturn View::make('services.create');\r\n\t}", "public function create()\n {\n return view('adminlte.services.create');\n }", "public function new_form(){\n $this->vars['page_header'] = __('Create New Service', 'latepoint');\n $this->vars['breadcrumbs'][] = array('label' => __('Create New Service', 'latepoint'), 'link' => false );\n\n $this->vars['category'] = new OsServiceCategoryModel();\n\n if($this->get_return_format() == 'json'){\n $response_html = $this->render($this->views_folder.'new_form', 'none');\n echo wp_send_json(array('status' => 'success', 'message' => $response_html));\n exit();\n }else{\n echo $this->render($this->views_folder . 'new_form', $this->get_layout());\n }\n }", "public function create()\n\t{\n\t\treturn View::make('services.create');\n\t}", "public function created(Service $Service)\n {\n //code...\n }", "public function create()\n {\n\n $services = Service::where('locale', 'en')->get();\n foreach ($services as $key => $item) {\n $_services = Service::where('serviceid', $item->serviceid)->get();\n if (count($_services) == 14)\n unset($services[$key]);\n }\n\n return view(\"services.create\", ['services' => $services]);\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function create()\n {\n return view('services.add');\n }", "public function create()\n {\n $services = Service::all();\n return view('backend.service-detail.create',compact('services'));\n }", "public function create()\n {\n return view(\"backoffice.service_detail.create\");\n }", "public function create()\n {\n return view('service_type.create');\n }", "public function create()\r\n {\r\n $serviceCategory = ServiceCategory::all();\r\n return view('admin.service.services.form', compact('serviceCategory'));\r\n }", "public function add_service()\n {\n\n $cols = \"`title`,`icon`,`desc`\";\n\n $value =\n \"'\" . $this->obj->all_data->service->get_title1() . \"',\n '\" . $this->obj->all_data->service->get_icon() . \"',\n '\" . $this->obj->all_data->service->get_desc() . \"'\n\n \";\n\n\n $insert = $this->obj->insert(\"out_service\", $cols, $value);\n return $insert;\n }", "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 }", "public function create()\n {\n return \\Response::view('service.create');\n }", "public function testCreateService()\n {\n\n }", "public function create()\n {\n return view('patent__services.create');\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 create()\n\t{\n\t\treturn view('recinto_servicios.create');\n\t}", "public function create()\n {\n // $services['services']=Service::where('is_active',1)->get();\n // return view('addSupplier')->with('services', $services);\n }", "public function create()\n {\n return view('services.create');\n }", "public function create()\n {\n return view('services.create');\n }", "public function create()\n {\n return view('dashboard.services.create');\n }", "public function create()\n {\n $services = Service::pluck('title', 'id')->all();\n\n return view('back.partner.create', ['services'=>$services]);\n }", "public function create()\n {\n if (Auth::user()->type == 'admin') {\n $services = Service::all();\n return view('admin.create', ['services' => $services]);\n }\n }", "public function create()\n {\n $services=\\App\\Models\\Service::all();\n return view('admin.service-projects.create', compact('services'));\n }", "public function create()\n {\n return view('admin.service.create');\n }", "public function newAction()\n {\n $entity = new Servicio();\n $entity->setActivo(1);\n\n //Se carga una provincia por defecto\n $provincia = $this->getDoctrine()\n ->getRepository('sisconeeAppBundle:Provincia')\n ->find(2);\n //Se le establece la provincia por defecto al servicio (necesario para el funcionamiento de la programacion asociada\n //a los eventos PRE_SET_DATA y PRE_SUBMIT)\n //var_dump($provincia);\n $entity->setProvincia($provincia);\n\n $form = $this->createCreateForm($entity);\n\n return $this->render('sisconeeAdministracionBundle:Servicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\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 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 }", "function createServiceStatus(){\n\t\t\t$serviceStatusRepo = new serviceStatusRepository;\t\t\t\n\t\t\t$serviceStatusRepo->createServiceStatus($_POST['ServiceID'], $_POST['ServiceOwnerID'], $_POST['RequesterUserID']);\n\t\t}", "public function addService(array $request) {\n // Make sure user is connected before allowing to add a new service.\n $this->redirectIfNotLoggedIn('user', 'login');\n\n if($this->isFormSubmitted()) {\n if($this->issetAndNotEmpty($request, 'subject', 'descriptionService')) {\n $subject = DB::secureData($request['subject']);\n $description = DB::secureData($request['descriptionService']);\n\n $service = new UserService();\n $service->setSubject($subject);\n $service->setDescription($description);\n $service->setServiceDate((new \\DateTime())->format('Y-m-d h:i:s'));\n $service->setUser($this->user);\n\n // Checking if user has uploaded a service image.\n if($_FILES['serviceImage']['size'] > 0) {\n $fileUploader = new FileUpload($_FILES['serviceImage'], '/assets/uploads/services/');\n if(!$fileUploader->isSizeInThreshold() || !$fileUploader->upload()) {\n $this->setErrorMessage(\"Une erreur est survenue en envoyant l'image de votre service.\");\n }\n else {\n $service->setImage($fileUploader->getFinalFileName());\n }\n }\n\n $this->userServiceManager->addService($service);\n if($service->getId() !== null) {\n $this->setSuccessMessage(\"Votre service a bien été ajouté.\");\n }\n else {\n $this->setErrorMessage(\"Une erreur est survenue en ajoutant votre service.\");\n }\n }\n else {\n $this->setErrorMessage(\"Tous les champs requis ne sont pas remplis !\");\n }\n }\n\n $this->addCss($this->profileCss);\n $this->addJavaScript($this->javaScripts);\n $this->showView('service/createService', [\n 'userProfile' => $this->userProfileManager->getUserProfile($this->user)\n ]);\n }", "public function create()\n{\n $services = Service::pluck('service','id'); // shows info from services table in form\n return view('order.create')->with('services',$services);\n }", "public function create()\n {\n return view('admin.video_service.add_new_video_service');\n }", "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 create()\n {\n $data['type_service'] = DB::table(\"service_types\")->select(\"service_type_id\", \"service_type_name\")->get();\n $data['group_service'] = DB::table(\"service_groups\")->select(\"service_group_id\", \"service_group_name\")->get();\n return view('BE.hosting.create',$data);\n }", "public function create($id)\n {\n $client = $id;\n $servicesTypes = TypeService::all();\n return view('services.create', compact('servicesTypes', 'client'));\n }", "public function createService($serviceClass);", "public function create()\n {\n $service = new Service;\n $service_code = self::generateServiceCode();\n $ships = Ship::all();\n \n return view('service.create', compact('service', 'service_code','ships'));\n }", "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 create()\n\t{\n $services = Service::all(['name', 'id'])->toArray();\n //fetches name from the array ...\n $services = array_fetch($services, 'name');\n// dd($services);\n\t\treturn View::make('subscriptions.create', compact('services'));\n\t}", "public function create()\n {\n $services = DB::select('select * from service');\n return view('soupkitchen.soupKitchenCreate')->with('services',$services);\n }", "public function servicecat(){\n\t\t$modelservices = new Application_Model_Services();\n\t\t\n\t\t$servicelist = $modelservices->servicesdata();\n\t\t//prd($servicelist);\n\t\t\t\t\t\n \t\t$this->addElement('text', 'service_name', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required',\n\t\t\t\"label\" => \"Service Category Title \" ,\n\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\"),\n\t\t\t\"validators\" => array(\n\t\t\t\t\t\t\t\tarray(\"NotEmpty\",true,array(\"messages\"=>\" Expertise Title is required \")),\n \t\t\t\t\t\t\t),\n \t\t));\n\t\t\n\t\t$this->addElement('select', 'service_parent_id', array (\n\t\t\t\t'class' => 'form-control required' ,\n\t\t\t\t\"required\"=>true,\n\t\t\t\t\"multioptions\"=>$servicelist,\n\t\t\t\t\"filters\" => array(\"StringTrim\",\"StripTags\",\"HtmlEntities\"),\n\t\t\t\t\n\t\t));\n \t\t$this->submitButton();\n \t}", "function createservicestep1_post()\n {\n $em = $this->doctrine->em;\n $service = new \\Entities\\Service();\n $service->setAthor($this->getCurrentUser());\n\n\n $service->title = $this->post('title', TRUE);\n $service->subtitle = $this->post('subtitle', TRUE);\n $service->phone = $this->post('phone', TRUE);\n $service->address = $this->post('address', TRUE);\n// $service->addSubCategories($this->post('categories', TRUE),$em);\n// $service->addCities($this->post('cities', TRUE),$em);\n// $icon = $this->post('icon');\n// $path= \"./resources/\".$icon['filename'];\n// file_put_contents($path, base64_decode($icon['value']));\n// $service->setIcon($path);\n// $em->persist($service);\n// $em->flush();\n $this->set_response($service, REST_Controller::HTTP_OK);\n }", "public function create($service, $entity);", "public function create()\n {\n return view('back_end.pages_backend.services_backend.create');\n }", "function addService($service, $description, $info) {\n\t\tif (!in_array($service, $this->services)) {\n\t\t\t$this->services[] = $service;\n\t\t\t$this->descriptions[] = $description;\n\t\t\t$this->infos[] = $info;\n\t\t} else {\n\t\t\treturn \"Service already exists.\";\n\t\t}\n\t}", "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 create()\n {\n $title = 'Serviços';\n return view('servicos.create', compact('title'));\n }", "public function create()\n {\n \n return view('originalservice.create');\n }", "public function create()\n {\n echo \"Criaçao de novos clientes\";\n }", "public function create()\n {\n // $services = Service::all();\n $services = Service::all();\n return view('admin.orders.form', compact('services'));\n }", "protected function createInterface()\n {\n $classNameService = $this->argument('name');\n\n\n $this->call('make:service_interface', [\n 'name' => \"{$classNameService}Interface\",\n ]);\n }", "public function create()\n {\n return view('admin.globales.servicios.create');\n }", "public function create()\n {\n $data_user = Auth::user();\n $merchants = Merchant::all();\n $service_points = ServicePoint::all();\n return view('service_admin.create_admin_service',compact('data_user','merchants','service_points'));\n }", "public function addService($args)\n {\n // echo \"<pre>\"; print_r($args); echo \"</pre>\"; exit;\n $repo = $this->entityManager->getRepository('ZSELEX_Entity_Bundle');\n $user_id = UserUtil::getVar('uid');\n if ($args ['service_status'] != 2) { // demo\n $shop_id = $args [\"shop_id\"];\n $quantity = $args [\"quantity\"];\n $bundle_id = $args [\"bundle_id\"];\n $top_bundle = 1;\n $timer_days = $args [\"timer_days\"];\n $service_status = 1;\n // $paidRunning = $repo->getCount(null, 'ZSELEX_Entity_ServiceBundle', 'service_bundle_id', array('a.shop' => $shop_id, 'a.bundle_type' => 'main', 'a.service_status' => 2));\n } else { // paid\n // $user_id = UserUtil::getVar('uid');\n if (!$user_id) {\n $user_id = $args [\"user_id\"];\n }\n $shop_id = $args [\"shop_id\"];\n $quantity = $args [\"quantity\"];\n $bundle_id = $args [\"bundle_id\"];\n $top_bundle = 1;\n $timer_days = $args [\"timer_days\"];\n $service_status = 2;\n\n // $repo->deleteEntity(null, 'ZSELEX_Entity_ServiceBundle', array('a.shop' => $shop_id, 'a.service_status' => 1));\n // $repo->deleteEntity(null, 'ZSELEX_Entity_ServiceShop', array('a.shop' => $shop_id, 'a.service_status' => 1));\n }\n\n // echo \"<pre>\"; print_r($args); echo \"</pre>\"; exit;\n\n $ownerInfo = ModUtil::apiFunc('ZSELEX', 'admin', 'getOwnerInfo',\n $args = array(\n 'shop_id' => $shop_id\n ));\n\n $owner_id = $ownerInfo ['user_id'];\n // $source = FormUtil::getPassedValue(\"source\");\n // echo \"<pre>\"; print_r($_POST); echo \"</pre>\"; exit;\n\n $bundle_detail = $repo->get(array(\n 'entity' => 'ZSELEX_Entity_Bundle',\n 'where' => array(\n 'a.bundle_id' => $bundle_id\n )\n ));\n\n // echo \"<pre>\";print_r($bundle_detail); echo \"</pre>\"; exit;\n\n $servicePrice = $bundle_detail [\"bundle_price\"];\n $bundle_type = $bundle_detail [\"bundle_type\"];\n $bundle_name = $bundle_detail [\"bundle_name\"];\n\n // $date = date(\"Y-m-d\");\n // $date = $args[\"timer_date\"];\n // echo $count; exit;\n // echo \"<pre>\"; print_r($main_bundle); echo \"</pre>\"; exit;\n $main_bundle = $repo->get(array(\n 'entity' => 'ZSELEX_Entity_ServiceBundle',\n 'fields' => array(\n 'a.service_bundle_id',\n 'a.timer_date',\n 'a.timer_days',\n 'b.bundle_id'\n ),\n 'joins' => array(\n 'JOIN a.bundle b'\n ),\n 'where' => array(\n 'a.bundle_type' => 'main',\n 'a.shop' => $shop_id\n )\n ));\n if (!$main_bundle) {\n return;\n }\n // echo \"<pre>\"; print_r($main_bundle); echo \"</pre>\"; exit;\n // if ($bundle == 1) {\n $values = array(\n 'bundle' => 1,\n 'service_status' => $service_status,\n 'user_id' => $user_id,\n 'owner_id' => $owner_id,\n 'shop_id' => $shop_id,\n // 'main_bundle' => $main_bundle['bundle_id'],\n 'timer_date' => $main_bundle ['timer_date']\n );\n\n $bundleitems = $repo->getAll(array(\n 'entity' => 'ZSELEX_Entity_BundleItem',\n 'fields' => array(\n 'a.id',\n 'b.bundle_id',\n 'a.service_name',\n 'a.servicetype',\n 'c.plugin_id',\n 'a.price',\n 'a.qty',\n 'a.qty_based'\n ),\n 'joins' => array(\n 'JOIN a.bundle b',\n 'LEFT JOIN a.plugin c'\n ),\n 'where' => array(\n 'a.bundle' => $bundle_id\n ),\n 'groupby' => 'a.id'\n ));\n\n // echo \"<pre>\"; print_r($bundleitems); echo \"</pre>\"; exit;\n $values ['quantity'] = $quantity;\n $values ['bundleitems'] = $bundleitems;\n $values ['timer_days'] = $main_bundle ['timer_days'];\n $values ['bundle_type'] = $bundle_type;\n $values ['bundle_id'] = $bundle_id;\n // $values['bundle_id'] = $main_bundle['bundle_id'];\n $values ['shop_id'] = $shop_id;\n $values ['service_status'] = $service_status;\n\n // echo \"<pre>\"; print_r($values);exit;\n $approvebundlesitems = $this->insertBundleItemsRepair($values);\n // }\n\n if ($service_status == 1) {\n LogUtil::registerStatus($this->__('Service configured for demo'));\n } else {\n LogUtil::registerStatus($this->__('Paid Service configured successfully'));\n return true;\n }\n return true;\n }", "public function newAction(Request $request)\n {\n $service = new Services();\n $form = $this->createForm('kiraxe\\AdminCrmBundle\\Form\\ServicesType', $service, [\n 'obj_id' => $service->getId(),\n ]);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($service);\n $em->flush();\n\n return $this->redirectToRoute('services_show', array('id' => $service->getId()));\n }\n\n $em = $this->getDoctrine()->getManager();\n $this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');\n $user = $this->getUser();\n $tableName = [];\n $tableSettingsName = [];\n $tableName[$em->getClassMetadata('kiraxeAdminCrmBundle:Workers')->getTableName()] = \"Сотрудники\";\n $tableName[$em->getClassMetadata('kiraxeAdminCrmBundle:Services')->getTableName()] = \"Услуги\";\n $tableSettingsName[$em->getClassMetadata('kiraxeAdminCrmBundle:User')->getTableName()] = \"Пользователи\";\n $tableName[$em->getClassMetadata('kiraxeAdminCrmBundle:Materials')->getTableName()] = \"Материалы\";\n $tableSettingsName[$em->getClassMetadata('kiraxeAdminCrmBundle:Measure')->getTableName()] = \"Единицы измерения\";\n $tableName[$em->getClassMetadata('kiraxeAdminCrmBundle:Orders')->getTableName()] = \"Заказ-наряд\";\n $tableName[$em->getClassMetadata('kiraxeAdminCrmBundle:Expenses')->getTableName()] = \"Расход\";\n $tableCars = [];\n $tableCars[$em->getClassMetadata('kiraxeAdminCrmBundle:Brand')->getTableName()] = \"Бренд автомобиля\";\n $tableCars[$em->getClassMetadata('kiraxeAdminCrmBundle:Model')->getTableName()] = \"Модель автомобиля\";\n\n\n return $this->render('services/new.html.twig', array(\n 'service' => $service,\n 'form' => $form->createView(),\n 'tables' => $tableName,\n 'user' => $user,\n 'tableSettingsName' => $tableSettingsName,\n 'tableCars' => $tableCars,\n ));\n }", "public function create()\n {\n $icons = Icon::all();\n return view('site.services-create', compact('icons'));\n }", "public function create()\n {\n $services = Service::get();\n return view('project.create', compact('services'));\n }", "public function create()\n {\n return view('admin.childservices.create',['title'=>trans('admin.create')]);\n }", "public function create()\n {\n $providers = Provider::select('*')->get();\n return view('service.create')->with('providers', $providers);\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 create()\n {\n $title = 'Services';\n $module = $this->module;\n $route = route($this->module . '.store');\n $formulario = 'modules.'.$this->module.'.form';\n return view('create', compact('title', 'module', 'route', 'formulario'));\n }", "public function serviceCreate(Request $requestParams): bool\n {\n }", "public function serviceCreate(Request $requestParams): bool\n {\n }", "public function run()\n {\n $services = [\n 'Hospital',\n 'Police',\n 'Water services',\n 'Public bus station',\n 'Market',\n 'Shops',\n 'Electrical supply',\n 'Primary school',\n 'Secondary school'\n ];\n\n for($i = 0; $i < count($services); $i++){\n $service = [\n 'name' => $services[$i],\n ];\n Utility::create($service);\n }\n }", "public function create()\n {\n return view('servicos.create');\n }", "function selectService($service) {\n\t\t$i = 0;\n\t\tforeach ($this->services as $value) {\n\t\t\tif ($value == $service) {\n\t\t\t\t$this->service[\"Keyword\"] = $value;\n\t\t\t\t$this->service[\"Description\"] = $this->descriptions[$i];\n\t\t\t\t$this->service[\"Information\"] = $this->infos[$i];\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn \"Service does not exist.\";\n\t}", "public function create()\n {\n return view(\"pages.service.create\");\n }", "public function create()\n {\n return view('dashboard.service.create');\n }", "public function create()\n {\n $customers = Customer::all();\n $items = Item::all();\n $cars=Car::all();\n $services=Service::all();\n return view('Admin.serviceMaintenance.create', compact('customers', 'items','cars','services'));\n \n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "public function actionCreate()\n {\n $model = new ClinicServices();\n\n if ($model->load(Yii::$app->request->post())) {\n\n if ($model->save()) {\n\n $model->upload();\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 create()\n {\n $services = $this->serviceRepository->toArray('id', 'name', 'publish');\n\n return view('booking::service-requests.create', compact('services'));\n }", "public function create()\n\t{\n\t\t//Obtenemos la lista de usuarios\n\t\t$users = User::all();\n\n\t\t//Retornamos la vista\n\t\treturn View::make('services.new', array('users'=>$users));\n\t}", "public function create()\n {\n $category_types = CategoryType::get();\n return view('services.create')->with('category_types', $category_types);\n }" ]
[ "0.7282651", "0.70714736", "0.68964577", "0.67849046", "0.6778415", "0.67771006", "0.67576385", "0.67561036", "0.67430365", "0.66446334", "0.6635683", "0.6629972", "0.6595493", "0.6584084", "0.6574064", "0.655998", "0.65472806", "0.6525126", "0.6498041", "0.6491219", "0.64813447", "0.64662266", "0.64612204", "0.6458788", "0.6455573", "0.645411", "0.64431334", "0.6418256", "0.6400465", "0.6400465", "0.6400465", "0.63988954", "0.63834757", "0.6374305", "0.63634574", "0.63596225", "0.6329693", "0.62979025", "0.62972206", "0.6291546", "0.6290421", "0.6268575", "0.6263991", "0.62343264", "0.6225185", "0.6225185", "0.6223363", "0.6165854", "0.6163091", "0.61533135", "0.6149686", "0.61471874", "0.61459655", "0.6145302", "0.61398983", "0.6135077", "0.612383", "0.61227083", "0.61120725", "0.61067265", "0.6090537", "0.60732454", "0.60318017", "0.60249275", "0.60230196", "0.6020548", "0.6011692", "0.5971988", "0.59369767", "0.5928727", "0.5920344", "0.59139913", "0.5908921", "0.59083295", "0.5900543", "0.58669484", "0.58651096", "0.5847534", "0.5844226", "0.58423936", "0.5836796", "0.58306634", "0.5829868", "0.5824295", "0.5822054", "0.58220416", "0.58216196", "0.58113873", "0.58113873", "0.5803029", "0.5801513", "0.5791215", "0.5784122", "0.57793367", "0.5774607", "0.57535267", "0.5740975", "0.5737851", "0.57332385", "0.5728705" ]
0.7298347
0
/! \brief Save the currently edited service.
function saveService() { $this->dialogObject->save_object(); $msgs = $this->dialogObject->check(); if (count($msgs)) { foreach ($msgs as $msg) { msg_dialog::display(_("Error"), $msg, ERROR_DIALOG); } } else { $this->plugins[$this->current] = $this->dialogObject; $tmp = get_object_vars($this->dialogObject); foreach ($tmp as $name => $value) { $this->plugins[$this->current]->$name = $value; } $this->closeDialogs(); $this->backup = NULL; $this->updateActionMenu(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saved(Service $Service)\n {\n //code...\n }", "public function saving(Service $Service)\n {\n //code...\n }", "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 }", "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 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 edit(Service $service)\n {\n //\n }", "public function edit(Service $service)\n {\n //\n }", "public function edit(Service $service)\n {\n //\n }", "public function edit(Service $service)\n {\n //\n }", "public function save()\n {\n if($this->changed) {\n Item::saveNewValues($this->id, $this->name, $this->status);\n } else {\n echo 'Nothing changed!';\n }\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}", "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 save()\n\t{\n\t\t$this->container->save($this);\n\t}", "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 testUpdateService()\n {\n\n $this->browse(function (Browser $browser) {\n $user = User::factory()->create();\n $service = Service::factory()->create();\n $serviceUpdate = Service::factory()->make();\n $browser->visit('/login')\n ->pause(3000)\n ->type('email', $user->email)\n ->type('password', 'password')\n ->press('Login')\n ->pause(2000)\n ->assertPathIs('/service')\n ->visit('/service/update/'.$service->id)\n ->pause(1000)\n ->type('descricao', $serviceUpdate->descricao)\n ->type('valor', $serviceUpdate->valor)\n ->press('Editar')\n ->pause(1000)\n ->assertSee(Constantes::SUCESSO_UPDATE_SERVICE)\n ->press('OK')\n ->pause(1000);\n\n });\n }", "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 final function save() {\n }", "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 updated(Service $Service)\n {\n //code...\n }", "public function save()\n {\n // For V2.0\n }", "public final function save()\n {\n }", "public function update(ServicesFormRequest $request)\n {\n $id = $request->input('id');\n $service = \\App\\Services::find($id);\n $service->title = $request->input('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 updated.<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/' . $id)->withMessage($message);\n }", "public function testUpdateService()\n {\n\n }", "public function edit(Services $services)\n {\n //\n }", "public function edit(Services $services)\n {\n //\n }", "public function edit(Services $services)\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 updated(Service $service)\n {\n //\n }", "public function updating(Service $Service)\n {\n //code...\n }", "static function saveService(validationService $validationService){\n\t\tif(f('SELECT 1 FROM ' . VALIDATION_SERVICES_TABLE . ' WHERE name=\"' . $GLOBALS['DB_WE']->escape($validationService->name) . '\"\n\t\t\t\t\tAND PK_tblvalidationservices != ' . intval($validationService->id) . ' LIMIT 1')){\n\t\t\t$GLOBALS['errorMessage'] = g_l('validation', '[edit_service][servicename_already_exists]');\n\t\t\treturn false;\n\t\t}\n\n\t\t$qSet = we_database_base::arraySetter(array(\n\t\t\t\t'category' => $validationService->category,\n\t\t\t\t'name' => $validationService->name,\n\t\t\t\t'host' => $validationService->host,\n\t\t\t\t'path' => $validationService->path,\n\t\t\t\t'method' => $validationService->method,\n\t\t\t\t'varname' => $validationService->varname,\n\t\t\t\t'checkvia' => $validationService->checkvia,\n\t\t\t\t'additionalVars' => $validationService->additionalVars,\n\t\t\t\t'ctype' => $validationService->ctype,\n\t\t\t\t'fileEndings' => $validationService->fileEndings,\n\t\t\t\t'active' => $validationService->active\n\t\t));\n\t\t$query = ($validationService->id != 0 ?\n\t\t\t\t'UPDATE ' . VALIDATION_SERVICES_TABLE . ' SET ' . $qSet . ' WHERE PK_tblvalidationservices=' . intval($validationService->id) :\n\t\t\t\t'INSERT INTO ' . VALIDATION_SERVICES_TABLE . ' SET ' . $qSet);\n\n\t\tif($GLOBALS['DB_WE']->query($query)){\n\t\t\t$validationService->id = $validationService->id ? : $GLOBALS['DB_WE']->getInsertId();\n\t\t\treturn $validationService;\n\t\t}\n\t\treturn false;\n\t}", "function saveService ($pid, $name, $site_url, $ping_url, $method, $enabled)\n{\n global $_CONF, $_TABLES, $LANG_TRB;\n\n $enabled = ($enabled == 'on' ? 1 : 0);\n if ($method == 'extended') {\n $method = 'weblogUpdates.extendedPing';\n } else {\n $method = 'weblogUpdates.ping';\n }\n\n $name = strip_tags (COM_stripslashes ($name));\n $site_url = strip_tags (COM_stripslashes ($site_url));\n $ping_url = strip_tags (COM_stripslashes ($ping_url));\n\n $errormsg = '';\n if (empty ($name)) {\n $errormsg = $LANG_TRB['error_site_name'];\n } else {\n // all URLs must start with http: or https:\n $parts = explode (':', $site_url);\n if (($parts[0] != 'http') && ($parts[0] != 'https')) {\n $errormsg = $LANG_TRB['error_site_url'];\n } else {\n $parts = explode (':', $ping_url);\n if (($parts[0] != 'http') && ($parts[0] != 'https')) {\n $errormsg = $LANG_TRB['error_ping_url'];\n }\n }\n }\n\n if (!empty ($errormsg)) {\n return editServiceForm ($pid, $errormsg, $name, $site_url, $ping_url,\n $method, $enabled);\n }\n\n $name = addslashes ($name);\n $site_url = addslashes ($site_url);\n $ping_url = addslashes ($ping_url);\n\n if ($pid > 0) {\n DB_save ($_TABLES['pingservice'],\n 'pid,name,site_url,ping_url,method,is_enabled',\n \"'$pid','$name','$site_url','$ping_url','$method','$enabled'\");\n } else {\n DB_save ($_TABLES['pingservice'],\n 'name,site_url,ping_url,method,is_enabled',\n \"'$name','$site_url','$ping_url','$method','$enabled'\");\n }\n\n return COM_refresh ($_CONF['site_admin_url']\n . '/trackback.php?mode=listservice&amp;msg=65');\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 save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }", "public function edit(Service $partner)\n {\n //\n }", "public function save() {}", "public function save() {}", "public function save() {}", "public function testUpdateServiceData()\n {\n\n }", "public static function editService($service, $id){\r\n Client::Update()\r\n ->set('service',$service)\r\n ->where('id', $id)\r\n ->execute();\r\n }", "public function save()\r\n {\r\n \r\n }", "public function save()\n {\n return $this->service->saveTimeEntry($this);\n }", "public function save()\n {\n }", "public function actionEditService() {\r\n if (Yii::$app->request->isAjax) {\r\n $id = $_POST['id'];\r\n $name = $_POST['name'];\r\n $value = $_POST['valuee'];\r\n $service = AppointmentService::find()->where(['id' => $id])->one();\r\n $appointment = Appointment::find()->where(['id' => $service->appointment_id])->one();\r\n if ($value != '') {\r\n $service->$name = $value;\r\n $service->UB = Yii::$app->user->identity->id;\r\n if ($name == 'amount') {\r\n $tax_amount = 0;\r\n if ($service->amount != '' && $service->amount > 0) {\r\n $tax_val = $service->tax != '' ? \\common\\models\\Tax::findOne($service->tax)->value : '';\r\n if ($tax_val != '' && $tax_val > 0) {\r\n $tax_amount = ($service->amount * $tax_val) / 100;\r\n }\r\n $service->tax_amount = $tax_amount;\r\n $service->tax_percentage = $tax_val;\r\n $tot = $service->amount + $tax_amount;\r\n $service->total = $tot;\r\n }\r\n }\r\n if ($service->save()) {\r\n if ($appointment->sub_status > 0) {\r\n $this->RemoveAccountsData($appointment);\r\n }\r\n Yii::$app->SetValues->updateAppointment($appointment->id);\r\n Yii::$app->session->set('account_step1', '1');\r\n return $service->total;\r\n }\r\n }\r\n }\r\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();", "public function save();", "public function save();", "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 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 update(Service $request, Services $services, $id)\n {\n \n \n $service = Services::find($id);\n \n if($request->hasFile('image')){\n $image = $request->image;\n $image_new_name = time().$image->getClientOriginalName();\n $image->move('admin/img/', $image_new_name);\n $service->image = 'admin/img/'. $image_new_name; \n }\n $service->name = $request->name;\n \n $service->order = $request->order;\n $service->save();\n \n return redirect()->route('Service.index');\n \n }", "public function save()\n {\n file_put_contents(\"address.json\", json_encode($this->content));\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}", "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 edit($service, $data)\n {\n }", "public function updated(SaleService $saleService)\n {\n //\n }", "public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $this->data);\n }", "public function save()\n {\n \treturn FactoryAbastract::dao(get_class($this))->save($this);\n }", "public function save() {\n }", "public function save() {\n }", "public function save() {\n\t\t\t\n\t\t}", "public function save()\n {\n return;\n }", "public function save() {\n }", "public function save() {\r\n $conn = GFSalsaConnector::instance();\r\n if ($conn) {\r\n $conn->saveObject($this->object, $this);\r\n }\r\n }", "public function restoreOriginalService(): void;", "public function save() {\r\n /** probably we should add a timestamp, Item ID and stuff */\r\n $stored_data = json_encode(array($this->name, $this->status), JSON_UNESCAPED_UNICODE);\r\n $this->db_write(\"objects\", \"Item_s11n\", $stored_data);\r\n print ($stored_data);\r\n }", "public function save()\n {\n $data = $this->input->post(null, true);\n $result = TagService::getInstance()->save($data);\n $this->_success($result);\n }", "public function save()\n\t{\n\n\t}", "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 save()\n {\n if ( !$this->unsaved ) {\n // either nothing has been changed, or data has not been loaded, so\n // do nothing by returning early\n return;\n }\n\n $this->write();\n $this->unsaved = false;\n }", "function editServiceForm ($pid, $msg = '', $new_name = '', $new_site_url = '', $new_ping_url = '', $new_method = '', $new_enabled = -1)\n{\n global $_CONF, $_TABLES, $LANG_TRB, $LANG_ADMIN, $MESSAGE;\n\n $retval = '';\n\n if ($pid > 0) {\n $result = DB_query (\"SELECT * FROM {$_TABLES['pingservice']} WHERE pid = '$pid'\");\n $A = DB_fetchArray ($result);\n } else {\n $A['is_enabled'] = 1;\n $A['method'] = 'weblogUpdates.ping';\n }\n\n if (!empty ($new_name)) {\n $A['name'] = $new_name;\n }\n if (!empty ($new_site_url)) {\n $A['site_url'] = $new_site_url;\n }\n if (!empty ($new_ping_url)) {\n $A['ping_url'] = $new_ping_url;\n }\n if (!empty ($new_method)) {\n $A['method'] = $new_method;\n }\n if ($new_enabled >= 0) {\n $A['is_enabled'] = $new_enabled;\n }\n\n $retval .= COM_siteHeader ('menu', $LANG_TRB['edit_service']);\n\n if (!empty ($msg)) {\n $retval .= showTrackbackMessage ('Error', $msg);\n }\n\n $token = SEC_createToken();\n\n $retval .= COM_startBlock($LANG_TRB['edit_service'], getHelpUrl() . '#ping',\n COM_getBlockTemplate('_admin_block', 'header'));\n $retval .= SEC_getTokenExpiryNotice($token);\n\n $template = new Template ($_CONF['path_layout'] . 'admin/trackback');\n $template->set_file (array ('editor' => 'serviceeditor.thtml'));\n $template->set_var('xhtml', XHTML);\n $template->set_var('site_url', $_CONF['site_url']);\n $template->set_var('site_admin_url', $_CONF['site_admin_url']);\n $template->set_var('layout_url', $_CONF['layout_url']);\n $template->set_var('max_url_length', 255);\n $template->set_var('method_ping', 'weblogUpdates.ping');\n $template->set_var('method_ping_extended', 'weblogUpdates.extendedPing');\n\n $template->set_var('lang_name', $LANG_TRB['service']);\n $template->set_var('lang_site_url', $LANG_TRB['service_website']);\n $template->set_var('lang_ping_url', $LANG_TRB['service_ping_url']);\n $template->set_var('lang_enabled', $LANG_ADMIN['enabled']);\n $template->set_var('lang_method', $LANG_TRB['ping_method']);\n $template->set_var('lang_method_standard', $LANG_TRB['ping_standard']);\n $template->set_var('lang_method_extended', $LANG_TRB['ping_extended']);\n $template->set_var('lang_save', $LANG_ADMIN['save']);\n $template->set_var('lang_cancel', $LANG_ADMIN['cancel']);\n\n if ($pid > 0) {\n $delbutton = '<input type=\"submit\" value=\"' . $LANG_ADMIN['delete']\n . '\" name=\"servicemode[2]\"%s' . XHTML . '>';\n $jsconfirm = ' onclick=\"return confirm(\\'' . $MESSAGE[76] . '\\');\"';\n $template->set_var('delete_option',\n sprintf ($delbutton, $jsconfirm));\n $template->set_var('delete_option_no_confirmation',\n sprintf ($delbutton, ''));\n } else {\n $template->set_var('delete_option', '');\n }\n\n if (isset ($A['pid'])) {\n $template->set_var('service_id', $A['pid']);\n } else {\n $template->set_var('service_id', '');\n }\n if (isset ($A['name'])) {\n $template->set_var('service_name', $A['name']);\n } else {\n $template->set_var('service_name', '');\n }\n if (isset ($A['site_url'])) {\n $template->set_var('service_site_url', $A['site_url']);\n } else {\n $template->set_var('service_site_url', '');\n }\n if (isset ($A['ping_url'])) {\n $template->set_var('service_ping_url', $A['ping_url']);\n } else {\n $template->set_var('service_ping_url', '');\n }\n if ($A['is_enabled'] == 1) {\n $template->set_var('is_enabled', 'checked=\"checked\"');\n } else {\n $template->set_var('is_enabled', '');\n }\n if ($A['method'] == 'weblogUpdates.ping') {\n $template->set_var('standard_is_checked', 'checked=\"checked\"');\n $template->set_var('extended_is_checked', '');\n } else {\n $template->set_var('standard_is_checked', '');\n $template->set_var('extended_is_checked', 'checked=\"checked\"');\n }\n $template->set_var('gltoken_name', CSRF_TOKEN);\n $template->set_var('gltoken', $token);\n\n $template->parse ('output', 'editor');\n $retval .= $template->finish ($template->get_var ('output'));\n\n $retval .= COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'));\n $retval .= COM_siteFooter ();\n\n return $retval;\n}", "public function save()\n\t{\n\t\t$this->componentConfig->save();\n\t}", "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 restored(Service $Service)\n {\n //code...\n }", "public function onAfterSave(AccountServiceManagerInterface $sm) { }", "public function save()\r\n {\r\n //\r\n }", "public function editService(string $title, string $content, string $file_name, int $id):bool\n {\n\n $editService = $this->pdo->prepare('UPDATE services SET title = :title, content = :content, file_name = :file_name WHERE id = :id');\n\n return $editService->execute(array(\n ':title' => $title,\n ':content'=> $content,\n ':file_name' => $file_name,\n ':id'=> $id\n ));\n }", "public function save(): EnvClientInterface;", "public function restoring(Service $Service)\n {\n //code...\n }", "public function save():void;", "public function save()\n {\n return Query::update('officers', \"`ID`=\".$this->id, $this->initialVars, $this->getDBArray());\n }", "public function update(serviceRequest $request,Service $id)\n {\n $id->title = $request->title;\n\n if($request->hasFile('icon')) {\n if($request->file('icon')->isValid()){\n $file = $request->file('icon');\n $filename = str_random(25).'_'.$file->getClientOriginalName();\n\n $icon_path = public_path().'/uploads/images/services/icon/';\n $icon = Image::make($file);\n $icon->fit(72)->save($icon_path.$filename);\n\n if(file_exists($icon_path.$id->icons)){\n @unlink($icon_path.$id->icons);\n }\n $id->icons = $filename;\n }\n }\n\n $id->caption = $request->caption;\n\n if($request->hasFile('image')) {\n if($request->file('image')->isValid()) {\n $file =$request->file('image');\n $filename = str_random(25).'_'.$file->getClientOriginalName();\n $path = public_path().'/uploads/images/services/image/';\n $image = Image::make($file);\n $image->resize(1170, null, function ($constraints){\n $constraints->aspectRatio();\n $constraints->upsize();\n })->save($path.$filename);\n\n if(file_exists($path.$id->image)){\n @unlink($path.$id->image);\n }\n\n $id->image = $filename;\n\n $thumbnail_name = str_random(25).'_thumb_'.$file->getClientOriginalName();\n $thumb = Image::make($file);\n $thumb->resize(250, null, function ($constraints){\n $constraints->aspectRatio();\n $constraints->upsize();\n })->save($path.'thumbnail/'.$thumbnail_name, 100);\n\n if(file_exists($path.'thumbnail/'.$id->thumbnail)){\n @unlink($path.'thumbnail/'.$id->thumbnail);\n }\n\n $id->thumbnail = $thumbnail_name;\n }\n }\n\n $id->description = $request->service_description;\n $id->status = $request->status;\n $id->slug = str_slug($request->title, '-');\n $id->save();\n\n return redirect()->route('services')->with('status', 'Service edited successfully');\n }", "public function edit(ServiceCode $serviceCode)\n {\n //\n }", "public function save(){\n $data = file_get_contents('php://input');\n //saving data and getting inserted id or the existing one\n $this->id = $this->_so->save($data);\n //returning saved object for frontend sync\n return $this->byId();\n }", "public function update(ServiceRequest $request, $id)\n {\n $service = Service::find($id);\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 updated service with id \".$service->id,$request->url(),$request->method(),$request->ip(),$request->userAgent(),session(\"user\")->id);\n return redirect()->back()->with(\"editServiceSuccess\",\"Service successfully updated!\");\n }catch (\\Exception $e){\n \\Log::error($e->getMessage());\n $this->log(\"Error on admin updating service with id \".$service->id,$request->url(),$request->method(),$request->ip(),$request->userAgent(),session(\"user\")->id);\n return redirect()->back()->with(\"editServiceError\" , \"Server error on editing service, try again later.\")->withInput();\n }\n }", "public function save()\n {\n }", "public function save()\n {\n }" ]
[ "0.7892811", "0.77685624", "0.6851962", "0.65422964", "0.6470245", "0.63781875", "0.63781875", "0.63781875", "0.63781875", "0.6352098", "0.63233113", "0.63204175", "0.62916154", "0.62136286", "0.62098277", "0.61865205", "0.6118567", "0.603916", "0.6018963", "0.59706897", "0.596909", "0.5957119", "0.59483624", "0.5915681", "0.5915681", "0.5915681", "0.5910129", "0.5882739", "0.58711976", "0.585863", "0.583057", "0.58198184", "0.58034796", "0.57918173", "0.5781531", "0.5781531", "0.578079", "0.57791406", "0.5774585", "0.57723916", "0.5758897", "0.5757713", "0.575598", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57444996", "0.57284415", "0.57198215", "0.5707206", "0.570107", "0.5676278", "0.56732637", "0.56707144", "0.5660717", "0.5658535", "0.5655083", "0.56498885", "0.56498885", "0.56468976", "0.564224", "0.56299686", "0.5629797", "0.5620003", "0.56038105", "0.55988485", "0.5598068", "0.55951595", "0.55951285", "0.55945426", "0.5589515", "0.5589465", "0.5581852", "0.55707103", "0.5570545", "0.55699044", "0.5559003", "0.5558106", "0.5558106", "0.55556846", "0.55494404", "0.5548301", "0.55459523", "0.5535904", "0.55293095", "0.55293095" ]
0.72893447
2
/!\brief Close all opened dialogs And reset "dialog open" flags to display bottom buttons again.
function closeDialogs() { management::closeDialogs(); $this->dialog = FALSE; /* Get our dn back */ $this->dn = $this->last_dn; set_object_info($this->dn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function closeModal()\n {\n $this->isOpen = false;\n }", "public function closeModal()\n {\n $this->isOpen = false;\n }", "public function closeModal()\n {\n $this->isOpen = false;\n }", "public function closeModal()\n {\n $this->isOpen = false;\n }", "public function closeModal()\n {\n $this->isModal = false;\n }", "public function close_content_pane() {\n\t\t$this->disp('closemainbox.tpl');\n\t}", "public function closeWindow();", "public static function closeAll()\n {\n Collection::make(static::$browsers)->each->quit();\n\n static::$browsers = collect();\n }", "public function closeWindow() {}", "function close_all()\r\n {\r\n $display_content = '<script type=\"text/javascript\">';\r\n foreach ($this->folders as $folder)\r\n $display_content .= \"opml_browser.clickFolder('\" . $folder . \"');\";\r\n $display_content .= '</script>';\r\n return $display_content;\r\n }", "function nc__dlg__end(){\n\n\t\t//output function name\n\t\tnc__util__func('class', 'nc__dlg__end');\n\n\t\t\t\t\t\t//end dialog for content body (starts in another function)\n\t\t\t\t\t\techo \"</div>\" .\n\n\t\t\t\t\t//end dialog content window (starts in another function)\n\t\t\t\t\t\"</div>\" .\n\n\t\t\t\t//end dialog body (starts in another function)\n\t\t\t\t\"</div>\" .\n\n\t\t\t//end end dialog bounding DIV (starts in another function)\n\t\t\t\"</div>\";\n\n\t}", "private function closeDetailsDialog() {\n\t\t$pageObject = $this->webUIGeneralContext->getCurrentPageObject();\n\t\ttry {\n\t\t\t$pageObject->closeDetailsDialog();\n\t\t} catch (Exception $e) {\n\t\t\t//ignore if dialog cannot be closed\n\t\t\t//most likely there is no dialog open\n\t\t}\n\t}", "public static function unhideWindow() {}", "function initializeDeleteMultipleFilesDialog() {\n $files = $this->getFilesById(array_keys($this->params['batch_files']));\n if (is_array($files) && count($files) > 0) {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_msgdialog.php');\n $hidden = array(\n 'cmd' => $this->params['cmd'],\n 'batch_files' => $this->params['batch_files'],\n 'confirm' => 1,\n );\n\n foreach ($files as $fileId => $file) {\n $fileNames[] = $file['file_name'];\n }\n\n $fileNamesList = '\"'.implode('\", \"', $fileNames).'\"';\n\n $this->dialog = new base_msgdialog(\n $this,\n $this->paramName,\n $hidden,\n sprintf(\n $this->_gt('Do you really want to delete %s ?'),\n $fileNamesList\n ),\n 'warning'\n );\n $this->dialog->msgs = &$this->msgs;\n $this->dialog->buttonTitle = 'Delete';\n } else {\n $this->addMSG(MSG_INFO, $this->_gt('No files found.'));\n }\n }", "public function setClose()\n {\n $this->close = true;\n }", "public function closeTipsPrompt() {\n $this->saveTipsList(NULL);\n }", "public function set_all_orders_to_closed() {\n $segments = $this->uri->segment_array();\n $table_id = $segments[3];\n\n // deleting all unnecessary segments (url parts and $table_id)\n unset($segments[0], $segments[1], $segments[2], $segments[3]);\n\n foreach ($segments as $id_order) {\n $this->create_order_record($id_order);\n $this->m_orders_overview->close_order($id_order);\n }\n\n $this->m_orders_overview->close_all_orders($table_id);\n $this->show_order();\n }", "public function onClose();", "public function onClose();", "public static function closeAll($linkIDs) {\n\t\tif (empty($linkIDs)) return;\n\t\t\n\t\t$sql = \"UPDATE \twcf\".WCF_N.\"_linklist_link\n\t\t\tSET\tisClosed = 1\n\t\t\tWHERE \tlinkID IN (\".$linkIDs.\")\";\n\t\tWCF::getDB()->registerShutdownUpdate($sql);\n\t}", "public function turnOffWaitingChecks()\n {\n $this->isModal = true;\n return;\n }", "public function close() {\n\t\twhile ( count( $this->mWorkStack ) ) {\n\t\t\t$this->profileOut( 'close' );\n\t\t}\n\t}", "public function getPageClose() {}", "public function closeChatPopup()\n {\n Cookie::queue('chatPopupShow', 'false', 60);\n $this->chatPopupVisibility = false;\n }", "static function close()\n\t{\n\t\tforeach (self::$dbConnections as $dbName => $db)\n\t\t{\n\t\t\t$db->close();\n\t\t\tunset(self::$dbConnections[$dbName]);\n\t\t}\n\n\t\tforeach(self::$extraConnections as $index => $db)\n\t\t{\n\t\t\t$db->close();\n\t\t\tunset(self::$extraConnections[$index]);\n\t\t}\n\t}", "function close()\r\n\t{\r\n\t\tunset($this->urlprefix);\r\n\t\tunset($this->xml_parser);\r\n\t}", "function removeAllHiddenTabs()\r\n\t{\r\n\t\t$this->hidden_tab = array();\r\n\t}", "function close() {}", "public function btnCalculator_Close() {\n\t\t\t$this->txtValue->Text = $this->dlgCalculatorWidget->Value;\n\t\t}", "abstract public function closeControl();", "public function Close()\n {\n $this->CallJqUiMethod(\"close\");\n }", "function app_template_dialogs() {\n global $App;\n $continue = __('continue');\n $cancel = __('cancel');\n $ok = __('ok');\n $dialog_html = <<<HTML\n\n<div id=\"modal-warning\" class=\"abstract-modal-popup\" data-overlay-theme=\"b\">\n <div data-role=\"header\">\n <h1 id=\"modal-warning-label\"></h1>\n </div>\n <div id=\"modal-warning-body\" class=\"ui-content\" data-role=\"main\"></div>\n <div data-role=\"footer\">\n <a href=\"#\" class=\"modal-warning-close\" data-role=\"button\" data-transition=\"flow\">{$continue}</a>\n </div>\n</div>\n \n<div id=\"modal-dialog\" class=\"abstract-modal-popup\" data-overlay-theme=\"b\">\n <div data-role=\"header\">\n <h1 id=\"modal-dialog-label\"></h1>\n </div>\n <div id=\"modal-dialog-body\" class=\"ui-content\" data-role=\"main\"></div>\n <div data-role=\"footer\">\n <a href=\"#\" class=\"modal-dialog-close\" data-role=\"button\" data-inline=\"true\" data-transition=\"flow\">{$continue}</a>\n </div>\n</div>\n \n<div id=\"modal-confirm\" class=\"abstract-modal-popup\" data-overlay-theme=\"b\">\n <div data-role=\"header\">\n <h1 id=\"modal-confirm-label\"></h1>\n </div>\n <div id=\"modal-confirm-body\" class=\"ui-content\" data-role=\"main\"></div>\n <div data-role=\"footer\">\n <a href=\"#\" class=\"modal-confirm-cancel\" data-role=\"button\" data-inline=\"true\" data-transition=\"flow\">{$cancel}</a>\n <a href=\"#\" class=\"modal-confirm-ok\" data-role=\"button\" data-inline=\"true\" data-transition=\"flow\" data-theme=\"b\">{$ok}</a>\n </div>\n</div>\n\nHTML;\n\n return array(\n 'selector' \t=> $App->config('page_content_id'),\n 'pos_func' \t=> 'insertAfter',\n 'html'\t\t=> $dialog_html\n );\n}", "public function close() {\n if($this->isOpen()) {\n closedir($this->getPointer());\n parent::close();\n }\n }", "protected function unsetHiddenModules() {}", "public final function destroy_all()\n {\n }", "public static function closeAll($threadIDs) {\n\t\tif (empty($threadIDs)) return;\n\t\t\n\t\t$sql = \"UPDATE \twbb\".WBB_N.\"_thread\n\t\t\tSET\tisClosed = 1\n\t\t\tWHERE \tthreadID IN (\".$threadIDs.\")\";\n\t\tWCF::getDB()->registerShutdownUpdate($sql);\n\t}", "public function erase()\n {\n if (is_object($this->addpointButton)) {\n $this->addpointButton->destroy();\n }\n if (is_object($this->removepointButton)) {\n $this->removepointButton->destroy();\n }\n\n $this->frame->clearComponents();\n $this->frame->destroy();\n $this->destroyComponents();\n parent::destroy();\n }", "public function close()\n {\n $this->view_file = null;\n $this->view_data = [];\n }", "function honeycomb_primary_navigation_wrapper_close() {\n\t\techo '</div>';\n\t}", "public function removeAllButtons()\n {\n $this->mixButtons = array();\n $this->blnValidationArray = array();\n $this->blnModified = true;\n }", "function close();", "function close();", "function close();", "function NewModalFooter($settings) {\n $tabs = (isset($settings['tabs']) ? intval($settings['tabs']) : 6);\n $formID = (isset($settings['formid']) ? IdentifierStr($settings['formid']) : (isset($settings['form']) ? (is_array($settings['form']) ? IdentifierStr($settings['form']['id']) : IdentifierStr($settings['form'])) : null));\n echo str_repeat(\"\\t\", $tabs).\"<div class=\\\"modal-footer\\\">\\n\";\n $saveCaption = (!empty($settings['savecaption']) ? PunctuatedTextStr($settings['savecaption']) : \"Save changes\");\n $onclick = null;\n if(!empty($formID)) {\n //Add cancel/ignore button\n if(empty($settings['nocancel'])) {\n echo str_repeat(\"\\t\", $tabs+1).\"<button type=\\\"button\\\" class=\\\"btn btn-sm btn-default\\\" data-dismiss=\\\"modal\\\">\".(stripos($saveCaption, 'cancel') !== FALSE ? 'Abort' : 'Cancel').\"</button>\\n\";\n }\n if(!empty($settings['url'])) {\n $onclick = \"submitForm('{$formID}', '{$settings['url']}', { defErrorDlg: \".(empty($settings['onpost']) ? \"true\" : \"false\").\", defSuccessDlg: false, parseJSON: true, modal: true\";\n if(!empty($settings['onvalidate'])) {\n $onclick .= \", validate: \".$settings['onvalidate'];\n }\n if(!empty($settings['onsuccess'])) {\n $onclick .= \", cbSuccess: \".$settings['onsuccess'];\n }\n if(!empty($settings['onpost'])) {\n $onclick .= \", cbPosted: \".$settings['onpost'];\n }\n $onclick .= \" } );\";\n }\n } elseif(!empty($settings['url'])) {\n //URL, but no form;\n $onclick = \"window.location.href = \".$settings['url'];\n } elseif(!empty($settings['script'])) {\n $onclick = $settings['script'];\n } else {\n //No form and no URL, so just put close button\n $closeCaption = (!empty($settings['closecaption']) ? PunctuatedTextStr($settings['closecaption']) : \"Close\");\n echo str_repeat(\"\\t\", $tabs+1).\"<button type=\\\"button\\\" class=\\\"btn btn-sm btn-info\\\" data-dismiss=\\\"modal\\\">\".htmlspecialchars($closeCaption).\"</button>\\n\";\n }\n if(!empty($onclick)) {\n if(isset($settings['confirm'])) {\n $str = \"bootbox.confirm({ \";\n if(!empty($settings['confirm']['title'])) {\n $str .= \"title: \".OutputJSString($settings['confirm']['title']).\", \";\n }\n $str .= \"message: \".OutputJSString((!empty($settings['confirm']['message']) ? $settings['confirm']['message'] : \"Are you sure?\")).\", \";\n $str .= \"callback: function(result){ if( result ){ {$onclick} } }})\";\n $onclick = $str;\n }\n echo str_repeat(\"\\t\", $tabs+1).\"<button id=\\\"dlgConfirmationBtnSave\\\" type=\\\"button\\\" class=\\\"btn btn-sm btn-primary\\\" onclick=\\\"{$onclick}\\\">\".htmlspecialchars($saveCaption).\"</button>\\n\";\n }\n echo str_repeat(\"\\t\", $tabs).\"</div>\\n\";\n if(!empty($formID)) {\n jsFormValidation($formID, TRUE, $tabs);\n }\n}", "public function selfClosing();", "public function resetAllBreakpoints();", "function close() {\r\n\t\t// \"implementado en la clase <i>\" . get_class($this) . \"</i></h1>\";\r\n\t\treturn FALSE;\r\n\t}", "function closeForm()\r\n\t\t{\r\n\t\t\t# Open form and configure\r\n\t\t\techo \"</form>\";\r\n\t\t}", "function _close() {\n }", "public function closeConfirmingDeletion()\n {\n $this->confirmingExpenseDeletion = false;\n }", "function lose_the_widgets ()\r\n{\r\n unregister_sidebar( 'sidebar-1' );\r\n unregister_sidebar( 'sidebar-2' );\r\n unregister_sidebar( 'sidebar-3' );\r\n}", "public function flush() {\n foreach ($this->openedFiles as $handle) {\n fclose($handle);\n }\n }", "public function unsetAll() {\n\t\tparent::unsetAll();\n\t}", "public function unmarkAllExecutions() {}", "function _close()\n\t{\n\t}", "function closeWindow( $frame = null )\r\n\t{\r\n\t\tif($frame == null)\r\n\t\t{\r\n\t\t\t$frame = 'parent';\r\n\t\t}\r\n\t\r\n\t\t$this->addCommand(array('cmd'=>'mw:cw', 'frame'=>$frame), null);\t\r\n\t}", "function close_form($tabs = 0)\n{\n close_tag('form', Tab($tabs), true) ;\n}", "function close_body($tabs = 1)\n{\n close_tag('body', Tab($tabs), true) ;\n}", "public function clearframes()\n {\n foreach ($this->parsedfiles as $temp_frame) {\n unlink($temp_frame);\n }\n }", "function close_holdentries(){\n\t\n\t\tif(isset($_POST['id_list']) && !empty($_POST['id_list'])){\n\t\t\t$voucher_arr = explode(\",\", $_POST['id_list']);\n\t\t\tforeach ($voucher_arr as $payment_id)\n\t\t\t{\n\t\t\t\t$this->Students_model->delete_transaction($payment_id);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->holdentries();\n\t}", "function _closeRemainingBlocks () {\r\n // everything closed\r\n if (count ($this->_stack) == 1) {\r\n return true;\r\n }\r\n // not everything close\r\n if ($this->strict) {\r\n return false;\r\n }\r\n while (count ($this->_stack) > 1) {\r\n if ($this->_topNode ('getFlag', 'closetag', 'integer', BBCODE_CLOSETAG_IMPLICIT) == BBCODE_CLOSETAG_MUSTEXIST) {\r\n return false; // sorry\r\n }\r\n $res = $this->_popNode ();\r\n if (!$res) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public function htmleditorAction()\r\n {\r\n $this->_view->unsetMain();\r\n }", "function hm_deactivate_conflicts() {\n\t$plugins = get_option('active_plugins' );\n\t$plugin_deactivate = array_keys( $plugins, 'WPThumb/wpthumb.php' );\n\tunset( $plugins[$plugin_deactivate[0]]);\n\tupdate_option( 'active_plugins', $plugins );\n}", "public function removeWidgets()\n {\n $this->disabledWidgets->each(function ($widget) {\n unregister_widget($this->widgetIds[$widget]);\n });\n }", "function initializeMoveMultipleFilesDialog() {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_dialog.php');\n $data = array();\n $hidden = array(\n 'cmd' => $this->params['cmd'],\n 'confirm' => 1,\n 'batch_files' => $this->params['batch_files'],\n );\n\n $fields = array(\n 'target_folder_id' => array('Target folder', 'isNum', TRUE, 'combo',\n $this->getFolderComboArray($this->lngSelect->currentLanguageId)),\n );\n\n $this->dialog = new base_dialog($this, $this->paramName, $fields, $data, $hidden);\n $this->dialog->dialogTitle = $this->_gt('Move files');\n $this->dialog->buttonTitle = 'Move';\n $this->dialog->inputFieldSize = 'large';\n }", "function _close()\n {\n return true;\n }", "function close()\r\n {\r\n return TRUE;\r\n }", "public function close() {\n // DO NOTHING!!!!\n }", "public function erase()\n {\n ActionHandler::getInstance()->deleteAction($this->deleteAction);\n ActionHandler::getInstance()->deleteAction($this->deleteActionf);\n $this->saveButton->destroy();\n $this->loadButton->destroy();\n $this->frame->clearComponents();\n $this->frame->destroy();\n $this->destroyComponents();\n\n parent::destroy();\n }", "public function close()\n {\n $this->_manager->close();\n }", "function close(){\n\t\t$this->pdo=null;\n\t\t$this->stmt=null;\n\t}", "public static function getCloseCall()\n {\n return 'ATK.Dialog.getCurrent().close();';\n }", "function reset_process(){ $this->model->closing(); $this->transmodel->closing(); }", "function close_form($no_link_back=false, $equery=false) {\r\n\t\tparent::close_form($no_link_back,$equery);\r\n\t\tglobal $percorso;\r\n\t\t$percorso.=$this->percorso_agg;\r\n\t}", "public function delAllPanier () {\n if ($_SESSION['panier']) {\n unset($_SESSION['panier']);\n }\n }", "public function closeGame()\n\t{\n\t\t$playerX = $this -> playerX;\n\t\t$playerO = $this -> playerO;\n\t\t$query = \"DELETE FROM tttGame \n\t\t\t\t WHERE playerX = '$playerX' \n\t\t\t\t AND playerO = '$playerO';\";\n\t\t$this -> queryDB($query);\n\t}", "private function delete_all_plugin_options() {\n\t\t// Deletes all options from the options table.\n\t\t$this->options->delete( Activation::OPTION_SHOW_ACTIVATION_NOTICE );\n\t\t$this->options->delete( Activation::OPTION_NEW_SITE_POSTS );\n\t\t$this->options->delete( Credentials::OPTION );\n\t\t$this->options->delete( 'googlesitekit-active-modules' );\n\t\t$this->options->delete( Search_Console::PROPERTY_OPTION );\n\t\t$this->options->delete( AdSense::OPTION );\n\t\t$this->options->delete( Analytics::OPTION );\n\t\t$this->options->delete( 'googlesitekit_analytics_adsense_linked' );\n\t\t$this->options->delete( PageSpeed_Insights::OPTION );\n\t\t$this->options->delete( Optimize::OPTION );\n\t\t$this->options->delete( Tag_Manager::OPTION );\n\t\t$this->options->delete( First_Admin::OPTION );\n\t\t$this->options->delete( OAuth_Client::OPTION_PROXY_NONCE );\n\t\t$this->options->delete( Beta_Migration::OPTION_IS_PRE_PROXY_INSTALL );\n\n\t\t// Clean up old site verification data, moved to user options.\n\t\t// Also clean up other old unused options.\n\t\t// @todo remove after RC.\n\t\t$this->options->delete( Verification::OPTION );\n\t\t$this->options->delete( Verification_Tag::OPTION );\n\t\t$this->options->delete( 'googlesitekit_api_key' );\n\t\t$this->options->delete( 'googlesitekit_available_modules' );\n\t\t$this->options->delete( 'googlesitekit_secret_token' );\n\t\t$this->options->delete( 'googlesitekit_project_id' );\n\t\t$this->options->delete( 'googlesitekit_gcp_project' );\n\t}", "function close()\n {\n return 0;\n }", "public function resetAll()\n {\n $this->reset();\n $this->resetFlash();\n }", "function RevokeAll()\n \t{\n \t\t\n \t}", "function unloadRecursive() {\n if ($this->HasControls()) {\n $keys = array_keys($this->Controls);\n for ($i = 0; $i < count($this->Controls); $i++) {\n @$control = &$this->Controls[$keys[$i]];\n if(method_exists($control, \"unloadRecursive\")){\n $control->unloadRecursive();\n }\n $control=null;\n }\n }\n $this->ControlOnUnload();\n $this->Controls=array();\n }", "function clearall() {\n}", "public static function renderCloseFieldset();", "public function remove_all_hook() {\n\t\tremove_action( 'all', [ $this, 'wrap_hook_callbacks' ] );\n\t}", "public function erase()\n {\n $this->sendButton->destroy();\n parent::destroy();\n }", "public function clear_all()\n {\n }", "function reset_process(){ $this->model->closing(); }", "public function cancelAllMonitors () {\n $this->callMethod( 'cancelAllMonitors');\n $this->_handlersMonitorFile = array();\n }", "public function reset()\n {\n $this->values[self::_OPEN_PANEL] = null;\n $this->values[self::_QUERY_OPPO] = null;\n $this->values[self::_START_BAT] = null;\n $this->values[self::_END_BAT] = null;\n $this->values[self::_RESET] = null;\n $this->values[self::_DRAW_REWARD] = null;\n }", "public function clearAll();", "public function clearAll();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();" ]
[ "0.5628627", "0.5628627", "0.5628627", "0.5628627", "0.5427189", "0.5297497", "0.52536917", "0.5211063", "0.5165551", "0.5128363", "0.51225746", "0.5067337", "0.5041713", "0.49300697", "0.49270236", "0.49194652", "0.49063772", "0.48965254", "0.48965254", "0.47861335", "0.47401154", "0.47175375", "0.46873435", "0.46847022", "0.4680722", "0.46738592", "0.4662589", "0.46566042", "0.46523535", "0.46514648", "0.46415943", "0.4634136", "0.46190682", "0.45901537", "0.4581313", "0.45802003", "0.45783117", "0.45775136", "0.4575413", "0.45527866", "0.45516706", "0.45516706", "0.45516706", "0.45448852", "0.45356998", "0.45266542", "0.4520873", "0.45195758", "0.45172203", "0.45164618", "0.4510685", "0.44981277", "0.44925094", "0.44821677", "0.44737092", "0.44618568", "0.4458955", "0.4458932", "0.444701", "0.44447172", "0.44438705", "0.44102857", "0.44038782", "0.43916926", "0.439148", "0.43891242", "0.43870297", "0.43790486", "0.437392", "0.4372903", "0.43681067", "0.43594396", "0.43553403", "0.4351425", "0.43487325", "0.4331988", "0.43262058", "0.4316409", "0.43088904", "0.4303847", "0.43036878", "0.42977628", "0.42951787", "0.42944923", "0.42892033", "0.42868397", "0.428485", "0.42814478", "0.427825", "0.42762634", "0.42762634", "0.4276086", "0.4276086", "0.4276086", "0.4276086", "0.4276086", "0.4276086", "0.4276086", "0.4276086", "0.4276086" ]
0.7388481
0
/! \brief Remove the selected service(s)
protected function removeService($action = "", $target = array(), $all = array()) { foreach ($target as $s_entry) { $new_obj = new $s_entry($this->dn, $this); $new_obj->set_acl_base($this->acl_base); $new_obj->set_acl_category(preg_replace("/\/$/", "", $this->acl_category)); $tmp = $new_obj->getListEntry(); /* Check if we are allowed to remove this service */ if ($tmp['AllowRemove']) { $str = $this->plugins[$s_entry]->allow_remove(); if (empty($str)) { $this->plugins[$s_entry] = $new_obj; $this->plugins[$s_entry]->is_account = FALSE; } else { msg_dialog::display(_("Error"), $str, ERROR_DIALOG); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Services $services)\n {\n //\n }", "public function destroy(Services $services)\n {\n //\n }", "public function removeServices(Host $host): void;", "public function destroy(Services $service)\n {\n $service->delete();\n }", "public function deleting(Service $Service)\n {\n //code...\n }", "public function destroy(Service $service)\n {\n //\n }", "public function deleted(Service $service)\n {\n //\n }", "public function listsServicesDelete($service_id)\r\n {\r\n $serive = Services::destroy($service_id);\r\n if($serive){\r\n return response()->json(['msg' => 'Deleted the servie']);\r\n }else{\r\n return response('Oops, seems like something went wrong while deleting the service');\r\n }\r\n }", "function delete_service_data()\n\t{\n\t\t# Get the passed details into the form data array if any\n\t\t$urldata = $this->uri->uri_to_assoc(4, array('action','service_id'));\n\t\t\n\t\tif($this->process_form_data($urldata, array(), 'delete'))\n\t\t{\n\t\t\t$data['msg'] = \"The truck service was successfully deleted.\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# For each error to be displayed as an error, it should start with \"ERROR:\"\n\t\t\t$data['msg'] = \"ERROR: The truck data was not deleted or may not be deleted correctly.\";\n\t\t}\n\t\t\n\t\t$truckid= $this->session->userdata('sess_id');\n\t\t\t$data['truck_id'] = $truckid;\n\t\t\n\t\t\t\t\t\t$data['url2']='serv';\n\n\t\t$data['userdetails'] = $this->session->userdata('alluserdata');\n\t\t$id=$data['userdetails']['companyid'];\n $query = $this->Query_reader->get_query_by_code('pick_all_services_for_truck', array('truck_id'=>$truckid));\n\t\t$result = $this->db->query($query);\n\t $data['returned']= $result->num_rows();\n\t\t$data['service_array'] = $result->result_array();\n\t\t$this->load->view('managetruck/specifications', $data);\n\t\t\n\t}", "public static function eliminarServicio($id_servicio){\n \n $eliminar = Neo4Play::client()->getNode($id_servicio);\t\t\n $eliminar->delete();\t\n \n\t}", "public function deleteAction(Request $request, Services $service)\n {\n $form = $this->createDeleteForm($service);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n if ($service->getParent()) {\n $service->setParent(null);\n }\n foreach($service->getWorkerOrders() as $order) {\n $order->setServices(null);\n $order->setServicesparent(null);\n }\n $em->remove($service);\n $em->flush();\n }\n\n return $this->redirectToRoute('services_index');\n }", "public function deleted(Service $Service)\n {\n //code...\n }", "public function Remove_addtional_services($user_master_id,$order_additional_id)\n\t{\n\t\t$sQuery = \"DELETE FROM `service_order_additional` WHERE id = '\".$order_additional_id.\"'\";\n\t\t$serv_result = $this->db->query($sQuery);\n\n\t\tif($serv_result)\n\t\t{\n\t\t\t$response = array(\"status\" => \"success\", \"msg\" => \"Additional Service Removed\");\n\t\t} else {\n\t\t\t$response = array(\"status\" => \"error\", \"msg\" => \"Services Not Found\");\n\t\t}\n\n\t\treturn $response;\n\t}", "public function deleteService()\n {\n $serviceid = request()->input('serviceId');\n DB::table('tbl_services')->where('service_id',$serviceid)->delete();\n return redirect('cms/1');\n }", "public function deactivateService() {}", "protected function _delete()\n {\n $this->_deleteRows( $this->getServiceTurnaroundTimes() );\n $this->_deleteRows( $this->getServicePriceModifiers() );\n $this->_deleteRows( $this->getServiceSpeakerNumbers() );\n\n $clientServiceModel = new Application_Model_ClientService();\n $clientServiceModel->delete( 'service_id = ' . $this->id );\n\n $serviceGroupModel = new Application_Model_ServiceGroupService();\n $serviceGroupModel->delete( 'service_id = ' . $this->id );\n }", "public function destroy(Services $service)\n {\n DB::beginTransaction();\n\n try{\n\n $service->unlinkImage($service->banner);\n\n $service->products()->detach();\n $service->delete();\n\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 Delete Data\"], 500);\n }\n\n }", "public function destroy(Service $service)\n {\n $service->clients()->detach();\n File::delete($service->logo);\n $service->delete();\n\n\n return redirect()->route('services');\n }", "function removeServico($campos){\n\t\t\t$itemID = $campos['InputDelServico'];\n\t\t\tfor($i=0;$i<sizeof($itemID);$i++){\n\t\t\t\t\t\t$sql=\" DELETE FROM vekttor_venda_servico WHERE id = '$itemID[$i]'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t}\n}", "public function drop()\n\t\t{\n\t\t\t$service_id = $this->input->get('service_id') ;\n\n\t\t\ttry{\n\n\t\t\t\tif( empty($service_id) ){\n\t\t\t\t\tthrow new Exception(\"Error: Invalid Service\");\n\t\t\t\t}\n\n\n\t\t\t\tif(! $this->mdl_services->drop($service_id) ){\n\t\t\t\t\tthrow new Exception(\"Error processing request\");\n\t\t\t\t}\n\n\t\t\t\t$data['status'] = 'success' ;\n\t\t\t\t\t\n\t\t\t}catch(Exception $e){\n\n\t\t\t\t$data['status'] = 'error' ;\n\t\t\t\t$data['message'] = $e->getMessage() ;\n\t\t\t}\t\n\n\n\t\t\techo json_encode($data) ;\t\n\t\t}", "public function delete_service(){\r\t\t\t$query=\"delete from `\".$this->tablename.\"` where `id`='\".$this->id.\"' \";\r\t\t\t$result=mysqli_query($this->conn,$query);\r\t\t\treturn $result;\r\t\t}", "public function destroy(ServiceList $serviceList) {\n //\n }", "public function destroy($id)\r\n {\r\n\r\n $services = Service::find($id);\r\n// dd($serviceCategory);\r\n // Delete image\r\n $path = optional($services->media()->first())->path;\r\n $this->deleteImage( $path );\r\n\r\n // Clean image database links\r\n $services->media()->delete();\r\n\r\n $services->delete();\r\n\r\n return response()->json('Service Sucessfullly Deleted');\r\n\r\n\r\n }", "function eliminarServicio(){\r\n\t\t$this->procedimiento='gev.f_tgv_servicio_ime';\r\n\t\t$this->transaccion='tgv_SERVIC_ELI';\r\n\t\t$this->tipo_procedimiento='IME';\r\n\t\t\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\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 remove();", "public function remove();", "public function remove();", "public function remove();", "public function destroy(Service $service)\n {\n $service->delete();\n $services = Service::all();\n $icon = Icon::all();\n return view('site.services', compact('services', 'icon'));\n }", "public function destroy($id)\n {\n $Service_Type = \\Blegrator\\Servicetype::find($id);\n if (is_null($Service_Type)) {\n return $this->responseWithNotFound();\n }\n\n // Delete Image\n foreach (['icon', 'coverphoto'] as $img_field) {\n if (!empty($Service_Type->{$img_field})) {\n File::deleteImageWithOriginal(\\Blegrator\\Servicetype::$Image_Path, $Service_Type->{$img_field});\n }\n }\n\n // Delete Service Type\n $Service_Type->delete();\n\n // Return Removed\n return $this->responseWithRemovedItem();\n }", "public function destroy($id)\n {\n $this->servicegroupManager->delete($id);\n }", "function deleteServices($conn, $planID){\n\t$sql = \"DELETE FROM planservice WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n}", "function delete_service_type($ID_SERVICE_TYPE)\n {\n return $this->db->delete('SERVICE_TYPE',array('ID_SERVICE_TYPE'=>$ID_SERVICE_TYPE));\n }", "function deleteServiceInput($id) {\n return $this->db->update('insumos', array('deleted' => 1), array('id' => $id));\n }", "function deletewebserviceAction() {\n\n $clientId = $this->getRequest()->getParam('clientId');\n $webserviceId = $this->getRequest()->getParam('webserviceId');\n\n $em = Zend_Registry::getInstance()->entitymanager;\n\n if(isset($webserviceId) && $webserviceId != \"\") {\n\n $webserviceObj = $em->find('TWebservice',$webserviceId);\n $em->remove($webserviceObj);\n $em->flush();\n\n $this->_redirect('admin/webservice/index/clientId/'.$clientId);\n }\n }", "function make_remove($id){\n\t\tfor ($i=0;$i<count($this->table_names_modify);$i++){\n\t\t\t$this->modify_all_id_service($id,$this->table_names_modify[$i]);\n\t\t}\n\t\t//borramos todos aquellos registros en los que hay un id_user;\t\t\n\t\tfor ($i=0;$i<count($this->table_names_delete);$i++){\n\t\t\t$this->delete_all_id_service($id,$this->table_names_delete[$i]);\n\t\t}\n\t\n\t}", "public function destroy(ServiceCode $serviceCode)\n {\n //\n }", "public function destroy(TeamService $teamService)\n {\n //\n }", "public function destroy(Service $id)\n {\n if(file_exists(public_path().'/uploads/images/services/icon/'.$id->icons))\n @unlink(public_path().'/uploads/images/services/icon/'.$id->icons);\n\n if(file_exists(public_path().'/uploads/images/services/image/'.$id->image))\n @unlink(public_path().'/uploads/images/services/image/'.$id->image);\n\n if(file_exists(public_path().'/uploads/images/services/image/thumbnail/'.$id->thumbnail))\n @unlink(public_path().'/uploads/images/services/image/thumbnail/'.$id->thumbnail);\n\n\n $id->delete();\n $delete = true;\n\n return redirect()->route('services', ['delete' => $delete])->with('status', 'Service deleted successfully');\n }", "public function deleteServiceInfo($servID)\n {\n //First Delete From Appointment Table\n $sqlDelete = \"DELETE FROM appointment WHERE service_id=?\";\n $values = array($servID);\n $this->execute($sqlDelete,$values);\n //Delete From Service_Branch Table\n $sqlDelete = \"DELETE FROM service_branch WHERE service_id=?\";\n $values = array($servID);\n $this->execute($sqlDelete,$values);\n //Delete Service From Service Table\n $sqlDelete = \"DELETE FROM service WHERE service_id=?\";\n $values = array($servID);\n $this->execute($sqlDelete,$values);\n }", "public function remove() {}", "public function remove() {}", "private function uninstall_OSF_WebServices()\n {\n // Get package info\n $installPath = \"{$this->osf_web_services_folder}/{$this->osf_web_services_ns}\";\n\n // Uninstall\n $this->span(\"Uninstalling...\", 'info');\n $this->rm(\"{$installPath}/\", TRUE);\n }", "public function remove(...$items);", "public function destroy($id)\n {\n $services = Service::find($id);\n $services->delete();\n\n return redirect('/admin/services/view');\n }", "public function deleteservice(){\n\t\tif(isset($this->service_id)){\n\t\t//get the filename using SELECT query\n\t\t$this->sql=\"SELECT service_thumb_image FROM tbl_service WHERE service_id='$this->service_id'\";\n\t\t//execute the query\n\t\t$this->res=mysqli_query($this->conxn,$this->sql) or trigger_error($this->err=mysqli_error($this->conxn));\n\t\t$this->row=mysqli_fetch_assoc($this->res);\n\t\t\n\t\t//check if the file exits\n\t\tif(file_exists('../uploads/'.$this->row['service_thumb_image'])){\n\t\t@unlink('../uploads/'.$this->row['service_thumb_image']);\n\t\t}\n\t\t\n\t\t$this->sql=\"DELETE FROM tbl_service WHERE service_id='$this->service_id'\";\n\t\t//echo $this->service_id;\n\t\t$this->res=mysqli_query($this->conxn,$this->sql) or trigger_error($this->err=mysqli_error($this->conxn));\n\t\t$this->affRows=mysqli_affected_rows($this->conxn);// or trigger_error($this->err=mysqli_error($this->conxn));\n\t\tif($this->affRows>0){\n\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\treturn false;\n\t\t}\n\t\n\t}\n\t}", "public function destroy(Service $service)\n {\n ImageHandler::destroyImage($service['img']);\n $service->delete();\n flash()->success('Tjänst borttagen');\n return redirect('/admin/service');\n }", "public function destroy(Service $service)\n {\n //\n $service->delete();\n\n return redirect('/service');\n }", "public function destroy(ProductosServicio $productosServicio)\n {\n //\n }", "public function destroy($id)\n {\n $service = ServiceSetting::find($id);\n }", "public function destroy(Service $service)\n {\n if(file_exists($service->image))\n unlink($service->image);\n $service->delete();\n Session::flash('success_message', '刪除成功!');\n // flash()->overlay('刪除成功!','系統訊息:');\n return redirect('/admin/service');\n }", "public function destroy(Service $partner)\n {\n //\n }", "public function destroy($id)\n {\n $services=Services::find($id);\n\t\t$services->delete();\n\t\treturn redirect()->route('services.index')->with('success','Data Deleted');\n\t\t\n }", "public function destroy($id)\n {\n $service = list_services::find($id);\n $service->delete();\n return redirect('services')->with('thongbao','Xóa thành công');\n }", "public function testServiceDAO_removeServiceAndJoinedDTs()\n {\n print __METHOD__ . \"\\n\";\n include __DIR__ . '/resources/sampleFixtureData4.php';\n\n // Remove Service\n // Impt: When deleting a service, we can't rely solely on the\n // 'onDelete=cascade' defined on the 'EndpointLocation->service'\n // to correctly cascade-delete the EL. This is because downtimes can also be linked\n // to the EL. Therefore, if we don't invoke an $em->remove() on the EL\n // (either via cascade=\"remove\" or manually invoking em->remove() on each EL),\n // Doctrine will not have flagged the EL as removed and so will not automatically delete the\n // relevant row(s) in 'DOWNTIMES_ENDPOINTLOCATIONS' join table.\n // This would cause a FK integrity/violation constraint exception\n // on the 'DOWNTIMES_ENDPOINTLOCATIONS.ENDPOINTLOCATION_ID' FK column.\n // This is why we need to do a managed delete using the ServiceDAO\n $serviceDao = new ServiceDAO();\n $serviceDao->setEntityManager($this->em);\n $serviceDao->removeService($service1);\n $this->em->flush();\n\n // use DB connection to check data has been deleted\n $con = $this->getConnection();\n $result = $con->createQueryTable('results_table', \"SELECT * FROM EndpointLocations\");\n $this->assertTrue($result->getRowCount() == 2);\n $result = $con->createQueryTable('results_table', \"SELECT * FROM Downtimes\");\n $this->assertTrue($result->getRowCount() == 4); // 3 DTs linked to service2 and orphanDT\n }", "public function delete() {\n // Deleting microarticles.\n $microarticles = $this->getMicroarticles();\n if (!empty($microarticles)) {\n foreach ($microarticles as $microarticle) {\n $microarticle->delete();\n }\n }\n\n // Deleting selfservices.\n $selfServices = $this->getSelfservices();\n if (!empty($selfServices)) {\n foreach ($selfServices as $selfService) {\n $selfService->delete();\n }\n }\n\n parent::delete();\n }", "public function testServiceDAO_removeService2AndJoinedDTs()\n {\n print __METHOD__ . \"\\n\";\n include __DIR__ . '/resources/sampleFixtureData4.php';\n\n $serviceDao = new ServiceDAO();\n $serviceDao->setEntityManager($this->em);\n $serviceDao->removeService($service2);\n $this->em->flush();\n\n // use DB connection to check data has been deleted\n $con = $this->getConnection();\n $result = $con->createQueryTable('results_table', \"SELECT * FROM EndpointLocations\");\n $this->assertTrue($result->getRowCount() == 2);\n $result = $con->createQueryTable('results_table', \"SELECT * FROM Downtimes\");\n $this->assertTrue($result->getRowCount() == 7); // 6 DTs linked to service1 and orphanDT\n }", "public function forceDeleted(Service $service)\n {\n //\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $id = $model->service_id;\n $model->delete();\n\n return $this->redirect(['/admin/services/edit', 'id' => $id]);\n }", "public function destroy($id)\r\n\t{\r\n\t\t$service = Service::find($id)->delete();\r\n\t\tSession::flash('message', 'Successfully deleted service');\r\n\t\treturn Redirect::to('services');\r\n\t}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function removeAll() {}", "public function destroy(Service $service)\n {\n //remove image from storage\n if (file_exists(public_path('assets/images/upload/' . $service->image)))\n @unlink(public_path(\"assets/images/upload/\" . $service->image));\n $status = $service->delete();\n if ($status)\n return $this->successResponse(route(\"services.index\"), 'Deleted Successfully');\n return $this->failResponse();\n }", "public function service_slots_delete($id) {\n $ids = explode(',', $id);\n foreach ($ids as $key => $value) {\n $this->db->where('id', $value);\n $this->db->delete('services_slots');\n }\n return true;\n }", "public function destroy($id)\n {\n $childservices = ChildService::find($id);\n\n\n $childCount = $childservices->subChildServices()->count();\n if ($childCount)\n {\n session()->flash('error', 'You Can Not Delete this ,it has subChildServices');\n return back();\n\n }\n\n it()->delete($childservices->image);\n it()->delete('childservice',$id);\n\n @$childservices->delete();\n session()->flash('success',trans('admin.deleted'));\n return back();\n }", "public function delete_about_us_services_info($id){\r\n $query = \"DELETE FROM tbl_aboutus_service WHERE service_id='$id'\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $message = \"About Us Services Information Deleted Successfully!\";\r\n return $message;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "public function unregisterService(string $serviceName);", "public function remove($ids);", "public function destroy(Service $service)\n {\n $service->delete();\n session()->flash('success', __('site.deleted_successfully'));\n return redirect()->route('dashboard.service.index');\n }", "public function deleteServiceById($remove){\n $sql = \"DELETE FROM servicii_prestate WHERE id = :id \";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':id', $remove);\n $result =$stmt->execute();\n if ($result) {\n $msg = '<div class=\"alert alert-success alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Success !</strong> Service șters cu succes!</div>';\n return $msg;\n }else{\n $msg = '<div class=\"alert alert-danger alert-dismissible mt-3\" id=\"flash-msg\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n <strong>Error !</strong> Service nu a fost șters!</div>';\n return $msg;\n }\n }", "public function removeAll(): void;", "public function destroy(Service $service)\n {\n //dd($service);\n Service::destroy($service->id);\n $msg = [\n 'title' => 'Eliminado!',\n 'text' => 'Servicio eliminado exitosamente.',\n 'icon' => 'success'\n ];\n\n return response()->json($msg);\n }", "public function delete_user_services_by_id($id)\n\t{\n\t\t\n\t\t\t\n\t\t$this->db->trans_start();\n\t\t\n\t\t$this->db->where('user_services_id', $id);\n\t\t$this->db->delete('user_services');\n\t\t\n\t\t$this->db->trans_complete();\n\t\t\n\t\tif ($this->db->trans_status() === FALSE)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t}", "function _wsdl_docs_service_delete($name) {\n $service_id = _wsdl_docs_get_service_id($name);\n if (is_numeric($service_id)) {\n entity_delete('wsclient_service', $service_id);\n return \"DELETE SERVICE: $name, ID: $service_id\";\n }\n return 'WSDL Doc not deleted. No WSDL Doc matching the name was found.';\n}", "public function remove()\n {\n $arg = func_get_args();\n\n foreach ($this->group as $form) {\n if (! is_object($form)) {\n $form = new $form();\n }\n\n if (method_exists($form, 'delete')) {\n $form->delete(...$arg);\n }\n }\n }", "public function destroy($id)\n {\n $item = Service::findOrFail($id);\n\n\n $item->delete();\n\n \n\n return redirect()->route('service.index')->with('success','Data berhasil dihapus (Cek Recyle Bin');\n }", "public function destroy(Service $service)\n {\n $service->delete();\n session()->flash('flash_message', 'Se ha eliminado el servicio');\n return redirect('servicios');\n }", "public function delete_business_service_gallery($service_id) {\n\n $this->db->where('service_id', $service_id);\n $this->db->delete('business_service_gallery');\n }", "function remove($options='')\n {\n\t\t$sql = array();\n\n\t\treturn $this->_remove($sql,$options);\n }", "public function destroy($id)\n {\n $delete = Service::DeleteService($id);\n\t\tif($delete){\n\t\t\treturn [\"status\"=>\"success\",\"message\"=>\"Service Deleted\"];\n\t\t}else{\n\t\t\treturn [\"status\"=>\"failed\",\"message\"=>\"Failed To Delete\"];\n\t\t}\n }", "public function delete_addons_of_service($addonid){\r\t\t\t$query=\"delete from `\".$this->table_name_sa.\"` where `id`=$addonid\";\r\t\t\tmysqli_query($this->conn,$query);\r\t\t}", "function remove($options='') {\n $sql = array();\n\n\tdolibarr_set_const($this->db,'MAIN_THEME','eldy');\n\tdolibarr_set_const($this->db,'MAIN_MENU_INVERT',0);\n\t\n\tdolibarr_del_const($this->db,'MAIN_MENU_STANDARD_FORCED');\n\tdolibarr_del_const($this->db,'MAIN_MENUFRONT_STANDARD_FORCED');\n\tdolibarr_del_const($this->db,'MAIN_MENU_SMARTPHONE_FORCED');\n\tdolibarr_del_const($this->db,'MAIN_MENUFRONT_SMARTPHONE_FORCED');\n\t\t\n return $this->_remove($sql, $options);\n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function destroy($id)\n {\n $services = Services::where('id', '=', $id)->delete();\n \n if($services == 1) {\n $success = true;\n $message = \"Services deleted successfully\";\n } else {\n $success = false;\n $message = \"Services not deleted\";\n }\n return response()->json([\n 'success' => $success,\n 'message' => $message,\n ]);\n }", "public function destroy($id)\n {\n $service = Services::find($id);\n $service->delete();\n \n return redirect()->back();\n }", "public function deleted(SaleService $saleService)\n {\n //\n }", "public function destroy($id)\n {\n $service = Service::findOrFail($id);\n $service->delete();\n \n // redirect\n return redirect('/services');\n }", "public function unsetServiceType($index)\n {\n unset($this->serviceType[$index]);\n }", "public function remove($id)\n {\n $em = $this->getEntityManager();\n $service = $this->getServiceRepository()->find($id);\n if ($service) {\n try {\n $this->deleteImages($service);\n $em->remove($service);\n $em->flush();\n $this->message = $this->getTranslator()->translate($this->getVocabulary()[\"MESSAGE_SERVICE_REMOVED\"]);\n return true;\n } catch (\\Exception $e) {\n $this->message = $this->getTranslator()->translate($this->getVocabulary()[\"ERROR_SERVICE_NOT_REMOVED\"]);\n return false;\n }\n }\n return false;\n }", "function delete_servicio($id)\n {\n $this->db->where('id', $id);\n return $this->db->delete('servicio');\n }", "public function delete_password($service_name = ''){\n\t\t\n\t\texec('security 2>&1 >/dev/null delete-generic-password -a '.$service_name.' -s \"Login: '.$service_name.'\" >/dev/null');\n\t\t\n\t\treturn;\n\t\t\n\t}", "public function remove() {\n }", "public function destroy($id)\n {\n if (Gate::denies('service.delete',ServiceType::findOrFail($id))) {\n session()->flash('warning', 'You do not have permission to edit a service');\n return redirect()->back();\n }\n $service = ServiceType::where('id', $id)->first();\n $service->delete();\n session()->flash('success', 'Service Deleted');\n return redirect()->route('service.index');\n }", "public function onRemove();", "public function drop_command($service_name) {\n\n // $doctrine represents the database configuration\n $doctrine = $this->sm->get($service_name);\n // schema represents manipulations over tables (alter, drop, create)\n $schema = $doctrine->get_schema();\n\n if(!$doctrine) {\n $this->shell->write_line('Service \"' . $service_name . '\" not found.');\n return;\n }\n \n $schema->drop(); // we get the sql (array)\n\n $this->output->write_line(\n $this->formater->set_color(\n 'Database schema dropped',\n 'green'\n )\n );\n }", "public function destroy($id)\n {\n DB::delete('delete from original_services where id = ?',[$id]);\n return redirect('/originalservices')->with('success', 'Original Service deleted!');\n }" ]
[ "0.6950787", "0.6950787", "0.67904085", "0.64627653", "0.62373984", "0.6141447", "0.61281973", "0.6070257", "0.6058566", "0.6050088", "0.5874558", "0.58431983", "0.582545", "0.58169675", "0.5812562", "0.5808583", "0.58075243", "0.57658577", "0.5762506", "0.57606053", "0.5757584", "0.5745299", "0.57039624", "0.5661471", "0.5599058", "0.5599058", "0.5599058", "0.5599058", "0.55981517", "0.55740285", "0.55656576", "0.5562134", "0.55541855", "0.55472875", "0.5542028", "0.55414116", "0.5538989", "0.5536135", "0.55160195", "0.5497035", "0.54902154", "0.54885316", "0.54865205", "0.54834044", "0.5464623", "0.5463201", "0.543782", "0.5435904", "0.54326177", "0.5431144", "0.5423943", "0.54188854", "0.54186136", "0.5414508", "0.5413139", "0.5411656", "0.5394405", "0.53825456", "0.5381438", "0.53784376", "0.5374637", "0.5374637", "0.5374637", "0.5374637", "0.5374424", "0.5374424", "0.5373057", "0.5367989", "0.53587115", "0.5355829", "0.5348645", "0.5346613", "0.53429025", "0.5339137", "0.5332245", "0.5328913", "0.5325205", "0.5324412", "0.5317016", "0.53160375", "0.5310807", "0.5306731", "0.52994096", "0.5292455", "0.5289379", "0.5286192", "0.5278857", "0.52738774", "0.5265838", "0.52647495", "0.5264056", "0.52574515", "0.5256156", "0.5253439", "0.5252478", "0.5236513", "0.5229359", "0.5221003", "0.52189034", "0.5213706" ]
0.62047833
5
/! \brief Returns the list of of services, active services. Used in the filter class for services. class_filterServerService.inc
static function getServiceList() { return session::get('ServerService'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices() {\n return $this->services;\n }", "public function getServices() {\n return $this->services;\n }", "public function getServices() {\n\n return $this->services;\n\n }", "protected function getServices()\n {\n return $this->services;\n }", "public function getServices();", "public function getServices()\n {\n return $this->pantonoServices;\n }", "public function &getServices(): array {\n return $this->services;\n }", "public function listAllAvailableServices()\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/services/available.json\");\n\t\t$data = $data->{'services'};\n\t\t$serviceArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$serviceArray->append(new Service($data[$i], $this));\n\t\t}\n\t\treturn $serviceArray;\n }", "public static function get_services()\n {\n $ServicesObj = new Services();\n $Services = array();\n try {\n $stmt = $ServicesObj->read();\n $count = $stmt->rowCount();\n if ($count > 0) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $p = (object) array(\n \"ServiceID\" => (int) $ServiceID,\n \"ServiceName\" => $ServiceName,\n );\n\n array_push($Services, $p);\n }\n }\n return $Services;\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function getServices(): array;", "function getServices() {\n\t\t$results = \"\";\n\t\t$sql = 'SELECT * FROM Service';\n\n\t\t$results = queryDB($sql);\n\n\t\treturn $results;\n\t}", "public static function getServices(): array\n {\n return static::$services;\n }", "public function getServices()\r\n {\r\n if (is_null($this->_services)) {\r\n if ($this->getConfig('auto')) {\r\n $this->_services = array();\r\n $config = Mage::app()->getConfig();\r\n foreach (array('cache', 'full_page_cache', 'fpc') as $cacheType) {\r\n $node = $config->getXpath('global/' . $cacheType . '[1]');\r\n if (isset($node[0]->backend) && in_array((string)$node[0]->backend, array(\r\n 'Cm_Cache_Backend_Redis',\r\n 'Mage_Cache_Backend_Redis'\r\n ))) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__(str_replace('_', ' ', uc_words($cacheType))),\r\n $node[0]->backend_options->server,\r\n $node[0]->backend_options->port,\r\n $node[0]->backend_options->password,\r\n $node[0]->backend_options->database\r\n );\r\n }\r\n }\r\n // get session\r\n $node = $config->getXpath('global/redis_session');\r\n if ($node) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__('Session'),\r\n $node[0]->host,\r\n $node[0]->port,\r\n $node[0]->password,\r\n $node[0]->db\r\n );\r\n }\r\n } else {\r\n $this->_services = unserialize($this->getConfig('manual'));\r\n }\r\n }\r\n return $this->_services;\r\n }", "public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services.json\");\n }", "public static function get_services()\n {\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\CustomPostType::class,\n Base\\CustomMetaBox::class,\n Base\\Shortcode::class,\n Base\\Cron::class,\n ];\n }", "protected function getServicesList()\n {\n $servicesList = [];\n $services = $this->getInstalledServices();\n foreach ($services as $serviceType => $installedServices) {\n $servicesList[] = $this->getServiceTypeList($serviceType, $installedServices);\n }\n return $servicesList;\n }", "public function getAvailableServices()\n {\n return array_keys($this->_servicesConfig);\n }", "public static function get_services() {\n return [ \n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class,\n Base\\JsObjectsManager::class,\n Base\\ShortCodesManager::class\n ];\n }", "public function getAvailableServices();", "public function servicesArray()\n {\n return [\n self::PAINTING,\n self::TIRE,\n self::BODY_WORK,\n self::TO,\n self::WASHING,\n ];\n }", "function get_service_list() {\n\t\tglobal $wpdb;\n\t\t\n\t\t$services = $wpdb->get_results( \n\t\t\t\"\n\t\t\tSELECT ID, Title\n\t\t\tFROM cp_Categories\n\t\t\tWHERE 1\n\t\t\t\",\n\t\t\tARRAY_A\n\t\t);\n\t\t\n\t\treturn $services;\n\t}", "public static function get_services()\n {\n\n //підключаємо всі необхідні класи для активації через масив\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class\n ];\n }", "public function services($ignore_cache = false) {\n if ($this->services === null || $ignore_cache) {\n $this->services = StatusBoard_Service::allForSite($this);\n }\n \n return $this->services;\n }", "public static function get_services(): array\n {\n return [\n Base\\SettingsLinks::class,\n Pages\\Admin::class,\n Base\\Enqueue::class,\n CPT\\EmailCpt::class,\n ];\n }", "private function get_services() {\n\t\treturn [\n\t\t\tServices\\Language_Loader::class,\n\t\t\tServices\\Setup_Database::class,\n\t\t\tServices\\Scripts_And_Templates::class,\n\t\t\tServices\\Admin_Pages::class,\n\t\t\tServices\\Setup_Settings_Page::class,\n\t\t\tServices\\Loggers_Loader::class,\n\t\t\tServices\\Dropins_Loader::class,\n\t\t\tServices\\Setup_Log_Filters::class,\n\t\t\tServices\\Setup_Pause_Resume_Actions::class,\n\t\t\tServices\\Setup_Purge_DB_Cron::class,\n\t\t\tServices\\API::class,\n\t\t\tServices\\Dashboard_Widget::class,\n\t\t\tServices\\Network_Menu_Items::class,\n\t\t\tServices\\Plugin_List_Link::class,\n\t\t];\n\t}", "function AllServices(){\n return $this->db->get($this->service)->result();\n }", "public function services()\n {\n return $this->belongstomany(Service::class);\n }", "public function findServices(): array;", "protected function renderServicesList() {}", "public function getServices()\n\t\t{\n\n\t\t\t$service_id = $this->input->get('service_id') ;\n\t\t\techo json_encode($this->mdl_services->all()->result() ) ;\n\t\t}", "public function getAllowedServices()\n {\n return $this->allowed_services;\n }", "public function getServices()\n\t{\n\t\treturn ['card', 'topup_mobile', 'topup_mobile_post', 'topup_game'];\n\t}", "public function listsServicesGet()\r\n {\r\n $response = Services::with('regimen')->get();\r\n return response()->json($response,200);\r\n }", "public function getServices()\n {\n $services = OurService::select('id','title','slug','description','image')\n ->where('status','=',\\DB::raw(1))\n ->take(4)\n ->get();\n if($services->count()) {\n return $services;\n }\n\n return false;\n }", "public function getServices() {\n $serviceNames = $this->getServiceNames($this->serviceFolderPaths);\n $ret = $ret1 = array();\n// require_once AMFPHP_ROOTPATH.'Plugins/AmfphpDiscovery/CReflection.php';\n foreach ($serviceNames as $serviceName) {\n/* $methods = array();\n $objC = new CReflection(APP_PATH.'/app/controllers/'.$serviceName.'.php');\n $objComment = $objC->getDocComment();\n $arrMethod = $objC->getMethods();\n foreach ($arrMethod as $objMethods)\n {\n $methodComment = $objMethods->getDocComment();\n $parsedMethodComment = $this->parseMethodComment($methodComment);\n $arrParamenter = $objMethods->getParameters();\n foreach ($arrParamenter as $Paramenter)\n {\n $parameterInfo = new AmfphpDiscovery_ParameterDescriptor($Paramenter, '');\n $parameters[] = $parameterInfo;\n }\n $methods[$objMethods->_name] = new AmfphpDiscovery_MethodDescriptor($objMethods->_name, $parameters, $methodComment, $parsedMethodComment['return']);\n }\n\n $ret[$serviceName] = new AmfphpDiscovery_ServiceDescriptor($serviceName, $methods, $objComment); */\n $ret1[] = array('label'=>$serviceName,'date'=>'');\n }\n// var_dump($ret);exit();\n //note : filtering must be done at the end, as for example excluding a Vo class needed by another creates issues\n foreach ($ret as $serviceName => $serviceObj) {\n foreach (self::$excludePaths as $excludePath) {\n if (strpos($serviceName, $excludePath) !== false) {\n unset($ret[$serviceName]);\n break;\n }\n }\n }\n return $ret1;\n }", "public function getServices()\n {\n $services = InvoiceService::where('office_id', request('office_id'))->where('name', 'like', '%' . request('q') . '%')->get();\n\n return $services;\n }", "public static function get_services()\n {\n return [\n Pages\\Dashboard::class,\n Base\\Enqueue::class,\n Base\\SettingsLink::class,\n Base\\CustomPostTypeController::class,\n ];\n }", "function getServices() {\n $sql = 'SELECT * FROM services';\n\n $results = mysqli_query($GLOBALS['con'], $sql);\n\n if (mysqli_num_rows($results) > 0) {\n return $results;\n }\n }", "public function get_services($settings = FALSE)\n\t{\t\n\t\treturn parent::get_objects(array(\n\t\t\t'settings' => $settings\n\t\t));\n\t}", "public function getRequestedServices();", "public function services(): array\n {\n return \\array_merge(\n \\array_keys($this->_services),\n \\array_keys($this->aliases)\n );\n }", "public function shareService ()\n {\n \n $list = $this->services->findAll();\n return $list;\n }", "public function serviceInstances() {\n return StatusBoard_SiteService::allForSite($this); \n }", "public function getList()\n {\n return $this->call('GET', \"/shipping/services.json\");\n }", "public function get_safe_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services/safe.json\");\n }", "public function displayAllServices() {\n $services = $this->userServiceManager->getServices(null, true);\n $this->addCss(['search.css', 'forms.css']);\n $this->showView('service/allServices', [\n 'services' => $services,\n ]);\n }", "function getAllUsedServices()\n {\n $ret = array();\n foreach ($this->plugins as $name => $obj) {\n if ($obj->is_account) {\n if (isset($obj->DisplayName)) {\n $ret[$name] = $obj->DisplayName;\n } else {\n $ret[$name] = $name;\n }\n }\n }\n return $ret;\n }", "public function listServiceActv()\n {\n $actvServicio = ActividadServicio::orderBy('fechaFinalizacion', 'asc')\n ->get();\n return response()->json($actvServicio, 200);\n }", "public function index()\n {\t\t\n return ServicesResource::collection(Services::all());\n }", "private function _getServiceList()\n {\n Modules_CustomServices_DataLayer::init();\n $configs = Modules_CustomServices_DataLayer::loadServiceConfigurations();\n\n // Configs are objects, but the list view needs associative arrays.\n $config_to_array = function($config) {\n return [\n 'name' => '<a href=\"' . htmlspecialchars(pm_Context::getActionUrl('index', 'view') . '/id/' . urlencode($config->unique_id)) . '\">' . htmlspecialchars($config->display_name) . '</a>',\n 'type' => self::_configTypeName($config->config_type),\n 'plesk_service_id' => '<code>' . htmlspecialchars('ext-' . pm_Context::getModuleId() . '-' . $config->unique_id) . '</code>',\n 'run_as_user' => $config->run_as_user\n ];\n };\n $data = array_map($config_to_array, $configs);\n\n // Prepare the list for presentation.\n $list = new pm_View_List_Simple($this->view, $this->_request);\n $list->setData($data);\n $list->setColumns([\n 'name' => [\n 'title' => 'Name',\n 'noEscape' => TRUE,\n 'searchable' => TRUE,\n 'sortable' => TRUE\n ],\n 'type' => [\n 'title' => 'Type',\n 'noEscape' => FALSE,\n 'searchable' => FALSE,\n 'sortable' => FALSE\n ],\n 'plesk_service_id' => [\n 'title' => 'Service ID',\n 'noEscape' => TRUE,\n 'searchable' => TRUE,\n 'sortable' => FALSE\n ],\n 'run_as_user' => [\n 'title' => 'System user',\n 'noEscape' => FALSE,\n 'searchable' => TRUE,\n 'sortable' => TRUE\n ]\n ]);\n $list->setDataUrl(['action' => 'list-data']);\n $list->setTools([\n [\n 'title' => 'Add service (simple)',\n 'description' => 'Add a new service that wraps a process',\n 'class' => 'sb-add-new',\n 'link' => pm_Context::getActionUrl('index', 'add') . '/type/process'\n ],\n [\n 'title' => 'Add service (manual)',\n 'description' => 'Add a new manually controlled service',\n 'class' => 'sb-add-new',\n 'link' => pm_Context::getActionUrl('index', 'add') . '/type/manual'\n ]\n ]);\n return $list;\n }", "protected function getInstalledServices() {}", "public static function get_services($intState = 2) {\n\n\t\t$chrQuery = \"\n\t\t\tSELECT NagiosValue.idNagiosService AS idService\n\t\t\tFROM NagiosValue\n\t\t\tLEFT JOIN NagiosField ON NagiosValue.idNagiosField = NagiosField.idNagiosField\n\t\t\tWHERE NagiosField.chrName = ?\n\t\t\tAND NagiosValue.chrValue = ?\n\t\t\n\t\t\tORDER BY \n\t\t\t\t(SELECT NagiosValue.chrValue \n\t\t\t\tFROM NagiosValue\n\t\t\t\tLEFT JOIN NagiosField ON NagiosValue.idNagiosField = NagiosField.idNagiosField \n\t\t\t\tWHERE NagiosValue.idNagiosService = idService\n\t\t\t\tAND NagiosField.chrName = ?) DESC\n\t\t\";\n\t\t\n\t\t$objQuery = DB::prepare($chrQuery);\n\t\t\n\t\t$objQuery->execute(\n\t\t\tarray(\n\t\t\t\t'last_hard_state',\n\t\t\t\t$intState,\n\t\t\t\t'last_hard_state_change',\n\t\t\t)\n\t\t);\n\t\t\n\t\t$arrServices = array();\n\t\tforeach($objQuery->fetchAll() as $intCount => $arrResult){\n\t\t\t\n\t\t\t$objService = new NagiosService($arrResult['idService']);\n\t\t\n\t\t\tif($objService->getField('problem_has_been_acknowledged') != 0){\n\t\t\t\t# Problem has been acknowledged - skip it\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$arrServices[] = $arrResult['idService'];\n\t\t\t\n\t\t}\n\t\n\t\treturn $arrServices;\n\t\t\t\n\t}", "public function index()\n {\n return ServicesApi::collection($this->services->whereNull('deleted_at')->get());\n\n }", "public function getCasinoServices()\n {\n $query = \"SELECT ServiceID, ServiceName, Code, UserMode\n FROM ref_services WHERE ServiceID IN (8,9,10,11,12)\n AND Status = 1\";\n \n $command = $this->_connection->createCommand($query);\n $result = $command->queryRow();\n return $result;\n }", "function listServices()\n{\n global $LANG_ADMIN, $LANG_TRB, $_CONF, $_IMAGE_TYPE, $_TABLES;\n\n require_once $_CONF['path_system'] . 'lib-admin.php';\n\n $retval = '';\n\n $header_arr = array( # display 'text' and use table field 'field'\n array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false),\n array('text' => $LANG_TRB['service'], 'field' => 'name', 'sort' => true),\n array('text' => $LANG_TRB['ping_method'], 'field' => 'method', 'sort' => true),\n array('text' => $LANG_TRB['service_ping_url'], 'field' => 'ping_url', 'sort' => true),\n array('text' => $LANG_ADMIN['enabled'], 'field' => 'is_enabled', 'sort' => false)\n );\n\n $defsort_arr = array('field' => 'name', 'direction' => 'asc');\n\n $menu_arr = array (\n array('url' => $_CONF['site_admin_url'] . '/trackback.php?mode=editservice',\n 'text' => $LANG_ADMIN['create_new']),\n array('url' => $_CONF['site_admin_url'],\n 'text' => $LANG_ADMIN['admin_home']));\n\n $retval .= COM_startBlock($LANG_TRB['services_headline'], '',\n COM_getBlockTemplate('_admin_block', 'header'));\n\n $retval .= ADMIN_createMenu(\n $menu_arr,\n $LANG_TRB['service_explain'],\n $_CONF['layout_url'] . '/images/icons/trackback.' . $_IMAGE_TYPE\n );\n\n $text_arr = array(\n 'has_extras' => true,\n 'form_url' => $_CONF['site_admin_url'] . '/trackback.php',\n 'help_url' => getHelpUrl() . '#ping'\n );\n\n $query_arr = array(\n 'table' => 'pingservice',\n 'sql' => \"SELECT * FROM {$_TABLES['pingservice']} WHERE 1=1\",\n 'query_fields' => array('name', 'ping_url'),\n 'default_filter' => \"\",\n 'no_data' => $LANG_TRB['no_services']\n );\n\n // this is a dummy variable so we know the form has been used if all services\n // should be disabled in order to disable the last one.\n $form_arr = array('bottom' => '<input type=\"hidden\" name=\"serviceChanger\" value=\"true\"' . XHTML . '>');\n\n $retval .= ADMIN_list('pingservice', 'ADMIN_getListField_trackback',\n $header_arr, $text_arr, $query_arr, $defsort_arr,\n '', SEC_createToken(), '', $form_arr);\n $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));\n\n if ($_CONF['trackback_enabled']) {\n $retval .= freshTrackback ();\n }\n if ($_CONF['pingback_enabled']) {\n $retval .= freshPingback ();\n }\n\n return $retval;\n}", "protected function getServices() {\n\t\treturn [\n\t\t\tMessagesService::class,\n\t\t];\n\t}", "private function GetServices($_list)\n\t{\n\t\t//Get Database\n\t\t$_database = $this->ConnectDatabase();\n\t\t//Create Data\n\t\t$_data = array($_list);\n\t\t//Call and return Database Function\n\t\treturn $this->CallDatabase(\n\t\t\t$_database,\n\t\t\t$_data,\n\t\t\tfunction($_pdo, $_parameters)\n\t\t\t{\n\t\t\t\t$_cond = '(' . $_parameters[0] . ')';\n\n\t\t\t\t//Create Query\n\t\t\t\t$_query = $_pdo->prepare(\"\n\t\t\t\t\tSELECT \n\t\t\t\t\t\tid,\n\t\t\t\t\t\tname\n\t\t\t\t\tFROM `Services`\n\t\t\t\t\tWHERE `id` IN \" . $_cond\n\t\t\t\t);\n\t\t\t\t//Execute Query\n\t\t\t\t$_query->execute($_parameters);\n\n\t\t\t\t$_data = array();\n\t\t\t\twhile ($_row = $_query->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t\tarray_push($_data, $_row);\n\t\t\t\t}\n\t\t\t\treturn $_data;\n\t\t\t}\n\t\t);\n }", "public function getAllServiceItems()\n {\n $qbo = $this->container->get(\"numa.quickbooks\")->init();\n\n $ItemService = new \\QuickBooks_IPP_Service_Item();\n\n $qbItems = $ItemService->query($qbo->getContext(), $qbo->getRealm(), \"SELECT * FROM Item WHERE type='service' ORDER BY name \");\n $r = array();\n foreach ($qbItems as $item) {\n $r[$item->getName()] = $item->getName();\n }\n\n return $r;\n }", "public static function select_all_our_services()\n {\n $query = new Query;\n $services = $query->select(['core_products.*','core_product_categories.category_name','core_product_sub_categories.sub_category_name', 'core_product_models.model_name','core_product_categories.metric AS metric','core_product_images.*'])\n ->from('core_products')\n ->leftJoin('core_product_categories', 'core_product_categories.category_id=core_products.category_id')\n ->leftJoin('core_product_sub_categories', 'core_product_sub_categories.sub_category_id=core_products.sub_category_id')\n ->leftJoin('core_product_models', 'core_product_models.model_id=core_products.model_id')\n ->innerJoin('core_product_images', 'core_product_images.product_id=core_products.product_id')\n ->orderBy(['core_products.product_id' => SORT_DESC])\n ->groupBy('core_products.product_id')\n ->where(\"core_products.product_status = 1\")\n ->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->all();\n return $services;\n }", "public function listRunningServices( $sensorID)\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/\".$sensorID.\"/services.json\");\n\t\t$data = $data->{'services'};\n\t\t$serviceArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$serviceArray->append(new Service($data[$i], $this));\n\t\t}\n\t\treturn $serviceArray;\n }", "public function get_registered_services() {\n\t\t$data = [];\n\t\t$res = self::$dbo->query( 'SELECT storage_service FROM snapshot_storage_credentials' );\n\t\twhile ( $row = $res->fetchArray() ) {\n\t\t\t$data[] = $row['storage_service'];\n\t\t}\n\n\t\treturn $data;\n\t}", "public function getList()\n {\n $query = (new Query());\n $query->select(['services.id as id, services.name as name, COUNT(orders.id) as count'])\n ->from('services')\n ->rightJoin('orders', '`orders`.`service_id` = `services`.`id`');\n\n $this->filter($query);\n\n return $query->groupBy('orders.service_id')\n ->all();\n }", "public function getServices()\n\t{\n\t\t$senddata= array();\n\t\t$finalsenddata= array();\n\t\t$services = Contactuspage::get()->toArray();\n\t\tforeach($services as $key=>$service)\n\t\t{\n\t\t\t$senddata['id'] \t\t\t= $service['id'];\n\t\t\t$senddata['title'] \t\t\t= $service['title'];\n\t\t\t$senddata['content'] \t\t= $service['content'];\n\t\t\tarray_push($finalsenddata,$senddata);\n\t\t}\n\t\t$siteSettings = SiteSettings::find(1)->toArray();\n\t\t$data['status'] = 1;\n\t\t$data['msg'] = 'Successfull.';\n\t\t$data['heading_text'] = $siteSettings['service_header'];\n\t\t$data['data'] = $finalsenddata;\n\t\techo json_encode($data);\n\t}", "public function client_all_services(){\n $service = Service::where('user_id',Auth::user()->id)->where('status', 0)->get();\n //dd($service);\n return view('admin.pages.client_services.all_services', compact('service'));\n }", "protected function getInstalledServices()\n {\n $filteredServices = [];\n foreach ($GLOBALS['T3_SERVICES'] as $serviceType => $serviceList) {\n // If the (first) key of the service list is not the same as the service type,\n // it's a \"true\" service type. Keep it and sort it.\n if (key($serviceList) !== $serviceType) {\n uasort($serviceList, [$this, 'sortServices']);\n $filteredServices[$serviceType] = $serviceList;\n }\n }\n return $filteredServices;\n }", "public function getServicesCount()\n {\n return $this->count(self::services);\n }", "final public function getServices()\n {\n if (is_null($this->serviceProviders)) {\n $this->serviceProviders = $this->getServiceProviders();\n }\n\n return $this->serviceProviders;\n }", "public function getServices() {\n\t\t$user = $this->auth->user();\n\n\t\tif(!$user) {\n\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\"code\" => 401,\n\t\t\t\t\"message\" => \"Permisos denegados para el cliente\",\n\t\t\t\t\"response\" => null\n\t\t\t]);\n\t\t} else {\n\t\t\t$services = ServicesOrder::join('user_addresses', 'user_addresses.id', '=', 'services_orders.address')\n\t\t\t\t->where('services_orders.id_client', $user->id)\n\t\t\t\t->where('services_orders.status', '!=', 6)\n\t\t\t\t->get(['services_orders.*', 'user_addresses.address', 'user_addresses.latitude', 'user_addresses.longitude']);\n\n\t\t\tif($services->count()) {\n\t\t\t\tforeach($services as $key => $service) {\n\t\t\t\t\t$documents = ServicesDocuments::join('documents', 'documents.id', '=', 'services2documents.document_id')->where('service_id', $service->id)->get(['documents.id', 'folio', 'location', 'type', 'alias', 'notes', 'subtype', 'picture_path', 'expedition', 'expiration', 'documents.created_at']);\n\t\t\t\t\t$services[$key]->documents = $documents;\n\t\t\t\t}\n\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 200,\n\t\t\t\t\t\"message\" => \"Listado de servicios\",\n\t\t\t\t\t\"response\" => array(\"services\" => $services)\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn CustomResponsesHandler::response([\n\t\t\t\t\t\"code\" => 202,\n\t\t\t\t\t\"message\" => \"No se encontraron servicios\",\n\t\t\t\t\t\"response\" => null\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function listHostedServices()\n {\n \t$response = $this->_performRequest(self::OP_HOSTED_SERVICES);\n\n \tif ($response->isSuccessful()) {\n\t\t\t$result = $this->_parseResponse($response);\n\n \t\tif (!$result->HostedService) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t if (count($result->HostedService) > 1) {\n \t\t $xmlServices = $result->HostedService;\n \t\t} else {\n \t\t $xmlServices = [$result->HostedService];\n \t\t}\n\n\t\t\t$services = [];\n\t\t\tif (!is_null($xmlServices)) {\n\n\t\t\t\tfor ($i = 0; $i < count($xmlServices); $i++) {\n\t\t\t\t\t$services[] = new Zend_Service_WindowsAzure_Management_HostedServiceInstance(\n\t\t\t\t\t (string)$xmlServices[$i]->Url,\n\t\t\t\t\t (string)$xmlServices[$i]->ServiceName\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $services;\n\t\t} else {\n\t\t\trequire_once 'Zend/Service/WindowsAzure/Management/Exception.php';\n\t\t\tthrow new Zend_Service_WindowsAzure_Management_Exception($this->_getErrorMessage($response, 'Resource could not be accessed.'));\n\t\t}\n }", "public function fetchClientServicesAction()\n {\n $this->view->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n $clientId = $this->getRequest()->getParam( 'client_id', null );\n\n $output = array(\n 'services' => '-'\n );\n\n if ( $clientId > 0 )\n {\n $clientMapper = new Application_Model_ClientMapper();\n $client = $clientMapper->fetchRow( $clientMapper->select()->where( 'id = ?', $clientId ) );\n $services = $client->getAllServices();\n $output['services'] = $this->view->partial( 'job/_partials/_services.phtml', 'default', array( 'services' => $services, 'clientId' => $clientId ) );\n }\n\n echo json_encode( $output );\n }", "public function services()\n {\n $services_active = true;\n\n $display_status_id = config('contants.display_status_display');\n $feedbacks = $this->feedback_services->allWithDisplayStatus($display_status_id);\n\n return view('client.services', compact('feedbacks', 'services_active'));\n }", "public function index()\n {\n $services = Service::\n orderBy('status', 'asc')->\n orderBy('created_at', 'desc')->\n paginate(10);\n\n return view('services.services', compact('services'));\n }", "public function getAllServices_crm() {\r\n\t\t$billingServicesObj = new billing_SERVICES();\r\n $services = $billingServicesObj->getAllServiceDataForActiveServices();\r\n foreach ($services as $key=>$val) {\r\n if (strpos($val[\"SERVICEID\"], 'M') && $val[\"SERVICEID\"] != 'M3' && $val[\"SERVICEID\"] != 'M') {\r\n \tunset($services[$key]);\r\n }\r\n }\r\n return $services;\r\n }", "public function getDeferredServices(): array\n {\n return $this->deferredServices;\n }", "public function listAvailableServices( $sensorID)\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/\".$sensorID.\"/services/available.json\");\n\t\t$data = $data->{'services'};\n\t\t$serviceArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$serviceArray->append(new Service($data[$i], $this));\n\t\t}\n\t\treturn $serviceArray;\n }", "protected function index() {\n\t\t$service = new Model_Service();\n\t\t//$service->set('active',true);\n\t\t$this->payload->services = $service->find();\n\t}", "public function getDeclaredServices(): array\n {\n return [\n // Service id, optional class name, tag\n ['best_it_contentful.markdown.twig_extension', MarkdownExtension::class, 'twig.extension'],\n ['best_it_contentful.contentful.twig_extension', ContentfulExtension::class, 'twig.extension'],\n ['best_it_contentful.delivery.cache.reset_service', CacheResetService::class],\n ['best_it_contentful.delivery.client', ClientDecorator::class],\n ['best_it_contentful.markdown.parser', MarkdownParser::class],\n ['best_it_contentful.delivery.response_parser.default', SimpleResponseParser::class]\n ];\n }", "public function getServices($id) {\n $dql = \"SELECT se FROM Service se\n JOIN se.serviceType st\n WHERE st.id = :id\";\n $services = $this->em->createQuery($dql)\n ->setParameter('id', $id)\n ->getResult();\n return $services;\n }", "public function getServerList() {}", "function listarServicios()\n\t{\n\t\treturn \"select servicios.servicio_id,servicios.nombre_servicio, servicios.estado_servicio, servicios.descripcion, servicios.fecha_creacion,\n trabajadores.nombre,\nsucursales.nombre_sucursal\nfrom trabajadores, servicios,sucursales where servicios.trabajador_id = trabajadores.trabajador_id \nand servicios.estado_servicio = 1 \nand servicios.sucursal_id = sucursales.sucursal_id\";\n\t}", "public function index()\n {\n return $this->service->list();\n }", "protected function get_service_classes(): array {\n\t\treturn [];\n\t}", "public function services(): ServicesContract;", "public function serviceSelectAll(){\n $data = $this->getDataAccessObject()->daoSelectAll();\n return $data;\n }", "public function index()\n {\n return Service::all();\n }", "public function getServices(string $type): array\n {\n return $this->services[$type] ?? [];\n }", "public function get_servicios(){\n\t\t$query = $this->db->get('servicios');\n\t\treturn $query->result_array();\n\t}", "public function getList()\n {\n $service = list_services::all();\n return view('page.services',compact('service'));\n }", "public function listedesservicesAction()\r\n {\r\n $tservices = new Pits_Model_DbTable_TServicesplaces();\r\n $select = $tservices->select();\r\n $adapter = new Zend_Paginator_Adapter_DbTableSelect($select);\r\n $paginator = new Zend_Paginator($adapter);\r\n $paginator->setItemCountPerPage(10);\r\n $paginator->setCurrentPageNumber($this->view->page = $this->getRequest()->getParam('page', 1));\r\n $this->view->services = $paginator;\r\n }", "function listarServiciosTerminados()\n\t{\n\t\treturn \"select servicios.servicio_id,servicios.nombre_servicio, servicios.estado_servicio, servicios.descripcion, servicios.fecha_creacion,\n trabajadores.nombre,\nsucursales.nombre_sucursal\nfrom trabajadores, servicios,sucursales where servicios.trabajador_id = trabajadores.trabajador_id \nand servicios.estado_servicio = 0 \nand servicios.sucursal_id = sucursales.sucursal_id\";\n\t}", "public function waitservicelistAction()\n {\n\n $uid = $this->_USER_ID;\n $floorId = $this->getParam('CF_floorid');\n\n $mbllApi = new Mbll_Tower_ServiceApi($uid);\n $aryRst = $mbllApi->getWaitServiceList($floorId);\n\n if (!$aryRst || !$aryRst['result']) {\n $errParam = '-1';\n if (!empty($aryRst['errno'])) {\n $errParam = $aryRst['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n\n //service list info\n $waitServiceList = $aryRst['result']['list'];\n\n foreach ($waitServiceList as $key => $value) {\n $guest = Mbll_Tower_GuestTpl::getGuestDescription($value['tp']);\n //guest name\n $guestName = explode(\"|\", $guest['des']);\n $waitServiceList[$key]['name'] = $guestName[0];\n //need item\n $needItem = Mbll_Tower_ItemTpl::getItemDescription($value['ac']);\n $waitServiceList[$key]['ac_name'] = $needItem['name'];\n //mood picture\n $waitServiceList[$key]['moodPic'] = round($value['ha']/10)*10;\n\n $waitServiceList[$key]['ha_emoj'] = Mbll_Tower_Common::getMoodDesc($value['ha']);\n //leave time\n $waitServiceList[$key]['remain_hour'] = floor(($value['ot'] - $value['ct'])/3600);\n $waitServiceList[$key]['remain_minute'] = strftime('%M', $value['ot'] - $value['ct']);\n }\n\n $this->view->waitServiceList = $waitServiceList;\n $this->view->countService = count($waitServiceList);\n $this->view->floorid = $floorId;\n $this->render();\n }", "public static function getServices($user=null) {\n\t\tif ($user!=null)\t$portlist=$user->getRol()->getServices();\n\t\telse \t\t\t\t\t$portlist=$this->getDoctrine()->getRepository(Service::class)->findAll();\n\t\t$data=array(\"total\"=>count($portlist),\"rows\"=>array());\n\t\tforeach($portlist as $port) {\n\t\t\t$row=array(\"id\"=>$port->getId(), \"port\"=>$port->getPort(), \"name\"=>$port->getName());\n\t\t\t$data[\"rows\"][]=$row;\n\t\t}\n\t\treturn $data;\n\t}", "public function getServiceCatalog()\n {\n $sourcePID = $this->getSystemSetting(\"reference-pid\");\n $servicesData = \\REDCap::getData($sourcePID, 'array');\n\n return $servicesData;\n }", "public function getServers() {\n\t\treturn $this->dbHandler->getAllServer();\n\t}", "function serviceList(&$smartyServiceList,$abcBar=false,$searchBox=false,$topList=false) {\n\t\t//\tfunction makeServiceListQuery($char=all,$limit=true,$count=false) {\n\t\t$query = $this->makeServiceListQuery($this->piVars['char']);\n\t\tif (!$query) {\n\t\t\treturn false;\n\t\t}\n\t\t$res = $GLOBALS['TYPO3_DB']->sql(TYPO3_db,$query);\n\n\t\t$row_counter = 0;\n\n\t\t// WS-VERSIONING: collect all new records and place them at the beginning of the array!\n\t\t// the new records have no name in live-space and therefore would be delegated\n\t\t// to the very end of the list through the order by clause in function makeServiceListQuery....\n\t\t$eleminated_rows=0;\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t{\n\t\t\t// WS-VERSIONING: get the Preview from the Core!!!!\n\t\t\t// copied from tt_news\n\t\t\t// the function versionOL() in /t3lib/class.t3lib_page.php does\n\t\t\t// the rendering of the version records for preview.\n\t\t\t// i.e. a new, not yet published record has the name ['PLACEHOLDER'] and is hidden in live-workspace,\n\t\t\t// class.t3lib_page.php replaces the fields in question with content from its\n\t\t\t// version-workspace-equivalent for preview purposes!\n\t\t\t// for it to work the result must also contain the records from live-workspace which carry the hidden-flag!!!\n\t\t\tif ($this->versioningEnabled) {\n\t\t\t\t// remember: versionOL generates field-list and cannot handle aliases!\n\t\t\t\t// i.e. there must not be any aliases in the query!!!\n\t\t\t\t$GLOBALS['TSFE']->sys_page->versionOL('tx_civserv_service',$row);\n\n\t\t\t\tif($this->previewMode){\n\t\t\t\t\t$row['realname']=$row['sv_name'];\n\t\t\t\t\t$row['name']=$row['realname'];\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(is_array($row)){\n\t\t\t\t$services[$row_counter]['uid']=$row['uid']; //needed for preview-sorting see below\n\t\t\t\t$services[$row_counter]['t3ver_state']=$row['t3ver_state'];\n\t\t\t\t$services[$row_counter]['fe_group']=$row['fe_group'];\n\t\t\t\t// customLinks will only work if there is an according rewrite-rule in action!!!!\n\t\t\t\tif(!$this->conf['useCustomLinks_Services']){\n\t\t\t\t\t$services[$row_counter]['link'] = htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'service',id => $row['uid']),$this->conf['cache_services'],1));\n\t\t\t\t}else{\n\t\t\t\t\t$services[$row_counter]['link'] = strtolower($this->convert_plus_minus(urlencode($this->replace_umlauts($this->strip_extra($row['realname'].\"_\".$row['uid']))))).\".html\";\n\t\t\t\t}\n\t\t\t\tif ($row['name'] == $row['realname']) {\n\t\t\t\t\t$services[$row_counter]['name'] = $row['name'];\n\t\t\t\t} else {\n\t\t\t\t\t// this will only happen in LIVE context\n\t\t\t\t\t$services[$row_counter]['name'] = $row['name'] . ' (= ' . $row['realname'] . ')';\n\t\t\t\t}\n\t\t\t\t// mark the version records for the FE, could be done by colour in template as well!\n\t\t\t\tif($row['_ORIG_pid']==-1 && $row['t3ver_state']==0){ // VERSION records\n\t\t\t\t\t$services[$row_counter]['name'].=\" DRAFT: \".$row['uid'];\n\t\t\t\t\t$services[$row_counter]['preview']=1;\n\t\t\t\t}elseif($row['_ORIG_pid']==-1 && $row['t3ver_state']==-1){ // NEW records\n\t\t\t\t\t$services[$row_counter]['name'].=\" NEW: \".$row['uid'];\n\t\t\t\t\t$services[$row_counter]['preview']=1;\n\t\t\t\t}else{\n\t\t\t\t\t// LIVE!!\n\t\t\t\t\t#$services[$row_counter]['name'].= \" \".$row['uid'];\n\t\t\t\t}\n\n\n\t\t\t\t//for the online_service list we want form descr. and service picture as well.\n\t\t\t\tif($this->piVars['mode'] == \"online_services\"){\n\t\t\t\t\t$res_online_services = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(\n\t\t\t\t\t\t'tx_civserv_form.fo_descr,\n\t\t\t\t\t\t tx_civserv_service.sv_image,\n\t\t\t\t\t\t tx_civserv_service.sv_image_text',\n\t\t\t\t\t\t'tx_civserv_service',\n\t\t\t\t\t\t'tx_civserv_service_sv_form_mm',\n\t\t\t\t\t\t'tx_civserv_form',\n\t\t\t\t\t\t' AND tx_civserv_service.uid = ' . $row['uid'] .\n\t\t \t\t\t\t $this->cObj->enableFields('tx_civserv_form').\n\t\t\t\t\t\t' AND tx_civserv_form.fo_status >= 2',\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t'');\n\n\n\t\t\t\t\tif ($online_sv_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_online_services) ) { //we only accept one online-form per service!!!!\n\t\t\t\t\t\t$imagepath = $this->conf['folder_organisations'] . $this->community['id'] . '/images/';\n\t\t\t\t\t\t#function getImageCode($image,$path,$conf,$altText)\t{\n\t\t\t\t\t\t$imageCode = $this->getImageCode($online_sv_row['sv_image'],$imagepath,$this->conf['service-image.'],$online_sv_row['sv_image_text']);\n\t\t\t\t\t\t$services[$row_counter]['descr']=$online_sv_row['fo_descr'];\n\t\t\t\t\t\t$services[$row_counter]['image']=$imageCode;\n\t\t\t\t\t\t$services[$row_counter]['image_text']=$online_sv_row['sv_image_text'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// highlight_external services in list view!! (works only if function makeServiceListQuery returns pid-value!)\n\t\t\t\t$mandant = t3lib_div::makeInstanceClassName('tx_civserv_mandant');\n\t\t\t\t$mandantInst = new $mandant();\n\t\t\t\t$service_community_id= $mandantInst->get_mandant($row['pid']);\n\t\t\t\t$service_community_name = $mandantInst->get_mandant_name($row['pid']);\n\t\t\t\tif($this->community['id'] != $service_community_id){\n\t\t\t\t\t$services[$row_counter]['name'] .= \" <i> - \".$service_community_name.\"</i>\";\n\t\t\t\t}\n\t\t\t\t$row_counter++;\n\t\t\t}else{\n\t\t\t\t// NULL-rows (obsolete)\n\t\t\t\t$eleminated_rows++;\n\t\t\t}\n\t\t} //end while\n\n\n\t\tif($this->previewMode){\n\t\t\t// we need to re_sort the services_array in order to incorporate the\n\t\t\t// new services which appear at the very end (due to \"order by name\" meets \"[PLACEHOLDER]\")\n\n\t\t\t#http://forum.jswelt.de/serverseitige-programmierung/10285-array_multisort.html\n\t\t\t#http://www.php.net/manual/en/function.array-multisort.php\n\t\t\t#http://de.php.net/array_multisort#AEN9158\n\n\t\t\t//found solution here:\n\t\t\t#http://www.php-resource.de/manual.php?p=function.array-multisort\n\n\t\t\t$lowercase_uids=array();\n\t\t\t//ATTENTION: multisort is case sensitive!!!\n\t\t\tfor($i=0; $i<count($services); $i++){\n\t\t\t\t$name=$services[$i]['name'];\n\t\t\t\t// service-name starts with lowercase letter\n\t\t\t\tif(strcmp(substr($name,0,1), strtoupper(substr($name,0,1)))>0){\n\t\t\t\t\t// make it uppercase\n\t\t\t\t\t$services[$i]['name']=strtoupper(substr($name,0,1)).substr($name,1,strlen($name));\n\t\t\t\t\t// remember which one it was you manipulated\n\t\t\t\t\t$lowercase_uids[]=$services[$i]['uid'];\n\t\t\t\t}\n\t\t\t\t$sortarray[$i] = $services[$i]['name'];\n\t\t\t}\n\n\t\t\t// DON'T! or else multisort won't work! (must be something about keys and indexes??)\n\t\t\t# natcasesort($sortarray);\n\n\t\t\t// $services is sorted by $sortarray as in SQL \"ordery by name\"\n\t\t\t// $sortarray itself gets sorted by multisort!!!\n\t\t\tif(is_array($sortarray) && count($sortarray)>0){\n\t\t\t\tarray_multisort($sortarray, SORT_ASC, $services);\n\t\t\t}\n\n\t\t\tfor($i=0; $i<count($services); $i++){\n\t\t\t\t$name=$services[$i]['name'];\n\t\t\t\t// reset the converted service-names to their initial value (lowercase first letter)\n\t\t\t\tif(in_array($services[$i]['uid'],$lowercase_uids)){\n\t\t\t\t\t$services[$i]['name']=strtolower(substr($name,0,1)).substr($name,1,strlen($name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// Retrieve the service count\n\t\t$row_count = 0;\n\t\t//\tfunction makeServiceListQuery($char=all,$limit=true,$count=false) {\n\t\t$query = $this->makeServiceListQuery($this->piVars['char'],false,true);\n\t\t$res = $GLOBALS['TYPO3_DB']->sql(TYPO3_db,$query);\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$row_count += $row['count(*)'];\n\t\t}\n\n\t\t$row_count = $row_count-$eleminated_rows;\n\t\t$this->internal['res_count'] = $row_count;\n\n\t\tif(!$this->previewMode){\n\t\t\t$this->internal['results_at_a_time']= $this->conf['services_per_page'];\n\t\t}else{\n\t\t\t$this->internal['results_at_a_time']=10000; //in Preview Mode we need ALL records - new ones from the end of the alphabethical list are to be included!!!\n\t\t}\n\n\t\t$this->internal['maxPages'] = $this->conf['max_pages_in_pagebar'];\n\n\n\t\t$smartyServiceList->assign('services', $services);\n\n\t\tif ($abcBar) {\n\t\t\t$query = $this->makeServiceListQuery(all,false);\n\t\t\t$smartyServiceList->assign('abcbar',$this->makeAbcBar($query));\n\t\t}\n\t\t$smartyServiceList->assign('heading',$this->getServiceListHeading($this->piVars['mode'],intval($this->piVars['id'])));\n\n\n\t\t// if the title is set here it will overwrite the value we want in the organisationDetail-View\n\t\t// but we do need it for circumstance and user_groups!\n\t\t$GLOBALS['TSFE']->page['title'] = $this->getServiceListHeading($this->piVars['mode'],intval($this->piVars['id']));\n\n\t\tif($this->piVars['char']>''){\n\t\t\t $GLOBALS['TSFE']->page['title'] .= ': '.$this->pi_getLL('tx_civserv_pi1_service_list.abc_letter','Letter').' '.$this->piVars['char'];\n\t\t}\n\n\t\tif ($searchBox) {\n\t\t\t//$_SERVER['REQUEST_URI'] = $this->pi_linkTP_keepPIvars_url(array(mode => 'search_result'),0,1); //dropped this according to instructions from security review\n\t\t\t$smartyServiceList->assign('searchbox', $this->pi_list_searchBox('',true));\n\t\t}\n\n\t\tif ($topList) {\n\t\t\tif (!$this->calculate_top15($smartyServiceList,false,$this->conf['topCount'])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t//test bk: the service_list template is being used by several modes, change the subheading in accordance with the modes!!!\n\t\tif($this->piVars['mode'] == 'organisation')$smartyServiceList->assign('subheading',$this->pi_getLL('tx_civserv_pi1_service_list.available_services','Here you find the following services'));\n\t\t$smartyServiceList->assign('pagebar',$this->pi_list_browseresults(true,'', ' '.$this->conf['abcSpacer'].' '));\n\n\t\treturn true;\n\t}", "function services (){\n // \n //Get the selected destination \n if(isset($_REQUEST['attraction'])){\n $attraction=$_REQUEST['attraction'];\n }\n //\n //Die if no destination is provided\n else{\n throw new Exception(\"No attraction found\");\n }\n //\n //\n //return the attractions using the destination primary key\n $sql= $this->chk(\n \"SELECT \n services.services,\n services.name,\n attraction.attraction\n FROM \n services \n Inner Join \n atservice on atservice.services=services.services\n Inner Join\n attraction on atservice.attraction=attraction.attraction\n WHERE \n `attraction`.`attraction` = $attraction\"\n );\n // \n $service= $this->sqlData($sql);\n echo ($service); \n }" ]
[ "0.8080548", "0.75776476", "0.75776476", "0.75776476", "0.75444704", "0.75444704", "0.74481744", "0.7399029", "0.736209", "0.7200411", "0.71679336", "0.7080594", "0.70667094", "0.6993931", "0.69681054", "0.69099975", "0.6899074", "0.6889862", "0.6847158", "0.67877805", "0.67370576", "0.67324317", "0.67261285", "0.6723409", "0.6715947", "0.6692131", "0.66706204", "0.66639256", "0.6663653", "0.6642494", "0.66233593", "0.66104853", "0.6610027", "0.6565051", "0.6561071", "0.653863", "0.6525421", "0.6514097", "0.64656335", "0.6460232", "0.6456266", "0.64357626", "0.6405884", "0.6399234", "0.6381377", "0.63596624", "0.6353821", "0.6304281", "0.629479", "0.625647", "0.6245041", "0.62336314", "0.62142754", "0.6193862", "0.6193338", "0.6183442", "0.6148219", "0.61461514", "0.61413753", "0.6139939", "0.61288005", "0.61219066", "0.6110951", "0.61038065", "0.6089702", "0.6089291", "0.6088684", "0.6083984", "0.60663396", "0.60659385", "0.60070103", "0.59966046", "0.5991519", "0.59877044", "0.5985224", "0.59523565", "0.5932487", "0.58548355", "0.5849345", "0.5840702", "0.5840514", "0.58294517", "0.58245945", "0.58171463", "0.5813267", "0.579827", "0.57964873", "0.5792289", "0.5783499", "0.5780189", "0.57757235", "0.57751334", "0.57700354", "0.57601464", "0.5759799", "0.575672", "0.5746503", "0.5746147", "0.5714949", "0.57120126" ]
0.76281357
1
/! \brief Returns an image for the service status. Used in the service list class.
static function filterServiceStatus($a, $b, $c, $d) { $img = ""; if (isset($d['0'])) { switch ($d[0]) { case 'stopped': $img = 'geticon.php?context=status&icon=task-stopped&size=16'; break; case 'running': $img = 'geticon.php?context=status&icon=task-running&size=16'; break; } } if (!empty($img)) { return '<img src=\''.$img.'\'>'; } return "&nbsp;"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getImageStatus()\n \t{\n \t\tswitch ($this->status) {\n \t\t\tcase self::STATUS_ACTIVE: \n \t\t\t\treturn Yii::app()->theme->baseUrl.'/images/enable.png';\n \t\t\t\tbreak;\n \t\t\tcase self::STATUS_PENDING:\n \t\t\t\treturn Yii::app()->theme->baseUrl.'/images/disable.png';\n \t\t\t\tbreak;\n \t\t}\t\n \t}", "function getStatusImage(){\r\n\t\t$retval=\"gray.gif\";\r\n\t\tswitch ($this->status) {\r\n\t\t\tcase 0: $retval = \"black.gif\";break;\r\n\t\t\tcase 1: $retval = \"red.gif\";break;\r\n\t\t\tcase 2: $retval = \"orange.gif\";break;\r\n\t\t\tcase 3: $retval = \"yellow.gif\";break;\r\n\t\t\tcase 4: $retval = \"lila.gif\";break;\r\n\t\t\tcase 5: $retval = \"green.gif\";break;\r\n\t\t\tdefault: $retval=\"gray.gif\";\r\n\t\t}\r\n\t\treturn $retval;\r\n\t}", "public function getServiceImage($service) {\n\t\t$img_loc_name = \"dummy_\" .$service. \"_\" . LANGUAGE . \".png\";\n\t\t$img_def_name = \"dummy_\" .$service. \".png\";\n\t\t// Check if a localized image exists otherwise fall back to default\n\t\tif ( file_exists( DIR_BASE . '/' . DIRNAME_PACKAGES . '/' . $this->pkgHandle . '/' . $this->img_dir . $img_loc_name ) ) {\n\t\t\t$dummyImg = DIR_REL . '/' . DIRNAME_PACKAGES . '/' . $this->pkgHandle . '/' . $this->img_dir . $img_loc_name;\n\t\t} elseif ( file_exists( DIR_BASE . '/' . DIRNAME_PACKAGES . '/' . $this->pkgHandle . '/' . $this->img_dir . $img_def_name ) ) {\n\t\t\t$dummyImg = DIR_REL . '/' . DIRNAME_PACKAGES . '/' . $this->pkgHandle . '/' . $this->img_dir . $img_def_name;\n\t\t} else {\n\t\t\t$dummyImg = \"\";\n\t\t}\n\t\treturn $dummyImg;\n\t}", "function translate_status_into_img($status, $type, $size = 16)\r\n\t{\r\n\t\t$statut_str = '';\r\n\t\t$statut = Sql::get_row_from_query(sprintf(\"SELECT name, icon FROM \" . TABLES__STATUTS . \" WHERE statut = '%d' AND type = '%s'\", $status, $type));\r\n\t\tif (!empty($statut))\r\n\t\t{\r\n\t\t\t$statut_str = '<img src=\"' . ROOT_PATH . 'core/images/icons/' . $statut['icon'] . '_' . $size . 'x' . $size . '.png\" alt=\"' . $statut['name'] . '\" title=\"' . $statut['name'] . '\" style=\"vertical-align:middle;\" />';\r\n\t\t}\r\n\t\treturn $statut_str;\r\n\t}", "public function status_cls($status){\n\t\tif($status == '1'){\n\t\t $stat = 'img/active.png';\n\t\t}else{\t\n\t\t $stat = 'img/inactive.png';\t\n\t\t}\n\t\treturn $stat;\n\t}", "function translate_status_into_img_and_text($status, $type, $size = 16)\r\n\t{\r\n\t\t$statut_str = '';\r\n\t\t$statut = Sql::get_row_from_query(sprintf(\"SELECT name, icon FROM \" . TABLES__STATUTS . \" \r\n\t\tWHERE statut = '%d' AND type = '%s'\", $status, $type));\r\n\t\tif (!empty($statut))\r\n\t\t{\r\n\t\t\t$statut_str = '<img src=\"' . ROOT_PATH . 'core/images/icons/' . $statut['icon'] . '_' . $size . 'x' . $size . '.png\" title=\"' . $statut['name'] . '\" align=\"left\" style=\"margin-right:5px;\" /> '.$statut['name'];\r\n\t\t}\r\n\t\treturn $statut_str;\r\n\t}", "function statusIcon() {\n\t\t// published, draft\n\t\t// page_white_clock.png\n\t\t// page_white_edit.png\n\n\t\tswitch ($this->status) {\n\t\t\tcase 'published':\n\t\t\t\t// varit, eller ska bli, publicerad?\n\t\t\t\t// $datePublish $dateUnpublish\n\t\t\t\tif ($this->isPublished()) {\n\t\t\t\t\treturn POLARBEAR_WEBPATH . 'images/silkicons/page_white_text.png';\n\t\t\t\t} else {\n\t\t\t\t\treturn POLARBEAR_WEBPATH . 'images/silkicons/page_white_text_clock.png';\n\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 'draft':\n\t\t\t\treturn POLARBEAR_WEBPATH . 'images/silkicons/page_white_text_edit.png';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn POLARBEAR_WEBPATH . 'images/silkicons/page_white_text.png';\n\t\t}\n\t\t\n\t}", "public function getJobStatus() {\r\n\t\t$status = array();\r\n\t\t\t$status[0] = snappy_image('icons/cross.png') . 'Canceled';\r\n\t\t\t$status[1] = snappy_image('icons/bullet_yellow.png'). 'Inprogress';\r\n\t\t\t$status[2] = snappy_image('icons/tick.png'). 'Completed';\r\n\t\treturn $status; //array\r\n\t}", "function VM_statusIcons($param)\n{\n\t//Exit the function if the client has nox VMs\n\tif ($param['vmRole'] == VM_ROLE_NONE)\n\t\treturn(\"\");\n\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t$html = \"\";\n\n\t//Array with status icon and description for the virtualsiation soulutions on host and guest.\n\t$imgA['VM_ROLE_HOST']['VM_SW_VBOX'][0] = \"vm-server-vbox-mini.png\";\n\t$imgA['VM_ROLE_HOST']['VM_SW_VBOX'][1] = $I18N_VMServerVBox;\n\t$imgA['VM_ROLE_HOST']['VM_SW_VBOX'][2] = \"index.php?page=clientsoverview&vmRunOnHost=$param[id]\";\n\n//\t$imgA['VM_ROLE_HOST']['VM_SW_KVM'][0] = \"vm-server-mini.png\";\n\t$imgA['VM_ROLE_GUEST']['VM_SW_VBOX'][0] = \"vm-client-vbox-mini.png\";\n\t$imgA['VM_ROLE_GUEST']['VM_SW_VBOX'][1] = $I18N_VMClientVBox;\n\t$imgA['VM_ROLE_GUEST']['VM_SW_VBOX'][2] = \"index.php?page=clientdetails&client=$param[client]&id=$param[id]#virtualisation\";\n\n\t//Run thru all known roles\n\tforeach (array_keys($imgA) as $role)\n\t{\n\t\t//Check if the client is in a special role\n\t\tif (($param['vmRole'] & $role) == $role)\n\t\t\t//Check if the client uses a special virtualisation software in this rule\n\t\t\tforeach (array_keys($imgA[$role]) as $vmSW)\n\t\t\t\t//Choose the icon and title by role and virtualisation software\n\t\t\t\tif (($param['vmSoftware'] & $vmSW) == $vmSW)\n\t\t\t\t\t$html .= '<a href=\"'.$imgA[$role][$vmSW][2].'\"><img src=\"/gfx/'.$imgA[$role][$vmSW][0].'\" title=\"'.$imgA[$role][$vmSW][1].'\" border=0></a> ';\n\t}\n\treturn($html);\n}", "function VM_convertSwitchStatusInfo($status)\n{\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\tswitch($status)\n\t{\n\t\tcase VM_STATE_OFF:\n\t\t\t$out['text'] = $I18N_computerOff;\n\t\t\t$out['imgTag'] = \"<img src=\\\"/gfx/status/red.png\\\" title=\\\"$I18N_computerOff\\\">\";\n\t\t\t$out['icon'] = \"/gfx/status/red.png\";\n\t\t\tbreak;\n\n\t\tcase VM_STATE_PAUSE:\n\t\t\t$out['text'] = $I18N_computerPaused;\n\t\t\t$out['imgTag'] = \"<img src=\\\"/gfx/status/yellow.png\\\" title=\\\"$I18N_computerPaused\\\">\";\n\t\t\t$out['icon'] = \"/gfx/status/yellow.png\";\n\t\t\tbreak;\n\n\t\tcase VM_STATE_ON:\n\t\t\t$out['text'] = $I18N_computerOn;\n\t\t\t$out['imgTag'] = \"<img src=\\\"/gfx/status/green.png\\\" title=\\\"$I18N_computerOn\\\">\";\n\t\t\t$out['icon'] = \"/gfx/status/green.png\";\n\t\t\tbreak;\n\t}\n\n\treturn($out);\n}", "public function GetStatus()\n\t{\n\t\t// Demnach ist der Status in IPS der einzige der vorliegt.\t\t\n\t}", "public function executeItemStatusImage()\r\n\t{\r\n\t\tif (!$this->getRequest()->isXmlHttpRequest()) {\r\n\t\t\tthrow new ControllerException(\"Method not allowed.\");\r\n\t\t}\r\n\r\n\t\t$id = $this->getRequest()->get('id');\r\n\t\t$item = Item::find($id);\r\n\t\t\r\n\t\tif (is_null($item)) {\r\n\t\t\tthrow new ControllerException(\"Item does not exist.\");\r\n\t\t}\r\n\t\treturn json_encode(array(\r\n\t\t\t'id' => $item->getId(), \r\n\t\t\t'img' => $item->getStatusMarkerImage()\r\n\t\t));\r\n\t\t\r\n\t}", "public function status() {\n\t\t$status = \"unknown\";\n\t\t// Get status summary of monitored services.\n\t\t$cmd = new \\OMV\\System\\Process([\"monit\", \"-B\", \"summary\"]);\n\t\t$cmd->setRedirect2to1();\n\t\t$cmd->execute($output);\n\t\t// Parse the command output.\n\t\t// Example:\n\t\t// Monit 5.20.0 uptime: 6m\n\t\t// Service Name Status Type\n\t\t// omv4stretch Running System\n\t\t// rrdcached Running Process\n\t\t// php5-fpm Execution failed | Does... Process\n\t\t// nginx Running Process\n\t\t// omv-engined Not monitored Process\n\t\t// collectd Execution failed | Does... Process\n\t\t// rootfs Accessible Filesystem\n\t\tforeach ($output as $outputk => $outputv) {\n\t\t\t$regex = '/^\\s+([\\S]+)\\s+(.+)\\s+Process$/i';\n\t\t\tif (1 !== preg_match($regex, $outputv, $matches))\n\t\t\t\tcontinue;\n\t\t\tif ($matches[1] !== $this->name)\n\t\t\t\tcontinue;\n\t\t\t$status = trim($matches[2]);\n\t\t\tbreak;\n\t\t}\n\t\treturn mb_strtolower($status);\n\t}", "static function getImgStatus($status, $dias, $diaNuevo) {\n //$activaNuevo = $dias - $diaNuevo;\n\n if ($status == 'Activo' && $dias <= $diaNuevo) {\n $status = 'Nuevo';\n }\n switch ($status) {\n case 'Vendido':\n $styleImg = 'inmVenta';\n break;\n case 'Alquilado':\n $styleImg = 'inmAlquiler';\n break;\n case 'Nuevo':\n $styleImg = 'inmNuevo';\n break;\n default:\n $styleImg = 'inmVacio';\n }\n return $styleImg;\n }", "function iis_get_service_state($service_id)\n{\n}", "public function getCarStatusForTitle(){\r\n\t\tif($this->getCarStatusInterval()<=30){\r\n\t\t\tif($this->getCarStatusValue()==0){\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\t\t\telseif($this->getCarStatusValue()==1){\r\n\t\t\t\treturn '<img src=\"'.HTTP_DOMAIN.'images/layout/status_new_title.png\" style=\"margin-bottom: -5px;\"/>';\r\n\t\t\t}\r\n\t\t\telseif($this->getCarStatusValue()==2){\r\n\t\t\t\treturn '<img src=\"'.HTTP_DOMAIN.'images/layout/status_sold_title.png\" style=\"margin-bottom: -5px;\" />';\r\n\t\t\t}\r\n\t\t}\r\n\t}", "abstract public function GetStatus();", "protected function getImageService() {}", "public function get_common_service_image($id, $type) {\n\n $this->db->select(\"service_image\");\n $this->db->from('services_image');\n $this->db->where(\"service_id\", $id);\n $this->db->where(\"status\", 1);\n if ($type == '1' || $type == 1) {\n $val = $this->db->get()->row_array();\n } else {\n $val = $this->db->get()->result();\n }\n return $val;\n }", "public function getStatus()\n {\n return $this->file->get('status');\n }", "public function getStatusDescription($status = 0){\r\n\t\t$retval=\"gray.gif\";\r\n\t\t\r\n\t\tif($status == 0){\r\n\t\t\t$status = $this->status;\r\n\t\t}\r\n\t\t\r\n\t\tswitch ($status) {\r\n\t\t\tcase 1: $retval = \"Angelegt\";break;\r\n\t\t\tcase 2: $retval = \"Gesendet u. Bestellt\";break;\r\n\t\t\tcase 3: $retval = \"In Bearbeitung\";break;\r\n\t\t\tcase 4: $retval = \"Fertig u. im Versand\";break;\r\n\t\t\tcase 5: $retval = \"Fertig u. Abholbereit\";break;\r\n\t\t\tdefault: $retval=\"...\";\r\n\t\t}\r\n\t\treturn $retval;\r\n\t}", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function getStatus();", "public function status() {\n\t\treturn self::STATUS_DESCRIPTIONS[$this->status];\n\t}", "public function callGetServiceStatus() {\n\t\t$requestArray = $this->signArray();\n\t\treturn $this->getServiceStatus($requestArray);\n\t}", "public function getImageStatus(VarMap $varMap, ImageJobRepo $imageJobRepo)\n {\n if ($varMap->has('job_id') !== true) {\n return new JsonResponse([\n 'error' => \"job_id not set\"\n ]);\n }\n\n\n $job_id = $varMap->get('job_id');\n $status = $imageJobRepo->getJobStatus($job_id);\n\n return new JsonResponse([\n 'job_status' => $status,\n ]);\n }", "function getImageCode($image,$path,$conf,$altText)\t{\n\t\t$conf['file'] = $path . $image;\n\t\t// for the online_service_list we want to display thumbnails of the service images!\n\t\tif($this->piVars['mode'] == 'online_services'){\n\t\t\t$conf['file.'] = array('maxH' => 100, 'maxW' => 100);\n\t\t}\n\t\t$conf['altText'] = $altText;\n\t\treturn $this->cObj->IMAGE($conf);\n\t}", "public function status() {\n\t\treturn self::STATUS_DESCRIPTIONS[$this->oehhstat];\n\t}", "abstract public function getStatus();", "function getStatus();", "function getStatus() ;", "function getStatus() ;", "function getStatus() ;", "public function imageExaminationStatus( $image ){ return $this->APICall( array( 'imageExaminationStatus' => $image ), \"Could not look up image status for \" . $image ); }", "function getDetailedStatus() ;", "public function getCarStatus(){\r\n\t\tif($this->getCarStatusInterval()<=30){\r\n\t\t\tif($this->getCarStatusValue()==0){\r\n\t\t\t\treturn '';\t\t\r\n\t\t\t}\r\n\t\t\telseif($this->getCarStatusValue()==1){\r\n\t\t\t\treturn '<div class=\"alert_new\"><img src=\"'.HTTP_DOMAIN.'images/layout/status_new.png\"/></div>';\t\t\r\n\t\t\t}\r\n\t\t\telseif($this->getCarStatusValue()==2){\r\n\t\t\t\treturn '<div class=\"alert_new\"><img src=\"'.HTTP_DOMAIN.'images/layout/status_sold.png\"/></div>';\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function status();", "public function status();", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function getStatus() {}", "public function __construct(\n // img service needed params\n string $src = '',\n bool $local = false,\n bool $original = false,\n int $compression = null,\n int $compressionWebp = null,\n int $width = 0,\n int $height = 0,\n string $fit = '',\n string $position = '',\n bool $greyscale = false,\n string $colorize = '',\n // this core component specific options\n string $tag = 'span',\n string $href = '',\n string $alt = '',\n bool $immediate = false,\n bool $thumb = true,\n bool $fixed = false,\n string $bgColor = '',\n bool $cage = true,\n string $cssFit = 'cover',\n bool $progress = false,\n string $attrsRoot = '',\n string $attrs = ''\n ) {\n $img = new ImgService($src, [\n 'local' => $local,\n 'original' => $original,\n 'compression' => $compression,\n 'compressionWebp' => $compressionWebp,\n 'w' => $width,\n 'h' => $height,\n 'fit' => $fit,\n 'position' => $position,\n 'greyscale' => $greyscale,\n 'colorize' => $colorize,\n ]);\n\n $this->img = $img->getMeta();\n $this->tag = $href ? 'a' : $tag;\n $this->href = $href;\n $this->alt = $alt;\n $this->immediate = $immediate;\n $this->thumb =\n $thumb && $this->img['thumb']\n ? $this->img['thumb']\n : 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';\n $this->fixed = $fixed;\n $this->bgColor = $bgColor;\n $this->cage = $cage;\n $this->cssFit = $cssFit;\n $this->progress = $progress;\n $this->attrsRoot = $attrsRoot;\n $this->attrs = $attrs;\n }", "public function status() {\r\n\t\treturn self::request(self::HTTP_GET, 'status');\r\n\t}", "function getStatusString() {\n\t\tswitch ($this->getData('status')) {\n\t\t\tcase THESIS_STATUS_INACTIVE:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status.inactive';\n\t\t\tcase THESIS_STATUS_ACTIVE:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status.active';\n\t\t\tdefault:\n\t\t\t\treturn 'plugins.generic.thesis.manager.status';\n\t\t}\n\t}", "public function status()\n {\n $response = $this->call(Request::METHOD_GET, '/api/v1/status');\n return $response->getApiData();\n }", "abstract protected function getStatusesInfos();", "function api_status()\n{\n $result;\n return _do_api_call('GET', '/api/v1/status', null, $result);\n}", "function getStatus() {\n return $this->status;\n }", "function VM_getStatus($clientName)\n{\n\t$info = VM_getSWandHost($clientName);\n\n\t//Create the status command string and execute it on the VM host\n\t$cmd = VM_status($info['vmSoftware'], $clientName);\n\n// \tprint(\"<pre>$cmd</cmd>\");\n\n\t$ret = CLIENT_executeOnClientOrIP($info['vmHost'],\"VM_status\",\"$cmd\",\"m23-vbox\",false);\n\treturn(VM_parseStatus($info['vmSoftware'],$ret));\n}", "function getStatus() {\n\t\treturn $this->getData('status');\n\t}", "public function getFormattedStatus(): string;", "function theme_simplenews_status($variables) {\n $source = $variables['source'];\n $status = $variables['status'];\n switch ($source) {\n case 'published':\n $images = array(\n 0 => 'images/sn-saved.png',\n 1 => 'images/sn-sent.png',\n );\n $title = array(\n 0 => t('Not published'),\n 1 => t('Published'),\n );\n break;\n case 'activated':\n $images = array(\n 0 => 'images/sn-saved.png',\n 1 => 'images/sn-sent.png',\n );\n $title = array(\n 0 => t('Inactive: no newsletters will be sent'),\n 1 => t('Active: user will receive newsletters'),\n );\n break;\n case 'sent':\n $images = array(\n SIMPLENEWS_STATUS_SEND_PENDING => 'images/sn-cron.png',\n SIMPLENEWS_STATUS_SEND_READY => 'images/sn-sent.png',\n );\n $title = array(\n SIMPLENEWS_STATUS_SEND_NOT => t('Not yet sent'),\n SIMPLENEWS_STATUS_SEND_PENDING => t('Currently sending by cron'),\n SIMPLENEWS_STATUS_SEND_READY => t('Sent'),\n SIMPLENEWS_STATUS_SEND_PUBLISH => t('Send on publish'),\n );\n break;\n }\n\n // Build the output\n if (isset($images[$status])) {\n $img_vars = array(\n 'path' => drupal_get_path('module', 'simplenews') . '/' . $images[$status],\n 'alt' => $title[$status],\n 'title' => $title[$status],\n 'getsize' => TRUE,\n );\n $output = theme('image', $img_vars);\n }\n else {\n $output = check_plain($title[$status]);\n }\n return $output;\n}", "function VM_status($type, $vmName)\n{\n\tswitch ($type)\n\t{\n\t\tcase VM_SW_VBOX:\n\t\t\t$cmd = \"VBoxManage showvminfo \\\"$vmName\\\" | grep \\\":\\\" | tr -s [':blank:'] 2>&1 | cat\";\n\t\t\tbreak;\n\t}\n\treturn($cmd);\n}", "public function getStatus() {\n return $this->status;\n }", "public function getStatus() {\n return $this->status;\n }", "public function get_status()\n {\n }", "public function get_status()\n {\n }", "function service_information() {\r\n\t\t$return_value = '<service name=\"' . $this->basename . '\">'\r\n\t\t. '<port name=\"' . $this->basename . 'Port\" binding=\"tns:' . $this->basename . 'Binding\">'\r\n\t\t. '<soap:address location=\"' . $this->api_url . '\"/>'\r\n\t\t. '</port>'\r\n\t\t. '</service>';\r\n\r\n\t\treturn $return_value;\r\n\t}", "function getStatus()\n {\n $url = API_URL . 'status';\n $xml = simplexml_load_file($url);\n return array(\n array(\n 'round' => $xml->round,\n 'state' => $xml->state,\n 'desc' => $xml->desc\n )\n );\n }", "function getStatus() \n {\n return $this->instance->getStatus();\n }", "function getStatus()\n {\n return $this->status;\n }", "public function status(): string;", "public function getServiceStatus($request);", "function get_status()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_STATUS);\r\n }", "public function getImage()\n {\n // merge text options with generation options\n $queryArgs = array_merge(\n $this->getOptions(),\n array(\n \t'text' => $this->getText(),\n )\n );\n \n $url = self::GENERATOR_SERVICE_URL . '?' . http_build_query($queryArgs);\n \n // Set curl options and execute the request\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\n $result = curl_exec($ch);\n \n // if the request fails, throw exception\n if ($result === false) {\n require_once 'Ncstate/Brand/Exception.php';\n throw new Ncstate_Brand_Exception('CURL Error: ' . curl_error($ch));\n }\n \n $im = imagecreatefromstring($result);\n curl_close($ch); \n \n return $this->_store($im);\n }", "public function getStatus(){\n\t\treturn $this->status;\n\t}", "function get_status() {\n return $this->status;\n }", "public function getStatus()\r\n {\r\n return $this->status;\r\n }", "public function getStatus()\r\n {\r\n return $this->status;\r\n }", "function createServiceStatus(){\n\t\t\t$serviceStatusRepo = new serviceStatusRepository;\t\t\t\n\t\t\t$serviceStatusRepo->createServiceStatus($_POST['ServiceID'], $_POST['ServiceOwnerID'], $_POST['RequesterUserID']);\n\t\t}", "public function getSinglePhotoStatus(): PhotoStatus\n {\n throw new DownloadException(\n sprintf('Cannot call %s from %s', __METHOD__, static::class)\n );\n }", "public function getStatus()\n {\n return $this->_makeCall('status');\n }", "public function interview_status_cls($status){\n\t\tif($status == 'Scheduled' || $status == 'Re-Scheduled'){\n\t\t\t $stat = 'info';\n\t\t}elseif($status == 'OnHold'){\t\n\t \t\t $stat = 'warning';\t\n\t\t}elseif($status == 'Rejected'){\n\t\t\t$stat = 'important';\t\n\t\t}elseif($status == 'Qualified'){\n\t\t\t$stat = 'success';\t\n\t\t}elseif($status == 'Cancelled'){\n\t\t\t$stat = '';\t\n\t\t}\n\t\treturn $stat;\n\t}", "public function status()\n {\n return $this->status->get($this->entity->status);\n }" ]
[ "0.7264797", "0.67785585", "0.6753869", "0.66771245", "0.64746886", "0.64118284", "0.63943005", "0.6038153", "0.5919974", "0.59151", "0.58864343", "0.585254", "0.584792", "0.5790245", "0.5774487", "0.57714087", "0.5746902", "0.5722838", "0.5722755", "0.5718525", "0.57140666", "0.5709771", "0.5709771", "0.5709771", "0.5709771", "0.5709771", "0.5709771", "0.5709771", "0.5709771", "0.5709771", "0.5709771", "0.5704622", "0.569646", "0.5637357", "0.56123143", "0.5606171", "0.5581389", "0.5577923", "0.55657053", "0.55657053", "0.556569", "0.5541598", "0.55375063", "0.5502865", "0.5493286", "0.5493286", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.54895455", "0.5488818", "0.5488818", "0.5488818", "0.5488818", "0.54775697", "0.5455755", "0.5447942", "0.54472786", "0.54465413", "0.54379815", "0.5416465", "0.5414902", "0.54087245", "0.53984153", "0.53945124", "0.53895783", "0.5388262", "0.5388262", "0.5380163", "0.5380163", "0.53747976", "0.53654337", "0.53567815", "0.5350178", "0.53375167", "0.53289235", "0.53287524", "0.5324569", "0.531446", "0.53123283", "0.53069377", "0.53069377", "0.5300854", "0.5298106", "0.5297821", "0.52939427", "0.5285179" ]
0.64142114
5